8.2k views
2 votes
The instruction format of a computer is given by one indirect bit, opcode bits, register address bits, immediate operand bits and memory address bits. It occupies one memory word of 64 bits.

a- How many memory addresses can be generated if the memory size is 1 Giga Bytes (Giga-2)? Number of addresbits Number of addresses
b- Complete the missing fields in the following instruction format, given that the number of opcodes is 128, the immediate operand field occupies 24 bits and the instruction occupies one memory word Opcode Register address Immediate operand Memory address
c- If the immediate value is increased by combining it with the address field in the above instruction. Find the largest positive and smallest negative immediate values that can be stored on the address field, before and after combining it with the address field. Range before combining (+ Range after combining-+

1 Answer

2 votes

Answer:

Following are the answer to this question:

Step-by-step explanation:

A)

The memory size is 1 Giga Bytes which is equal to
2^(30)


\texttt{Number of address bits \ \ \ \ \ \ \ \ \ \ \ \ \ \ Number of addresses}\\\\ \ \ \ \ 30 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 2^(30)= 1073741824

B)
\texttt{I \ \ \ Opcode \ \ \ Register address \ \ \ Immediate operand \ \ \ Memory address}\\\\\\\textt{1 \ bit \ \ \ \ \ \ 128 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 2 \ bits \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 24 \ bits \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 30 \ bits}\\\\\\
= 2^7 \\\\ = 7 \ bits

calculating the register Bits:


= 64-(1+7+24+30)\\\\=64 -62\ \ bits\\\\= 2\ \ bits\\

C)

Immediate value size while merging the additional benefit with the address field:


= 2^(24) + 2^(30)\\\\= 2^(54)\\\\
\texttt{Range before combining(-,+) 24 bits \ \ \ \ \ \ Range after combining( -,+)54bits}\\\\
\textt{-2^(12) from + (2^(12)-1) \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ -2^(27) from + (2^(27)- 1)}


= (24)/(2) = 12\\\\= (54)/(2) = 27

The range is accomplished by dividing the bits by 2 into the two sides of the o and the number is one short to 0.

User Rohanthewiz
by
6.5k points