1
$\begingroup$

I'm trying to understand binary floating point and using just a 4-bit mantissa and a 4-bit exponent (both 2s compliment) to keep things simple.

As far as I can tell, the largest denary number I can represent is 112: 0111 0111

So why do I have trouble representing denary 11 (eleven) in this system? I get that the largest (positive) mantissa is 7 in denary (0111). So I'm inferring that I can't represent consecutive positive integers between 0 and the maximum value of 112.

Is that correct? If so, can someone help me to see why please? Which numbers in this range can I represent?

$\endgroup$

1 Answer 1

2
$\begingroup$

Yes, that is correct. Your mantissa has only three magnitude bits, so you can only represent numbers from -8 to 7, multiplied of course by any power of 2 from $2^{-8}$ to $2^7$. 11 is impossible to represent, because any positive exponent gets you multiples of 2, any negative exponent gets you numbers less or equal to $7*2^{-1}=3.5$, and exponent 0 is just numbers from -8 to 7.

$\endgroup$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.