# NEED HELP OPTION TOPIC interrelationship of hardware and software (1 Viewer)

#### Acturial

##### New Member
For IEEE 754 single precision floating-point representation, why do we have to add 127 to the exponent?

Also, the book says that the largest possible number using this approach will have an exponent of 11111110 which is 254 (decimal) and then they SUBTRACT 127 from this... so yea how do we know when to add or subtract 127 from expononent?...

for reference: It's on page 432 on Samuel Davis' book

Thanks

#### hjed

##### Member
The value of the exponent is it's value converted to decimal minus 127. This means it has a range from -127 to 128.
Otherwise it wouldn't be able to have negative exponents. (It doesn't use sign and modulus).

Basically, when converting to IEEE754 add 127. When converting from IEEE754 subtract 127.

#### schlep16

##### Member
We never have to go from a single prescision to a decimal number...i think thats a little to hard, i mean, decimal to single pres is hard enough

#### hjed

##### Member
Are you sure about that, my teacher has certainly made us convert both ways...

#### schlep16

##### Member
hahah im sure.
Shes an absolute retard..
The kid whose topping had to teach us.
Its easy, i know how to do it now...just shes a dumb ass.
Its 100% in the syllabus