1 111 010 009 999 999 999 999 999 147 Converted to 32 Bit Single Precision IEEE 754 Binary Floating Point Representation Standard

Convert decimal 1 111 010 009 999 999 999 999 999 147(10) to 32 bit single precision IEEE 754 binary floating point representation standard (1 bit for sign, 8 bits for exponent, 23 bits for mantissa)

What are the steps to convert decimal number
1 111 010 009 999 999 999 999 999 147(10) to 32 bit single precision IEEE 754 binary floating point representation (1 bit for sign, 8 bits for exponent, 23 bits for mantissa)

1. 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 111 010 009 999 999 999 999 999 147 ÷ 2 = 555 505 004 999 999 999 999 999 573 + 1;
  • 555 505 004 999 999 999 999 999 573 ÷ 2 = 277 752 502 499 999 999 999 999 786 + 1;
  • 277 752 502 499 999 999 999 999 786 ÷ 2 = 138 876 251 249 999 999 999 999 893 + 0;
  • 138 876 251 249 999 999 999 999 893 ÷ 2 = 69 438 125 624 999 999 999 999 946 + 1;
  • 69 438 125 624 999 999 999 999 946 ÷ 2 = 34 719 062 812 499 999 999 999 973 + 0;
  • 34 719 062 812 499 999 999 999 973 ÷ 2 = 17 359 531 406 249 999 999 999 986 + 1;
  • 17 359 531 406 249 999 999 999 986 ÷ 2 = 8 679 765 703 124 999 999 999 993 + 0;
  • 8 679 765 703 124 999 999 999 993 ÷ 2 = 4 339 882 851 562 499 999 999 996 + 1;
  • 4 339 882 851 562 499 999 999 996 ÷ 2 = 2 169 941 425 781 249 999 999 998 + 0;
  • 2 169 941 425 781 249 999 999 998 ÷ 2 = 1 084 970 712 890 624 999 999 999 + 0;
  • 1 084 970 712 890 624 999 999 999 ÷ 2 = 542 485 356 445 312 499 999 999 + 1;
  • 542 485 356 445 312 499 999 999 ÷ 2 = 271 242 678 222 656 249 999 999 + 1;
  • 271 242 678 222 656 249 999 999 ÷ 2 = 135 621 339 111 328 124 999 999 + 1;
  • 135 621 339 111 328 124 999 999 ÷ 2 = 67 810 669 555 664 062 499 999 + 1;
  • 67 810 669 555 664 062 499 999 ÷ 2 = 33 905 334 777 832 031 249 999 + 1;
  • 33 905 334 777 832 031 249 999 ÷ 2 = 16 952 667 388 916 015 624 999 + 1;
  • 16 952 667 388 916 015 624 999 ÷ 2 = 8 476 333 694 458 007 812 499 + 1;
  • 8 476 333 694 458 007 812 499 ÷ 2 = 4 238 166 847 229 003 906 249 + 1;
  • 4 238 166 847 229 003 906 249 ÷ 2 = 2 119 083 423 614 501 953 124 + 1;
  • 2 119 083 423 614 501 953 124 ÷ 2 = 1 059 541 711 807 250 976 562 + 0;
  • 1 059 541 711 807 250 976 562 ÷ 2 = 529 770 855 903 625 488 281 + 0;
  • 529 770 855 903 625 488 281 ÷ 2 = 264 885 427 951 812 744 140 + 1;
  • 264 885 427 951 812 744 140 ÷ 2 = 132 442 713 975 906 372 070 + 0;
  • 132 442 713 975 906 372 070 ÷ 2 = 66 221 356 987 953 186 035 + 0;
  • 66 221 356 987 953 186 035 ÷ 2 = 33 110 678 493 976 593 017 + 1;
  • 33 110 678 493 976 593 017 ÷ 2 = 16 555 339 246 988 296 508 + 1;
  • 16 555 339 246 988 296 508 ÷ 2 = 8 277 669 623 494 148 254 + 0;
  • 8 277 669 623 494 148 254 ÷ 2 = 4 138 834 811 747 074 127 + 0;
  • 4 138 834 811 747 074 127 ÷ 2 = 2 069 417 405 873 537 063 + 1;
  • 2 069 417 405 873 537 063 ÷ 2 = 1 034 708 702 936 768 531 + 1;
  • 1 034 708 702 936 768 531 ÷ 2 = 517 354 351 468 384 265 + 1;
  • 517 354 351 468 384 265 ÷ 2 = 258 677 175 734 192 132 + 1;
  • 258 677 175 734 192 132 ÷ 2 = 129 338 587 867 096 066 + 0;
  • 129 338 587 867 096 066 ÷ 2 = 64 669 293 933 548 033 + 0;
  • 64 669 293 933 548 033 ÷ 2 = 32 334 646 966 774 016 + 1;
  • 32 334 646 966 774 016 ÷ 2 = 16 167 323 483 387 008 + 0;
  • 16 167 323 483 387 008 ÷ 2 = 8 083 661 741 693 504 + 0;
  • 8 083 661 741 693 504 ÷ 2 = 4 041 830 870 846 752 + 0;
  • 4 041 830 870 846 752 ÷ 2 = 2 020 915 435 423 376 + 0;
  • 2 020 915 435 423 376 ÷ 2 = 1 010 457 717 711 688 + 0;
  • 1 010 457 717 711 688 ÷ 2 = 505 228 858 855 844 + 0;
  • 505 228 858 855 844 ÷ 2 = 252 614 429 427 922 + 0;
  • 252 614 429 427 922 ÷ 2 = 126 307 214 713 961 + 0;
  • 126 307 214 713 961 ÷ 2 = 63 153 607 356 980 + 1;
  • 63 153 607 356 980 ÷ 2 = 31 576 803 678 490 + 0;
  • 31 576 803 678 490 ÷ 2 = 15 788 401 839 245 + 0;
  • 15 788 401 839 245 ÷ 2 = 7 894 200 919 622 + 1;
  • 7 894 200 919 622 ÷ 2 = 3 947 100 459 811 + 0;
  • 3 947 100 459 811 ÷ 2 = 1 973 550 229 905 + 1;
  • 1 973 550 229 905 ÷ 2 = 986 775 114 952 + 1;
  • 986 775 114 952 ÷ 2 = 493 387 557 476 + 0;
  • 493 387 557 476 ÷ 2 = 246 693 778 738 + 0;
  • 246 693 778 738 ÷ 2 = 123 346 889 369 + 0;
  • 123 346 889 369 ÷ 2 = 61 673 444 684 + 1;
  • 61 673 444 684 ÷ 2 = 30 836 722 342 + 0;
  • 30 836 722 342 ÷ 2 = 15 418 361 171 + 0;
  • 15 418 361 171 ÷ 2 = 7 709 180 585 + 1;
  • 7 709 180 585 ÷ 2 = 3 854 590 292 + 1;
  • 3 854 590 292 ÷ 2 = 1 927 295 146 + 0;
  • 1 927 295 146 ÷ 2 = 963 647 573 + 0;
  • 963 647 573 ÷ 2 = 481 823 786 + 1;
  • 481 823 786 ÷ 2 = 240 911 893 + 0;
  • 240 911 893 ÷ 2 = 120 455 946 + 1;
  • 120 455 946 ÷ 2 = 60 227 973 + 0;
  • 60 227 973 ÷ 2 = 30 113 986 + 1;
  • 30 113 986 ÷ 2 = 15 056 993 + 0;
  • 15 056 993 ÷ 2 = 7 528 496 + 1;
  • 7 528 496 ÷ 2 = 3 764 248 + 0;
  • 3 764 248 ÷ 2 = 1 882 124 + 0;
  • 1 882 124 ÷ 2 = 941 062 + 0;
  • 941 062 ÷ 2 = 470 531 + 0;
  • 470 531 ÷ 2 = 235 265 + 1;
  • 235 265 ÷ 2 = 117 632 + 1;
  • 117 632 ÷ 2 = 58 816 + 0;
  • 58 816 ÷ 2 = 29 408 + 0;
  • 29 408 ÷ 2 = 14 704 + 0;
  • 14 704 ÷ 2 = 7 352 + 0;
  • 7 352 ÷ 2 = 3 676 + 0;
  • 3 676 ÷ 2 = 1 838 + 0;
  • 1 838 ÷ 2 = 919 + 0;
  • 919 ÷ 2 = 459 + 1;
  • 459 ÷ 2 = 229 + 1;
  • 229 ÷ 2 = 114 + 1;
  • 114 ÷ 2 = 57 + 0;
  • 57 ÷ 2 = 28 + 1;
  • 28 ÷ 2 = 14 + 0;
  • 14 ÷ 2 = 7 + 0;
  • 7 ÷ 2 = 3 + 1;
  • 3 ÷ 2 = 1 + 1;
  • 1 ÷ 2 = 0 + 1;

