GATE Computer ScienceModerateGATE CS (PYQ pattern)

Which statements about 8-bit number representations are correct? I. In one's complement, 0xFE + 0x02 with end-around carry gives 0x01. II. Sign-extending the two's-complement byte 0x9C to 16 bits gives 0xFF9C. III. In sign-magnitude, 0x80 and 0x00 both represent zero. IV. In excess-128 (bias 128) code, 0x7F represents 0.

  1. A. II and III only
  2. B. I, II, III and IV
  3. C. I, II and III only
  4. D. II, III and IV only

Correct answer: C. I, II and III only

I: 0xFE is −1 in one's complement; 0xFE + 0x02 = 0x100, and adding the carry back gives 0x01 = +1 (true). II: 0x9C has MSB 1, so the high byte is 0xFF (true). III: +0 and −0 (true). IV: in excess-128, 0x80 is 0 and 0x7F is −1 (false); 0x7F is 0 only in excess-127.

More Computer Organization and Architecture questions

Exams that ask this topic