Addresses in decimal,binary,octal and hexadecimal

716 Views Asked by At

One of the first minicomputers, the PDP-8 had a word size of 12 bits. (Recall the word size of a computer refers to the number of bits used to encode addresses.) what was the last address in this computer's memory space in decimal, binary, octal and hexadecimal?

I am stuck at this question. How do we know the last addresses in all four of these. Anyone know?

3

There are 3 best solutions below

8
On

The first address is when no bits are triggered (i. e. basically $0$ in any base), and the last address is when every bit is triggered (i. e. $111111111111$ in binary, $FFF$ in hexa, etc.)

1
On

Hint: Recall that the maximum number that can be stored in n bits is $2^n-1$

$$ \begin{align} &\text{Decimal:} &2^{12}-1 &\quad= 2^{12}-1 &= 4096_{10}-1\\ &\text{Octal:} &2^{3^4}-1 &\quad= 8^4-1 &= 10000_8-1\\ &\text{Hexa:} &2^{4^3}-1 &\quad= 16^3-1 &= 1000_{16}-1 \end{align} $$

0
On

12 bits so 2^12 - 1

Decimal -> 4095

Hexadecimal -> FFF

Octal -> 777

Binary -> 111111111111

You can see in the BInary representation, all 12 bits are filled to the brim with 1s. Thus this would logically be the last address.