GATE Computer ScienceVery hardGATE CS (PYQ pattern)
An 8-bit ALU computes 0x50 − 0xB0 by adding 0x50 to the two's complement of 0xB0. What are the result and the signed-overflow flag V?
- A. 0x60 with V = 1
- B. 0x1A0 with V = 1
- C. 0xA0 with V = 0
- D. 0xA0 with V = 1
Correct answer: D. 0xA0 with V = 1
0x50 = +80 and 0xB0 = −80, so the true result +160 is outside −128..127: the byte 0xA0 (−96) is wrong and V = 1. A − B with A positive and B negative giving a negative result is the overflow case.
Practise more Computer Organization and Architecture questionsComputer Organization and Architecture: notes and key points
More Computer Organization and Architecture questions
- A processor has a 64-entry fully associative TLB, 4 KB pages, and a data cache of 512 KB. A program sweeps through an array of 1 MB…
- A 32 KB cache with 64-byte blocks and 36-bit physical addresses is 4-way set-associative. If the associativity is doubled (8-way) while…
- A stack machine evaluates the sum of 16 distinct variables arranged as a perfectly balanced binary tree of additions (addition is…
- A program has three disjoint parts: 20% not improvable, 30% sped up 5× by a vector unit, and 50% sped up 2× by a faster memory. What is…
- In IEEE 754 single precision with round-to-nearest-even, let x = 2²³ = 8,388,608. What are the results of (x + 0.5) + 0.5 and x + (0.5 +…
- A classic 5-stage pipeline (IF, ID, EX, MEM, WB) runs: I1: ADD R1, R1, R2; I2: ADD R3, R1, R4; I3: ADD R5, R3, R1; I4: LW R6, 0(R5); I5…