This preview shows page 1. Sign up to view the full content.
Unformatted text preview: given by bit vector ½½ ¡ ¡ ¡ ½ ÈÛ ½ Û having integer value ÍÅ Ü Û ¾ ½. Thus, the function ¾Í Û can be deﬁned as a mapping ¼¾ Û Û ¾Í Û ¼ ½ ¼ ¾ ½ . Note that ¾Í Û is a bijection—it associates a unique value to each bit vector of length Û, and conversely each integer between 0 and ¾Û ½ has a unique binary representation as a bit vector of length Û. For many applications, we wish to represent negative values as well. The most common computer representation of signed numbers is known as two’s complement form. This is deﬁned by interpreting the most signiﬁcant bit of the word to have negative weight. We express this interpretation as a function ¾Ì Û (for “binary to two’s complement” length Û): ¾Ì Û ´Üµ Ü Û ½¾ Û ½ · Û ¾
¼ Ü¾ (2.2) The most signiﬁcant bit is also called the sign bit. When set to 1, the represented value is negative, and when set to 0 the value is nonnegative. The least representable value is given by bit vector ½¼ ¡ ¡ ¡ ¼ (i.e...
View Full Document