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 (1’s become 0’s and 0’s become 1’s), 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 1’s. 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, positive integer, simple onoroff LEDs, 2scomplement 1byte integer

Click to edit the document details