324_Book

# Note that printf does not make use of any type

This preview shows page 1. Sign up to view the full content.

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: tations to derive a numerical relationship. Comparing Equations 2.1 and 2.2, we can see that for bit pattern Ü, if we compute the difference ¾Í Û ´Üµ ¾Ì Û ´Üµ, the weighted sums for bits from 0 to Û ¾ will cancel each other, leaving a value: ¾Í Û ´Üµ ¾Ì Û ´Üµ ÜÛ ½ ´¾Û ½ ¾Û ½ µ ÜÛ ½ ¾Û . This gives a relationship ¾Í Û ´Üµ ÜÛ ½ ¾Û · ¾Ì Û ´Üµ. If we let Ü ¾Ì Û ´Üµ, we then have ¾Í Û ´Ì¾ Û´ Üµµ Ì¾Í Û ´Üµ Ü ½ ¾ Û Û · Ü (2.3) This relationship is useful for proving relationships between unsigned and two’s complement arithmetic. In the two’s complement representation of Ü, bit ÜÛ ½ determines whether or not Ü is negative, giving Ì¾Í Û ´Üµ ´ Ü·¾ Ü Û Ü Ü ¼ ¼ (2.4) Figure 2.11 illustrates the behavior of function Ì¾Í . As it illustrates, when mapping a signed number to its unsigned counterpart, negative numbers are converted to large positive numbers, while nonnegative numbers remain unchanged. Practice Problem 2.14: Explain how Equation 2.4 applies to the entries in the table you generated when solving Problem 2.13. Going in th...
View Full Document

## This note was uploaded on 09/02/2010 for the course ELECTRICAL 360 taught by Professor Schultz during the Spring '10 term at BYU.

Ask a homework question - tutors are online