Decimal to 32 Bit IEEE 754 Binary: Convert Number 10 010 110 010 100 110 000 000 000 000 010 to 32 Bit Single Precision IEEE 754 Binary Floating Point Representation Standard, From Base Ten Decimal System

Number 10 010 110 010 100 110 000 000 000 000 010(10) converted and written in 32 bit single precision IEEE 754 binary floating point representation standard (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;
  • 10 010 110 010 100 110 000 000 000 000 010 ÷ 2 = 5 005 055 005 050 055 000 000 000 000 005 + 0;
  • 5 005 055 005 050 055 000 000 000 000 005 ÷ 2 = 2 502 527 502 525 027 500 000 000 000 002 + 1;
  • 2 502 527 502 525 027 500 000 000 000 002 ÷ 2 = 1 251 263 751 262 513 750 000 000 000 001 + 0;
  • 1 251 263 751 262 513 750 000 000 000 001 ÷ 2 = 625 631 875 631 256 875 000 000 000 000 + 1;
  • 625 631 875 631 256 875 000 000 000 000 ÷ 2 = 312 815 937 815 628 437 500 000 000 000 + 0;
  • 312 815 937 815 628 437 500 000 000 000 ÷ 2 = 156 407 968 907 814 218 750 000 000 000 + 0;
  • 156 407 968 907 814 218 750 000 000 000 ÷ 2 = 78 203 984 453 907 109 375 000 000 000 + 0;
  • 78 203 984 453 907 109 375 000 000 000 ÷ 2 = 39 101 992 226 953 554 687 500 000 000 + 0;
  • 39 101 992 226 953 554 687 500 000 000 ÷ 2 = 19 550 996 113 476 777 343 750 000 000 + 0;
  • 19 550 996 113 476 777 343 750 000 000 ÷ 2 = 9 775 498 056 738 388 671 875 000 000 + 0;
  • 9 775 498 056 738 388 671 875 000 000 ÷ 2 = 4 887 749 028 369 194 335 937 500 000 + 0;
  • 4 887 749 028 369 194 335 937 500 000 ÷ 2 = 2 443 874 514 184 597 167 968 750 000 + 0;
  • 2 443 874 514 184 597 167 968 750 000 ÷ 2 = 1 221 937 257 092 298 583 984 375 000 + 0;
  • 1 221 937 257 092 298 583 984 375 000 ÷ 2 = 610 968 628 546 149 291 992 187 500 + 0;
  • 610 968 628 546 149 291 992 187 500 ÷ 2 = 305 484 314 273 074 645 996 093 750 + 0;
  • 305 484 314 273 074 645 996 093 750 ÷ 2 = 152 742 157 136 537 322 998 046 875 + 0;
  • 152 742 157 136 537 322 998 046 875 ÷ 2 = 76 371 078 568 268 661 499 023 437 + 1;
  • 76 371 078 568 268 661 499 023 437 ÷ 2 = 38 185 539 284 134 330 749 511 718 + 1;
  • 38 185 539 284 134 330 749 511 718 ÷ 2 = 19 092 769 642 067 165 374 755 859 + 0;
  • 19 092 769 642 067 165 374 755 859 ÷ 2 = 9 546 384 821 033 582 687 377 929 + 1;
  • 9 546 384 821 033 582 687 377 929 ÷ 2 = 4 773 192 410 516 791 343 688 964 + 1;
  • 4 773 192 410 516 791 343 688 964 ÷ 2 = 2 386 596 205 258 395 671 844 482 + 0;
  • 2 386 596 205 258 395 671 844 482 ÷ 2 = 1 193 298 102 629 197 835 922 241 + 0;
  • 1 193 298 102 629 197 835 922 241 ÷ 2 = 596 649 051 314 598 917 961 120 + 1;
  • 596 649 051 314 598 917 961 120 ÷ 2 = 298 324 525 657 299 458 980 560 + 0;
  • 298 324 525 657 299 458 980 560 ÷ 2 = 149 162 262 828 649 729 490 280 + 0;
  • 149 162 262 828 649 729 490 280 ÷ 2 = 74 581 131 414 324 864 745 140 + 0;
  • 74 581 131 414 324 864 745 140 ÷ 2 = 37 290 565 707 162 432 372 570 + 0;
  • 37 290 565 707 162 432 372 570 ÷ 2 = 18 645 282 853 581 216 186 285 + 0;
  • 18 645 282 853 581 216 186 285 ÷ 2 = 9 322 641 426 790 608 093 142 + 1;
  • 9 322 641 426 790 608 093 142 ÷ 2 = 4 661 320 713 395 304 046 571 + 0;
  • 4 661 320 713 395 304 046 571 ÷ 2 = 2 330 660 356 697 652 023 285 + 1;
  • 2 330 660 356 697 652 023 285 ÷ 2 = 1 165 330 178 348 826 011 642 + 1;
  • 1 165 330 178 348 826 011 642 ÷ 2 = 582 665 089 174 413 005 821 + 0;
  • 582 665 089 174 413 005 821 ÷ 2 = 291 332 544 587 206 502 910 + 1;
  • 291 332 544 587 206 502 910 ÷ 2 = 145 666 272 293 603 251 455 + 0;
  • 145 666 272 293 603 251 455 ÷ 2 = 72 833 136 146 801 625 727 + 1;
  • 72 833 136 146 801 625 727 ÷ 2 = 36 416 568 073 400 812 863 + 1;
  • 36 416 568 073 400 812 863 ÷ 2 = 18 208 284 036 700 406 431 + 1;
  • 18 208 284 036 700 406 431 ÷ 2 = 9 104 142 018 350 203 215 + 1;
  • 9 104 142 018 350 203 215 ÷ 2 = 4 552 071 009 175 101 607 + 1;
  • 4 552 071 009 175 101 607 ÷ 2 = 2 276 035 504 587 550 803 + 1;
  • 2 276 035 504 587 550 803 ÷ 2 = 1 138 017 752 293 775 401 + 1;
  • 1 138 017 752 293 775 401 ÷ 2 = 569 008 876 146 887 700 + 1;
  • 569 008 876 146 887 700 ÷ 2 = 284 504 438 073 443 850 + 0;
  • 284 504 438 073 443 850 ÷ 2 = 142 252 219 036 721 925 + 0;
  • 142 252 219 036 721 925 ÷ 2 = 71 126 109 518 360 962 + 1;
  • 71 126 109 518 360 962 ÷ 2 = 35 563 054 759 180 481 + 0;
  • 35 563 054 759 180 481 ÷ 2 = 17 781 527 379 590 240 + 1;
  • 17 781 527 379 590 240 ÷ 2 = 8 890 763 689 795 120 + 0;
  • 8 890 763 689 795 120 ÷ 2 = 4 445 381 844 897 560 + 0;
  • 4 445 381 844 897 560 ÷ 2 = 2 222 690 922 448 780 + 0;
  • 2 222 690 922 448 780 ÷ 2 = 1 111 345 461 224 390 + 0;
  • 1 111 345 461 224 390 ÷ 2 = 555 672 730 612 195 + 0;
  • 555 672 730 612 195 ÷ 2 = 277 836 365 306 097 + 1;
  • 277 836 365 306 097 ÷ 2 = 138 918 182 653 048 + 1;
  • 138 918 182 653 048 ÷ 2 = 69 459 091 326 524 + 0;
  • 69 459 091 326 524 ÷ 2 = 34 729 545 663 262 + 0;
  • 34 729 545 663 262 ÷ 2 = 17 364 772 831 631 + 0;
  • 17 364 772 831 631 ÷ 2 = 8 682 386 415 815 + 1;
  • 8 682 386 415 815 ÷ 2 = 4 341 193 207 907 + 1;
  • 4 341 193 207 907 ÷ 2 = 2 170 596 603 953 + 1;
  • 2 170 596 603 953 ÷ 2 = 1 085 298 301 976 + 1;
  • 1 085 298 301 976 ÷ 2 = 542 649 150 988 + 0;
  • 542 649 150 988 ÷ 2 = 271 324 575 494 + 0;
  • 271 324 575 494 ÷ 2 = 135 662 287 747 + 0;
  • 135 662 287 747 ÷ 2 = 67 831 143 873 + 1;
  • 67 831 143 873 ÷ 2 = 33 915 571 936 + 1;
  • 33 915 571 936 ÷ 2 = 16 957 785 968 + 0;
  • 16 957 785 968 ÷ 2 = 8 478 892 984 + 0;
  • 8 478 892 984 ÷ 2 = 4 239 446 492 + 0;
  • 4 239 446 492 ÷ 2 = 2 119 723 246 + 0;
  • 2 119 723 246 ÷ 2 = 1 059 861 623 + 0;
  • 1 059 861 623 ÷ 2 = 529 930 811 + 1;
  • 529 930 811 ÷ 2 = 264 965 405 + 1;
  • 264 965 405 ÷ 2 = 132 482 702 + 1;
  • 132 482 702 ÷ 2 = 66 241 351 + 0;
  • 66 241 351 ÷ 2 = 33 120 675 + 1;
  • 33 120 675 ÷ 2 = 16 560 337 + 1;
  • 16 560 337 ÷ 2 = 8 280 168 + 1;
  • 8 280 168 ÷ 2 = 4 140 084 + 0;
  • 4 140 084 ÷ 2 = 2 070 042 + 0;
  • 2 070 042 ÷ 2 = 1 035 021 + 0;
  • 1 035 021 ÷ 2 = 517 510 + 1;
  • 517 510 ÷ 2 = 258 755 + 0;
  • 258 755 ÷ 2 = 129 377 + 1;
  • 129 377 ÷ 2 = 64 688 + 1;
  • 64 688 ÷ 2 = 32 344 + 0;
  • 32 344 ÷ 2 = 16 172 + 0;
  • 16 172 ÷ 2 = 8 086 + 0;
  • 8 086 ÷ 2 = 4 043 + 0;
  • 4 043 ÷ 2 = 2 021 + 1;
  • 2 021 ÷ 2 = 1 010 + 1;
  • 1 010 ÷ 2 = 505 + 0;
  • 505 ÷ 2 = 252 + 1;
  • 252 ÷ 2 = 126 + 0;
  • 126 ÷ 2 = 63 + 0;
  • 63 ÷ 2 = 31 + 1;
  • 31 ÷ 2 = 15 + 1;
  • 15 ÷ 2 = 7 + 1;
  • 7 ÷ 2 = 3 + 1;
  • 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.

10 010 110 010 100 110 000 000 000 000 010(10) =


111 1110 0101 1000 0110 1000 1110 1110 0000 1100 0111 1000 1100 0001 0100 1111 1111 0101 1010 0000 1001 1011 0000 0000 0000 1010(2)


3. Normalize the binary representation of the number.

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


10 010 110 010 100 110 000 000 000 000 010(10) =


111 1110 0101 1000 0110 1000 1110 1110 0000 1100 0111 1000 1100 0001 0100 1111 1111 0101 1010 0000 1001 1011 0000 0000 0000 1010(2) =


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


1.1111 1001 0110 0001 1010 0011 1011 1000 0011 0001 1110 0011 0000 0101 0011 1111 1101 0110 1000 0010 0110 1100 0000 0000 0010 10(2) × 2102


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


Mantissa (not normalized):
1.1111 1001 0110 0001 1010 0011 1011 1000 0011 0001 1110 0011 0000 0101 0011 1111 1101 0110 1000 0010 0110 1100 0000 0000 0010 10


5. Adjust the exponent.

Use the 8 bit excess/bias notation:


Exponent (adjusted) =


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


102 + 2(8-1) - 1 =


(102 + 127)(10) =


229(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;
  • 229 ÷ 2 = 114 + 1;
  • 114 ÷ 2 = 57 + 0;
  • 57 ÷ 2 = 28 + 1;
  • 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) =


229(10) =


1110 0101(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. 111 1100 1011 0000 1101 0001 110 1110 0000 1100 0111 1000 1100 0001 0100 1111 1111 0101 1010 0000 1001 1011 0000 0000 0000 1010 =


111 1100 1011 0000 1101 0001


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 0101


Mantissa (23 bits) =
111 1100 1011 0000 1101 0001


The base ten decimal number 10 010 110 010 100 110 000 000 000 000 010 converted and written in 32 bit single precision IEEE 754 binary floating point representation:

0 - 1110 0101 - 111 1100 1011 0000 1101 0001

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