32bit IEEE 754: Decimal ↗ Single Precision Floating Point Binary: -1 234.057 Convert the Number to 32 Bit Single Precision IEEE 754 Binary Floating Point Representation Standard, From a Base 10 Decimal System Number

Number -1 234.057(10) converted and written in 32 bit single precision IEEE 754 binary floating point representation (1 bit for sign, 8 bits for exponent, 23 bits for mantissa)

1. Start with the positive version of the number:

|-1 234.057| = 1 234.057

2. First, convert to binary (in base 2) the integer part: 1 234.
Divide the number repeatedly by 2.

Keep track of each remainder.

We stop when we get a quotient that is equal to zero.


  • division = quotient + remainder;
  • 1 234 ÷ 2 = 617 + 0;
  • 617 ÷ 2 = 308 + 1;
  • 308 ÷ 2 = 154 + 0;
  • 154 ÷ 2 = 77 + 0;
  • 77 ÷ 2 = 38 + 1;
  • 38 ÷ 2 = 19 + 0;
  • 19 ÷ 2 = 9 + 1;
  • 9 ÷ 2 = 4 + 1;
  • 4 ÷ 2 = 2 + 0;
  • 2 ÷ 2 = 1 + 0;
  • 1 ÷ 2 = 0 + 1;

3. Construct the base 2 representation of the integer part of the number.

Take all the remainders starting from the bottom of the list constructed above.


1 234(10) =


100 1101 0010(2)


4. Convert to binary (base 2) the fractional part: 0.057.

Multiply it repeatedly by 2.


Keep track of each integer part of the results.


Stop when we get a fractional part that is equal to zero.


  • #) multiplying = integer + fractional part;
  • 1) 0.057 × 2 = 0 + 0.114;
  • 2) 0.114 × 2 = 0 + 0.228;
  • 3) 0.228 × 2 = 0 + 0.456;
  • 4) 0.456 × 2 = 0 + 0.912;
  • 5) 0.912 × 2 = 1 + 0.824;
  • 6) 0.824 × 2 = 1 + 0.648;
  • 7) 0.648 × 2 = 1 + 0.296;
  • 8) 0.296 × 2 = 0 + 0.592;
  • 9) 0.592 × 2 = 1 + 0.184;
  • 10) 0.184 × 2 = 0 + 0.368;
  • 11) 0.368 × 2 = 0 + 0.736;
  • 12) 0.736 × 2 = 1 + 0.472;
  • 13) 0.472 × 2 = 0 + 0.944;
  • 14) 0.944 × 2 = 1 + 0.888;
  • 15) 0.888 × 2 = 1 + 0.776;
  • 16) 0.776 × 2 = 1 + 0.552;
  • 17) 0.552 × 2 = 1 + 0.104;
  • 18) 0.104 × 2 = 0 + 0.208;
  • 19) 0.208 × 2 = 0 + 0.416;
  • 20) 0.416 × 2 = 0 + 0.832;
  • 21) 0.832 × 2 = 1 + 0.664;
  • 22) 0.664 × 2 = 1 + 0.328;
  • 23) 0.328 × 2 = 0 + 0.656;
  • 24) 0.656 × 2 = 1 + 0.312;

We didn't get any fractional part that was equal to zero. But we had enough iterations (over Mantissa limit) and at least one integer that was different from zero => FULL STOP (losing precision...)


5. Construct the base 2 representation of the fractional part of the number.

Take all the integer parts of the multiplying operations, starting from the top of the constructed list above:


0.057(10) =


0.0000 1110 1001 0111 1000 1101(2)


6. Positive number before normalization:

1 234.057(10) =


100 1101 0010.0000 1110 1001 0111 1000 1101(2)

7. Normalize the binary representation of the number.

Shift the decimal mark 10 positions to the left, so that only one non zero digit remains to the left of it:


1 234.057(10) =


100 1101 0010.0000 1110 1001 0111 1000 1101(2) =


100 1101 0010.0000 1110 1001 0111 1000 1101(2) × 20 =


1.0011 0100 1000 0011 1010 0101 1110 0011 01(2) × 210


8. Up to this moment, there are the following elements that would feed into the 32 bit single precision IEEE 754 binary floating point representation:

Sign 1 (a negative number)


Exponent (unadjusted): 10


Mantissa (not normalized):
1.0011 0100 1000 0011 1010 0101 1110 0011 01


9. Adjust the exponent.

Use the 8 bit excess/bias notation:


Exponent (adjusted) =


Exponent (unadjusted) + 2(8-1) - 1 =


10 + 2(8-1) - 1 =


(10 + 127)(10) =


137(10)


10. Convert the adjusted exponent from the decimal (base 10) to 8 bit binary.

Use the same technique of repeatedly dividing by 2:


  • division = quotient + remainder;
  • 137 ÷ 2 = 68 + 1;
  • 68 ÷ 2 = 34 + 0;
  • 34 ÷ 2 = 17 + 0;
  • 17 ÷ 2 = 8 + 1;
  • 8 ÷ 2 = 4 + 0;
  • 4 ÷ 2 = 2 + 0;
  • 2 ÷ 2 = 1 + 0;
  • 1 ÷ 2 = 0 + 1;

11. Construct the base 2 representation of the adjusted exponent.

Take all the remainders starting from the bottom of the list constructed above.


Exponent (adjusted) =


137(10) =


1000 1001(2)


12. Normalize the mantissa.

a) Remove the leading (the leftmost) bit, since it's allways 1, and the decimal point, if the case.


b) Adjust its length to 23 bits, by removing the excess bits, from the right (if any of the excess bits is set on 1, we are losing precision...).


Mantissa (normalized) =


1. 001 1010 0100 0001 1101 0010 111 1000 1101 =


001 1010 0100 0001 1101 0010


13. The three elements that make up the number's 32 bit single precision IEEE 754 binary floating point representation:

Sign (1 bit) =
1 (a negative number)


Exponent (8 bits) =
1000 1001


Mantissa (23 bits) =
001 1010 0100 0001 1101 0010


The base ten decimal number -1 234.057 converted and written in 32 bit single precision IEEE 754 binary floating point representation:
1 - 1000 1001 - 001 1010 0100 0001 1101 0010

The latest decimal numbers converted from base ten to 32 bit single precision IEEE 754 floating point binary standard representation