-0.000 000 000 000 000 002 335 153 506 863 298 Converted to 32 Bit Single Precision IEEE 754 Binary Floating Point Representation Standard

Convert decimal -0.000 000 000 000 000 002 335 153 506 863 298(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 000 002 335 153 506 863 298(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 000 002 335 153 506 863 298| = 0.000 000 000 000 000 002 335 153 506 863 298


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 000 002 335 153 506 863 298.

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 000 002 335 153 506 863 298 × 2 = 0 + 0.000 000 000 000 000 004 670 307 013 726 596;
  • 2) 0.000 000 000 000 000 004 670 307 013 726 596 × 2 = 0 + 0.000 000 000 000 000 009 340 614 027 453 192;
  • 3) 0.000 000 000 000 000 009 340 614 027 453 192 × 2 = 0 + 0.000 000 000 000 000 018 681 228 054 906 384;
  • 4) 0.000 000 000 000 000 018 681 228 054 906 384 × 2 = 0 + 0.000 000 000 000 000 037 362 456 109 812 768;
  • 5) 0.000 000 000 000 000 037 362 456 109 812 768 × 2 = 0 + 0.000 000 000 000 000 074 724 912 219 625 536;
  • 6) 0.000 000 000 000 000 074 724 912 219 625 536 × 2 = 0 + 0.000 000 000 000 000 149 449 824 439 251 072;
  • 7) 0.000 000 000 000 000 149 449 824 439 251 072 × 2 = 0 + 0.000 000 000 000 000 298 899 648 878 502 144;
  • 8) 0.000 000 000 000 000 298 899 648 878 502 144 × 2 = 0 + 0.000 000 000 000 000 597 799 297 757 004 288;
  • 9) 0.000 000 000 000 000 597 799 297 757 004 288 × 2 = 0 + 0.000 000 000 000 001 195 598 595 514 008 576;
  • 10) 0.000 000 000 000 001 195 598 595 514 008 576 × 2 = 0 + 0.000 000 000 000 002 391 197 191 028 017 152;
  • 11) 0.000 000 000 000 002 391 197 191 028 017 152 × 2 = 0 + 0.000 000 000 000 004 782 394 382 056 034 304;
  • 12) 0.000 000 000 000 004 782 394 382 056 034 304 × 2 = 0 + 0.000 000 000 000 009 564 788 764 112 068 608;
  • 13) 0.000 000 000 000 009 564 788 764 112 068 608 × 2 = 0 + 0.000 000 000 000 019 129 577 528 224 137 216;
  • 14) 0.000 000 000 000 019 129 577 528 224 137 216 × 2 = 0 + 0.000 000 000 000 038 259 155 056 448 274 432;
  • 15) 0.000 000 000 000 038 259 155 056 448 274 432 × 2 = 0 + 0.000 000 000 000 076 518 310 112 896 548 864;
  • 16) 0.000 000 000 000 076 518 310 112 896 548 864 × 2 = 0 + 0.000 000 000 000 153 036 620 225 793 097 728;
  • 17) 0.000 000 000 000 153 036 620 225 793 097 728 × 2 = 0 + 0.000 000 000 000 306 073 240 451 586 195 456;
  • 18) 0.000 000 000 000 306 073 240 451 586 195 456 × 2 = 0 + 0.000 000 000 000 612 146 480 903 172 390 912;
  • 19) 0.000 000 000 000 612 146 480 903 172 390 912 × 2 = 0 + 0.000 000 000 001 224 292 961 806 344 781 824;
  • 20) 0.000 000 000 001 224 292 961 806 344 781 824 × 2 = 0 + 0.000 000 000 002 448 585 923 612 689 563 648;
  • 21) 0.000 000 000 002 448 585 923 612 689 563 648 × 2 = 0 + 0.000 000 000 004 897 171 847 225 379 127 296;
  • 22) 0.000 000 000 004 897 171 847 225 379 127 296 × 2 = 0 + 0.000 000 000 009 794 343 694 450 758 254 592;
  • 23) 0.000 000 000 009 794 343 694 450 758 254 592 × 2 = 0 + 0.000 000 000 019 588 687 388 901 516 509 184;
  • 24) 0.000 000 000 019 588 687 388 901 516 509 184 × 2 = 0 + 0.000 000 000 039 177 374 777 803 033 018 368;
  • 25) 0.000 000 000 039 177 374 777 803 033 018 368 × 2 = 0 + 0.000 000 000 078 354 749 555 606 066 036 736;
  • 26) 0.000 000 000 078 354 749 555 606 066 036 736 × 2 = 0 + 0.000 000 000 156 709 499 111 212 132 073 472;
  • 27) 0.000 000 000 156 709 499 111 212 132 073 472 × 2 = 0 + 0.000 000 000 313 418 998 222 424 264 146 944;
  • 28) 0.000 000 000 313 418 998 222 424 264 146 944 × 2 = 0 + 0.000 000 000 626 837 996 444 848 528 293 888;
  • 29) 0.000 000 000 626 837 996 444 848 528 293 888 × 2 = 0 + 0.000 000 001 253 675 992 889 697 056 587 776;
  • 30) 0.000 000 001 253 675 992 889 697 056 587 776 × 2 = 0 + 0.000 000 002 507 351 985 779 394 113 175 552;
  • 31) 0.000 000 002 507 351 985 779 394 113 175 552 × 2 = 0 + 0.000 000 005 014 703 971 558 788 226 351 104;
  • 32) 0.000 000 005 014 703 971 558 788 226 351 104 × 2 = 0 + 0.000 000 010 029 407 943 117 576 452 702 208;
  • 33) 0.000 000 010 029 407 943 117 576 452 702 208 × 2 = 0 + 0.000 000 020 058 815 886 235 152 905 404 416;
  • 34) 0.000 000 020 058 815 886 235 152 905 404 416 × 2 = 0 + 0.000 000 040 117 631 772 470 305 810 808 832;
  • 35) 0.000 000 040 117 631 772 470 305 810 808 832 × 2 = 0 + 0.000 000 080 235 263 544 940 611 621 617 664;
  • 36) 0.000 000 080 235 263 544 940 611 621 617 664 × 2 = 0 + 0.000 000 160 470 527 089 881 223 243 235 328;
  • 37) 0.000 000 160 470 527 089 881 223 243 235 328 × 2 = 0 + 0.000 000 320 941 054 179 762 446 486 470 656;
  • 38) 0.000 000 320 941 054 179 762 446 486 470 656 × 2 = 0 + 0.000 000 641 882 108 359 524 892 972 941 312;
  • 39) 0.000 000 641 882 108 359 524 892 972 941 312 × 2 = 0 + 0.000 001 283 764 216 719 049 785 945 882 624;
  • 40) 0.000 001 283 764 216 719 049 785 945 882 624 × 2 = 0 + 0.000 002 567 528 433 438 099 571 891 765 248;
  • 41) 0.000 002 567 528 433 438 099 571 891 765 248 × 2 = 0 + 0.000 005 135 056 866 876 199 143 783 530 496;
  • 42) 0.000 005 135 056 866 876 199 143 783 530 496 × 2 = 0 + 0.000 010 270 113 733 752 398 287 567 060 992;
  • 43) 0.000 010 270 113 733 752 398 287 567 060 992 × 2 = 0 + 0.000 020 540 227 467 504 796 575 134 121 984;
  • 44) 0.000 020 540 227 467 504 796 575 134 121 984 × 2 = 0 + 0.000 041 080 454 935 009 593 150 268 243 968;
  • 45) 0.000 041 080 454 935 009 593 150 268 243 968 × 2 = 0 + 0.000 082 160 909 870 019 186 300 536 487 936;
  • 46) 0.000 082 160 909 870 019 186 300 536 487 936 × 2 = 0 + 0.000 164 321 819 740 038 372 601 072 975 872;
  • 47) 0.000 164 321 819 740 038 372 601 072 975 872 × 2 = 0 + 0.000 328 643 639 480 076 745 202 145 951 744;
  • 48) 0.000 328 643 639 480 076 745 202 145 951 744 × 2 = 0 + 0.000 657 287 278 960 153 490 404 291 903 488;
  • 49) 0.000 657 287 278 960 153 490 404 291 903 488 × 2 = 0 + 0.001 314 574 557 920 306 980 808 583 806 976;
  • 50) 0.001 314 574 557 920 306 980 808 583 806 976 × 2 = 0 + 0.002 629 149 115 840 613 961 617 167 613 952;
  • 51) 0.002 629 149 115 840 613 961 617 167 613 952 × 2 = 0 + 0.005 258 298 231 681 227 923 234 335 227 904;
  • 52) 0.005 258 298 231 681 227 923 234 335 227 904 × 2 = 0 + 0.010 516 596 463 362 455 846 468 670 455 808;
  • 53) 0.010 516 596 463 362 455 846 468 670 455 808 × 2 = 0 + 0.021 033 192 926 724 911 692 937 340 911 616;
  • 54) 0.021 033 192 926 724 911 692 937 340 911 616 × 2 = 0 + 0.042 066 385 853 449 823 385 874 681 823 232;
  • 55) 0.042 066 385 853 449 823 385 874 681 823 232 × 2 = 0 + 0.084 132 771 706 899 646 771 749 363 646 464;
  • 56) 0.084 132 771 706 899 646 771 749 363 646 464 × 2 = 0 + 0.168 265 543 413 799 293 543 498 727 292 928;
  • 57) 0.168 265 543 413 799 293 543 498 727 292 928 × 2 = 0 + 0.336 531 086 827 598 587 086 997 454 585 856;
  • 58) 0.336 531 086 827 598 587 086 997 454 585 856 × 2 = 0 + 0.673 062 173 655 197 174 173 994 909 171 712;
  • 59) 0.673 062 173 655 197 174 173 994 909 171 712 × 2 = 1 + 0.346 124 347 310 394 348 347 989 818 343 424;
  • 60) 0.346 124 347 310 394 348 347 989 818 343 424 × 2 = 0 + 0.692 248 694 620 788 696 695 979 636 686 848;
  • 61) 0.692 248 694 620 788 696 695 979 636 686 848 × 2 = 1 + 0.384 497 389 241 577 393 391 959 273 373 696;
  • 62) 0.384 497 389 241 577 393 391 959 273 373 696 × 2 = 0 + 0.768 994 778 483 154 786 783 918 546 747 392;
  • 63) 0.768 994 778 483 154 786 783 918 546 747 392 × 2 = 1 + 0.537 989 556 966 309 573 567 837 093 494 784;
  • 64) 0.537 989 556 966 309 573 567 837 093 494 784 × 2 = 1 + 0.075 979 113 932 619 147 135 674 186 989 568;
  • 65) 0.075 979 113 932 619 147 135 674 186 989 568 × 2 = 0 + 0.151 958 227 865 238 294 271 348 373 979 136;
  • 66) 0.151 958 227 865 238 294 271 348 373 979 136 × 2 = 0 + 0.303 916 455 730 476 588 542 696 747 958 272;
  • 67) 0.303 916 455 730 476 588 542 696 747 958 272 × 2 = 0 + 0.607 832 911 460 953 177 085 393 495 916 544;
  • 68) 0.607 832 911 460 953 177 085 393 495 916 544 × 2 = 1 + 0.215 665 822 921 906 354 170 786 991 833 088;
  • 69) 0.215 665 822 921 906 354 170 786 991 833 088 × 2 = 0 + 0.431 331 645 843 812 708 341 573 983 666 176;
  • 70) 0.431 331 645 843 812 708 341 573 983 666 176 × 2 = 0 + 0.862 663 291 687 625 416 683 147 967 332 352;
  • 71) 0.862 663 291 687 625 416 683 147 967 332 352 × 2 = 1 + 0.725 326 583 375 250 833 366 295 934 664 704;
  • 72) 0.725 326 583 375 250 833 366 295 934 664 704 × 2 = 1 + 0.450 653 166 750 501 666 732 591 869 329 408;
  • 73) 0.450 653 166 750 501 666 732 591 869 329 408 × 2 = 0 + 0.901 306 333 501 003 333 465 183 738 658 816;
  • 74) 0.901 306 333 501 003 333 465 183 738 658 816 × 2 = 1 + 0.802 612 667 002 006 666 930 367 477 317 632;
  • 75) 0.802 612 667 002 006 666 930 367 477 317 632 × 2 = 1 + 0.605 225 334 004 013 333 860 734 954 635 264;
  • 76) 0.605 225 334 004 013 333 860 734 954 635 264 × 2 = 1 + 0.210 450 668 008 026 667 721 469 909 270 528;
  • 77) 0.210 450 668 008 026 667 721 469 909 270 528 × 2 = 0 + 0.420 901 336 016 053 335 442 939 818 541 056;
  • 78) 0.420 901 336 016 053 335 442 939 818 541 056 × 2 = 0 + 0.841 802 672 032 106 670 885 879 637 082 112;
  • 79) 0.841 802 672 032 106 670 885 879 637 082 112 × 2 = 1 + 0.683 605 344 064 213 341 771 759 274 164 224;
  • 80) 0.683 605 344 064 213 341 771 759 274 164 224 × 2 = 1 + 0.367 210 688 128 426 683 543 518 548 328 448;
  • 81) 0.367 210 688 128 426 683 543 518 548 328 448 × 2 = 0 + 0.734 421 376 256 853 367 087 037 096 656 896;
  • 82) 0.734 421 376 256 853 367 087 037 096 656 896 × 2 = 1 + 0.468 842 752 513 706 734 174 074 193 313 792;

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 000 002 335 153 506 863 298(10) =


