35 623 562 356 235 623 562 332 581.3 Converted to 32 Bit Single Precision IEEE 754 Binary Floating Point Representation Standard

Convert decimal 35 623 562 356 235 623 562 332 581.3(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
35 623 562 356 235 623 562 332 581.3(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. First, convert to binary (in base 2) the integer part: 35 623 562 356 235 623 562 332 581.
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;
  • 35 623 562 356 235 623 562 332 581 ÷ 2 = 17 811 781 178 117 811 781 166 290 + 1;
  • 17 811 781 178 117 811 781 166 290 ÷ 2 = 8 905 890 589 058 905 890 583 145 + 0;
  • 8 905 890 589 058 905 890 583 145 ÷ 2 = 4 452 945 294 529 452 945 291 572 + 1;
  • 4 452 945 294 529 452 945 291 572 ÷ 2 = 2 226 472 647 264 726 472 645 786 + 0;
  • 2 226 472 647 264 726 472 645 786 ÷ 2 = 1 113 236 323 632 363 236 322 893 + 0;
  • 1 113 236 323 632 363 236 322 893 ÷ 2 = 556 618 161 816 181 618 161 446 + 1;
  • 556 618 161 816 181 618 161 446 ÷ 2 = 278 309 080 908 090 809 080 723 + 0;
  • 278 309 080 908 090 809 080 723 ÷ 2 = 139 154 540 454 045 404 540 361 + 1;
  • 139 154 540 454 045 404 540 361 ÷ 2 = 69 577 270 227 022 702 270 180 + 1;
  • 69 577 270 227 022 702 270 180 ÷ 2 = 34 788 635 113 511 351 135 090 + 0;
  • 34 788 635 113 511 351 135 090 ÷ 2 = 17 394 317 556 755 675 567 545 + 0;
  • 17 394 317 556 755 675 567 545 ÷ 2 = 8 697 158 778 377 837 783 772 + 1;
  • 8 697 158 778 377 837 783 772 ÷ 2 = 4 348 579 389 188 918 891 886 + 0;
  • 4 348 579 389 188 918 891 886 ÷ 2 = 2 174 289 694 594 459 445 943 + 0;
  • 2 174 289 694 594 459 445 943 ÷ 2 = 1 087 144 847 297 229 722 971 + 1;
  • 1 087 144 847 297 229 722 971 ÷ 2 = 543 572 423 648 614 861 485 + 1;
  • 543 572 423 648 614 861 485 ÷ 2 = 271 786 211 824 307 430 742 + 1;
  • 271 786 211 824 307 430 742 ÷ 2 = 135 893 105 912 153 715 371 + 0;
  • 135 893 105 912 153 715 371 ÷ 2 = 67 946 552 956 076 857 685 + 1;
  • 67 946 552 956 076 857 685 ÷ 2 = 33 973 276 478 038 428 842 + 1;
  • 33 973 276 478 038 428 842 ÷ 2 = 16 986 638 239 019 214 421 + 0;
  • 16 986 638 239 019 214 421 ÷ 2 = 8 493 319 119 509 607 210 + 1;
  • 8 493 319 119 509 607 210 ÷ 2 = 4 246 659 559 754 803 605 + 0;
  • 4 246 659 559 754 803 605 ÷ 2 = 2 123 329 779 877 401 802 + 1;
  • 2 123 329 779 877 401 802 ÷ 2 = 1 061 664 889 938 700 901 + 0;
  • 1 061 664 889 938 700 901 ÷ 2 = 530 832 444 969 350 450 + 1;
  • 530 832 444 969 350 450 ÷ 2 = 265 416 222 484 675 225 + 0;
  • 265 416 222 484 675 225 ÷ 2 = 132 708 111 242 337 612 + 1;
  • 132 708 111 242 337 612 ÷ 2 = 66 354 055 621 168 806 + 0;
  • 66 354 055 621 168 806 ÷ 2 = 33 177 027 810 584 403 + 0;
  • 33 177 027 810 584 403 ÷ 2 = 16 588 513 905 292 201 + 1;
  • 16 588 513 905 292 201 ÷ 2 = 8 294 256 952 646 100 + 1;
  • 8 294 256 952 646 100 ÷ 2 = 4 147 128 476 323 050 + 0;
  • 4 147 128 476 323 050 ÷ 2 = 2 073 564 238 161 525 + 0;
  • 2 073 564 238 161 525 ÷ 2 = 1 036 782 119 080 762 + 1;
  • 1 036 782 119 080 762 ÷ 2 = 518 391 059 540 381 + 0;
  • 518 391 059 540 381 ÷ 2 = 259 195 529 770 190 + 1;
  • 259 195 529 770 190 ÷ 2 = 129 597 764 885 095 + 0;
  • 129 597 764 885 095 ÷ 2 = 64 798 882 442 547 + 1;
  • 64 798 882 442 547 ÷ 2 = 32 399 441 221 273 + 1;
  • 32 399 441 221 273 ÷ 2 = 16 199 720 610 636 + 1;
  • 16 199 720 610 636 ÷ 2 = 8 099 860 305 318 + 0;
  • 8 099 860 305 318 ÷ 2 = 4 049 930 152 659 + 0;
  • 4 049 930 152 659 ÷ 2 = 2 024 965 076 329 + 1;
  • 2 024 965 076 329 ÷ 2 = 1 012 482 538 164 + 1;
  • 1 012 482 538 164 ÷ 2 = 506 241 269 082 + 0;
  • 506 241 269 082 ÷ 2 = 253 120 634 541 + 0;
  • 253 120 634 541 ÷ 2 = 126 560 317 270 + 1;
  • 126 560 317 270 ÷ 2 = 63 280 158 635 + 0;
  • 63 280 158 635 ÷ 2 = 31 640 079 317 + 1;
  • 31 640 079 317 ÷ 2 = 15 820 039 658 + 1;
  • 15 820 039 658 ÷ 2 = 7 910 019 829 + 0;
  • 7 910 019 829 ÷ 2 = 3 955 009 914 + 1;
  • 3 955 009 914 ÷ 2 = 1 977 504 957 + 0;
  • 1 977 504 957 ÷ 2 = 988 752 478 + 1;
  • 988 752 478 ÷ 2 = 494 376 239 + 0;
  • 494 376 239 ÷ 2 = 247 188 119 + 1;
  • 247 188 119 ÷ 2 = 123 594 059 + 1;
  • 123 594 059 ÷ 2 = 61 797 029 + 1;
  • 61 797 029 ÷ 2 = 30 898 514 + 1;
  • 30 898 514 ÷ 2 = 15 449 257 + 0;
  • 15 449 257 ÷ 2 = 7 724 628 + 1;
  • 7 724 628 ÷ 2 = 3 862 314 + 0;
  • 3 862 314 ÷ 2 = 1 931 157 + 0;
  • 1 931 157 ÷ 2 = 965 578 + 1;
  • 965 578 ÷ 2 = 482 789 + 0;
  • 482 789 ÷ 2 = 241 394 + 1;
  • 241 394 ÷ 2 = 120 697 + 0;
  • 120 697 ÷ 2 = 60 348 + 1;
  • 60 348 ÷ 2 = 30 174 + 0;
  • 30 174 ÷ 2 = 15 087 + 0;
  • 15 087 ÷ 2 = 7 543 + 1;
  • 7 543 ÷ 2 = 3 771 + 1;
  • 3 771 ÷ 2 = 1 885 + 1;
  • 1 885 ÷ 2 = 942 + 1;
  • 942 ÷ 2 = 471 + 0;
  • 471 ÷ 2 = 235 + 1;
  • 235 ÷ 2 = 117 + 1;
  • 117 ÷ 2 = 58 + 1;
  • 58 ÷ 2 = 29 + 0;
  • 29 ÷ 2 = 14 + 1;
  • 14 ÷ 2 = 7 + 0;
  • 7 ÷ 2 = 3 + 1;
  • 3 ÷ 2 = 1 + 1;
  • 1 ÷ 2 = 0 + 1;

2. 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.

35 623 562 356 235 623 562 332 581(10) =


1 1101 0111 0111 1001 0101 0010 1111 0101 0110 1001 1001 1101 0100 1100 1010 1010 1101 1100 1001 1010 0101(2)


3. Convert to binary (base 2) the fractional part: 0.3.

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.3 × 2 = 0 + 0.6;
  • 2) 0.6 × 2 = 1 + 0.2;
  • 3) 0.2 × 2 = 0 + 0.4;
  • 4) 0.4 × 2 = 0 + 0.8;
  • 5) 0.8 × 2 = 1 + 0.6;
  • 6) 0.6 × 2 = 1 + 0.2;
  • 7) 0.2 × 2 = 0 + 0.4;
  • 8) 0.4 × 2 = 0 + 0.8;
  • 9) 0.8 × 2 = 1 + 0.6;
  • 10) 0.6 × 2 = 1 + 0.2;
  • 11) 0.2 × 2 = 0 + 0.4;
  • 12) 0.4 × 2 = 0 + 0.8;
  • 13) 0.8 × 2 = 1 + 0.6;
  • 14) 0.6 × 2 = 1 + 0.2;
  • 15) 0.2 × 2 = 0 + 0.4;
  • 16) 0.4 × 2 = 0 + 0.8;
  • 17) 0.8 × 2 = 1 + 0.6;
  • 18) 0.6 × 2 = 1 + 0.2;
  • 19) 0.2 × 2 = 0 + 0.4;
  • 20) 0.4 × 2 = 0 + 0.8;
  • 21) 0.8 × 2 = 1 + 0.6;
  • 22) 0.6 × 2 = 1 + 0.2;
  • 23) 0.2 × 2 = 0 + 0.4;
  • 24) 0.4 × 2 = 0 + 0.8;

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).


