View Single Post
Old May 15th, 2008, 12:22 PM   #1
nannu
Newbie
 
Join Date: Apr 2008
Posts: 19
Rep Power: 0 nannu is on a distinguished road
MARIE a sample computer ARCH

Hey guys, Im stydying for the final in the class. I have posted for other things. But one of the questions for the review is:
QUESTION:
In a computer instruction format, the instruction length is 11 bits and the size of an address field is 4 bits. Is it possible to have
5 2-address instructions
45 1-address instructions
32 0-address instructions

EXAMPLE:
For the sample I looked at, it shows that it is possible to have
15 instructions with 3 addresses
14 instructions with 2 addresses
31 instruction with 2 addresses
16 instructions with 0 addresses

0000 R1 R2 R3
<----- 15 3 address code
1110 R1 R2 R3

1111 0000 R1 R2
<----- 14 2 address codes
1111 1101 R1 R2

The book tells that there are two ways to set this up.
| | | | | | | | | | | | | | | | | | | | | | | | | |
opcode address 1 address 2 address 3
or
| | | | | | | | | | | | | | | | | | | | | |
opcode address 1

How can I understand the part in red to be able to answer the review question that I posted above. What are the two examples saying.
Thanks in advance
nannu is offline   Reply With Quote