1 000 111 111 099 999 999 999 999 999 545 Converted to 32 Bit Single Precision IEEE 754 Binary Floating Point Representation Standard

Convert decimal 1 000 111 111 099 999 999 999 999 999 545(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 000 111 111 099 999 999 999 999 999 545(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 000 111 111 099 999 999 999 999 999 545 ÷ 2 = 500 055 555 549 999 999 999 999 999 772 + 1;
  • 500 055 555 549 999 999 999 999 999 772 ÷ 2 = 250 027 777 774 999 999 999 999 999 886 + 0;
  • 250 027 777 774 999 999 999 999 999 886 ÷ 2 = 125 013 888 887 499 999 999 999 999 943 + 0;
  • 125 013 888 887 499 999 999 999 999 943 ÷ 2 = 62 506 944 443 749 999 999 999 999 971 + 1;
  • 62 506 944 443 749 999 999 999 999 971 ÷ 2 = 31 253 472 221 874 999 999 999 999 985 + 1;
  • 31 253 472 221 874 999 999 999 999 985 ÷ 2 = 15 626 736 110 937 499 999 999 999 992 + 1;
  • 15 626 736 110 937 499 999 999 999 992 ÷ 2 = 7 813 368 055 468 749 999 999 999 996 + 0;
  • 7 813 368 055 468 749 999 999 999 996 ÷ 2 = 3 906 684 027 734 374 999 999 999 998 + 0;
  • 3 906 684 027 734 374 999 999 999 998 ÷ 2 = 1 953 342 013 867 187 499 999 999 999 + 0;
  • 1 953 342 013 867 187 499 999 999 999 ÷ 2 = 976 671 006 933 593 749 999 999 999 + 1;
  • 976 671 006 933 593 749 999 999 999 ÷ 2 = 488 335 503 466 796 874 999 999 999 + 1;
  • 488 335 503 466 796 874 999 999 999 ÷ 2 = 244 167 751 733 398 437 499 999 999 + 1;
  • 244 167 751 733 398 437 499 999 999 ÷ 2 = 122 083 875 866 699 218 749 999 999 + 1;
  • 122 083 875 866 699 218 749 999 999 ÷ 2 = 61 041 937 933 349 609 374 999 999 + 1;
  • 61 041 937 933 349 609 374 999 999 ÷ 2 = 30 520 968 966 674 804 687 499 999 + 1;
  • 30 520 968 966 674 804 687 499 999 ÷ 2 = 15 260 484 483 337 402 343 749 999 + 1;
  • 15 260 484 483 337 402 343 749 999 ÷ 2 = 7 630 242 241 668 701 171 874 999 + 1;
  • 7 630 242 241 668 701 171 874 999 ÷ 2 = 3 815 121 120 834 350 585 937 499 + 1;
  • 3 815 121 120 834 350 585 937 499 ÷ 2 = 1 907 560 560 417 175 292 968 749 + 1;
  • 1 907 560 560 417 175 292 968 749 ÷ 2 = 953 780 280 208 587 646 484 374 + 1;
  • 953 780 280 208 587 646 484 374 ÷ 2 = 476 890 140 104 293 823 242 187 + 0;
  • 476 890 140 104 293 823 242 187 ÷ 2 = 238 445 070 052 146 911 621 093 + 1;
  • 238 445 070 052 146 911 621 093 ÷ 2 = 119 222 535 026 073 455 810 546 + 1;
  • 119 222 535 026 073 455 810 546 ÷ 2 = 59 611 267 513 036 727 905 273 + 0;
  • 59 611 267 513 036 727 905 273 ÷ 2 = 29 805 633 756 518 363 952 636 + 1;
  • 29 805 633 756 518 363 952 636 ÷ 2 = 14 902 816 878 259 181 976 318 + 0;
  • 14 902 816 878 259 181 976 318 ÷ 2 = 7 451 408 439 129 590 988 159 + 0;
  • 7 451 408 439 129 590 988 159 ÷ 2 = 3 725 704 219 564 795 494 079 + 1;
  • 3 725 704 219 564 795 494 079 ÷ 2 = 1 862 852 109 782 397 747 039 + 1;
  • 1 862 852 109 782 397 747 039 ÷ 2 = 931 426 054 891 198 873 519 + 1;
  • 931 426 054 891 198 873 519 ÷ 2 = 465 713 027 445 599 436 759 + 1;
  • 465 713 027 445 599 436 759 ÷ 2 = 232 856 513 722 799 718 379 + 1;
  • 232 856 513 722 799 718 379 ÷ 2 = 116 428 256 861 399 859 189 + 1;
  • 116 428 256 861 399 859 189 ÷ 2 = 58 214 128 430 699 929 594 + 1;
  • 58 214 128 430 699 929 594 ÷ 2 = 29 107 064 215 349 964 797 + 0;
  • 29 107 064 215 349 964 797 ÷ 2 = 14 553 532 107 674 982 398 + 1;
  • 14 553 532 107 674 982 398 ÷ 2 = 7 276 766 053 837 491 199 + 0;
  • 7 276 766 053 837 491 199 ÷ 2 = 3 638 383 026 918 745 599 + 1;
  • 3 638 383 026 918 745 599 ÷ 2 = 1 819 191 513 459 372 799 + 1;
  • 1 819 191 513 459 372 799 ÷ 2 = 909 595 756 729 686 399 + 1;
  • 909 595 756 729 686 399 ÷ 2 = 454 797 878 364 843 199 + 1;
  • 454 797 878 364 843 199 ÷ 2 = 227 398 939 182 421 599 + 1;
  • 227 398 939 182 421 599 ÷ 2 = 113 699 469 591 210 799 + 1;
  • 113 699 469 591 210 799 ÷ 2 = 56 849 734 795 605 399 + 1;
  • 56 849 734 795 605 399 ÷ 2 = 28 424 867 397 802 699 + 1;
  • 28 424 867 397 802 699 ÷ 2 = 14 212 433 698 901 349 + 1;
  • 14 212 433 698 901 349 ÷ 2 = 7 106 216 849 450 674 + 1;
  • 7 106 216 849 450 674 ÷ 2 = 3 553 108 424 725 337 + 0;
  • 3 553 108 424 725 337 ÷ 2 = 1 776 554 212 362 668 + 1;
  • 1 776 554 212 362 668 ÷ 2 = 888 277 106 181 334 + 0;
  • 888 277 106 181 334 ÷ 2 = 444 138 553 090 667 + 0;
  • 444 138 553 090 667 ÷ 2 = 222 069 276 545 333 + 1;
  • 222 069 276 545 333 ÷ 2 = 111 034 638 272 666 + 1;
  • 111 034 638 272 666 ÷ 2 = 55 517 319 136 333 + 0;
  • 55 517 319 136 333 ÷ 2 = 27 758 659 568 166 + 1;
  • 27 758 659 568 166 ÷ 2 = 13 879 329 784 083 + 0;
  • 13 879 329 784 083 ÷ 2 = 6 939 664 892 041 + 1;
  • 6 939 664 892 041 ÷ 2 = 3 469 832 446 020 + 1;
  • 3 469 832 446 020 ÷ 2 = 1 734 916 223 010 + 0;
  • 1 734 916 223 010 ÷ 2 = 867 458 111 505 + 0;
  • 867 458 111 505 ÷ 2 = 433 729 055 752 + 1;
  • 433 729 055 752 ÷ 2 = 216 864 527 876 + 0;
  • 216 864 527 876 ÷ 2 = 108 432 263 938 + 0;
  • 108 432 263 938 ÷ 2 = 54 216 131 969 + 0;
  • 54 216 131 969 ÷ 2 = 27 108 065 984 + 1;
  • 27 108 065 984 ÷ 2 = 13 554 032 992 + 0;
  • 13 554 032 992 ÷ 2 = 6 777 016 496 + 0;
  • 6 777 016 496 ÷ 2 = 3 388 508 248 + 0;
  • 3 388 508 248 ÷ 2 = 1 694 254 124 + 0;
  • 1 694 254 124 ÷ 2 = 847 127 062 + 0;
  • 847 127 062 ÷ 2 = 423 563 531 + 0;
  • 423 563 531 ÷ 2 = 211 781 765 + 1;
  • 211 781 765 ÷ 2 = 105 890 882 + 1;
  • 105 890 882 ÷ 2 = 52 945 441 + 0;
  • 52 945 441 ÷ 2 = 26 472 720 + 1;
  • 26 472 720 ÷ 2 = 13 236 360 + 0;
  • 13 236 360 ÷ 2 = 6 618 180 + 0;
  • 6 618 180 ÷ 2 = 3 309 090 + 0;
  • 3 309 090 ÷ 2 = 1 654 545 + 0;
  • 1 654 545 ÷ 2 = 827 272 + 1;
  • 827 272 ÷ 2 = 413 636 + 0;
  • 413 636 ÷ 2 = 206 818 + 0;
  • 206 818 ÷ 2 = 103 409 + 0;
  • 103 409 ÷ 2 = 51 704 + 1;
  • 51 704 ÷ 2 = 25 852 + 0;
  • 25 852 ÷ 2 = 12 926 + 0;
  • 12 926 ÷ 2 = 6 463 + 0;
  • 6 463 ÷ 2 = 3 231 + 1;
  • 3 231 ÷ 2 = 1 615 + 1;
  • 1 615 ÷ 2 = 807 + 1;
  • 807 ÷ 2 = 403 + 1;
  • 403 ÷ 2 = 201 + 1;
  • 201 ÷ 2 = 100 + 1;
  • 100 ÷ 2 = 50 + 0;
  • 50 ÷ 2 = 25 + 0;
  • 25 ÷ 2 = 12 + 1;
  • 12 ÷ 2 = 6 + 0;
  • 6 ÷ 2 = 3 + 0;
  • 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 000 111 111 099 999 999 999 999 999 545(10) =


1100 1001 1111 1000 1000 1000 0101 1000 0001 0001 0011 0101 1001 0111 1111 1110 1011 1111 1001 0110 1111 1111 1110 0011 1001(2)


3. Normalize the binary representation of the number.

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


1 000 111 111 099 999 999 999 999 999 545(10) =


1100 1001 1111 1000 1000 1000 0101 1000 0001 0001 0011 0101 1001 0111 1111 1110 1011 1111 1001 0110 1111 1111 1110 0011 1001(2) =


1100 1001 1111 1000 1000 1000 0101 1000 0001 0001 0011 0101 1001 0111 1111 1110 1011 1111 1001 0110 1111 1111 1110 0011 1001(2) × 20 =


1.1001 0011 1111 0001 0001 0000 1011 0000 0010 0010 0110 1011 0010 1111 1111 1101 0111 1111 0010 1101 1111 1111 1100 0111 001(2) × 299


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


Mantissa (not normalized):
1.1001 0011 1111 0001 0001 0000 1011 0000 0010 0010 0110 1011 0010 1111 1111 1101 0111 1111 0010 1101 1111 1111 1100 0111 001


5. Adjust the exponent.

Use the 8 bit excess/bias notation:


Exponent (adjusted) =


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


99 + 2(8-1) - 1 =


(99 + 127)(10) =


226(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;
  • 226 ÷ 2 = 113 + 0;
  • 113 ÷ 2 = 56 + 1;
  • 56 ÷ 2 = 28 + 0;
  • 28 ÷ 2 = 14 + 0;
  • 14 ÷ 2 = 7 + 0;
  • 7 ÷ 2 = 3 + 1;
  • 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) =


226(10) =


1110 0010(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. 100 1001 1111 1000 1000 1000 0101 1000 0001 0001 0011 0101 1001 0111 1111 1110 1011 1111 1001 0110 1111 1111 1110 0011 1001 =


100 1001 1111 1000 1000 1000


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) =
1110 0010


Mantissa (23 bits) =
100 1001 1111 1000 1000 1000


Decimal number 1 000 111 111 099 999 999 999 999 999 545 converted to 32 bit single precision IEEE 754 binary floating point representation:

0 - 1110 0010 - 100 1001 1111 1000 1000 1000


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