Here's the number I'm working on
1 01110 001 = ____
1 sign bit, 5 exp bits, 3 fraction bits
bias = 15
Here's my current process, hopefully you can tell me where I'm missing something
01110 = 14
14 - 15 = -1
0.001 * 2^-1 = 0.0001
.0001 = 1/16
The sign bit is 1 so my result is -1/16, however the given answer is -9/16. Would anyone mind explaining where the extra 8 in the fraction is coming from?
You seem to have the correct concept, including an understanding of the excess-N representation, but you're missing a crucial point.
The 3 bits used to encode the fractional part of the magnitude are 001
, but there is an implicit 1.
preceding the fraction bits, so the full magnitude is actually 1.001
, which can be represented as an improper fraction as 1+1/8 => 9/8
.
2^(-1)
is the same as 1/(2^1)
, or 1/2
.
9/8 * 1/2 = 9/16
. Take the sign bit into account, and you arrive at the answer -9/16
.