10 001 100 001 101 010 000 000 000 000 663 Converted to 32 Bit Single Precision IEEE 754 Binary Floating Point Representation Standard

Convert decimal 10 001 100 001 101 010 000 000 000 000 663(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
10 001 100 001 101 010 000 000 000 000 663(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;
  • 10 001 100 001 101 010 000 000 000 000 663 ÷ 2 = 5 000 550 000 550 505 000 000 000 000 331 + 1;
  • 5 000 550 000 550 505 000 000 000 000 331 ÷ 2 = 2 500 275 000 275 252 500 000 000 000 165 + 1;
  • 2 500 275 000 275 252 500 000 000 000 165 ÷ 2 = 1 250 137 500 137 626 250 000 000 000 082 + 1;
  • 1 250 137 500 137 626 250 000 000 000 082 ÷ 2 = 625 068 750 068 813 125 000 000 000 041 + 0;
  • 625 068 750 068 813 125 000 000 000 041 ÷ 2 = 312 534 375 034 406 562 500 000 000 020 + 1;
  • 312 534 375 034 406 562 500 000 000 020 ÷ 2 = 156 267 187 517 203 281 250 000 000 010 + 0;
  • 156 267 187 517 203 281 250 000 000 010 ÷ 2 = 78 133 593 758 601 640 625 000 000 005 + 0;
  • 78 133 593 758 601 640 625 000 000 005 ÷ 2 = 39 066 796 879 300 820 312 500 000 002 + 1;
  • 39 066 796 879 300 820 312 500 000 002 ÷ 2 = 19 533 398 439 650 410 156 250 000 001 + 0;
  • 19 533 398 439 650 410 156 250 000 001 ÷ 2 = 9 766 699 219 825 205 078 125 000 000 + 1;
  • 9 766 699 219 825 205 078 125 000 000 ÷ 2 = 4 883 349 609 912 602 539 062 500 000 + 0;
  • 4 883 349 609 912 602 539 062 500 000 ÷ 2 = 2 441 674 804 956 301 269 531 250 000 + 0;
  • 2 441 674 804 956 301 269 531 250 000 ÷ 2 = 1 220 837 402 478 150 634 765 625 000 + 0;
  • 1 220 837 402 478 150 634 765 625 000 ÷ 2 = 610 418 701 239 075 317 382 812 500 + 0;
  • 610 418 701 239 075 317 382 812 500 ÷ 2 = 305 209 350 619 537 658 691 406 250 + 0;
  • 305 209 350 619 537 658 691 406 250 ÷ 2 = 152 604 675 309 768 829 345 703 125 + 0;
  • 152 604 675 309 768 829 345 703 125 ÷ 2 = 76 302 337 654 884 414 672 851 562 + 1;
  • 76 302 337 654 884 414 672 851 562 ÷ 2 = 38 151 168 827 442 207 336 425 781 + 0;
  • 38 151 168 827 442 207 336 425 781 ÷ 2 = 19 075 584 413 721 103 668 212 890 + 1;
  • 19 075 584 413 721 103 668 212 890 ÷ 2 = 9 537 792 206 860 551 834 106 445 + 0;
  • 9 537 792 206 860 551 834 106 445 ÷ 2 = 4 768 896 103 430 275 917 053 222 + 1;
  • 4 768 896 103 430 275 917 053 222 ÷ 2 = 2 384 448 051 715 137 958 526 611 + 0;
  • 2 384 448 051 715 137 958 526 611 ÷ 2 = 1 192 224 025 857 568 979 263 305 + 1;
  • 1 192 224 025 857 568 979 263 305 ÷ 2 = 596 112 012 928 784 489 631 652 + 1;
  • 596 112 012 928 784 489 631 652 ÷ 2 = 298 056 006 464 392 244 815 826 + 0;
  • 298 056 006 464 392 244 815 826 ÷ 2 = 149 028 003 232 196 122 407 913 + 0;
  • 149 028 003 232 196 122 407 913 ÷ 2 = 74 514 001 616 098 061 203 956 + 1;
  • 74 514 001 616 098 061 203 956 ÷ 2 = 37 257 000 808 049 030 601 978 + 0;
  • 37 257 000 808 049 030 601 978 ÷ 2 = 18 628 500 404 024 515 300 989 + 0;
  • 18 628 500 404 024 515 300 989 ÷ 2 = 9 314 250 202 012 257 650 494 + 1;
  • 9 314 250 202 012 257 650 494 ÷ 2 = 4 657 125 101 006 128 825 247 + 0;
  • 4 657 125 101 006 128 825 247 ÷ 2 = 2 328 562 550 503 064 412 623 + 1;
  • 2 328 562 550 503 064 412 623 ÷ 2 = 1 164 281 275 251 532 206 311 + 1;
  • 1 164 281 275 251 532 206 311 ÷ 2 = 582 140 637 625 766 103 155 + 1;
  • 582 140 637 625 766 103 155 ÷ 2 = 291 070 318 812 883 051 577 + 1;
  • 291 070 318 812 883 051 577 ÷ 2 = 145 535 159 406 441 525 788 + 1;
  • 145 535 159 406 441 525 788 ÷ 2 = 72 767 579 703 220 762 894 + 0;
  • 72 767 579 703 220 762 894 ÷ 2 = 36 383 789 851 610 381 447 + 0;
  • 36 383 789 851 610 381 447 ÷ 2 = 18 191 894 925 805 190 723 + 1;
  • 18 191 894 925 805 190 723 ÷ 2 = 9 095 947 462 902 595 361 + 1;
  • 9 095 947 462 902 595 361 ÷ 2 = 4 547 973 731 451 297 680 + 1;
  • 4 547 973 731 451 297 680 ÷ 2 = 2 273 986 865 725 648 840 + 0;
  • 2 273 986 865 725 648 840 ÷ 2 = 1 136 993 432 862 824 420 + 0;
  • 1 136 993 432 862 824 420 ÷ 2 = 568 496 716 431 412 210 + 0;
  • 568 496 716 431 412 210 ÷ 2 = 284 248 358 215 706 105 + 0;
  • 284 248 358 215 706 105 ÷ 2 = 142 124 179 107 853 052 + 1;
  • 142 124 179 107 853 052 ÷ 2 = 71 062 089 553 926 526 + 0;
  • 71 062 089 553 926 526 ÷ 2 = 35 531 044 776 963 263 + 0;
  • 35 531 044 776 963 263 ÷ 2 = 17 765 522 388 481 631 + 1;
  • 17 765 522 388 481 631 ÷ 2 = 8 882 761 194 240 815 + 1;
  • 8 882 761 194 240 815 ÷ 2 = 4 441 380 597 120 407 + 1;
  • 4 441 380 597 120 407 ÷ 2 = 2 220 690 298 560 203 + 1;
  • 2 220 690 298 560 203 ÷ 2 = 1 110 345 149 280 101 + 1;
  • 1 110 345 149 280 101 ÷ 2 = 555 172 574 640 050 + 1;
  • 555 172 574 640 050 ÷ 2 = 277 586 287 320 025 + 0;
  • 277 586 287 320 025 ÷ 2 = 138 793 143 660 012 + 1;
  • 138 793 143 660 012 ÷ 2 = 69 396 571 830 006 + 0;
  • 69 396 571 830 006 ÷ 2 = 34 698 285 915 003 + 0;
  • 34 698 285 915 003 ÷ 2 = 17 349 142 957 501 + 1;
  • 17 349 142 957 501 ÷ 2 = 8 674 571 478 750 + 1;
  • 8 674 571 478 750 ÷ 2 = 4 337 285 739 375 + 0;
  • 4 337 285 739 375 ÷ 2 = 2 168 642 869 687 + 1;
  • 2 168 642 869 687 ÷ 2 = 1 084 321 434 843 + 1;
  • 1 084 321 434 843 ÷ 2 = 542 160 717 421 + 1;
  • 542 160 717 421 ÷ 2 = 271 080 358 710 + 1;
  • 271 080 358 710 ÷ 2 = 135 540 179 355 + 0;
  • 135 540 179 355 ÷ 2 = 67 770 089 677 + 1;
  • 67 770 089 677 ÷ 2 = 33 885 044 838 + 1;
  • 33 885 044 838 ÷ 2 = 16 942 522 419 + 0;
  • 16 942 522 419 ÷ 2 = 8 471 261 209 + 1;
  • 8 471 261 209 ÷ 2 = 4 235 630 604 + 1;
  • 4 235 630 604 ÷ 2 = 2 117 815 302 + 0;
  • 2 117 815 302 ÷ 2 = 1 058 907 651 + 0;
  • 1 058 907 651 ÷ 2 = 529 453 825 + 1;
  • 529 453 825 ÷ 2 = 264 726 912 + 1;
  • 264 726 912 ÷ 2 = 132 363 456 + 0;
  • 132 363 456 ÷ 2 = 66 181 728 + 0;
  • 66 181 728 ÷ 2 = 33 090 864 + 0;
  • 33 090 864 ÷ 2 = 16 545 432 + 0;
  • 16 545 432 ÷ 2 = 8 272 716 + 0;
  • 8 272 716 ÷ 2 = 4 136 358 + 0;
  • 4 136 358 ÷ 2 = 2 068 179 + 0;
  • 2 068 179 ÷ 2 = 1 034 089 + 1;
  • 1 034 089 ÷ 2 = 517 044 + 1;
  • 517 044 ÷ 2 = 258 522 + 0;
  • 258 522 ÷ 2 = 129 261 + 0;
  • 129 261 ÷ 2 = 64 630 + 1;
  • 64 630 ÷ 2 = 32 315 + 0;
  • 32 315 ÷ 2 = 16 157 + 1;
  • 16 157 ÷ 2 = 8 078 + 1;
  • 8 078 ÷ 2 = 4 039 + 0;
  • 4 039 ÷ 2 = 2 019 + 1;
  • 2 019 ÷ 2 = 1 009 + 1;
  • 1 009 ÷ 2 = 504 + 1;
  • 504 ÷ 2 = 252 + 0;
  • 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 001 100 001 101 010 000 000 000 000 663(10) =


111 1110 0011 1011 0100 1100 0000 0110 0110 1101 1110 1100 1011 1111 0010 0001 1100 1111 1010 0100 1101 0101 0000 0010 1001 0111(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 001 100 001 101 010 000 000 000 000 663(10) =


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


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


1.1111 1000 1110 1101 0011 0000 0001 1001 1011 0111 1011 0010 1111 1100 1000 0111 0011 1110 1001 0011 0101 0100 0000 1010 0101 11(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 1000 1110 1101 0011 0000 0001 1001 1011 0111 1011 0010 1111 1100 1000 0111 0011 1110 1001 0011 0101 0100 0000 1010 0101 11


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


111 1100 0111 0110 1001 1000


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 0111 0110 1001 1000


Decimal number 10 001 100 001 101 010 000 000 000 000 663 converted to 32 bit single precision IEEE 754 binary floating point representation:

0 - 1110 0101 - 111 1100 0111 0110 1001 1000


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