GATE Computer ScienceHardGATE CS (PYQ pattern)
Over all 256 eight-bit patterns, for how many does the value read as sign-magnitude, as one's complement and as two's complement all coincide?
- A. 128
- B. 129
- C. 127
- D. 256
Correct answer: A. 128
Only patterns with MSB 0 (0 to 127) coincide: for any negative pattern, one's complement value is p − 255 and two's complement p − 256 so they never agree. That is 128.
More Digital Logic questions
- The quadratic x² − (13)b·x + (46)b = 0, with coefficients written in base b, has roots 6 and 9. What is b?
- For how many integers n with 2 ≤ n ≤ 30 does the fraction 1/n have a terminating representation in base 6 but a non-terminating one in…
- Values from −1000 to +1000 must be stored with a resolution of at least 0.0001. Design (i) is a two's complement binary fixed-point format…
- How many 8-bit patterns have no two adjacent 1 bits and an even number of 1 bits?
- A memory word uses the (72, 64) SEC-DED code: a Hamming code with 7 check bits over the 64 data bits (71 bits in all), plus an overall…
- An (8, 4) SEC-DED code uses even-parity Hamming bits at positions 1, 2, 4, data bits d1..d4 at positions 3, 5, 6, 7 (positions numbered…