100 100 000 000 000 000 000 000 000 000 000 331 Converted to 32 Bit Single Precision IEEE 754 Binary Floating Point Representation Standard

Convert decimal 100 100 000 000 000 000 000 000 000 000 000 331(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 100 000 000 000 000 000 000 000 000 000 331(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 100 000 000 000 000 000 000 000 000 000 331 ÷ 2 = 50 050 000 000 000 000 000 000 000 000 000 165 + 1;
  • 50 050 000 000 000 000 000 000 000 000 000 165 ÷ 2 = 25 025 000 000 000 000 000 000 000 000 000 082 + 1;
  • 25 025 000 000 000 000 000 000 000 000 000 082 ÷ 2 = 12 512 500 000 000 000 000 000 000 000 000 041 + 0;
  • 12 512 500 000 000 000 000 000 000 000 000 041 ÷ 2 = 6 256 250 000 000 000 000 000 000 000 000 020 + 1;
  • 6 256 250 000 000 000 000 000 000 000 000 020 ÷ 2 = 3 128 125 000 000 000 000 000 000 000 000 010 + 0;
  • 3 128 125 000 000 000 000 000 000 000 000 010 ÷ 2 = 1 564 062 500 000 000 000 000 000 000 000 005 + 0;
  • 1 564 062 500 000 000 000 000 000 000 000 005 ÷ 2 = 782 031 250 000 000 000 000 000 000 000 002 + 1;
  • 782 031 250 000 000 000 000 000 000 000 002 ÷ 2 = 391 015 625 000 000 000 000 000 000 000 001 + 0;
  • 391 015 625 000 000 000 000 000 000 000 001 ÷ 2 = 195 507 812 500 000 000 000 000 000 000 000 + 1;
  • 195 507 812 500 000 000 000 000 000 000 000 ÷ 2 = 97 753 906 250 000 000 000 000 000 000 000 + 0;
  • 97 753 906 250 000 000 000 000 000 000 000 ÷ 2 = 48 876 953 125 000 000 000 000 000 000 000 + 0;
  • 48 876 953 125 000 000 000 000 000 000 000 ÷ 2 = 24 438 476 562 500 000 000 000 000 000 000 + 0;
  • 24 438 476 562 500 000 000 000 000 000 000 ÷ 2 = 12 219 238 281 250 000 000 000 000 000 000 + 0;
  • 12 219 238 281 250 000 000 000 000 000 000 ÷ 2 = 6 109 619 140 625 000 000 000 000 000 000 + 0;
  • 6 109 619 140 625 000 000 000 000 000 000 ÷ 2 = 3 054 809 570 312 500 000 000 000 000 000 + 0;
  • 3 054 809 570 312 500 000 000 000 000 000 ÷ 2 = 1 527 404 785 156 250 000 000 000 000 000 + 0;
  • 1 527 404 785 156 250 000 000 000 000 000 ÷ 2 = 763 702 392 578 125 000 000 000 000 000 + 0;
  • 763 702 392 578 125 000 000 000 000 000 ÷ 2 = 381 851 196 289 062 500 000 000 000 000 + 0;
  • 381 851 196 289 062 500 000 000 000 000 ÷ 2 = 190 925 598 144 531 250 000 000 000 000 + 0;
  • 190 925 598 144 531 250 000 000 000 000 ÷ 2 = 95 462 799 072 265 625 000 000 000 000 + 0;
  • 95 462 799 072 265 625 000 000 000 000 ÷ 2 = 47 731 399 536 132 812 500 000 000 000 + 0;
  • 47 731 399 536 132 812 500 000 000 000 ÷ 2 = 23 865 699 768 066 406 250 000 000 000 + 0;
  • 23 865 699 768 066 406 250 000 000 000 ÷ 2 = 11 932 849 884 033 203 125 000 000 000 + 0;
  • 11 932 849 884 033 203 125 000 000 000 ÷ 2 = 5 966 424 942 016 601 562 500 000 000 + 0;
  • 5 966 424 942 016 601 562 500 000 000 ÷ 2 = 2 983 212 471 008 300 781 250 000 000 + 0;
  • 2 983 212 471 008 300 781 250 000 000 ÷ 2 = 1 491 606 235 504 150 390 625 000 000 + 0;
  • 1 491 606 235 504 150 390 625 000 000 ÷ 2 = 745 803 117 752 075 195 312 500 000 + 0;
  • 745 803 117 752 075 195 312 500 000 ÷ 2 = 372 901 558 876 037 597 656 250 000 + 0;
  • 372 901 558 876 037 597 656 250 000 ÷ 2 = 186 450 779 438 018 798 828 125 000 + 0;
  • 186 450 779 438 018 798 828 125 000 ÷ 2 = 93 225 389 719 009 399 414 062 500 + 0;
  • 93 225 389 719 009 399 414 062 500 ÷ 2 = 46 612 694 859 504 699 707 031 250 + 0;
  • 46 612 694 859 504 699 707 031 250 ÷ 2 = 23 306 347 429 752 349 853 515 625 + 0;
  • 23 306 347 429 752 349 853 515 625 ÷ 2 = 11 653 173 714 876 174 926 757 812 + 1;
  • 11 653 173 714 876 174 926 757 812 ÷ 2 = 5 826 586 857 438 087 463 378 906 + 0;
  • 5 826 586 857 438 087 463 378 906 ÷ 2 = 2 913 293 428 719 043 731 689 453 + 0;
  • 2 913 293 428 719 043 731 689 453 ÷ 2 = 1 456 646 714 359 521 865 844 726 + 1;
  • 1 456 646 714 359 521 865 844 726 ÷ 2 = 728 323 357 179 760 932 922 363 + 0;
  • 728 323 357 179 760 932 922 363 ÷ 2 = 364 161 678 589 880 466 461 181 + 1;
  • 364 161 678 589 880 466 461 181 ÷ 2 = 182 080 839 294 940 233 230 590 + 1;
  • 182 080 839 294 940 233 230 590 ÷ 2 = 91 040 419 647 470 116 615 295 + 0;
  • 91 040 419 647 470 116 615 295 ÷ 2 = 45 520 209 823 735 058 307 647 + 1;
  • 45 520 209 823 735 058 307 647 ÷ 2 = 22 760 104 911 867 529 153 823 + 1;
  • 22 760 104 911 867 529 153 823 ÷ 2 = 11 380 052 455 933 764 576 911 + 1;
  • 11 380 052 455 933 764 576 911 ÷ 2 = 5 690 026 227 966 882 288 455 + 1;
  • 5 690 026 227 966 882 288 455 ÷ 2 = 2 845 013 113 983 441 144 227 + 1;
  • 2 845 013 113 983 441 144 227 ÷ 2 = 1 422 506 556 991 720 572 113 + 1;
  • 1 422 506 556 991 720 572 113 ÷ 2 = 711 253 278 495 860 286 056 + 1;
  • 711 253 278 495 860 286 056 ÷ 2 = 355 626 639 247 930 143 028 + 0;
  • 355 626 639 247 930 143 028 ÷ 2 = 177 813 319 623 965 071 514 + 0;
  • 177 813 319 623 965 071 514 ÷ 2 = 88 906 659 811 982 535 757 + 0;
  • 88 906 659 811 982 535 757 ÷ 2 = 44 453 329 905 991 267 878 + 1;
  • 44 453 329 905 991 267 878 ÷ 2 = 22 226 664 952 995 633 939 + 0;
  • 22 226 664 952 995 633 939 ÷ 2 = 11 113 332 476 497 816 969 + 1;
  • 11 113 332 476 497 816 969 ÷ 2 = 5 556 666 238 248 908 484 + 1;
  • 5 556 666 238 248 908 484 ÷ 2 = 2 778 333 119 124 454 242 + 0;
  • 2 778 333 119 124 454 242 ÷ 2 = 1 389 166 559 562 227 121 + 0;
  • 1 389 166 559 562 227 121 ÷ 2 = 694 583 279 781 113 560 + 1;
  • 694 583 279 781 113 560 ÷ 2 = 347 291 639 890 556 780 + 0;
  • 347 291 639 890 556 780 ÷ 2 = 173 645 819 945 278 390 + 0;
  • 173 645 819 945 278 390 ÷ 2 = 86 822 909 972 639 195 + 0;
  • 86 822 909 972 639 195 ÷ 2 = 43 411 454 986 319 597 + 1;
  • 43 411 454 986 319 597 ÷ 2 = 21 705 727 493 159 798 + 1;
  • 21 705 727 493 159 798 ÷ 2 = 10 852 863 746 579 899 + 0;
  • 10 852 863 746 579 899 ÷ 2 = 5 426 431 873 289 949 + 1;
  • 5 426 431 873 289 949 ÷ 2 = 2 713 215 936 644 974 + 1;
  • 2 713 215 936 644 974 ÷ 2 = 1 356 607 968 322 487 + 0;
  • 1 356 607 968 322 487 ÷ 2 = 678 303 984 161 243 + 1;
  • 678 303 984 161 243 ÷ 2 = 339 151 992 080 621 + 1;
  • 339 151 992 080 621 ÷ 2 = 169 575 996 040 310 + 1;
  • 169 575 996 040 310 ÷ 2 = 84 787 998 020 155 + 0;
  • 84 787 998 020 155 ÷ 2 = 42 393 999 010 077 + 1;
  • 42 393 999 010 077 ÷ 2 = 21 196 999 505 038 + 1;
  • 21 196 999 505 038 ÷ 2 = 10 598 499 752 519 + 0;
  • 10 598 499 752 519 ÷ 2 = 5 299 249 876 259 + 1;
  • 5 299 249 876 259 ÷ 2 = 2 649 624 938 129 + 1;
  • 2 649 624 938 129 ÷ 2 = 1 324 812 469 064 + 1;
  • 1 324 812 469 064 ÷ 2 = 662 406 234 532 + 0;
  • 662 406 234 532 ÷ 2 = 331 203 117 266 + 0;
  • 331 203 117 266 ÷ 2 = 165 601 558 633 + 0;
  • 165 601 558 633 ÷ 2 = 82 800 779 316 + 1;
  • 82 800 779 316 ÷ 2 = 41 400 389 658 + 0;
  • 41 400 389 658 ÷ 2 = 20 700 194 829 + 0;
  • 20 700 194 829 ÷ 2 = 10 350 097 414 + 1;
  • 10 350 097 414 ÷ 2 = 5 175 048 707 + 0;
  • 5 175 048 707 ÷ 2 = 2 587 524 353 + 1;
  • 2 587 524 353 ÷ 2 = 1 293 762 176 + 1;
  • 1 293 762 176 ÷ 2 = 646 881 088 + 0;
  • 646 881 088 ÷ 2 = 323 440 544 + 0;
  • 323 440 544 ÷ 2 = 161 720 272 + 0;
  • 161 720 272 ÷ 2 = 80 860 136 + 0;
  • 80 860 136 ÷ 2 = 40 430 068 + 0;
  • 40 430 068 ÷ 2 = 20 215 034 + 0;
  • 20 215 034 ÷ 2 = 10 107 517 + 0;
  • 10 107 517 ÷ 2 = 5 053 758 + 1;
  • 5 053 758 ÷ 2 = 2 526 879 + 0;
  • 2 526 879 ÷ 2 = 1 263 439 + 1;
  • 1 263 439 ÷ 2 = 631 719 + 1;
  • 631 719 ÷ 2 = 315 859 + 1;
  • 315 859 ÷ 2 = 157 929 + 1;
  • 157 929 ÷ 2 = 78 964 + 1;
  • 78 964 ÷ 2 = 39 482 + 0;
  • 39 482 ÷ 2 = 19 741 + 0;
  • 19 741 ÷ 2 = 9 870 + 1;
  • 9 870 ÷ 2 = 4 935 + 0;
  • 4 935 ÷ 2 = 2 467 + 1;
  • 2 467 ÷ 2 = 1 233 + 1;
  • 1 233 ÷ 2 = 616 + 1;
  • 616 ÷ 2 = 308 + 0;
  • 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;

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

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

100 100 000 000 000 000 000 000 000 000 000 331(10) =


1 0011 0100 0111 0100 1111 1010 0000 0011 0100 1000 1110 1101 1101 1011 0001 0011 0100 0111 1111 0110 1001 0000 0000 0000 0000 0000 0001 0100 1011(2)


3. Normalize the binary representation of the number.

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


100 100 000 000 000 000 000 000 000 000 000 331(10) =


1 0011 0100 0111 0100 1111 1010 0000 0011 0100 1000 1110 1101 1101 1011 0001 0011 0100 0111 1111 0110 1001 0000 0000 0000 0000 0000 0001 0100 1011(2) =


1 0011 0100 0111 0100 1111 1010 0000 0011 0100 1000 1110 1101 1101 1011 0001 0011 0100 0111 1111 0110 1001 0000 0000 0000 0000 0000 0001 0100 1011(2) × 20 =


1.0011 0100 0111 0100 1111 1010 0000 0011 0100 1000 1110 1101 1101 1011 0001 0011 0100 0111 1111 0110 1001 0000 0000 0000 0000 0000 0001 0100 1011(2) × 2116


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


Mantissa (not normalized):
1.0011 0100 0111 0100 1111 1010 0000 0011 0100 1000 1110 1101 1101 1011 0001 0011 0100 0111 1111 0110 1001 0000 0000 0000 0000 0000 0001 0100 1011


5. Adjust the exponent.

Use the 8 bit excess/bias notation:


Exponent (adjusted) =


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


116 + 2(8-1) - 1 =


(116 + 127)(10) =


243(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;
  • 243 ÷ 2 = 121 + 1;
  • 121 ÷ 2 = 60 + 1;
  • 60 ÷ 2 = 30 + 0;
  • 30 ÷ 2 = 15 + 0;
  • 15 ÷ 2 = 7 + 1;
  • 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) =


243(10) =


1111 0011(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 1010 0011 1010 0111 1101 0 0000 0011 0100 1000 1110 1101 1101 1011 0001 0011 0100 0111 1111 0110 1001 0000 0000 0000 0000 0000 0001 0100 1011 =


001 1010 0011 1010 0111 1101


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) =
1111 0011


Mantissa (23 bits) =
001 1010 0011 1010 0111 1101


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

0 - 1111 0011 - 001 1010 0011 1010 0111 1101


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