10 001 101 000 010 009 999 999 999 999 641 Converted to 32 Bit Single Precision IEEE 754 Binary Floating Point Representation Standard

Convert decimal 10 001 101 000 010 009 999 999 999 999 641(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 101 000 010 009 999 999 999 999 641(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 101 000 010 009 999 999 999 999 641 ÷ 2 = 5 000 550 500 005 004 999 999 999 999 820 + 1;
  • 5 000 550 500 005 004 999 999 999 999 820 ÷ 2 = 2 500 275 250 002 502 499 999 999 999 910 + 0;
  • 2 500 275 250 002 502 499 999 999 999 910 ÷ 2 = 1 250 137 625 001 251 249 999 999 999 955 + 0;
  • 1 250 137 625 001 251 249 999 999 999 955 ÷ 2 = 625 068 812 500 625 624 999 999 999 977 + 1;
  • 625 068 812 500 625 624 999 999 999 977 ÷ 2 = 312 534 406 250 312 812 499 999 999 988 + 1;
  • 312 534 406 250 312 812 499 999 999 988 ÷ 2 = 156 267 203 125 156 406 249 999 999 994 + 0;
  • 156 267 203 125 156 406 249 999 999 994 ÷ 2 = 78 133 601 562 578 203 124 999 999 997 + 0;
  • 78 133 601 562 578 203 124 999 999 997 ÷ 2 = 39 066 800 781 289 101 562 499 999 998 + 1;
  • 39 066 800 781 289 101 562 499 999 998 ÷ 2 = 19 533 400 390 644 550 781 249 999 999 + 0;
  • 19 533 400 390 644 550 781 249 999 999 ÷ 2 = 9 766 700 195 322 275 390 624 999 999 + 1;
  • 9 766 700 195 322 275 390 624 999 999 ÷ 2 = 4 883 350 097 661 137 695 312 499 999 + 1;
  • 4 883 350 097 661 137 695 312 499 999 ÷ 2 = 2 441 675 048 830 568 847 656 249 999 + 1;
  • 2 441 675 048 830 568 847 656 249 999 ÷ 2 = 1 220 837 524 415 284 423 828 124 999 + 1;
  • 1 220 837 524 415 284 423 828 124 999 ÷ 2 = 610 418 762 207 642 211 914 062 499 + 1;
  • 610 418 762 207 642 211 914 062 499 ÷ 2 = 305 209 381 103 821 105 957 031 249 + 1;
  • 305 209 381 103 821 105 957 031 249 ÷ 2 = 152 604 690 551 910 552 978 515 624 + 1;
  • 152 604 690 551 910 552 978 515 624 ÷ 2 = 76 302 345 275 955 276 489 257 812 + 0;
  • 76 302 345 275 955 276 489 257 812 ÷ 2 = 38 151 172 637 977 638 244 628 906 + 0;
  • 38 151 172 637 977 638 244 628 906 ÷ 2 = 19 075 586 318 988 819 122 314 453 + 0;
  • 19 075 586 318 988 819 122 314 453 ÷ 2 = 9 537 793 159 494 409 561 157 226 + 1;
  • 9 537 793 159 494 409 561 157 226 ÷ 2 = 4 768 896 579 747 204 780 578 613 + 0;
  • 4 768 896 579 747 204 780 578 613 ÷ 2 = 2 384 448 289 873 602 390 289 306 + 1;
  • 2 384 448 289 873 602 390 289 306 ÷ 2 = 1 192 224 144 936 801 195 144 653 + 0;
  • 1 192 224 144 936 801 195 144 653 ÷ 2 = 596 112 072 468 400 597 572 326 + 1;
  • 596 112 072 468 400 597 572 326 ÷ 2 = 298 056 036 234 200 298 786 163 + 0;
  • 298 056 036 234 200 298 786 163 ÷ 2 = 149 028 018 117 100 149 393 081 + 1;
  • 149 028 018 117 100 149 393 081 ÷ 2 = 74 514 009 058 550 074 696 540 + 1;
  • 74 514 009 058 550 074 696 540 ÷ 2 = 37 257 004 529 275 037 348 270 + 0;
  • 37 257 004 529 275 037 348 270 ÷ 2 = 18 628 502 264 637 518 674 135 + 0;
  • 18 628 502 264 637 518 674 135 ÷ 2 = 9 314 251 132 318 759 337 067 + 1;
  • 9 314 251 132 318 759 337 067 ÷ 2 = 4 657 125 566 159 379 668 533 + 1;
  • 4 657 125 566 159 379 668 533 ÷ 2 = 2 328 562 783 079 689 834 266 + 1;
  • 2 328 562 783 079 689 834 266 ÷ 2 = 1 164 281 391 539 844 917 133 + 0;
  • 1 164 281 391 539 844 917 133 ÷ 2 = 582 140 695 769 922 458 566 + 1;
  • 582 140 695 769 922 458 566 ÷ 2 = 291 070 347 884 961 229 283 + 0;
  • 291 070 347 884 961 229 283 ÷ 2 = 145 535 173 942 480 614 641 + 1;
  • 145 535 173 942 480 614 641 ÷ 2 = 72 767 586 971 240 307 320 + 1;
  • 72 767 586 971 240 307 320 ÷ 2 = 36 383 793 485 620 153 660 + 0;
  • 36 383 793 485 620 153 660 ÷ 2 = 18 191 896 742 810 076 830 + 0;
  • 18 191 896 742 810 076 830 ÷ 2 = 9 095 948 371 405 038 415 + 0;
  • 9 095 948 371 405 038 415 ÷ 2 = 4 547 974 185 702 519 207 + 1;
  • 4 547 974 185 702 519 207 ÷ 2 = 2 273 987 092 851 259 603 + 1;
  • 2 273 987 092 851 259 603 ÷ 2 = 1 136 993 546 425 629 801 + 1;
  • 1 136 993 546 425 629 801 ÷ 2 = 568 496 773 212 814 900 + 1;
  • 568 496 773 212 814 900 ÷ 2 = 284 248 386 606 407 450 + 0;
  • 284 248 386 606 407 450 ÷ 2 = 142 124 193 303 203 725 + 0;
  • 142 124 193 303 203 725 ÷ 2 = 71 062 096 651 601 862 + 1;
  • 71 062 096 651 601 862 ÷ 2 = 35 531 048 325 800 931 + 0;
  • 35 531 048 325 800 931 ÷ 2 = 17 765 524 162 900 465 + 1;
  • 17 765 524 162 900 465 ÷ 2 = 8 882 762 081 450 232 + 1;
  • 8 882 762 081 450 232 ÷ 2 = 4 441 381 040 725 116 + 0;
  • 4 441 381 040 725 116 ÷ 2 = 2 220 690 520 362 558 + 0;
  • 2 220 690 520 362 558 ÷ 2 = 1 110 345 260 181 279 + 0;
  • 1 110 345 260 181 279 ÷ 2 = 555 172 630 090 639 + 1;
  • 555 172 630 090 639 ÷ 2 = 277 586 315 045 319 + 1;
  • 277 586 315 045 319 ÷ 2 = 138 793 157 522 659 + 1;
  • 138 793 157 522 659 ÷ 2 = 69 396 578 761 329 + 1;
  • 69 396 578 761 329 ÷ 2 = 34 698 289 380 664 + 1;
  • 34 698 289 380 664 ÷ 2 = 17 349 144 690 332 + 0;
  • 17 349 144 690 332 ÷ 2 = 8 674 572 345 166 + 0;
  • 8 674 572 345 166 ÷ 2 = 4 337 286 172 583 + 0;
  • 4 337 286 172 583 ÷ 2 = 2 168 643 086 291 + 1;
  • 2 168 643 086 291 ÷ 2 = 1 084 321 543 145 + 1;
  • 1 084 321 543 145 ÷ 2 = 542 160 771 572 + 1;
  • 542 160 771 572 ÷ 2 = 271 080 385 786 + 0;
  • 271 080 385 786 ÷ 2 = 135 540 192 893 + 0;
  • 135 540 192 893 ÷ 2 = 67 770 096 446 + 1;
  • 67 770 096 446 ÷ 2 = 33 885 048 223 + 0;
  • 33 885 048 223 ÷ 2 = 16 942 524 111 + 1;
  • 16 942 524 111 ÷ 2 = 8 471 262 055 + 1;
  • 8 471 262 055 ÷ 2 = 4 235 631 027 + 1;
  • 4 235 631 027 ÷ 2 = 2 117 815 513 + 1;
  • 2 117 815 513 ÷ 2 = 1 058 907 756 + 1;
  • 1 058 907 756 ÷ 2 = 529 453 878 + 0;
  • 529 453 878 ÷ 2 = 264 726 939 + 0;
  • 264 726 939 ÷ 2 = 132 363 469 + 1;
  • 132 363 469 ÷ 2 = 66 181 734 + 1;
  • 66 181 734 ÷ 2 = 33 090 867 + 0;
  • 33 090 867 ÷ 2 = 16 545 433 + 1;
  • 16 545 433 ÷ 2 = 8 272 716 + 1;
  • 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 101 000 010 009 999 999 999 999 641(10) =


111 1110 0011 1011 0100 1100 1101 1001 1111 0100 1110 0011 1110 0011 0100 1111 0001 1010 1110 0110 1010 1000 1111 1110 1001 1001(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 101 000 010 009 999 999 999 999 641(10) =


111 1110 0011 1011 0100 1100 1101 1001 1111 0100 1110 0011 1110 0011 0100 1111 0001 1010 1110 0110 1010 1000 1111 1110 1001 1001(2) =


111 1110 0011 1011 0100 1100 1101 1001 1111 0100 1110 0011 1110 0011 0100 1111 0001 1010 1110 0110 1010 1000 1111 1110 1001 1001(2) × 20 =


1.1111 1000 1110 1101 0011 0011 0110 0111 1101 0011 1000 1111 1000 1101 0011 1100 0110 1011 1001 1010 1010 0011 1111 1010 0110 01(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 0011 0110 0111 1101 0011 1000 1111 1000 1101 0011 1100 0110 1011 1001 1010 1010 0011 1111 1010 0110 01


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 1001 101 1001 1111 0100 1110 0011 1110 0011 0100 1111 0001 1010 1110 0110 1010 1000 1111 1110 1001 1001 =


111 1100 0111 0110 1001 1001


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 1001


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

0 - 1110 0101 - 111 1100 0111 0110 1001 1001


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