Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I was reading my notes and came across the following

    The sign of the exponent e usually is not encoded by a
    complement, but the so-called bias N (also referred to as
    excess-N). This means that e = N stands for 0, all values
    e > N for positive exponents and all values e < N for
    negative exponents.

It was followed by this example:

Example: An exponent e of 5 bits, bias 16.

value of e = meaning

$00000_{2}$ = $-16_{10}$

....

$01111_{2}$ = $-1_{10}$

$10000_{2}$ = $0_{10}$

....

$11111_{2}$ = $15_{10}$

I understand that the above table is represented in 2's complement using 5 bits but how is it that $11111_{2}$ is now equivalent to $15_{10}$? When I convert $11111_{2}$ to decimal I get 31 at http://www.mathsisfun.com/binary-decimal-hexadecimal-converter.html.

share|improve this question
2  
I think you're mixing up the number that is stored and the number it represents. $11111_2$ is indeed equivalent to $31_{10}$, and then you apply the excess-16 to get $31-16=15$. –  Peter Phipps Apr 20 '12 at 12:13
    
Thank you so much it makes perfect sense now! –  methuselah Apr 20 '12 at 13:04
    
@PeterPhipps: please post as an answer so it can be accepted. It's a good one and seems to satisfy methusaleh. Thanks –  Ross Millikan Apr 20 '12 at 13:23
add comment

1 Answer

up vote 1 down vote accepted

$11111_2$ is indeed equivalent to $31_{10}$, and then you apply the excess-16 to get $31−16=15$.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.