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
মোঃ আরিফুল ইসলাম
Feb 20, 2025