The Student Room Group

CPT4 question help

Explain how/why you got the answer please, always forget this.

1) A processor with an instructtion format of 16bits and a word length of 16 bits is being used.

Integers are stored in 2's complement form. What is the possible range of integers that can be stored in a 16bit word?

2) The instruction format uses 6 bits for the operator and 10 bits for the operand.

If diret addressing is used, what is the highest address possible?

__

Cheers
Reply 1
the smallest number is -2^15
the biggest number is (2^15)-1

If you think about a small set of numbers, say 4 bits.
-8 4 2 1

the smallest number is

1 0 0 0 [-8, or -2^3]

and the biggest number is
0 1 1 1 [7, or (2^3) -1]



ii)

The 10 bits for the operand will be used for addressing. You dont have negative addressing so it wont be stored in twos complement, so the maximum number is
(2^10)-1


I'm so not looking forward to CPT4 tommorow, it seems hellish hard, and there are so many definitions i dont know. Hopefully the UMS will be low :s-smilie:

Latest

Trending

Trending