-0.000 000 000 000 006 262 623 222 335 868 562 Converted to 32 Bit Single Precision IEEE 754 Binary Floating Point Representation Standard

Convert decimal -0.000 000 000 000 006 262 623 222 335 868 562(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
-0.000 000 000 000 006 262 623 222 335 868 562(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. Start with the positive version of the number:

|-0.000 000 000 000 006 262 623 222 335 868 562| = 0.000 000 000 000 006 262 623 222 335 868 562


2. First, convert to binary (in base 2) the integer part: 0.
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;
  • 0 ÷ 2 = 0 + 0;

3. Construct the base 2 representation of the integer part of the number.

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

0(10) =


0(2)


4. Convert to binary (base 2) the fractional part: 0.000 000 000 000 006 262 623 222 335 868 562.

Multiply it repeatedly by 2.


Keep track of each integer part of the results.


Stop when we get a fractional part that is equal to zero.


  • #) multiplying = integer + fractional part;
  • 1) 0.000 000 000 000 006 262 623 222 335 868 562 × 2 = 0 + 0.000 000 000 000 012 525 246 444 671 737 124;
  • 2) 0.000 000 000 000 012 525 246 444 671 737 124 × 2 = 0 + 0.000 000 000 000 025 050 492 889 343 474 248;
  • 3) 0.000 000 000 000 025 050 492 889 343 474 248 × 2 = 0 + 0.000 000 000 000 050 100 985 778 686 948 496;
  • 4) 0.000 000 000 000 050 100 985 778 686 948 496 × 2 = 0 + 0.000 000 000 000 100 201 971 557 373 896 992;
  • 5) 0.000 000 000 000 100 201 971 557 373 896 992 × 2 = 0 + 0.000 000 000 000 200 403 943 114 747 793 984;
  • 6) 0.000 000 000 000 200 403 943 114 747 793 984 × 2 = 0 + 0.000 000 000 000 400 807 886 229 495 587 968;
  • 7) 0.000 000 000 000 400 807 886 229 495 587 968 × 2 = 0 + 0.000 000 000 000 801 615 772 458 991 175 936;
  • 8) 0.000 000 000 000 801 615 772 458 991 175 936 × 2 = 0 + 0.000 000 000 001 603 231 544 917 982 351 872;
  • 9) 0.000 000 000 001 603 231 544 917 982 351 872 × 2 = 0 + 0.000 000 000 003 206 463 089 835 964 703 744;
  • 10) 0.000 000 000 003 206 463 089 835 964 703 744 × 2 = 0 + 0.000 000 000 006 412 926 179 671 929 407 488;
  • 11) 0.000 000 000 006 412 926 179 671 929 407 488 × 2 = 0 + 0.000 000 000 012 825 852 359 343 858 814 976;
  • 12) 0.000 000 000 012 825 852 359 343 858 814 976 × 2 = 0 + 0.000 000 000 025 651 704 718 687 717 629 952;
  • 13) 0.000 000 000 025 651 704 718 687 717 629 952 × 2 = 0 + 0.000 000 000 051 303 409 437 375 435 259 904;
  • 14) 0.000 000 000 051 303 409 437 375 435 259 904 × 2 = 0 + 0.000 000 000 102 606 818 874 750 870 519 808;
  • 15) 0.000 000 000 102 606 818 874 750 870 519 808 × 2 = 0 + 0.000 000 000 205 213 637 749 501 741 039 616;
  • 16) 0.000 000 000 205 213 637 749 501 741 039 616 × 2 = 0 + 0.000 000 000 410 427 275 499 003 482 079 232;
  • 17) 0.000 000 000 410 427 275 499 003 482 079 232 × 2 = 0 + 0.000 000 000 820 854 550 998 006 964 158 464;
  • 18) 0.000 000 000 820 854 550 998 006 964 158 464 × 2 = 0 + 0.000 000 001 641 709 101 996 013 928 316 928;
  • 19) 0.000 000 001 641 709 101 996 013 928 316 928 × 2 = 0 + 0.000 000 003 283 418 203 992 027 856 633 856;
  • 20) 0.000 000 003 283 418 203 992 027 856 633 856 × 2 = 0 + 0.000 000 006 566 836 407 984 055 713 267 712;
  • 21) 0.000 000 006 566 836 407 984 055 713 267 712 × 2 = 0 + 0.000 000 013 133 672 815 968 111 426 535 424;
  • 22) 0.000 000 013 133 672 815 968 111 426 535 424 × 2 = 0 + 0.000 000 026 267 345 631 936 222 853 070 848;
  • 23) 0.000 000 026 267 345 631 936 222 853 070 848 × 2 = 0 + 0.000 000 052 534 691 263 872 445 706 141 696;
  • 24) 0.000 000 052 534 691 263 872 445 706 141 696 × 2 = 0 + 0.000 000 105 069 382 527 744 891 412 283 392;
  • 25) 0.000 000 105 069 382 527 744 891 412 283 392 × 2 = 0 + 0.000 000 210 138 765 055 489 782 824 566 784;
  • 26) 0.000 000 210 138 765 055 489 782 824 566 784 × 2 = 0 + 0.000 000 420 277 530 110 979 565 649 133 568;
  • 27) 0.000 000 420 277 530 110 979 565 649 133 568 × 2 = 0 + 0.000 000 840 555 060 221 959 131 298 267 136;
  • 28) 0.000 000 840 555 060 221 959 131 298 267 136 × 2 = 0 + 0.000 001 681 110 120 443 918 262 596 534 272;
  • 29) 0.000 001 681 110 120 443 918 262 596 534 272 × 2 = 0 + 0.000 003 362 220 240 887 836 525 193 068 544;
  • 30) 0.000 003 362 220 240 887 836 525 193 068 544 × 2 = 0 + 0.000 006 724 440 481 775 673 050 386 137 088;
  • 31) 0.000 006 724 440 481 775 673 050 386 137 088 × 2 = 0 + 0.000 013 448 880 963 551 346 100 772 274 176;
  • 32) 0.000 013 448 880 963 551 346 100 772 274 176 × 2 = 0 + 0.000 026 897 761 927 102 692 201 544 548 352;
  • 33) 0.000 026 897 761 927 102 692 201 544 548 352 × 2 = 0 + 0.000 053 795 523 854 205 384 403 089 096 704;
  • 34) 0.000 053 795 523 854 205 384 403 089 096 704 × 2 = 0 + 0.000 107 591 047 708 410 768 806 178 193 408;
  • 35) 0.000 107 591 047 708 410 768 806 178 193 408 × 2 = 0 + 0.000 215 182 095 416 821 537 612 356 386 816;
  • 36) 0.000 215 182 095 416 821 537 612 356 386 816 × 2 = 0 + 0.000 430 364 190 833 643 075 224 712 773 632;
  • 37) 0.000 430 364 190 833 643 075 224 712 773 632 × 2 = 0 + 0.000 860 728 381 667 286 150 449 425 547 264;
  • 38) 0.000 860 728 381 667 286 150 449 425 547 264 × 2 = 0 + 0.001 721 456 763 334 572 300 898 851 094 528;
  • 39) 0.001 721 456 763 334 572 300 898 851 094 528 × 2 = 0 + 0.003 442 913 526 669 144 601 797 702 189 056;
  • 40) 0.003 442 913 526 669 144 601 797 702 189 056 × 2 = 0 + 0.006 885 827 053 338 289 203 595 404 378 112;
  • 41) 0.006 885 827 053 338 289 203 595 404 378 112 × 2 = 0 + 0.013 771 654 106 676 578 407 190 808 756 224;
  • 42) 0.013 771 654 106 676 578 407 190 808 756 224 × 2 = 0 + 0.027 543 308 213 353 156 814 381 617 512 448;
  • 43) 0.027 543 308 213 353 156 814 381 617 512 448 × 2 = 0 + 0.055 086 616 426 706 313 628 763 235 024 896;
  • 44) 0.055 086 616 426 706 313 628 763 235 024 896 × 2 = 0 + 0.110 173 232 853 412 627 257 526 470 049 792;
  • 45) 0.110 173 232 853 412 627 257 526 470 049 792 × 2 = 0 + 0.220 346 465 706 825 254 515 052 940 099 584;
  • 46) 0.220 346 465 706 825 254 515 052 940 099 584 × 2 = 0 + 0.440 692 931 413 650 509 030 105 880 199 168;
  • 47) 0.440 692 931 413 650 509 030 105 880 199 168 × 2 = 0 + 0.881 385 862 827 301 018 060 211 760 398 336;
  • 48) 0.881 385 862 827 301 018 060 211 760 398 336 × 2 = 1 + 0.762 771 725 654 602 036 120 423 520 796 672;
  • 49) 0.762 771 725 654 602 036 120 423 520 796 672 × 2 = 1 + 0.525 543 451 309 204 072 240 847 041 593 344;
  • 50) 0.525 543 451 309 204 072 240 847 041 593 344 × 2 = 1 + 0.051 086 902 618 408 144 481 694 083 186 688;
  • 51) 0.051 086 902 618 408 144 481 694 083 186 688 × 2 = 0 + 0.102 173 805 236 816 288 963 388 166 373 376;
  • 52) 0.102 173 805 236 816 288 963 388 166 373 376 × 2 = 0 + 0.204 347 610 473 632 577 926 776 332 746 752;
  • 53) 0.204 347 610 473 632 577 926 776 332 746 752 × 2 = 0 + 0.408 695 220 947 265 155 853 552 665 493 504;
  • 54) 0.408 695 220 947 265 155 853 552 665 493 504 × 2 = 0 + 0.817 390 441 894 530 311 707 105 330 987 008;
  • 55) 0.817 390 441 894 530 311 707 105 330 987 008 × 2 = 1 + 0.634 780 883 789 060 623 414 210 661 974 016;
  • 56) 0.634 780 883 789 060 623 414 210 661 974 016 × 2 = 1 + 0.269 561 767 578 121 246 828 421 323 948 032;
  • 57) 0.269 561 767 578 121 246 828 421 323 948 032 × 2 = 0 + 0.539 123 535 156 242 493 656 842 647 896 064;
  • 58) 0.539 123 535 156 242 493 656 842 647 896 064 × 2 = 1 + 0.078 247 070 312 484 987 313 685 295 792 128;
  • 59) 0.078 247 070 312 484 987 313 685 295 792 128 × 2 = 0 + 0.156 494 140 624 969 974 627 370 591 584 256;
  • 60) 0.156 494 140 624 969 974 627 370 591 584 256 × 2 = 0 + 0.312 988 281 249 939 949 254 741 183 168 512;
  • 61) 0.312 988 281 249 939 949 254 741 183 168 512 × 2 = 0 + 0.625 976 562 499 879 898 509 482 366 337 024;
  • 62) 0.625 976 562 499 879 898 509 482 366 337 024 × 2 = 1 + 0.251 953 124 999 759 797 018 964 732 674 048;
  • 63) 0.251 953 124 999 759 797 018 964 732 674 048 × 2 = 0 + 0.503 906 249 999 519 594 037 929 465 348 096;
  • 64) 0.503 906 249 999 519 594 037 929 465 348 096 × 2 = 1 + 0.007 812 499 999 039 188 075 858 930 696 192;
  • 65) 0.007 812 499 999 039 188 075 858 930 696 192 × 2 = 0 + 0.015 624 999 998 078 376 151 717 861 392 384;
  • 66) 0.015 624 999 998 078 376 151 717 861 392 384 × 2 = 0 + 0.031 249 999 996 156 752 303 435 722 784 768;
  • 67) 0.031 249 999 996 156 752 303 435 722 784 768 × 2 = 0 + 0.062 499 999 992 313 504 606 871 445 569 536;
  • 68) 0.062 499 999 992 313 504 606 871 445 569 536 × 2 = 0 + 0.124 999 999 984 627 009 213 742 891 139 072;
  • 69) 0.124 999 999 984 627 009 213 742 891 139 072 × 2 = 0 + 0.249 999 999 969 254 018 427 485 782 278 144;
  • 70) 0.249 999 999 969 254 018 427 485 782 278 144 × 2 = 0 + 0.499 999 999 938 508 036 854 971 564 556 288;
  • 71) 0.499 999 999 938 508 036 854 971 564 556 288 × 2 = 0 + 0.999 999 999 877 016 073 709 943 129 112 576;

