edited by
3,634 views
0 votes
0 votes

A computer uses a memory unit of $512\:K$ words of $32$ bits each. A binary instruction code is stored in one word of the memory. The instruction has four parts: an addressing mode field to specify one of the two-addressing mode (direct and indirect), an operation code, a register code part to specify one of the $256$ registers and an address part. How many bits are there in addressing mode part, opcode part, register code part and the address part?

  1. $1, 3, 9, 19$
  2. $1, 4, 9, 18$
  3. $1, 4, 8, 19$
  4. $1, 3, 8, 20$
edited by

1 Answer

1 votes
1 votes
There are 2 addressing modes.

So we need $\lceil log_22 \rceil=1$ bit for addressing mode part.

There are 256 registers.

So we need $\lceil log_2{256} \rceil=8$ bits for identifying a register. i.e register code part needs 8 bits.

There are 512K words.i.e $512*2^{10}=2^{19}$ words

So we need $\lceil log_2{2^{19}} \rceil=19$ bits for identifying a word. i.e,address part needs 19 bits.

So remaining bits of 32 bits are used to identify a instruction. i.e opcode.

So opcode has $32-(1+8+19)=32-28=4$ bits

Hence the computer can support upto 16 instructions.

So option c is the correct answer.

Related questions

1 votes
1 votes
2 answers
1
4 votes
4 votes
6 answers
3
soujanyareddy13 asked May 12, 2021
1,938 views
The Boolean expression $AB+A \overline{B}+\overline{A}C+AC$ is unaffected by the value of the Boolean variable _________.$A$$B$$C$$A, B$ and $C$