1 000 100 101 011 111 000 000 000 000 335 Converted to 32 Bit Single Precision IEEE 754 Binary Floating Point Representation Standard

Convert decimal 1 000 100 101 011 111 000 000 000 000 335(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
1 000 100 101 011 111 000 000 000 000 335(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;
  • 1 000 100 101 011 111 000 000 000 000 335 ÷ 2 = 500 050 050 505 555 500 000 000 000 167 + 1;
  • 500 050 050 505 555 500 000 000 000 167 ÷ 2 = 250 025 025 252 777 750 000 000 000 083 + 1;
  • 250 025 025 252 777 750 000 000 000 083 ÷ 2 = 125 012 512 626 388 875 000 000 000 041 + 1;
  • 125 012 512 626 388 875 000 000 000 041 ÷ 2 = 62 506 256 313 194 437 500 000 000 020 + 1;
  • 62 506 256 313 194 437 500 000 000 020 ÷ 2 = 31 253 128 156 597 218 750 000 000 010 + 0;
  • 31 253 128 156 597 218 750 000 000 010 ÷ 2 = 15 626 564 078 298 609 375 000 000 005 + 0;
  • 15 626 564 078 298 609 375 000 000 005 ÷ 2 = 7 813 282 039 149 304 687 500 000 002 + 1;
  • 7 813 282 039 149 304 687 500 000 002 ÷ 2 = 3 906 641 019 574 652 343 750 000 001 + 0;
  • 3 906 641 019 574 652 343 750 000 001 ÷ 2 = 1 953 320 509 787 326 171 875 000 000 + 1;
  • 1 953 320 509 787 326 171 875 000 000 ÷ 2 = 976 660 254 893 663 085 937 500 000 + 0;
  • 976 660 254 893 663 085 937 500 000 ÷ 2 = 488 330 127 446 831 542 968 750 000 + 0;
  • 488 330 127 446 831 542 968 750 000 ÷ 2 = 244 165 063 723 415 771 484 375 000 + 0;
  • 244 165 063 723 415 771 484 375 000 ÷ 2 = 122 082 531 861 707 885 742 187 500 + 0;
  • 122 082 531 861 707 885 742 187 500 ÷ 2 = 61 041 265 930 853 942 871 093 750 + 0;
  • 61 041 265 930 853 942 871 093 750 ÷ 2 = 30 520 632 965 426 971 435 546 875 + 0;
  • 30 520 632 965 426 971 435 546 875 ÷ 2 = 15 260 316 482 713 485 717 773 437 + 1;
  • 15 260 316 482 713 485 717 773 437 ÷ 2 = 7 630 158 241 356 742 858 886 718 + 1;
  • 7 630 158 241 356 742 858 886 718 ÷ 2 = 3 815 079 120 678 371 429 443 359 + 0;
  • 3 815 079 120 678 371 429 443 359 ÷ 2 = 1 907 539 560 339 185 714 721 679 + 1;
  • 1 907 539 560 339 185 714 721 679 ÷ 2 = 953 769 780 169 592 857 360 839 + 1;
  • 953 769 780 169 592 857 360 839 ÷ 2 = 476 884 890 084 796 428 680 419 + 1;
  • 476 884 890 084 796 428 680 419 ÷ 2 = 238 442 445 042 398 214 340 209 + 1;
  • 238 442 445 042 398 214 340 209 ÷ 2 = 119 221 222 521 199 107 170 104 + 1;
  • 119 221 222 521 199 107 170 104 ÷ 2 = 59 610 611 260 599 553 585 052 + 0;
  • 59 610 611 260 599 553 585 052 ÷ 2 = 29 805 305 630 299 776 792 526 + 0;
  • 29 805 305 630 299 776 792 526 ÷ 2 = 14 902 652 815 149 888 396 263 + 0;
  • 14 902 652 815 149 888 396 263 ÷ 2 = 7 451 326 407 574 944 198 131 + 1;
  • 7 451 326 407 574 944 198 131 ÷ 2 = 3 725 663 203 787 472 099 065 + 1;
  • 3 725 663 203 787 472 099 065 ÷ 2 = 1 862 831 601 893 736 049 532 + 1;
  • 1 862 831 601 893 736 049 532 ÷ 2 = 931 415 800 946 868 024 766 + 0;
  • 931 415 800 946 868 024 766 ÷ 2 = 465 707 900 473 434 012 383 + 0;
  • 465 707 900 473 434 012 383 ÷ 2 = 232 853 950 236 717 006 191 + 1;
  • 232 853 950 236 717 006 191 ÷ 2 = 116 426 975 118 358 503 095 + 1;
  • 116 426 975 118 358 503 095 ÷ 2 = 58 213 487 559 179 251 547 + 1;
  • 58 213 487 559 179 251 547 ÷ 2 = 29 106 743 779 589 625 773 + 1;
  • 29 106 743 779 589 625 773 ÷ 2 = 14 553 371 889 794 812 886 + 1;
  • 14 553 371 889 794 812 886 ÷ 2 = 7 276 685 944 897 406 443 + 0;
  • 7 276 685 944 897 406 443 ÷ 2 = 3 638 342 972 448 703 221 + 1;
  • 3 638 342 972 448 703 221 ÷ 2 = 1 819 171 486 224 351 610 + 1;
  • 1 819 171 486 224 351 610 ÷ 2 = 909 585 743 112 175 805 + 0;
  • 909 585 743 112 175 805 ÷ 2 = 454 792 871 556 087 902 + 1;
  • 454 792 871 556 087 902 ÷ 2 = 227 396 435 778 043 951 + 0;
  • 227 396 435 778 043 951 ÷ 2 = 113 698 217 889 021 975 + 1;
  • 113 698 217 889 021 975 ÷ 2 = 56 849 108 944 510 987 + 1;
  • 56 849 108 944 510 987 ÷ 2 = 28 424 554 472 255 493 + 1;
  • 28 424 554 472 255 493 ÷ 2 = 14 212 277 236 127 746 + 1;
  • 14 212 277 236 127 746 ÷ 2 = 7 106 138 618 063 873 + 0;
  • 7 106 138 618 063 873 ÷ 2 = 3 553 069 309 031 936 + 1;
  • 3 553 069 309 031 936 ÷ 2 = 1 776 534 654 515 968 + 0;
  • 1 776 534 654 515 968 ÷ 2 = 888 267 327 257 984 + 0;
  • 888 267 327 257 984 ÷ 2 = 444 133 663 628 992 + 0;
  • 444 133 663 628 992 ÷ 2 = 222 066 831 814 496 + 0;
  • 222 066 831 814 496 ÷ 2 = 111 033 415 907 248 + 0;
  • 111 033 415 907 248 ÷ 2 = 55 516 707 953 624 + 0;
  • 55 516 707 953 624 ÷ 2 = 27 758 353 976 812 + 0;
  • 27 758 353 976 812 ÷ 2 = 13 879 176 988 406 + 0;
  • 13 879 176 988 406 ÷ 2 = 6 939 588 494 203 + 0;
  • 6 939 588 494 203 ÷ 2 = 3 469 794 247 101 + 1;
  • 3 469 794 247 101 ÷ 2 = 1 734 897 123 550 + 1;
  • 1 734 897 123 550 ÷ 2 = 867 448 561 775 + 0;
  • 867 448 561 775 ÷ 2 = 433 724 280 887 + 1;
  • 433 724 280 887 ÷ 2 = 216 862 140 443 + 1;
  • 216 862 140 443 ÷ 2 = 108 431 070 221 + 1;
  • 108 431 070 221 ÷ 2 = 54 215 535 110 + 1;
  • 54 215 535 110 ÷ 2 = 27 107 767 555 + 0;
  • 27 107 767 555 ÷ 2 = 13 553 883 777 + 1;
  • 13 553 883 777 ÷ 2 = 6 776 941 888 + 1;
  • 6 776 941 888 ÷ 2 = 3 388 470 944 + 0;
  • 3 388 470 944 ÷ 2 = 1 694 235 472 + 0;
  • 1 694 235 472 ÷ 2 = 847 117 736 + 0;
  • 847 117 736 ÷ 2 = 423 558 868 + 0;
  • 423 558 868 ÷ 2 = 211 779 434 + 0;
  • 211 779 434 ÷ 2 = 105 889 717 + 0;
  • 105 889 717 ÷ 2 = 52 944 858 + 1;
  • 52 944 858 ÷ 2 = 26 472 429 + 0;
  • 26 472 429 ÷ 2 = 13 236 214 + 1;
  • 13 236 214 ÷ 2 = 6 618 107 + 0;
  • 6 618 107 ÷ 2 = 3 309 053 + 1;
  • 3 309 053 ÷ 2 = 1 654 526 + 1;
  • 1 654 526 ÷ 2 = 827 263 + 0;
  • 827 263 ÷ 2 = 413 631 + 1;
  • 413 631 ÷ 2 = 206 815 + 1;
  • 206 815 ÷ 2 = 103 407 + 1;
  • 103 407 ÷ 2 = 51 703 + 1;
  • 51 703 ÷ 2 = 25 851 + 1;
  • 25 851 ÷ 2 = 12 925 + 1;
  • 12 925 ÷ 2 = 6 462 + 1;
  • 6 462 ÷ 2 = 3 231 + 0;
  • 3 231 ÷ 2 = 1 615 + 1;
  • 1 615 ÷ 2 = 807 + 1;
  • 807 ÷ 2 = 403 + 1;
  • 403 ÷ 2 = 201 + 1;
  • 201 ÷ 2 = 100 + 1;
  • 100 ÷ 2 = 50 + 0;
  • 50 ÷ 2 = 25 + 0;
  • 25 ÷ 2 = 12 + 1;
  • 12 ÷ 2 = 6 + 0;
  • 6 ÷ 2 = 3 + 0;
  • 3 ÷ 2 = 1 + 1;
  • 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.

1 000 100 101 011 111 000 000 000 000 335(10) =


1100 1001 1111 0111 1111 0110 1010 0000 0110 1111 0110 0000 0000 1011 1101 0110 1111 1001 1100 0111 1101 1000 0001 0100 1111(2)


3. Normalize the binary representation of the number.

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


1 000 100 101 011 111 000 000 000 000 335(10) =


1100 1001 1111 0111 1111 0110 1010 0000 0110 1111 0110 0000 0000 1011 1101 0110 1111 1001 1100 0111 1101 1000 0001 0100 1111(2) =


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


1.1001 0011 1110 1111 1110 1101 0100 0000 1101 1110 1100 0000 0001 0111 1010 1101 1111 0011 1000 1111 1011 0000 0010 1001 111(2) × 299


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


Mantissa (not normalized):
1.1001 0011 1110 1111 1110 1101 0100 0000 1101 1110 1100 0000 0001 0111 1010 1101 1111 0011 1000 1111 1011 0000 0010 1001 111


5. Adjust the exponent.

Use the 8 bit excess/bias notation:


Exponent (adjusted) =


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


99 + 2(8-1) - 1 =


(99 + 127)(10) =


226(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;
  • 226 ÷ 2 = 113 + 0;
  • 113 ÷ 2 = 56 + 1;
  • 56 ÷ 2 = 28 + 0;
  • 28 ÷ 2 = 14 + 0;
  • 14 ÷ 2 = 7 + 0;
  • 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) =


226(10) =


1110 0010(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. 100 1001 1111 0111 1111 0110 1010 0000 0110 1111 0110 0000 0000 1011 1101 0110 1111 1001 1100 0111 1101 1000 0001 0100 1111 =


100 1001 1111 0111 1111 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) =
1110 0010


Mantissa (23 bits) =
100 1001 1111 0111 1111 0110


Decimal number 1 000 100 101 011 111 000 000 000 000 335 converted to 32 bit single precision IEEE 754 binary floating point representation:

0 - 1110 0010 - 100 1001 1111 0111 1111 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