1
votes

I have a question about two's complement representation, the question says convert the decimal number 7710 into 8-bit binary two’s complement:

7710 divide by 2 = 3855 remainder 0
3855 divide by 2 = 1927 remainder 1
1927 divide by 2 = 963 remainder 1
963 divide by 2 = 481 remainder 1
481 divide by 2 = 240 remainder 1
240 divide by 2 = 120 remainder 0
120 divide by 2 = 60 remainder 0
60 divide by 2 = 30 remainder 0
30 divide by 2 = 15 remainder 0
15 divide by 2 = 7 remainder 1
7 divide by 2 = 3 remainder 1
3 divide by 2 = 1 remainder 1
1 divide by 2 = 0 remainder 1

7710 = 1111000011110

1111000011110 + 1 = 1111000011111

I've already found the value but my question is how to represent it in the form of 8-bit ?

Thank you

1

1 Answers

3
votes

You can't. A 8-bit binary two's complement number can only represent number in the range [-128;127]. 7710 is not in this range so you can't represent it.
why -128? because 100 0000 is the lowest number you can represent and that is -128 in decimal representation.
why 127? because 0111 1111 is the highest number you can represent and that is 127 in decimal representation.