To find the size of each instruction, we calculate the number of bits required for each field:
Opcode: For 12 instructions, bits needed = ⌈log212⌉=4 bits.
Source Register 1: For 64 registers, bits needed = ⌈log264⌉=6 bits.
Source Register 2: Bits needed = ⌈log264⌉=6 bits.
Destination Register: Bits needed = ⌈log264⌉=6 bits.
Immediate Value: Given as 12 bits.
Total bits per instruction:
Total bits=4+6+6+6+12=34 bits Since instructions must be stored in a byte-aligned fashion (multiples of 8 bits / 1 byte):
Bytes per instruction=⌈834⌉=5 bytes For a program of 100 instructions:
Total memory consumed=100×5 bytes=500 bytes