Our result shows that even then we will get the same

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

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: this analysis we can define the two’s complement negation operation -tÛ for Ü in the range ¾¾ ½ Ü ¾Û ½ as: -Û Ü t ´ Ü ¾ Û ½ Ü Ü ¾ ¾ Û Û ½ ½ (2.13) Practice Problem 2.19: We can represent a bit pattern of length Û with a single hex digit. For a two’s complement interpretation of these digits, fill in the following table to determine the additive inverses of the digits shown. Ü Hex 0 3 8 A F Decimal -t Decimal Ü Hex What do you observe about the bit patterns generated by two’s complement and unsigned (Problem 2.17) negation. 2.3. INTEGER ARITHMETIC 61 A well-known technique for performing two’s complement negation at the bit level is to complement the bits and then increment the result. In C, this can be written as ˜x + 1. To justify the correctness of this technique, observe that for any single bit Ü , we have ˜Ü ½ Ü . Let Ü be a bit vector of length Û and Ü ¾Ì Û ´Üµ be the two’s complement number it represents. By Equation 2.2, the complemented bit vector ˜Ü has numeric value ¾Ì Û ´˜Üµ Ü ´½...
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