2. Construct the base 2 representation of the positive number.

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

1 111 010 009 999 999 999 999 999 147(10) =


11 1001 0111 0000 0001 1000 0101 0101 0011 0010 0011 0100 1000 0000 0100 1111 0011 0010 0111 1111 1100 1010 1011(2)


3. Normalize the binary representation of the number.

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


1 111 010 009 999 999 999 999 999 147(10) =


11 1001 0111 0000 0001 1000 0101 0101 0011 0010 0011 0100 1000 0000 0100 1111 0011 0010 0111 1111 1100 1010 1011(2) =


11 1001 0111 0000 0001 1000 0101 0101 0011 0010 0011 0100 1000 0000 0100 1111 0011 0010 0111 1111 1100 1010 1011(2) × 20 =


1.1100 1011 1000 0000 1100 0010 1010 1001 1001 0001 1010 0100 0000 0010 0111 1001 1001 0011 1111 1110 0101 0101 1(2) × 289


4. 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 0 (a positive number)


Exponent (unadjusted): 89


Mantissa (not normalized):
1.1100 1011 1000 0000 1100 0010 1010 1001 1001 0001 1010 0100 0000 0010 0111 1001 1001 0011 1111 1110 0101 0101 1


5. Adjust the exponent.

Use the 8 bit excess/bias notation:


