Home » Computer Organization and Architecture » Computer organization and architecture miscellaneous » Question

Computer organization and architecture miscellaneous

Computer Organization and Architecture

  1. Consider a processor with 64 registers and an instruction set of size twelve. Each instruction has five distinct fields, namely, opcode, two source register identifiers, one destination register identifier, and a twelve-bit immediate value. Each instruction must be stored in memory in a byte-aligned fashion. If a program has 100 instructions, the amount of memory (in bytes) consumed by the program text is ________.
    1. 500
    2. 100
    3. 243
    4. 150
Correct Option: A

Given No. of registers = 64
Required No. of bits to address registers = log2 64 = 6
Given No. of instructions = 12
∴ Opcode size = log2 12 = 4
Opcode + 3 reg address + 12 bit immediate value

Total bits per instruction = 34
Total bytes per instruction = 4.25
Due to byte alignment 0.75 byte will waste while storing 4.25 bytes.
Total no. of bytes per instruction = 5
Total no. of instructions = 100
Total size = No. of Instructions × Size of Instruction = 100 × 5 = 500 Bytes



Your comments will be displayed only after manual approval.