This preview shows page 1. Sign up to view the full content.
Unformatted text preview: n 0x3039, while mx has hexadecimal representation 0xCFC7. Expanding these into binary we get bit patterns ¼¼½½¼¼¼¼¼¼½½½¼¼½ for x and ½½¼¼½½½½½½¼¼¼½½½ for mx. As Figure 2.10 shows, Equation 2.2 yields values 12,345 and 12,345 for these two bit patterns. 2.2.3 Conversions Between Signed and Unsigned
Since both ¾Í Û and ¾Ì Û are bijections, they have well-deﬁned inverses. Deﬁne Í¾ Û to be ¾Í ½ , Û and Ì¾ Û to be ¾Ì ½ . These functions give the unsigned or two’s complement bit patterns for a numeric ¾ value. Given an integer Ü in the range ¼ Ü ¾Û , the function Í¾ Û ´Üµ gives the unique Û-bit unsigned representation of Ü. Similarly, when Ü is in the range ¾Û ½ Ü ¾Û ½ , the function Ì¾ Û ´Üµ gives the unique Û-bit two’s complement representation of Ü. Observe that for values in the range ¼ Ü ¾Û ½ , both of these functions will yield the same bit representation—the most signiﬁcant bit will be 0, and hence it does not matter whether thi...
View Full Document
- Spring '10
- The American