GATE Computer ScienceHardGATE CS (PYQ pattern)
A 16-bit instruction set has 4-bit address fields and expanding opcodes: three-address instructions use a 4-bit opcode, two-address instructions take unused 4-bit prefixes and extend into one address field, and one-address instructions extend further in the same way. The design needs exactly 30 two-address instructions and at least 250 one-address instructions. What is the largest number of three-address instructions possible?
- A. 14
- B. 13
- C. 15
- D. 12
Correct answer: B. 13
With x three-address codes, (16 − x) × 16 two-address codes exist; after 30 are used, ((16 − x) × 16 − 30) × 16 one-address codes remain. Need ≥ 250 → (16 − x) × 16 ≥ 46 → 16 − x ≥ 3 → x ≤ 13. Check x = 14: (32 − 30) × 16 = 32 < 250.
Practise more Computer Organization and Architecture questionsComputer Organization and Architecture: notes and key points
More Computer Organization and Architecture questions
- A RISC machine has 32-bit (4-byte) instructions at word-aligned addresses and a PC-relative branch with a 12-bit signed offset field…
- A direct-mapped cache has 8 lines (block = 1 word). A program issues block references [0, 8, 0, 8, 1, 9, 1, 9, 2, 10, 2, 10, 0, 8, 1, 9]…
- An 8-bit CPU adds the 16-bit two's-complement numbers 0x7F9C and 0x00A7 with ADD on the low bytes followed by ADC (add with carry) on the…
- A disk spins at 7200 rpm with 400 sectors of 512 B per track, an average seek of 9 ms and a 0.2 ms controller overhead. A 64 KB block (1…
- A DMA controller uses cycle stealing and may take at most 20% of the bus cycles. Bus 1 is 32 bits wide with a 50 ns cycle; bus 2 is 64…
- Ideal CPI is 1. Every instruction fetch misses the L1 I-cache 2% of the time; 30% of instructions are loads/stores and miss the L1 D-cache…