5 789 604 459 999 999 999 999 999 745 Converted to 32 Bit Single Precision IEEE 754 Binary Floating Point Representation Standard

Convert decimal 5 789 604 459 999 999 999 999 999 745(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
5 789 604 459 999 999 999 999 999 745(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;
  • 5 789 604 459 999 999 999 999 999 745 ÷ 2 = 2 894 802 229 999 999 999 999 999 872 + 1;
  • 2 894 802 229 999 999 999 999 999 872 ÷ 2 = 1 447 401 114 999 999 999 999 999 936 + 0;
  • 1 447 401 114 999 999 999 999 999 936 ÷ 2 = 723 700 557 499 999 999 999 999 968 + 0;
  • 723 700 557 499 999 999 999 999 968 ÷ 2 = 361 850 278 749 999 999 999 999 984 + 0;
  • 361 850 278 749 999 999 999 999 984 ÷ 2 = 180 925 139 374 999 999 999 999 992 + 0;
  • 180 925 139 374 999 999 999 999 992 ÷ 2 = 90 462 569 687 499 999 999 999 996 + 0;
  • 90 462 569 687 499 999 999 999 996 ÷ 2 = 45 231 284 843 749 999 999 999 998 + 0;
  • 45 231 284 843 749 999 999 999 998 ÷ 2 = 22 615 642 421 874 999 999 999 999 + 0;
  • 22 615 642 421 874 999 999 999 999 ÷ 2 = 11 307 821 210 937 499 999 999 999 + 1;
  • 11 307 821 210 937 499 999 999 999 ÷ 2 = 5 653 910 605 468 749 999 999 999 + 1;
  • 5 653 910 605 468 749 999 999 999 ÷ 2 = 2 826 955 302 734 374 999 999 999 + 1;
  • 2 826 955 302 734 374 999 999 999 ÷ 2 = 1 413 477 651 367 187 499 999 999 + 1;
  • 1 413 477 651 367 187 499 999 999 ÷ 2 = 706 738 825 683 593 749 999 999 + 1;
  • 706 738 825 683 593 749 999 999 ÷ 2 = 353 369 412 841 796 874 999 999 + 1;
  • 353 369 412 841 796 874 999 999 ÷ 2 = 176 684 706 420 898 437 499 999 + 1;
  • 176 684 706 420 898 437 499 999 ÷ 2 = 88 342 353 210 449 218 749 999 + 1;
  • 88 342 353 210 449 218 749 999 ÷ 2 = 44 171 176 605 224 609 374 999 + 1;
  • 44 171 176 605 224 609 374 999 ÷ 2 = 22 085 588 302 612 304 687 499 + 1;
  • 22 085 588 302 612 304 687 499 ÷ 2 = 11 042 794 151 306 152 343 749 + 1;
  • 11 042 794 151 306 152 343 749 ÷ 2 = 5 521 397 075 653 076 171 874 + 1;
  • 5 521 397 075 653 076 171 874 ÷ 2 = 2 760 698 537 826 538 085 937 + 0;
  • 2 760 698 537 826 538 085 937 ÷ 2 = 1 380 349 268 913 269 042 968 + 1;
  • 1 380 349 268 913 269 042 968 ÷ 2 = 690 174 634 456 634 521 484 + 0;
  • 690 174 634 456 634 521 484 ÷ 2 = 345 087 317 228 317 260 742 + 0;
  • 345 087 317 228 317 260 742 ÷ 2 = 172 543 658 614 158 630 371 + 0;
  • 172 543 658 614 158 630 371 ÷ 2 = 86 271 829 307 079 315 185 + 1;
  • 86 271 829 307 079 315 185 ÷ 2 = 43 135 914 653 539 657 592 + 1;
  • 43 135 914 653 539 657 592 ÷ 2 = 21 567 957 326 769 828 796 + 0;
  • 21 567 957 326 769 828 796 ÷ 2 = 10 783 978 663 384 914 398 + 0;
  • 10 783 978 663 384 914 398 ÷ 2 = 5 391 989 331 692 457 199 + 0;
  • 5 391 989 331 692 457 199 ÷ 2 = 2 695 994 665 846 228 599 + 1;
  • 2 695 994 665 846 228 599 ÷ 2 = 1 347 997 332 923 114 299 + 1;
  • 1 347 997 332 923 114 299 ÷ 2 = 673 998 666 461 557 149 + 1;
  • 673 998 666 461 557 149 ÷ 2 = 336 999 333 230 778 574 + 1;
  • 336 999 333 230 778 574 ÷ 2 = 168 499 666 615 389 287 + 0;
  • 168 499 666 615 389 287 ÷ 2 = 84 249 833 307 694 643 + 1;
  • 84 249 833 307 694 643 ÷ 2 = 42 124 916 653 847 321 + 1;
  • 42 124 916 653 847 321 ÷ 2 = 21 062 458 326 923 660 + 1;
  • 21 062 458 326 923 660 ÷ 2 = 10 531 229 163 461 830 + 0;
  • 10 531 229 163 461 830 ÷ 2 = 5 265 614 581 730 915 + 0;
  • 5 265 614 581 730 915 ÷ 2 = 2 632 807 290 865 457 + 1;
  • 2 632 807 290 865 457 ÷ 2 = 1 316 403 645 432 728 + 1;
  • 1 316 403 645 432 728 ÷ 2 = 658 201 822 716 364 + 0;
  • 658 201 822 716 364 ÷ 2 = 329 100 911 358 182 + 0;
  • 329 100 911 358 182 ÷ 2 = 164 550 455 679 091 + 0;
  • 164 550 455 679 091 ÷ 2 = 82 275 227 839 545 + 1;
  • 82 275 227 839 545 ÷ 2 = 41 137 613 919 772 + 1;
  • 41 137 613 919 772 ÷ 2 = 20 568 806 959 886 + 0;
  • 20 568 806 959 886 ÷ 2 = 10 284 403 479 943 + 0;
  • 10 284 403 479 943 ÷ 2 = 5 142 201 739 971 + 1;
  • 5 142 201 739 971 ÷ 2 = 2 571 100 869 985 + 1;
  • 2 571 100 869 985 ÷ 2 = 1 285 550 434 992 + 1;
  • 1 285 550 434 992 ÷ 2 = 642 775 217 496 + 0;
  • 642 775 217 496 ÷ 2 = 321 387 608 748 + 0;
  • 321 387 608 748 ÷ 2 = 160 693 804 374 + 0;
  • 160 693 804 374 ÷ 2 = 80 346 902 187 + 0;
  • 80 346 902 187 ÷ 2 = 40 173 451 093 + 1;
  • 40 173 451 093 ÷ 2 = 20 086 725 546 + 1;
  • 20 086 725 546 ÷ 2 = 10 043 362 773 + 0;
  • 10 043 362 773 ÷ 2 = 5 021 681 386 + 1;
  • 5 021 681 386 ÷ 2 = 2 510 840 693 + 0;
  • 2 510 840 693 ÷ 2 = 1 255 420 346 + 1;
  • 1 255 420 346 ÷ 2 = 627 710 173 + 0;
  • 627 710 173 ÷ 2 = 313 855 086 + 1;
  • 313 855 086 ÷ 2 = 156 927 543 + 0;
  • 156 927 543 ÷ 2 = 78 463 771 + 1;
  • 78 463 771 ÷ 2 = 39 231 885 + 1;
  • 39 231 885 ÷ 2 = 19 615 942 + 1;
  • 19 615 942 ÷ 2 = 9 807 971 + 0;
  • 9 807 971 ÷ 2 = 4 903 985 + 1;
  • 4 903 985 ÷ 2 = 2 451 992 + 1;
  • 2 451 992 ÷ 2 = 1 225 996 + 0;
  • 1 225 996 ÷ 2 = 612 998 + 0;
  • 612 998 ÷ 2 = 306 499 + 0;
  • 306 499 ÷ 2 = 153 249 + 1;
  • 153 249 ÷ 2 = 76 624 + 1;
  • 76 624 ÷ 2 = 38 312 + 0;
  • 38 312 ÷ 2 = 19 156 + 0;
  • 19 156 ÷ 2 = 9 578 + 0;
  • 9 578 ÷ 2 = 4 789 + 0;
  • 4 789 ÷ 2 = 2 394 + 1;
  • 2 394 ÷ 2 = 1 197 + 0;
  • 1 197 ÷ 2 = 598 + 1;
  • 598 ÷ 2 = 299 + 0;
  • 299 ÷ 2 = 149 + 1;
  • 149 ÷ 2 = 74 + 1;
  • 74 ÷ 2 = 37 + 0;
  • 37 ÷ 2 = 18 + 1;
  • 18 ÷ 2 = 9 + 0;
  • 9 ÷ 2 = 4 + 1;
  • 4 ÷ 2 = 2 + 0;
  • 2 ÷ 2 = 1 + 0;
  • 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.

5 789 604 459 999 999 999 999 999 745(10) =


1 0010 1011 0101 0000 1100 0110 1110 1010 1011 0000 1110 0110 0011 0011 1011 1100 0110 0010 1111 1111 1111 0000 0001(2)


3. Normalize the binary representation of the number.

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


5 789 604 459 999 999 999 999 999 745(10) =


1 0010 1011 0101 0000 1100 0110 1110 1010 1011 0000 1110 0110 0011 0011 1011 1100 0110 0010 1111 1111 1111 0000 0001(2) =


1 0010 1011 0101 0000 1100 0110 1110 1010 1011 0000 1110 0110 0011 0011 1011 1100 0110 0010 1111 1111 1111 0000 0001(2) × 20 =


1.0010 1011 0101 0000 1100 0110 1110 1010 1011 0000 1110 0110 0011 0011 1011 1100 0110 0010 1111 1111 1111 0000 0001(2) × 292


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): 92


Mantissa (not normalized):
1.0010 1011 0101 0000 1100 0110 1110 1010 1011 0000 1110 0110 0011 0011 1011 1100 0110 0010 1111 1111 1111 0000 0001


5. Adjust the exponent.

Use the 8 bit excess/bias notation:


Exponent (adjusted) =


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


92 + 2(8-1) - 1 =


(92 + 127)(10) =


219(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;
  • 219 ÷ 2 = 109 + 1;
  • 109 ÷ 2 = 54 + 1;
  • 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) =


219(10) =


1101 1011(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. 001 0101 1010 1000 0110 0011 0 1110 1010 1011 0000 1110 0110 0011 0011 1011 1100 0110 0010 1111 1111 1111 0000 0001 =


001 0101 1010 1000 0110 0011


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 1011


Mantissa (23 bits) =
001 0101 1010 1000 0110 0011


Decimal number 5 789 604 459 999 999 999 999 999 745 converted to 32 bit single precision IEEE 754 binary floating point representation:

0 - 1101 1011 - 001 0101 1010 1000 0110 0011


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