What is the hexadecimal representation?

61 Views Asked by At

A signed number in $2's$ compliment notation with $16-$bit register $P=DFA0$

What is the value of $P*4$?

I have tried $P*4=0111111010000000$ but sign bit changed from $1$ to $0$. What is wrong with my solution?

1

There are 1 best solutions below

1
On

The value overflowed the range of the register. A $16$ bit twos complement register can represent $-2^{15}$ to $2^{15}-1$ or $-32768$ to $32767$. $DFA0$ is a little more negative than $-5\cdot 2^{12}$, so when you multiply it by $4$ you get something like $-20\cdot 2^{12}=-81920$, which is out of range. I ignored the lower order bits because they do not impact the problem.