1.
To
represent negative numbers, WE NEED A NOTATION FOR NEGATIVE VALUES.
2.
The
convention is to make the sign bit 0 for positive and 1 for negative.
3.
The
user determines whether the number is signed or unsigned:
a.
If
the binary number is signed, then the leftmost bit represents the sign and the
rest of the bits represent the number.
b.
If
the binary number is assumed to be unsigned, then the leftmost bit is the most
significant bit of the number.
0101
ü 5 (unsigned number)
ü +5 (signed
number) (leftmost bit is 0)
1101
ü 13 (unsigned
number)
ü -5 (signed
number) (leftmost bit is 1)
NOTE: There is no
confusion in identifying the bits if the type of representation for the number
is known in advance.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.