NIMCET 2017 Computer PYQ — Which of the following is the representation of decimal number (-… | Mathem Solvex | Mathem Solvex
Tip:A–D to answerE for explanationV for videoS to reveal answer
NIMCET 2017 — Computer PYQ
NIMCET | Computer | 2017
Which of the following is the representation of decimal number (- 147) in 2’s compliment notation on a12-bit machine ?
Choose the correct answer:
A.
111101101100
B.
110001001101
C.
111101101101
(Correct Answer)
D.
000001101101
Correct Answer:
111101101101
Explanation
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)=11111111101101101100
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: 11111111101101100+1=111111111101101101
−147(10)=1111111101101101
Explanation
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)=11111111101101101100
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: 11111111101101100+1=111111111101101101