4. 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.3(10) =


0.0100 1100 1100 1100 1100 1100(2)

5. Positive number before normalization:

35 623 562 356 235 623 562 332 581.3(10) =


1 1101 0111 0111 1001 0101 0010 1111 0101 0110 1001 1001 1101 0100 1100 1010 1010 1101 1100 1001 1010 0101.0100 1100 1100 1100 1100 1100(2)

6. Normalize the binary representation of the number.

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


35 623 562 356 235 623 562 332 581.3(10) =


1 1101 0111 0111 1001 0101 0010 1111 0101 0110 1001 1001 1101 0100 1100 1010 1010 1101 1100 1001 1010 0101.0100 1100 1100 1100 1100 1100(2) =


1 1101 0111 0111 1001 0101 0010 1111 0101 0110 1001 1001 1101 0100 1100 1010 1010 1101 1100 1001 1010 0101.0100 1100 1100 1100 1100 1100(2) × 20 =


1.1101 0111 0111 1001 0101 0010 1111 0101 0110 1001 1001 1101 0100 1100 1010 1010 1101 1100 1001 1010 0101 0100 1100 1100 1100 1100 1100(2) × 284


7. 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): 84


Mantissa (not normalized):
1.1101 0111 0111 1001 0101 0010 1111 0101 0110 1001 1001 1101 0100 1100 1010 1010 1101 1100 1001 1010 0101 0100 1100 1100 1100 1100 1100


