100 000 100 100 001 110 000 000 000 000 638 Converted to 32 Bit Single Precision IEEE 754 Binary Floating Point Representation Standard

Convert decimal 100 000 100 100 001 110 000 000 000 000 638(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
100 000 100 100 001 110 000 000 000 000 638(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;
  • 100 000 100 100 001 110 000 000 000 000 638 ÷ 2 = 50 000 050 050 000 555 000 000 000 000 319 + 0;
  • 50 000 050 050 000 555 000 000 000 000 319 ÷ 2 = 25 000 025 025 000 277 500 000 000 000 159 + 1;
  • 25 000 025 025 000 277 500 000 000 000 159 ÷ 2 = 12 500 012 512 500 138 750 000 000 000 079 + 1;
  • 12 500 012 512 500 138 750 000 000 000 079 ÷ 2 = 6 250 006 256 250 069 375 000 000 000 039 + 1;
  • 6 250 006 256 250 069 375 000 000 000 039 ÷ 2 = 3 125 003 128 125 034 687 500 000 000 019 + 1;
  • 3 125 003 128 125 034 687 500 000 000 019 ÷ 2 = 1 562 501 564 062 517 343 750 000 000 009 + 1;
  • 1 562 501 564 062 517 343 750 000 000 009 ÷ 2 = 781 250 782 031 258 671 875 000 000 004 + 1;
  • 781 250 782 031 258 671 875 000 000 004 ÷ 2 = 390 625 391 015 629 335 937 500 000 002 + 0;
  • 390 625 391 015 629 335 937 500 000 002 ÷ 2 = 195 312 695 507 814 667 968 750 000 001 + 0;
  • 195 312 695 507 814 667 968 750 000 001 ÷ 2 = 97 656 347 753 907 333 984 375 000 000 + 1;
  • 97 656 347 753 907 333 984 375 000 000 ÷ 2 = 48 828 173 876 953 666 992 187 500 000 + 0;
  • 48 828 173 876 953 666 992 187 500 000 ÷ 2 = 24 414 086 938 476 833 496 093 750 000 + 0;
  • 24 414 086 938 476 833 496 093 750 000 ÷ 2 = 12 207 043 469 238 416 748 046 875 000 + 0;
  • 12 207 043 469 238 416 748 046 875 000 ÷ 2 = 6 103 521 734 619 208 374 023 437 500 + 0;
  • 6 103 521 734 619 208 374 023 437 500 ÷ 2 = 3 051 760 867 309 604 187 011 718 750 + 0;
  • 3 051 760 867 309 604 187 011 718 750 ÷ 2 = 1 525 880 433 654 802 093 505 859 375 + 0;
  • 1 525 880 433 654 802 093 505 859 375 ÷ 2 = 762 940 216 827 401 046 752 929 687 + 1;
  • 762 940 216 827 401 046 752 929 687 ÷ 2 = 381 470 108 413 700 523 376 464 843 + 1;
  • 381 470 108 413 700 523 376 464 843 ÷ 2 = 190 735 054 206 850 261 688 232 421 + 1;
  • 190 735 054 206 850 261 688 232 421 ÷ 2 = 95 367 527 103 425 130 844 116 210 + 1;
  • 95 367 527 103 425 130 844 116 210 ÷ 2 = 47 683 763 551 712 565 422 058 105 + 0;
  • 47 683 763 551 712 565 422 058 105 ÷ 2 = 23 841 881 775 856 282 711 029 052 + 1;
  • 23 841 881 775 856 282 711 029 052 ÷ 2 = 11 920 940 887 928 141 355 514 526 + 0;
  • 11 920 940 887 928 141 355 514 526 ÷ 2 = 5 960 470 443 964 070 677 757 263 + 0;
  • 5 960 470 443 964 070 677 757 263 ÷ 2 = 2 980 235 221 982 035 338 878 631 + 1;
  • 2 980 235 221 982 035 338 878 631 ÷ 2 = 1 490 117 610 991 017 669 439 315 + 1;
  • 1 490 117 610 991 017 669 439 315 ÷ 2 = 745 058 805 495 508 834 719 657 + 1;
  • 745 058 805 495 508 834 719 657 ÷ 2 = 372 529 402 747 754 417 359 828 + 1;
  • 372 529 402 747 754 417 359 828 ÷ 2 = 186 264 701 373 877 208 679 914 + 0;
  • 186 264 701 373 877 208 679 914 ÷ 2 = 93 132 350 686 938 604 339 957 + 0;
  • 93 132 350 686 938 604 339 957 ÷ 2 = 46 566 175 343 469 302 169 978 + 1;
  • 46 566 175 343 469 302 169 978 ÷ 2 = 23 283 087 671 734 651 084 989 + 0;
  • 23 283 087 671 734 651 084 989 ÷ 2 = 11 641 543 835 867 325 542 494 + 1;
  • 11 641 543 835 867 325 542 494 ÷ 2 = 5 820 771 917 933 662 771 247 + 0;
  • 5 820 771 917 933 662 771 247 ÷ 2 = 2 910 385 958 966 831 385 623 + 1;
  • 2 910 385 958 966 831 385 623 ÷ 2 = 1 455 192 979 483 415 692 811 + 1;
  • 1 455 192 979 483 415 692 811 ÷ 2 = 727 596 489 741 707 846 405 + 1;
  • 727 596 489 741 707 846 405 ÷ 2 = 363 798 244 870 853 923 202 + 1;
  • 363 798 244 870 853 923 202 ÷ 2 = 181 899 122 435 426 961 601 + 0;
  • 181 899 122 435 426 961 601 ÷ 2 = 90 949 561 217 713 480 800 + 1;
  • 90 949 561 217 713 480 800 ÷ 2 = 45 474 780 608 856 740 400 + 0;
  • 45 474 780 608 856 740 400 ÷ 2 = 22 737 390 304 428 370 200 + 0;
  • 22 737 390 304 428 370 200 ÷ 2 = 11 368 695 152 214 185 100 + 0;
  • 11 368 695 152 214 185 100 ÷ 2 = 5 684 347 576 107 092 550 + 0;
  • 5 684 347 576 107 092 550 ÷ 2 = 2 842 173 788 053 546 275 + 0;
  • 2 842 173 788 053 546 275 ÷ 2 = 1 421 086 894 026 773 137 + 1;
  • 1 421 086 894 026 773 137 ÷ 2 = 710 543 447 013 386 568 + 1;
  • 710 543 447 013 386 568 ÷ 2 = 355 271 723 506 693 284 + 0;
  • 355 271 723 506 693 284 ÷ 2 = 177 635 861 753 346 642 + 0;
  • 177 635 861 753 346 642 ÷ 2 = 88 817 930 876 673 321 + 0;
  • 88 817 930 876 673 321 ÷ 2 = 44 408 965 438 336 660 + 1;
  • 44 408 965 438 336 660 ÷ 2 = 22 204 482 719 168 330 + 0;
  • 22 204 482 719 168 330 ÷ 2 = 11 102 241 359 584 165 + 0;
  • 11 102 241 359 584 165 ÷ 2 = 5 551 120 679 792 082 + 1;
  • 5 551 120 679 792 082 ÷ 2 = 2 775 560 339 896 041 + 0;
  • 2 775 560 339 896 041 ÷ 2 = 1 387 780 169 948 020 + 1;
  • 1 387 780 169 948 020 ÷ 2 = 693 890 084 974 010 + 0;
  • 693 890 084 974 010 ÷ 2 = 346 945 042 487 005 + 0;
  • 346 945 042 487 005 ÷ 2 = 173 472 521 243 502 + 1;
  • 173 472 521 243 502 ÷ 2 = 86 736 260 621 751 + 0;
  • 86 736 260 621 751 ÷ 2 = 43 368 130 310 875 + 1;
  • 43 368 130 310 875 ÷ 2 = 21 684 065 155 437 + 1;
  • 21 684 065 155 437 ÷ 2 = 10 842 032 577 718 + 1;
  • 10 842 032 577 718 ÷ 2 = 5 421 016 288 859 + 0;
  • 5 421 016 288 859 ÷ 2 = 2 710 508 144 429 + 1;
  • 2 710 508 144 429 ÷ 2 = 1 355 254 072 214 + 1;
  • 1 355 254 072 214 ÷ 2 = 677 627 036 107 + 0;
  • 677 627 036 107 ÷ 2 = 338 813 518 053 + 1;
  • 338 813 518 053 ÷ 2 = 169 406 759 026 + 1;
  • 169 406 759 026 ÷ 2 = 84 703 379 513 + 0;
  • 84 703 379 513 ÷ 2 = 42 351 689 756 + 1;
  • 42 351 689 756 ÷ 2 = 21 175 844 878 + 0;
  • 21 175 844 878 ÷ 2 = 10 587 922 439 + 0;
  • 10 587 922 439 ÷ 2 = 5 293 961 219 + 1;
  • 5 293 961 219 ÷ 2 = 2 646 980 609 + 1;
  • 2 646 980 609 ÷ 2 = 1 323 490 304 + 1;
  • 1 323 490 304 ÷ 2 = 661 745 152 + 0;
  • 661 745 152 ÷ 2 = 330 872 576 + 0;
  • 330 872 576 ÷ 2 = 165 436 288 + 0;
  • 165 436 288 ÷ 2 = 82 718 144 + 0;
  • 82 718 144 ÷ 2 = 41 359 072 + 0;
  • 41 359 072 ÷ 2 = 20 679 536 + 0;
  • 20 679 536 ÷ 2 = 10 339 768 + 0;
  • 10 339 768 ÷ 2 = 5 169 884 + 0;
  • 5 169 884 ÷ 2 = 2 584 942 + 0;
  • 2 584 942 ÷ 2 = 1 292 471 + 0;
  • 1 292 471 ÷ 2 = 646 235 + 1;
  • 646 235 ÷ 2 = 323 117 + 1;
  • 323 117 ÷ 2 = 161 558 + 1;
  • 161 558 ÷ 2 = 80 779 + 0;
  • 80 779 ÷ 2 = 40 389 + 1;
  • 40 389 ÷ 2 = 20 194 + 1;
  • 20 194 ÷ 2 = 10 097 + 0;
  • 10 097 ÷ 2 = 5 048 + 1;
  • 5 048 ÷ 2 = 2 524 + 0;
  • 2 524 ÷ 2 = 1 262 + 0;
  • 1 262 ÷ 2 = 631 + 0;
  • 631 ÷ 2 = 315 + 1;
  • 315 ÷ 2 = 157 + 1;
  • 157 ÷ 2 = 78 + 1;
  • 78 ÷ 2 = 39 + 0;
  • 39 ÷ 2 = 19 + 1;
  • 19 ÷ 2 = 9 + 1;
  • 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.

100 000 100 100 001 110 000 000 000 000 638(10) =


100 1110 1110 0010 1101 1100 0000 0000 1110 0101 1011 0111 0100 1010 0100 0110 0000 1011 1101 0100 1111 0010 1111 0000 0010 0111 1110(2)


3. Normalize the binary representation of the number.

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


100 000 100 100 001 110 000 000 000 000 638(10) =


100 1110 1110 0010 1101 1100 0000 0000 1110 0101 1011 0111 0100 1010 0100 0110 0000 1011 1101 0100 1111 0010 1111 0000 0010 0111 1110(2) =


100 1110 1110 0010 1101 1100 0000 0000 1110 0101 1011 0111 0100 1010 0100 0110 0000 1011 1101 0100 1111 0010 1111 0000 0010 0111 1110(2) × 20 =


1.0011 1011 1000 1011 0111 0000 0000 0011 1001 0110 1101 1101 0010 1001 0001 1000 0010 1111 0101 0011 1100 1011 1100 0000 1001 1111 10(2) × 2106


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


Mantissa (not normalized):
1.0011 1011 1000 1011 0111 0000 0000 0011 1001 0110 1101 1101 0010 1001 0001 1000 0010 1111 0101 0011 1100 1011 1100 0000 1001 1111 10


5. Adjust the exponent.

Use the 8 bit excess/bias notation:


Exponent (adjusted) =


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


106 + 2(8-1) - 1 =


(106 + 127)(10) =


233(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;
  • 233 ÷ 2 = 116 + 1;
  • 116 ÷ 2 = 58 + 0;
  • 58 ÷ 2 = 29 + 0;
  • 29 ÷ 2 = 14 + 1;
  • 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) =


233(10) =


1110 1001(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 1101 1100 0101 1011 1000 000 0000 1110 0101 1011 0111 0100 1010 0100 0110 0000 1011 1101 0100 1111 0010 1111 0000 0010 0111 1110 =


001 1101 1100 0101 1011 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 1001


Mantissa (23 bits) =
001 1101 1100 0101 1011 1000


Decimal number 100 000 100 100 001 110 000 000 000 000 638 converted to 32 bit single precision IEEE 754 binary floating point representation:

0 - 1110 1001 - 001 1101 1100 0101 1011 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