GATE Computer ScienceHardGATE CS (PYQ pattern)

A processor compares A = 0xF0 with B = 0x10 using an 8-bit subtraction A − B and sets flags like a normal ALU. Which statement describes the branch outcomes correctly?

  1. A. Unsigned 'higher' is true, and signed 'less than' is false
  2. B. Unsigned 'higher' is false, and signed 'less than' is true
  3. C. Unsigned 'higher' is true (A > B), and signed 'less than' is true (A < B)
  4. D. Unsigned 'higher' is false, and signed 'less than' is false

Correct answer: C. Unsigned 'higher' is true (A > B), and signed 'less than' is true (A < B)

As unsigned, 240 > 16; as signed, 0xF0 = −16 < 16. The subtraction gives 0xE0; unsigned condition 'higher' tests the borrow/carry and Z, signed 'less' tests N ⊕ V (N = 1, V = 0), whichever carry convention is used.

More Computer Organization and Architecture questions

Exams that ask this topic