GATE Computer ScienceHardGATE CS (PYQ pattern)
An 8-bit ALU adds the two's complement numbers 0x9C and 0xB5. After the addition the carry (C), overflow (V) and sign (N) flags are respectively:
- A. C = 1, V = 1, N = 0
- B. C = 1, V = 0, N = 1
- C. C = 0, V = 1, N = 0
- D. C = 1, V = 0, N = 0
Correct answer: A. C = 1, V = 1, N = 0
0x9C + 0xB5 = 0x151, so the 8-bit result is 0x51 with a carry out (C = 1). Both operands are negative (−100 and −75) but the result 0x51 is positive, so signed overflow occurs (V = 1) and N = 0.
Practise more Computer Organization and Architecture questionsComputer Organization and Architecture: notes and key points
More Computer Organization and Architecture questions
- A disk delivers 4,096,000 bytes/s to memory through a DMA controller in cycle-stealing mode, one 32-bit word at a time. Each word steals…
- Six instructions execute in program order: I1: LW R1, 0(R2) I2: ADD R3, R1, R4 I3: SUB R4, R3, R2 I4: SW R3, 4(R1) I5: AND R1, R4, R3 I6…
- A cache has 4 lines of one word each. The word-address trace 0, 4, 0, 4, 1, 5, 1, 5, 2, 6, 3, 7, 0, 4, 1, 5, 8, 0, 8, 4, 2, 6 is applied…
- A 4-bit non-restoring divider divides the unsigned dividend Q = 1101 (13) by the divisor M = 0011 (3). The accumulator A is 5 bits wide…
- In IEEE 754 single precision (round-to-nearest-even), let a = 2²⁴ = 16777216, b = 1 and c = 1. The two sums S₁ = (a + b) + c and S₂ = a +…
- Three processors P0, P1, P2 use a snooping MESI write-invalidate protocol on one block that is initially invalid everywhere. A read miss…