(2)Memory representation of: signed char a=-7;
Binary
equivalent of data 7 in eight bit: 00000111
Binary
equivalent of data -7 will be its 2’s complement:
1’s
complements of 0000 0111 is 1111 1000
2’s
complement will be:
Binary
equivalent of data -7 in eight bit: 1111 1001
Data
bit: 1111001 (Take first seven bit form right side)
Sign
bit: 1 (Take
leftmost one bit)
No comments:
Post a Comment