Decimal to 32 Bit IEEE 754 Binary: Convert Number 111 101 000 010 010 000 000 107 to 32 Bit Single Precision IEEE 754 Binary Floating Point Representation Standard, From Base Ten Decimal System

Number 111 101 000 010 010 000 000 107(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;
  • 111 101 000 010 010 000 000 107 ÷ 2 = 55 550 500 005 005 000 000 053 + 1;
  • 55 550 500 005 005 000 000 053 ÷ 2 = 27 775 250 002 502 500 000 026 + 1;
  • 27 775 250 002 502 500 000 026 ÷ 2 = 13 887 625 001 251 250 000 013 + 0;
  • 13 887 625 001 251 250 000 013 ÷ 2 = 6 943 812 500 625 625 000 006 + 1;
  • 6 943 812 500 625 625 000 006 ÷ 2 = 3 471 906 250 312 812 500 003 + 0;
  • 3 471 906 250 312 812 500 003 ÷ 2 = 1 735 953 125 156 406 250 001 + 1;
  • 1 735 953 125 156 406 250 001 ÷ 2 = 867 976 562 578 203 125 000 + 1;
  • 867 976 562 578 203 125 000 ÷ 2 = 433 988 281 289 101 562 500 + 0;
  • 433 988 281 289 101 562 500 ÷ 2 = 216 994 140 644 550 781 250 + 0;
  • 216 994 140 644 550 781 250 ÷ 2 = 108 497 070 322 275 390 625 + 0;
  • 108 497 070 322 275 390 625 ÷ 2 = 54 248 535 161 137 695 312 + 1;
  • 54 248 535 161 137 695 312 ÷ 2 = 27 124 267 580 568 847 656 + 0;
  • 27 124 267 580 568 847 656 ÷ 2 = 13 562 133 790 284 423 828 + 0;
  • 13 562 133 790 284 423 828 ÷ 2 = 6 781 066 895 142 211 914 + 0;
  • 6 781 066 895 142 211 914 ÷ 2 = 3 390 533 447 571 105 957 + 0;
  • 3 390 533 447 571 105 957 ÷ 2 = 1 695 266 723 785 552 978 + 1;
  • 1 695 266 723 785 552 978 ÷ 2 = 847 633 361 892 776 489 + 0;
  • 847 633 361 892 776 489 ÷ 2 = 423 816 680 946 388 244 + 1;
  • 423 816 680 946 388 244 ÷ 2 = 211 908 340 473 194 122 + 0;
  • 211 908 340 473 194 122 ÷ 2 = 105 954 170 236 597 061 + 0;
  • 105 954 170 236 597 061 ÷ 2 = 52 977 085 118 298 530 + 1;
  • 52 977 085 118 298 530 ÷ 2 = 26 488 542 559 149 265 + 0;
  • 26 488 542 559 149 265 ÷ 2 = 13 244 271 279 574 632 + 1;
  • 13 244 271 279 574 632 ÷ 2 = 6 622 135 639 787 316 + 0;
  • 6 622 135 639 787 316 ÷ 2 = 3 311 067 819 893 658 + 0;
  • 3 311 067 819 893 658 ÷ 2 = 1 655 533 909 946 829 + 0;
  • 1 655 533 909 946 829 ÷ 2 = 827 766 954 973 414 + 1;
  • 827 766 954 973 414 ÷ 2 = 413 883 477 486 707 + 0;
  • 413 883 477 486 707 ÷ 2 = 206 941 738 743 353 + 1;
  • 206 941 738 743 353 ÷ 2 = 103 470 869 371 676 + 1;
  • 103 470 869 371 676 ÷ 2 = 51 735 434 685 838 + 0;
  • 51 735 434 685 838 ÷ 2 = 25 867 717 342 919 + 0;
  • 25 867 717 342 919 ÷ 2 = 12 933 858 671 459 + 1;
  • 12 933 858 671 459 ÷ 2 = 6 466 929 335 729 + 1;
  • 6 466 929 335 729 ÷ 2 = 3 233 464 667 864 + 1;
  • 3 233 464 667 864 ÷ 2 = 1 616 732 333 932 + 0;
  • 1 616 732 333 932 ÷ 2 = 808 366 166 966 + 0;
  • 808 366 166 966 ÷ 2 = 404 183 083 483 + 0;
  • 404 183 083 483 ÷ 2 = 202 091 541 741 + 1;
  • 202 091 541 741 ÷ 2 = 101 045 770 870 + 1;
  • 101 045 770 870 ÷ 2 = 50 522 885 435 + 0;
  • 50 522 885 435 ÷ 2 = 25 261 442 717 + 1;
  • 25 261 442 717 ÷ 2 = 12 630 721 358 + 1;
  • 12 630 721 358 ÷ 2 = 6 315 360 679 + 0;
  • 6 315 360 679 ÷ 2 = 3 157 680 339 + 1;
  • 3 157 680 339 ÷ 2 = 1 578 840 169 + 1;
  • 1 578 840 169 ÷ 2 = 789 420 084 + 1;
  • 789 420 084 ÷ 2 = 394 710 042 + 0;
  • 394 710 042 ÷ 2 = 197 355 021 + 0;
  • 197 355 021 ÷ 2 = 98 677 510 + 1;
  • 98 677 510 ÷ 2 = 49 338 755 + 0;
  • 49 338 755 ÷ 2 = 24 669 377 + 1;
  • 24 669 377 ÷ 2 = 12 334 688 + 1;
  • 12 334 688 ÷ 2 = 6 167 344 + 0;
  • 6 167 344 ÷ 2 = 3 083 672 + 0;
  • 3 083 672 ÷ 2 = 1 541 836 + 0;
  • 1 541 836 ÷ 2 = 770 918 + 0;
  • 770 918 ÷ 2 = 385 459 + 0;
  • 385 459 ÷ 2 = 192 729 + 1;
  • 192 729 ÷ 2 = 96 364 + 1;
  • 96 364 ÷ 2 = 48 182 + 0;
  • 48 182 ÷ 2 = 24 091 + 0;
  • 24 091 ÷ 2 = 12 045 + 1;
  • 12 045 ÷ 2 = 6 022 + 1;
  • 6 022 ÷ 2 = 3 011 + 0;
  • 3 011 ÷ 2 = 1 505 + 1;
  • 1 505 ÷ 2 = 752 + 1;
  • 752 ÷ 2 = 376 + 0;
  • 376 ÷ 2 = 188 + 0;
  • 188 ÷ 2 = 94 + 0;
  • 94 ÷ 2 = 47 + 0;
  • 47 ÷ 2 = 23 + 1;
  • 23 ÷ 2 = 11 + 1;
  • 11 ÷ 2 = 5 + 1;
  • 5 ÷ 2 = 2 + 1;
  • 2 ÷ 2 = 1 + 0;
  • 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.

111 101 000 010 010 000 000 107(10) =


1 0111 1000 0110 1100 1100 0001 1010 0111 0110 1100 0111 0011 0100 0101 0010 1000 0100 0110 1011(2)


3. Normalize the binary representation of the number.

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


111 101 000 010 010 000 000 107(10) =


1 0111 1000 0110 1100 1100 0001 1010 0111 0110 1100 0111 0011 0100 0101 0010 1000 0100 0110 1011(2) =


1 0111 1000 0110 1100 1100 0001 1010 0111 0110 1100 0111 0011 0100 0101 0010 1000 0100 0110 1011(2) × 20 =


1.0111 1000 0110 1100 1100 0001 1010 0111 0110 1100 0111 0011 0100 0101 0010 1000 0100 0110 1011(2) × 276


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


Mantissa (not normalized):
1.0111 1000 0110 1100 1100 0001 1010 0111 0110 1100 0111 0011 0100 0101 0010 1000 0100 0110 1011


5. Adjust the exponent.

Use the 8 bit excess/bias notation:


Exponent (adjusted) =


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


76 + 2(8-1) - 1 =


(76 + 127)(10) =


203(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;
  • 203 ÷ 2 = 101 + 1;
  • 101 ÷ 2 = 50 + 1;
  • 50 ÷ 2 = 25 + 0;
  • 25 ÷ 2 = 12 + 1;
  • 12 ÷ 2 = 6 + 0;
  • 6 ÷ 2 = 3 + 0;
  • 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) =


203(10) =


1100 1011(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. 011 1100 0011 0110 0110 0000 1 1010 0111 0110 1100 0111 0011 0100 0101 0010 1000 0100 0110 1011 =


011 1100 0011 0110 0110 0000


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) =
1100 1011


Mantissa (23 bits) =
011 1100 0011 0110 0110 0000


The base ten decimal number 111 101 000 010 010 000 000 107 converted and written in 32 bit single precision IEEE 754 binary floating point representation:

0 - 1100 1011 - 011 1100 0011 0110 0110 0000

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