A processor has 64 registers and 12 instructions. Each instruction contains opcode, two source-register fields, one destination-register field and a 12-bit immediate. Instructions are byte-aligned. How many bytes store 100 instructions?
Opcode width is $\lceil\log_2 12\rceil=4$ bits; each register needs 6. Total length is 4+3×6+12=34 bits. Byte alignment rounds each instruction to 40 bits, or 5 bytes. Thus 100 instructions occupy 500 bytes.
More Instruction Set and Addressing Modes questions
GATE 2013 CS (CS1) Q38– Micro-operations are MBR←PC; MAR←X; PC←Y; Memory←MBR. Which operation can they implement?
GATE 2011 CS (CS1) Q31– LW R1,20(R2) loads a 32-bit word at address 20+contents(R2) into R1. Which offered…
GATE 2015 CS (CS2) Q54– Memory is byte-addressable; PC, PSW and other registers are 2 bytes. An upward-growing…
GATE 2021 CS (CS2) Q54– The same two bytes interpreted as an unsigned integer have a little-endian numerical value…
GATE 2026 CS (CS1) Q14– Match each addressing mode in List I with a data element or an element of a data structure…
GATE 2026 CS (CS1) Q15– Consider a processor P whose instruction set architecture is the load-store architecture.…