Hi guys, I'm a uni student doing a course, I've got 3 Q's about ISA, opcodes and Bit
A processor has 32 registers, uses 16-bit immediates, and has 56 instructions
(corresponding to 56 operation codes) in its ISA. In the instruction set, there are four types of instructions as listed below:
• Type A: takes one source register, uses one destination register;
• Type B: takes two source registers, uses one destination register;
• Type C: takes one source register, one immediate, uses one destination register;
• Type D: takes one immediate, uses one destination register.
Assume that the ISA requires that all instructions be a multiple of 8 bits (1 byte) in length, and the operation codes (opcodes) are of fixed length (i.e., the ISA does not use shorter opcodes for some instructions and longer opcodes for others).
Answer the following questions and write down the calculation steps involved.
a) How many bits do we need to use to encode the opcodes? (8 marks)
b) How many bytes do we need to use to encode the Type-B instruction? (10 marks)
c) How many bytes do we need to use to encode the Type-C instruction? (12 marks)
A processor has 32 registers, uses 16-bit immediates, and has 56 instructions
(corresponding to 56 operation codes) in its ISA. In the instruction set, there are four types of instructions as listed below:
• Type A: takes one source register, uses one destination register;
• Type B: takes two source registers, uses one destination register;
• Type C: takes one source register, one immediate, uses one destination register;
• Type D: takes one immediate, uses one destination register.
Assume that the ISA requires that all instructions be a multiple of 8 bits (1 byte) in length, and the operation codes (opcodes) are of fixed length (i.e., the ISA does not use shorter opcodes for some instructions and longer opcodes for others).
Answer the following questions and write down the calculation steps involved.
a) How many bits do we need to use to encode the opcodes? (8 marks)
b) How many bytes do we need to use to encode the Type-B instruction? (10 marks)
c) How many bytes do we need to use to encode the Type-C instruction? (12 marks)