22 182 972 812 353 260 321 519 421 560 Converted to 32 Bit Single Precision IEEE 754 Binary Floating Point Representation Standard

Convert decimal 22 182 972 812 353 260 321 519 421 560(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
22 182 972 812 353 260 321 519 421 560(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;
  • 22 182 972 812 353 260 321 519 421 560 ÷ 2 = 11 091 486 406 176 630 160 759 710 780 + 0;
  • 11 091 486 406 176 630 160 759 710 780 ÷ 2 = 5 545 743 203 088 315 080 379 855 390 + 0;
  • 5 545 743 203 088 315 080 379 855 390 ÷ 2 = 2 772 871 601 544 157 540 189 927 695 + 0;
  • 2 772 871 601 544 157 540 189 927 695 ÷ 2 = 1 386 435 800 772 078 770 094 963 847 + 1;
  • 1 386 435 800 772 078 770 094 963 847 ÷ 2 = 693 217 900 386 039 385 047 481 923 + 1;
  • 693 217 900 386 039 385 047 481 923 ÷ 2 = 346 608 950 193 019 692 523 740 961 + 1;
  • 346 608 950 193 019 692 523 740 961 ÷ 2 = 173 304 475 096 509 846 261 870 480 + 1;
  • 173 304 475 096 509 846 261 870 480 ÷ 2 = 86 652 237 548 254 923 130 935 240 + 0;
  • 86 652 237 548 254 923 130 935 240 ÷ 2 = 43 326 118 774 127 461 565 467 620 + 0;
  • 43 326 118 774 127 461 565 467 620 ÷ 2 = 21 663 059 387 063 730 782 733 810 + 0;
  • 21 663 059 387 063 730 782 733 810 ÷ 2 = 10 831 529 693 531 865 391 366 905 + 0;
  • 10 831 529 693 531 865 391 366 905 ÷ 2 = 5 415 764 846 765 932 695 683 452 + 1;
  • 5 415 764 846 765 932 695 683 452 ÷ 2 = 2 707 882 423 382 966 347 841 726 + 0;
  • 2 707 882 423 382 966 347 841 726 ÷ 2 = 1 353 941 211 691 483 173 920 863 + 0;
  • 1 353 941 211 691 483 173 920 863 ÷ 2 = 676 970 605 845 741 586 960 431 + 1;
  • 676 970 605 845 741 586 960 431 ÷ 2 = 338 485 302 922 870 793 480 215 + 1;
  • 338 485 302 922 870 793 480 215 ÷ 2 = 169 242 651 461 435 396 740 107 + 1;
  • 169 242 651 461 435 396 740 107 ÷ 2 = 84 621 325 730 717 698 370 053 + 1;
  • 84 621 325 730 717 698 370 053 ÷ 2 = 42 310 662 865 358 849 185 026 + 1;
  • 42 310 662 865 358 849 185 026 ÷ 2 = 21 155 331 432 679 424 592 513 + 0;
  • 21 155 331 432 679 424 592 513 ÷ 2 = 10 577 665 716 339 712 296 256 + 1;
  • 10 577 665 716 339 712 296 256 ÷ 2 = 5 288 832 858 169 856 148 128 + 0;
  • 5 288 832 858 169 856 148 128 ÷ 2 = 2 644 416 429 084 928 074 064 + 0;
  • 2 644 416 429 084 928 074 064 ÷ 2 = 1 322 208 214 542 464 037 032 + 0;
  • 1 322 208 214 542 464 037 032 ÷ 2 = 661 104 107 271 232 018 516 + 0;
  • 661 104 107 271 232 018 516 ÷ 2 = 330 552 053 635 616 009 258 + 0;
  • 330 552 053 635 616 009 258 ÷ 2 = 165 276 026 817 808 004 629 + 0;
  • 165 276 026 817 808 004 629 ÷ 2 = 82 638 013 408 904 002 314 + 1;
  • 82 638 013 408 904 002 314 ÷ 2 = 41 319 006 704 452 001 157 + 0;
  • 41 319 006 704 452 001 157 ÷ 2 = 20 659 503 352 226 000 578 + 1;
  • 20 659 503 352 226 000 578 ÷ 2 = 10 329 751 676 113 000 289 + 0;
  • 10 329 751 676 113 000 289 ÷ 2 = 5 164 875 838 056 500 144 + 1;
  • 5 164 875 838 056 500 144 ÷ 2 = 2 582 437 919 028 250 072 + 0;
  • 2 582 437 919 028 250 072 ÷ 2 = 1 291 218 959 514 125 036 + 0;
  • 1 291 218 959 514 125 036 ÷ 2 = 645 609 479 757 062 518 + 0;
  • 645 609 479 757 062 518 ÷ 2 = 322 804 739 878 531 259 + 0;
  • 322 804 739 878 531 259 ÷ 2 = 161 402 369 939 265 629 + 1;
  • 161 402 369 939 265 629 ÷ 2 = 80 701 184 969 632 814 + 1;
  • 80 701 184 969 632 814 ÷ 2 = 40 350 592 484 816 407 + 0;
  • 40 350 592 484 816 407 ÷ 2 = 20 175 296 242 408 203 + 1;
  • 20 175 296 242 408 203 ÷ 2 = 10 087 648 121 204 101 + 1;
  • 10 087 648 121 204 101 ÷ 2 = 5 043 824 060 602 050 + 1;
  • 5 043 824 060 602 050 ÷ 2 = 2 521 912 030 301 025 + 0;
  • 2 521 912 030 301 025 ÷ 2 = 1 260 956 015 150 512 + 1;
  • 1 260 956 015 150 512 ÷ 2 = 630 478 007 575 256 + 0;
  • 630 478 007 575 256 ÷ 2 = 315 239 003 787 628 + 0;
  • 315 239 003 787 628 ÷ 2 = 157 619 501 893 814 + 0;
  • 157 619 501 893 814 ÷ 2 = 78 809 750 946 907 + 0;
  • 78 809 750 946 907 ÷ 2 = 39 404 875 473 453 + 1;
  • 39 404 875 473 453 ÷ 2 = 19 702 437 736 726 + 1;
  • 19 702 437 736 726 ÷ 2 = 9 851 218 868 363 + 0;
  • 9 851 218 868 363 ÷ 2 = 4 925 609 434 181 + 1;
  • 4 925 609 434 181 ÷ 2 = 2 462 804 717 090 + 1;
  • 2 462 804 717 090 ÷ 2 = 1 231 402 358 545 + 0;
  • 1 231 402 358 545 ÷ 2 = 615 701 179 272 + 1;
  • 615 701 179 272 ÷ 2 = 307 850 589 636 + 0;
  • 307 850 589 636 ÷ 2 = 153 925 294 818 + 0;
  • 153 925 294 818 ÷ 2 = 76 962 647 409 + 0;
  • 76 962 647 409 ÷ 2 = 38 481 323 704 + 1;
  • 38 481 323 704 ÷ 2 = 19 240 661 852 + 0;
  • 19 240 661 852 ÷ 2 = 9 620 330 926 + 0;
  • 9 620 330 926 ÷ 2 = 4 810 165 463 + 0;
  • 4 810 165 463 ÷ 2 = 2 405 082 731 + 1;
  • 2 405 082 731 ÷ 2 = 1 202 541 365 + 1;
  • 1 202 541 365 ÷ 2 = 601 270 682 + 1;
  • 601 270 682 ÷ 2 = 300 635 341 + 0;
  • 300 635 341 ÷ 2 = 150 317 670 + 1;
  • 150 317 670 ÷ 2 = 75 158 835 + 0;
  • 75 158 835 ÷ 2 = 37 579 417 + 1;
  • 37 579 417 ÷ 2 = 18 789 708 + 1;
  • 18 789 708 ÷ 2 = 9 394 854 + 0;
  • 9 394 854 ÷ 2 = 4 697 427 + 0;
  • 4 697 427 ÷ 2 = 2 348 713 + 1;
  • 2 348 713 ÷ 2 = 1 174 356 + 1;
  • 1 174 356 ÷ 2 = 587 178 + 0;
  • 587 178 ÷ 2 = 293 589 + 0;
  • 293 589 ÷ 2 = 146 794 + 1;
  • 146 794 ÷ 2 = 73 397 + 0;
  • 73 397 ÷ 2 = 36 698 + 1;
  • 36 698 ÷ 2 = 18 349 + 0;
  • 18 349 ÷ 2 = 9 174 + 1;
  • 9 174 ÷ 2 = 4 587 + 0;
  • 4 587 ÷ 2 = 2 293 + 1;
  • 2 293 ÷ 2 = 1 146 + 1;
  • 1 146 ÷ 2 = 573 + 0;
  • 573 ÷ 2 = 286 + 1;
  • 286 ÷ 2 = 143 + 0;
  • 143 ÷ 2 = 71 + 1;
  • 71 ÷ 2 = 35 + 1;
  • 35 ÷ 2 = 17 + 1;
  • 17 ÷ 2 = 8 + 1;
  • 8 ÷ 2 = 4 + 0;
  • 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.

22 182 972 812 353 260 321 519 421 560(10) =


100 0111 1010 1101 0101 0011 0011 0101 1100 0100 0101 1011 0000 1011 1011 0000 1010 1000 0001 0111 1100 1000 0111 1000(2)


3. Normalize the binary representation of the number.

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


22 182 972 812 353 260 321 519 421 560(10) =


100 0111 1010 1101 0101 0011 0011 0101 1100 0100 0101 1011 0000 1011 1011 0000 1010 1000 0001 0111 1100 1000 0111 1000(2) =


100 0111 1010 1101 0101 0011 0011 0101 1100 0100 0101 1011 0000 1011 1011 0000 1010 1000 0001 0111 1100 1000 0111 1000(2) × 20 =


1.0001 1110 1011 0101 0100 1100 1101 0111 0001 0001 0110 1100 0010 1110 1100 0010 1010 0000 0101 1111 0010 0001 1110 00(2) × 294


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


Mantissa (not normalized):
1.0001 1110 1011 0101 0100 1100 1101 0111 0001 0001 0110 1100 0010 1110 1100 0010 1010 0000 0101 1111 0010 0001 1110 00


5. Adjust the exponent.

Use the 8 bit excess/bias notation:


Exponent (adjusted) =


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


94 + 2(8-1) - 1 =


(94 + 127)(10) =


221(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;
  • 221 ÷ 2 = 110 + 1;
  • 110 ÷ 2 = 55 + 0;
  • 55 ÷ 2 = 27 + 1;
  • 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) =


221(10) =


1101 1101(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. 000 1111 0101 1010 1010 0110 011 0101 1100 0100 0101 1011 0000 1011 1011 0000 1010 1000 0001 0111 1100 1000 0111 1000 =


000 1111 0101 1010 1010 0110


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 1101


Mantissa (23 bits) =
000 1111 0101 1010 1010 0110


Decimal number 22 182 972 812 353 260 321 519 421 560 converted to 32 bit single precision IEEE 754 binary floating point representation:

0 - 1101 1101 - 000 1111 0101 1010 1010 0110


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