Exponent (adjusted) =


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


89 + 2(8-1) - 1 =


(89 + 127)(10) =


216(10)


6. 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;
  • 216 ÷ 2 = 108 + 0;
  • 108 ÷ 2 = 54 + 0;
  • 54 ÷ 2 = 27 + 0;
  • 27 ÷ 2 = 13 + 1;
  • 13 ÷ 2 = 6 + 1;
  • 6 ÷ 2 = 3 + 0;
  • 3 ÷ 2 = 1 + 1;
  • 1 ÷ 2 = 0 + 1;

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

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


Exponent (adjusted) =


216(10) =


1101 1000(2)


8. 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. 110 0101 1100 0000 0110 0001 01 0101 0011 0010 0011 0100 1000 0000 0100 1111 0011 0010 0111 1111 1100 1010 1011 =


110 0101 1100 0000 0110 0001


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

Sign (1 bit) =
0 (a positive number)


Exponent (8 bits) =
1101 1000


Mantissa (23 bits) =
110 0101 1100 0000 0110 0001


Decimal number 1 111 010 009 999 999 999 999 999 147 converted to 32 bit single precision IEEE 754 binary floating point representation:

0 - 1101 1000 - 110 0101 1100 0000 0110 0001

How to convert decimal numbers from base ten to 32 bit single precision IEEE 754 binary floating point standard

Follow the steps below to convert a base 10 decimal number to 32 bit single precision IEEE 754 binary floating point:

  • 1. If the number to be converted is negative, start with its the positive version.
  • 2. First convert the integer part. Divide repeatedly by 2 the base ten positive representation of the integer number that is to be converted to binary, until we get a quotient that is equal to zero, keeping track of each remainder.
  • 3. Construct the base 2 representation of the positive integer part of the number, by taking all the remainders of the previous dividing operations, starting from the bottom of the list constructed above. Thus, the last remainder of the divisions becomes the first symbol (the leftmost) of the base two number, while the first remainder becomes the last symbol (the rightmost).
  • 4. Then convert the fractional part. Multiply the number repeatedly by 2, until we get a fractional part that is equal to zero, keeping track of each integer part of the results.
  • 5. Construct the base 2 representation of the fractional part of the number by taking all the integer parts of the previous multiplying operations, starting from the top of the constructed list above (they should appear in the binary representation, from left to right, in the order they have been calculated).
  • 6. Normalize the binary representation of the number, by shifting the decimal point (or if you prefer, the decimal mark) "n" positions either to the left or to the right, so that only one non zero digit remains to the left of the decimal point.
  • 7. Adjust the exponent in 8 bit excess/bias notation and then convert it from decimal (base 10) to 8 bit binary, by using the same technique of repeatedly dividing by 2, as shown above:
    Exponent (adjusted) = Exponent (unadjusted) + 2(8-1) - 1
  • 8. Normalize mantissa, remove the leading (leftmost) bit, since it's allways '1' (and the decimal sign if the case) and adjust its length to 23 bits, either by removing the excess bits from the right (losing precision...) or by adding extra '0' bits to the right.
  • 9. Sign (it takes 1 bit) is either 1 for a negative or 0 for a positive number.

