# IEEE — 754 (Standard for floating point Arithmetic)

It is a standards that specify interchange and arithmetic formats and methods for binary and decimal floating point arithmetic in programming. It describes about three component method when representing the floating point numbers. They are sign bit, exponent value and mantissa value.

• Sign bit — It is a component that express whether the value is positive or negative. 0 represents a positive number while 1 represents a negative number.
• Exponent value Positive and negative exponents must be represented in the exponent field. To obtain the stored exponent, a bias is applied to the actual exponent.
• Mantissa value — The mantissa is the significant digits of a number in scientific notation or a floating-point number. We only have two digits here, O and 1. As a result, a normalized mantissa has only one 1 to the left of the decimal.
• Representing sign it value: Check whether value is positive or negative. If it is positive assign 0 for it and if it is negative assign 1 for it.
• Representing exponent value: Select the standard exponent value from the table according to your precision.(If it is single precision value = 8 and for double precision value = 11 and see the above table.). Let’s get single precision and exponent value is 8. So its exponent value =2⁸. As it has to represent both positive and negative value the value is -2⁸ — 2⁸ -1 . That is -128 and +127. Then take the exponent bias from the scientific representation and add that value into the exponent value. Now we have the exact exponent value and convert it into the binary format.
• Representing mantissa value: Now check the standard mantissa value from the table and get the binary representation in the scientific format and write the mantissa value representation until the standard count. As an example if you want to represent it into single precision you should have 23 numbers in mantissa value. (In here we not count the first 1 in the scientific representation for the count. Only take the values after the decimal point.)
• After collecting above three value now you have the complete IEEE-754 Standard representation for the selected floating value. (IEEE representation for the 8.3 )

--

--

## More from Thilini Weerasinghe

Currently working as an Associate Software Engineer at Virtusa. Has completed degree in B.Sc (Hons) Computing & Information Systems. After all I am a Human...

Love podcasts or audiobooks? Learn on the go with our new app.

## Thilini Weerasinghe

29 Followers

Currently working as an Associate Software Engineer at Virtusa. Has completed degree in B.Sc (Hons) Computing & Information Systems. After all I am a Human...