...
Question 6786 – Computer-Organization
May 30, 2024
Question 7049 – Computer-Organization
May 30, 2024
Question 6786 – Computer-Organization
May 30, 2024
Question 7049 – Computer-Organization
May 30, 2024

Question 8133 – Machine-Instructions

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 r 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 _________.

Correct Answer: A

Question 13 Explanation: 
One instruction is divided into five parts,
(i) The opcode- As we have instruction set of size 12, an instruction opcode can be identified by 4 bits, as 24 = 16 and we cannot go any less.

(ii) & (iii) Two source register identifiers- As there are total 64 registers, they can be identified by 6 bits. As they are two i.e. 6 bit + 6 bit.

iv) One destination register identifier- Again it will be 6 bits.

v) A twelve bit immediate value- 12 bit.

Adding them all we get,
4 + 6 + 6 + 6 + 12 = 34 bit = 34/8 byte = 4.25 bytes.
Due to byte alignment total bytes per instruction = 5 bytes.

As there are 100 instructions, total size = 5*100 = 500 Bytes.

A
500 bytes
B
501 bytes
C
502 bytes
D
503 bytes
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!