Example: convert the negative number -25.347 from decimal system (base ten) to 32 bit single precision IEEE 754 binary floating point:

  • 1. Start with the positive version of the number:

    |-25.347| = 25.347

  • 2. First convert the integer part, 25. Divide it repeatedly by 2, keeping track of each remainder, until we get a quotient that is equal to zero:
    • division = quotient + remainder;
    • 25 ÷ 2 = 12 + 1;
    • 12 ÷ 2 = 6 + 0;
    • 6 ÷ 2 = 3 + 0;
    • 3 ÷ 2 = 1 + 1;
    • 1 ÷ 2 = 0 + 1;
    • We have encountered a quotient that is ZERO => FULL STOP
  • 3. Construct the base 2 representation of the integer part of the number by taking all the remainders of the previous dividing operations, starting from the bottom of the list constructed above:

    25(10) = 1 1001(2)

  • 4. Then convert the fractional part, 0.347. Multiply repeatedly by 2, keeping track of each integer part of the results, until we get a fractional part that is equal to zero:
    • #) multiplying = integer + fractional part;
    • 1) 0.347 × 2 = 0 + 0.694;
    • 2) 0.694 × 2 = 1 + 0.388;
    • 3) 0.388 × 2 = 0 + 0.776;
    • 4) 0.776 × 2 = 1 + 0.552;
    • 5) 0.552 × 2 = 1 + 0.104;
    • 6) 0.104 × 2 = 0 + 0.208;
    • 7) 0.208 × 2 = 0 + 0.416;
    • 8) 0.416 × 2 = 0 + 0.832;
    • 9) 0.832 × 2 = 1 + 0.664;
    • 10) 0.664 × 2 = 1 + 0.328;
    • 11) 0.328 × 2 = 0 + 0.656;
    • 12) 0.656 × 2 = 1 + 0.312;
    • 13) 0.312 × 2 = 0 + 0.624;
    • 14) 0.624 × 2 = 1 + 0.248;
    • 15) 0.248 × 2 = 0 + 0.496;
    • 16) 0.496 × 2 = 0 + 0.992;
    • 17) 0.992 × 2 = 1 + 0.984;
    • 18) 0.984 × 2 = 1 + 0.968;
    • 19) 0.968 × 2 = 1 + 0.936;
    • 20) 0.936 × 2 = 1 + 0.872;
    • 21) 0.872 × 2 = 1 + 0.744;
    • 22) 0.744 × 2 = 1 + 0.488;
    • 23) 0.488 × 2 = 0 + 0.976;
    • 24) 0.976 × 2 = 1 + 0.952;
    • We didn't get any fractional part that was equal to zero. But we had enough iterations (over Mantissa limit = 23) and at least one integer part that was different from zero => FULL STOP (losing precision...).
  • 5. Construct the base 2 representation of the fractional part of the number, by taking all the integer parts of the previous multiplying operations, starting from the top of the constructed list above:

    0.347(10) = 0.0101 1000 1101 0100 1111 1101(2)

  • 6. Summarizing - the positive number before normalization:

    25.347(10) = 1 1001.0101 1000 1101 0100 1111 1101(2)

  • 7. Normalize the binary representation of the number, shifting the decimal point 4 positions to the left so that only one non-zero digit stays to the left of the decimal point:

    25.347(10) =
    1 1001.0101 1000 1101 0100 1111 1101(2) =
    1 1001.0101 1000 1101 0100 1111 1101(2) × 20 =
    1.1001 0101 1000 1101 0100 1111 1101(2) × 24

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

    Sign: 1 (a negative number)

    Exponent (unadjusted): 4

    Mantissa (not-normalized): 1.1001 0101 1000 1101 0100 1111 1101

  • 9. Adjust the exponent in 8 bit excess/bias notation and then convert it from decimal (base 10) to 8 bit binary (base 2), by using the same technique of repeatedly dividing it by 2, as already demonstrated above:

    Exponent (adjusted) = Exponent (unadjusted) + 2(8-1) - 1 = (4 + 127)(10) = 131(10) =
    1000 0011(2)

  • 10. Normalize the mantissa, remove the leading (leftmost) bit, since it's allways '1' (and the decimal point) and adjust its length to 23 bits, by removing the excess bits from the right (losing precision...):

    Mantissa (not-normalized): 1.1001 0101 1000 1101 0100 1111 1101

    Mantissa (normalized): 100 1010 1100 0110 1010 0111

  • Conclusion:

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

    Exponent (8 bits) = 1000 0011

    Mantissa (23 bits) = 100 1010 1100 0110 1010 0111

  • Number -25.347, converted from the decimal system (base 10) to 32 bit single precision IEEE 754 binary floating point =
    1 - 1000 0011 - 100 1010 1100 0110 1010 0111