GATE Computer ScienceModerateGATE CS (PYQ pattern)
A processor encodes branch targets as a 16-bit signed offset relative to the incremented PC in 2-byte instruction units (target = PC + 2 × offset, PC already points to the next instruction). A branch at address 0x4000 has offset field 0xFFF0 (two's complement). What is the target address?
- A. 0x4022
- B. 0x3FF2
- C. 0x3FE2
- D. 0x3FE0
Correct answer: C. 0x3FE2
0xFFF0 is −16. PC after fetching a 2-byte branch = 0x4002, so target = 0x4002 − 32 = 0x3FE2. Forgetting the PC increment gives 0x3FE0; forgetting the unit scaling gives 0x3FF2.
Practise more Computer Organization and Architecture questionsComputer Organization and Architecture: notes and key points
More Computer Organization and Architecture questions
- A synchronous 100 MHz bus has a multiplexed 32-bit address/data path. A block read takes 1 address cycle, 3 wait cycles, then one data…
- A memory-mapped device in a 32-bit byte-addressed system is selected when A31 = 1, A30 = 1 and A15–A12 = 0101; A3–A0 select one of its 16…
- An 8 KB cache with 16-byte blocks and 32-bit addresses can be built fully associative or 4-way set-associative. How many more tag bits…
- Processor A runs a program at 3.0 GHz with CPI 1.6. Processor B, with the same ISA and the same compiled program, runs at 2.4 GHz. What is…
- A write-back cache has 64-byte blocks, 2 ns hit time and 5% miss rate. Over an 8-byte bus, memory delivers the first 8 bytes 60 ns after a…
- An 8 × 8 matrix is stored in 8 memory banks. A bank is busy for 6 cycles after an access starts (an access started in cycle t completes at…