0.0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0010 1011 0001 0011 0111 0011 01(2)

6. Positive number before normalization:

0.000 000 000 000 000 002 335 153 506 863 298(10) =


0.0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0010 1011 0001 0011 0111 0011 01(2)

7. Normalize the binary representation of the number.

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


0.000 000 000 000 000 002 335 153 506 863 298(10) =


0.0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0010 1011 0001 0011 0111 0011 01(2) =


0.0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0010 1011 0001 0011 0111 0011 01(2) × 20 =


1.0101 1000 1001 1011 1001 101(2) × 2-59


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


Mantissa (not normalized):
1.0101 1000 1001 1011 1001 101


9. Adjust the exponent.

Use the 8 bit excess/bias notation:


Exponent (adjusted) =


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


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


(-59 + 127)(10) =


68(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;
  • 68 ÷ 2 = 34 + 0;
  • 34 ÷ 2 = 17 + 0;
  • 17 ÷ 2 = 8 + 1;
  • 8 ÷ 2 = 4 + 0;
  • 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) =


68(10) =


0100 0100(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. 010 1100 0100 1101 1100 1101 =


010 1100 0100 1101 1100 1101


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 0100


Mantissa (23 bits) =
010 1100 0100 1101 1100 1101


Decimal number -0.000 000 000 000 000 002 335 153 506 863 298 converted to 32 bit single precision IEEE 754 binary floating point representation:

1 - 0100 0100 - 010 1100 0100 1101 1100 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