We didn't get any fractional part that was equal to zero. But we had enough iterations (over Mantissa limit) and at least one integer that was different from zero => FULL STOP (Losing precision - the converted number we get in the end will be just a very good approximation of the initial one).


5. Construct the base 2 representation of the fractional part of the number.

Take all the integer parts of the multiplying operations, starting from the top of the constructed list above:


0.000 000 000 000 006 262 623 222 335 868 562(10) =


0.0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0001 1100 0011 0100 0101 0000 000(2)

6. Positive number before normalization:

0.000 000 000 000 006 262 623 222 335 868 562(10) =


0.0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0001 1100 0011 0100 0101 0000 000(2)

7. Normalize the binary representation of the number.

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


0.000 000 000 000 006 262 623 222 335 868 562(10) =


0.0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0001 1100 0011 0100 0101 0000 000(2) =


0.0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0001 1100 0011 0100 0101 0000 000(2) × 20 =


1.1100 0011 0100 0101 0000 000(2) × 2-48


8. 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 1 (a negative number)


Exponent (unadjusted): -48


Mantissa (not normalized):
1.1100 0011 0100 0101 0000 000


9. Adjust the exponent.

Use the 8 bit excess/bias notation:


Exponent (adjusted) =


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


-48 + 2(8-1) - 1 =


(-48 + 127)(10) =


79(10)


10. 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;
  • 79 ÷ 2 = 39 + 1;
  • 39 ÷ 2 = 19 + 1;
  • 19 ÷ 2 = 9 + 1;
  • 9 ÷ 2 = 4 + 1;
  • 4 ÷ 2 = 2 + 0;
  • 2 ÷ 2 = 1 + 0;
  • 1 ÷ 2 = 0 + 1;

11. Construct the base 2 representation of the adjusted exponent.

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


Exponent (adjusted) =


79(10) =


0100 1111(2)


12. 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, only if necessary (not the case here).


Mantissa (normalized) =


1. 110 0001 1010 0010 1000 0000 =


110 0001 1010 0010 1000 0000


13. The three elements that make up the number's 32 bit single precision IEEE 754 binary floating point representation:

Sign (1 bit) =
1 (a negative number)


Exponent (8 bits) =
0100 1111


Mantissa (23 bits) =
110 0001 1010 0010 1000 0000


Decimal number -0.000 000 000 000 006 262 623 222 335 868 562 converted to 32 bit single precision IEEE 754 binary floating point representation:

1 - 0100 1111 - 110 0001 1010 0010 1000 0000


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