This preview shows page 1. Sign up to view the full content.
Unformatted text preview: word is reserved for a sign-bit (0 is positive, 1 is negative) and the rest of the word is the magnitude of the output. Hence, the output -8 V and + 8 V differ only in the sign bit. But this is not the negative-integer convention for most computers. Most computers use 2s-complement representation of negative integers. Forming a negative integer from a positive integer requires two steps: first, all bits in the positive integer are complemented (1s become 0s and 0s become 1s), then binary 1 is added. For instance, to get -1, start with +1 (all 0s except the lowest order bit is 1), then add binary 1. The result is all 1s. Similarly the -2 is all 1s except the lowest-order bit of 0. Code a VI that accepts a 1-byte signed-integer number between -127 and 128 and displays the resulting bit pattern for the 2s-complement 1-byte integer....
View Full Document
- Fall '10