0

Can somebody please explain this problem to me?

A computer has 20 bit instructions with 8 bit addresses. Suppose that there are 12 two-address instructions. How many 1-address instructions are theoretically possible?

Would the instruction set be set up like this?
0000|00000000|00000000

2
Contributors
7
Replies
8
Views
7 Years
Discussion Span
Last Post by sfrider0
0

Why don't you just count? Each two-address instruction eats up enough of the available instruction space to represent 2 addresses. Each one-address instruction eats up enough of the available instruction space to represent 1 address. If you don't understand what this means, ask.

0

Why don't you just count? Each two-address instruction eats up enough of the available instruction space to represent 2 addresses. Each one-address instruction eats up enough of the available instruction space to represent 1 address. If you don't understand what this means, ask.

Yeah, I'm not really sure what that means.

0

To represent an N-bit value whose value could be anything, you need.... N bits. Which eats up 2^N possible numbers. You have 2^20 available numbers.

0

Ok. I appreciate your help, but I still really don't understand. There is a problem similar to this in our book:

A computer has 32-bit instructions and 12-bit addresses. Suppose there are 250 2-address instructions. How many 1-address instructions can be formulated?

The answer in the book is 6*2^24.

Where do these numbers come from?

0

If there are 32-bit instructions, that means there are 2^32 total values these instructions could have. If addresses are 12 bits, each 2-address instruction has 2^24 values it could have. So subtract the amount of values it could have from the total number of available values and that's how much you have left over.

0

Thank you! That makes so much since to me now. So I take it that you do nothing with the 250?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.