-0.000 000 000 000 006 262 623 222 335 868 2 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 2(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 2(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 2| = 0.000 000 000 000 006 262 623 222 335 868 2


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 2.

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 2 × 2 = 0 + 0.000 000 000 000 012 525 246 444 671 736 4;
  • 2) 0.000 000 000 000 012 525 246 444 671 736 4 × 2 = 0 + 0.000 000 000 000 025 050 492 889 343 472 8;
  • 3) 0.000 000 000 000 025 050 492 889 343 472 8 × 2 = 0 + 0.000 000 000 000 050 100 985 778 686 945 6;
  • 4) 0.000 000 000 000 050 100 985 778 686 945 6 × 2 = 0 + 0.000 000 000 000 100 201 971 557 373 891 2;
  • 5) 0.000 000 000 000 100 201 971 557 373 891 2 × 2 = 0 + 0.000 000 000 000 200 403 943 114 747 782 4;
  • 6) 0.000 000 000 000 200 403 943 114 747 782 4 × 2 = 0 + 0.000 000 000 000 400 807 886 229 495 564 8;
  • 7) 0.000 000 000 000 400 807 886 229 495 564 8 × 2 = 0 + 0.000 000 000 000 801 615 772 458 991 129 6;
  • 8) 0.000 000 000 000 801 615 772 458 991 129 6 × 2 = 0 + 0.000 000 000 001 603 231 544 917 982 259 2;
  • 9) 0.000 000 000 001 603 231 544 917 982 259 2 × 2 = 0 + 0.000 000 000 003 206 463 089 835 964 518 4;
  • 10) 0.000 000 000 003 206 463 089 835 964 518 4 × 2 = 0 + 0.000 000 000 006 412 926 179 671 929 036 8;
  • 11) 0.000 000 000 006 412 926 179 671 929 036 8 × 2 = 0 + 0.000 000 000 012 825 852 359 343 858 073 6;
  • 12) 0.000 000 000 012 825 852 359 343 858 073 6 × 2 = 0 + 0.000 000 000 025 651 704 718 687 716 147 2;
  • 13) 0.000 000 000 025 651 704 718 687 716 147 2 × 2 = 0 + 0.000 000 000 051 303 409 437 375 432 294 4;
  • 14) 0.000 000 000 051 303 409 437 375 432 294 4 × 2 = 0 + 0.000 000 000 102 606 818 874 750 864 588 8;
  • 15) 0.000 000 000 102 606 818 874 750 864 588 8 × 2 = 0 + 0.000 000 000 205 213 637 749 501 729 177 6;
  • 16) 0.000 000 000 205 213 637 749 501 729 177 6 × 2 = 0 + 0.000 000 000 410 427 275 499 003 458 355 2;
  • 17) 0.000 000 000 410 427 275 499 003 458 355 2 × 2 = 0 + 0.000 000 000 820 854 550 998 006 916 710 4;
  • 18) 0.000 000 000 820 854 550 998 006 916 710 4 × 2 = 0 + 0.000 000 001 641 709 101 996 013 833 420 8;
  • 19) 0.000 000 001 641 709 101 996 013 833 420 8 × 2 = 0 + 0.000 000 003 283 418 203 992 027 666 841 6;
  • 20) 0.000 000 003 283 418 203 992 027 666 841 6 × 2 = 0 + 0.000 000 006 566 836 407 984 055 333 683 2;
  • 21) 0.000 000 006 566 836 407 984 055 333 683 2 × 2 = 0 + 0.000 000 013 133 672 815 968 110 667 366 4;
  • 22) 0.000 000 013 133 672 815 968 110 667 366 4 × 2 = 0 + 0.000 000 026 267 345 631 936 221 334 732 8;
  • 23) 0.000 000 026 267 345 631 936 221 334 732 8 × 2 = 0 + 0.000 000 052 534 691 263 872 442 669 465 6;
  • 24) 0.000 000 052 534 691 263 872 442 669 465 6 × 2 = 0 + 0.000 000 105 069 382 527 744 885 338 931 2;
  • 25) 0.000 000 105 069 382 527 744 885 338 931 2 × 2 = 0 + 0.000 000 210 138 765 055 489 770 677 862 4;
  • 26) 0.000 000 210 138 765 055 489 770 677 862 4 × 2 = 0 + 0.000 000 420 277 530 110 979 541 355 724 8;
  • 27) 0.000 000 420 277 530 110 979 541 355 724 8 × 2 = 0 + 0.000 000 840 555 060 221 959 082 711 449 6;
  • 28) 0.000 000 840 555 060 221 959 082 711 449 6 × 2 = 0 + 0.000 001 681 110 120 443 918 165 422 899 2;
  • 29) 0.000 001 681 110 120 443 918 165 422 899 2 × 2 = 0 + 0.000 003 362 220 240 887 836 330 845 798 4;
  • 30) 0.000 003 362 220 240 887 836 330 845 798 4 × 2 = 0 + 0.000 006 724 440 481 775 672 661 691 596 8;
  • 31) 0.000 006 724 440 481 775 672 661 691 596 8 × 2 = 0 + 0.000 013 448 880 963 551 345 323 383 193 6;
  • 32) 0.000 013 448 880 963 551 345 323 383 193 6 × 2 = 0 + 0.000 026 897 761 927 102 690 646 766 387 2;
  • 33) 0.000 026 897 761 927 102 690 646 766 387 2 × 2 = 0 + 0.000 053 795 523 854 205 381 293 532 774 4;
  • 34) 0.000 053 795 523 854 205 381 293 532 774 4 × 2 = 0 + 0.000 107 591 047 708 410 762 587 065 548 8;
  • 35) 0.000 107 591 047 708 410 762 587 065 548 8 × 2 = 0 + 0.000 215 182 095 416 821 525 174 131 097 6;
  • 36) 0.000 215 182 095 416 821 525 174 131 097 6 × 2 = 0 + 0.000 430 364 190 833 643 050 348 262 195 2;
  • 37) 0.000 430 364 190 833 643 050 348 262 195 2 × 2 = 0 + 0.000 860 728 381 667 286 100 696 524 390 4;
  • 38) 0.000 860 728 381 667 286 100 696 524 390 4 × 2 = 0 + 0.001 721 456 763 334 572 201 393 048 780 8;
  • 39) 0.001 721 456 763 334 572 201 393 048 780 8 × 2 = 0 + 0.003 442 913 526 669 144 402 786 097 561 6;
  • 40) 0.003 442 913 526 669 144 402 786 097 561 6 × 2 = 0 + 0.006 885 827 053 338 288 805 572 195 123 2;
  • 41) 0.006 885 827 053 338 288 805 572 195 123 2 × 2 = 0 + 0.013 771 654 106 676 577 611 144 390 246 4;
  • 42) 0.013 771 654 106 676 577 611 144 390 246 4 × 2 = 0 + 0.027 543 308 213 353 155 222 288 780 492 8;
  • 43) 0.027 543 308 213 353 155 222 288 780 492 8 × 2 = 0 + 0.055 086 616 426 706 310 444 577 560 985 6;
  • 44) 0.055 086 616 426 706 310 444 577 560 985 6 × 2 = 0 + 0.110 173 232 853 412 620 889 155 121 971 2;
  • 45) 0.110 173 232 853 412 620 889 155 121 971 2 × 2 = 0 + 0.220 346 465 706 825 241 778 310 243 942 4;
  • 46) 0.220 346 465 706 825 241 778 310 243 942 4 × 2 = 0 + 0.440 692 931 413 650 483 556 620 487 884 8;
  • 47) 0.440 692 931 413 650 483 556 620 487 884 8 × 2 = 0 + 0.881 385 862 827 300 967 113 240 975 769 6;
  • 48) 0.881 385 862 827 300 967 113 240 975 769 6 × 2 = 1 + 0.762 771 725 654 601 934 226 481 951 539 2;
  • 49) 0.762 771 725 654 601 934 226 481 951 539 2 × 2 = 1 + 0.525 543 451 309 203 868 452 963 903 078 4;
  • 50) 0.525 543 451 309 203 868 452 963 903 078 4 × 2 = 1 + 0.051 086 902 618 407 736 905 927 806 156 8;
  • 51) 0.051 086 902 618 407 736 905 927 806 156 8 × 2 = 0 + 0.102 173 805 236 815 473 811 855 612 313 6;
  • 52) 0.102 173 805 236 815 473 811 855 612 313 6 × 2 = 0 + 0.204 347 610 473 630 947 623 711 224 627 2;
  • 53) 0.204 347 610 473 630 947 623 711 224 627 2 × 2 = 0 + 0.408 695 220 947 261 895 247 422 449 254 4;
  • 54) 0.408 695 220 947 261 895 247 422 449 254 4 × 2 = 0 + 0.817 390 441 894 523 790 494 844 898 508 8;
  • 55) 0.817 390 441 894 523 790 494 844 898 508 8 × 2 = 1 + 0.634 780 883 789 047 580 989 689 797 017 6;
  • 56) 0.634 780 883 789 047 580 989 689 797 017 6 × 2 = 1 + 0.269 561 767 578 095 161 979 379 594 035 2;
  • 57) 0.269 561 767 578 095 161 979 379 594 035 2 × 2 = 0 + 0.539 123 535 156 190 323 958 759 188 070 4;
  • 58) 0.539 123 535 156 190 323 958 759 188 070 4 × 2 = 1 + 0.078 247 070 312 380 647 917 518 376 140 8;
  • 59) 0.078 247 070 312 380 647 917 518 376 140 8 × 2 = 0 + 0.156 494 140 624 761 295 835 036 752 281 6;
  • 60) 0.156 494 140 624 761 295 835 036 752 281 6 × 2 = 0 + 0.312 988 281 249 522 591 670 073 504 563 2;
  • 61) 0.312 988 281 249 522 591 670 073 504 563 2 × 2 = 0 + 0.625 976 562 499 045 183 340 147 009 126 4;
  • 62) 0.625 976 562 499 045 183 340 147 009 126 4 × 2 = 1 + 0.251 953 124 998 090 366 680 294 018 252 8;
  • 63) 0.251 953 124 998 090 366 680 294 018 252 8 × 2 = 0 + 0.503 906 249 996 180 733 360 588 036 505 6;
  • 64) 0.503 906 249 996 180 733 360 588 036 505 6 × 2 = 1 + 0.007 812 499 992 361 466 721 176 073 011 2;
  • 65) 0.007 812 499 992 361 466 721 176 073 011 2 × 2 = 0 + 0.015 624 999 984 722 933 442 352 146 022 4;
  • 66) 0.015 624 999 984 722 933 442 352 146 022 4 × 2 = 0 + 0.031 249 999 969 445 866 884 704 292 044 8;
  • 67) 0.031 249 999 969 445 866 884 704 292 044 8 × 2 = 0 + 0.062 499 999 938 891 733 769 408 584 089 6;
  • 68) 0.062 499 999 938 891 733 769 408 584 089 6 × 2 = 0 + 0.124 999 999 877 783 467 538 817 168 179 2;
  • 69) 0.124 999 999 877 783 467 538 817 168 179 2 × 2 = 0 + 0.249 999 999 755 566 935 077 634 336 358 4;
  • 70) 0.249 999 999 755 566 935 077 634 336 358 4 × 2 = 0 + 0.499 999 999 511 133 870 155 268 672 716 8;
  • 71) 0.499 999 999 511 133 870 155 268 672 716 8 × 2 = 0 + 0.999 999 999 022 267 740 310 537 345 433 6;

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 2(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 2(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 2(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 2 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