This preview shows page 1. Sign up to view the full content.
Unformatted text preview: word is reserved for a signbit (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 negativeinteger convention for most computers. Most computers use 2scomplement 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 lowestorder bit of 0. Code a VI that accepts a 1byte signedinteger number between 127 and 128 and displays the resulting bit pattern for the 2scomplement 1byte integer....
View
Full
Document
 Fall '10
 LESLIEROSENBERG
 Work

Click to edit the document details