Which of the following is the representation of decimal number (- 147) in 2’s compliment notation on a 12-bit machine ?

Which of the following is the representation of decimal number (- 147) in 2’s compliment notation on a 12-bit machine ? Correct Answer 111101101101

The Correct Answer is 111101101101.

  • Conversion of  (-147) to a signed binary in 2's complement representation:
  • The positive version of the number: |-147| = 147
  • Divide the number repeatedly by 2 to get the binary form of (147): We stop when we get a quotient that is equal to zero.
  • We will get the binary number: 147(10) = 10010011(2)
  • The Positive binary computer representation on 16 bits (2 Bytes): Add extra 0's in front (to the left) of the base 2 number, up to the required length, 16: 147(10) = 0000000010010011
  • Get the negative integer number representation on 16 bits: !(0000000010010011) = 1111111101101100
  • To get the negative integer number representation on 16 bits (2 Bytes), the signed binary two's complement, add 1 to the number calculated above: 1111111101101100 + 1 = 1111111101101101
  • -147(10) = 1111111101101101

Related Questions

Given two processes (conversion of postfix equation to infix notation and conversion of prefix notation to infix notation), which of the following is easier to implement?
Convert the following dotted-decimal notation to binary notation – 111.56.45.78
Which is the correct method to obtained 10’s compliment of a decimal number