What decimal value does the 8-bit binary number 11011111 have if it is on a computer using signed-magnitude representation?

712 views Asked by At

I am confused on how to present this in decimal value

Would it be just the negative value of 223 or would it be -125?

1

There are 1 answers

0
paddy On

Would it be just the negative value of 223 or would it be -125?

Neither. Signed magnitude representation reserves one bit to represent the sign, and the remaining bits make up the value.

In this case:

  • bits 0-6 are 1011111, which is 95 in decimal
  • bit 7 is 1, meaning the value is negative

So the result is -95.

As for your calculation of -125, it appears you got that backwards. 125 is 1111101 in binary. Definitely got your wires crossed there.