8. Adjust the exponent.

Use the 8 bit excess/bias notation:


Exponent (adjusted) =


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


84 + 2(8-1) - 1 =


(84 + 127)(10) =


211(10)


9. 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;
  • 211 ÷ 2 = 105 + 1;
  • 105 ÷ 2 = 52 + 1;
  • 52 ÷ 2 = 26 + 0;
  • 26 ÷ 2 = 13 + 0;
  • 13 ÷ 2 = 6 + 1;
  • 6 ÷ 2 = 3 + 0;
  • 3 ÷ 2 = 1 + 1;
  • 1 ÷ 2 = 0 + 1;

10. Construct the base 2 representation of the adjusted exponent.

Take all the remainders starting from the bottom of the list constructed above.


Exponent (adjusted) =


211(10) =


1101 0011(2)


11. 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. 110 1011 1011 1100 1010 1001 0 1111 0101 0110 1001 1001 1101 0100 1100 1010 1010 1101 1100 1001 1010 0101 0100 1100 1100 1100 1100 1100 =


110 1011 1011 1100 1010 1001


12. 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) =
1101 0011


Mantissa (23 bits) =
110 1011 1011 1100 1010 1001


Decimal number 35 623 562 356 235 623 562 332 581.3 converted to 32 bit single precision IEEE 754 binary floating point representation:

0 - 1101 0011 - 110 1011 1011 1100 1010 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