1 001 010 000 100 000 000 000 000 000 374 Converted to 32 Bit Single Precision IEEE 754 Binary Floating Point Representation Standard

Convert decimal 1 001 010 000 100 000 000 000 000 000 374(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
1 001 010 000 100 000 000 000 000 000 374(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;
  • 1 001 010 000 100 000 000 000 000 000 374 ÷ 2 = 500 505 000 050 000 000 000 000 000 187 + 0;
  • 500 505 000 050 000 000 000 000 000 187 ÷ 2 = 250 252 500 025 000 000 000 000 000 093 + 1;
  • 250 252 500 025 000 000 000 000 000 093 ÷ 2 = 125 126 250 012 500 000 000 000 000 046 + 1;
  • 125 126 250 012 500 000 000 000 000 046 ÷ 2 = 62 563 125 006 250 000 000 000 000 023 + 0;
  • 62 563 125 006 250 000 000 000 000 023 ÷ 2 = 31 281 562 503 125 000 000 000 000 011 + 1;
  • 31 281 562 503 125 000 000 000 000 011 ÷ 2 = 15 640 781 251 562 500 000 000 000 005 + 1;
  • 15 640 781 251 562 500 000 000 000 005 ÷ 2 = 7 820 390 625 781 250 000 000 000 002 + 1;
  • 7 820 390 625 781 250 000 000 000 002 ÷ 2 = 3 910 195 312 890 625 000 000 000 001 + 0;
  • 3 910 195 312 890 625 000 000 000 001 ÷ 2 = 1 955 097 656 445 312 500 000 000 000 + 1;
  • 1 955 097 656 445 312 500 000 000 000 ÷ 2 = 977 548 828 222 656 250 000 000 000 + 0;
  • 977 548 828 222 656 250 000 000 000 ÷ 2 = 488 774 414 111 328 125 000 000 000 + 0;
  • 488 774 414 111 328 125 000 000 000 ÷ 2 = 244 387 207 055 664 062 500 000 000 + 0;
  • 244 387 207 055 664 062 500 000 000 ÷ 2 = 122 193 603 527 832 031 250 000 000 + 0;
  • 122 193 603 527 832 031 250 000 000 ÷ 2 = 61 096 801 763 916 015 625 000 000 + 0;
  • 61 096 801 763 916 015 625 000 000 ÷ 2 = 30 548 400 881 958 007 812 500 000 + 0;
  • 30 548 400 881 958 007 812 500 000 ÷ 2 = 15 274 200 440 979 003 906 250 000 + 0;
  • 15 274 200 440 979 003 906 250 000 ÷ 2 = 7 637 100 220 489 501 953 125 000 + 0;
  • 7 637 100 220 489 501 953 125 000 ÷ 2 = 3 818 550 110 244 750 976 562 500 + 0;
  • 3 818 550 110 244 750 976 562 500 ÷ 2 = 1 909 275 055 122 375 488 281 250 + 0;
  • 1 909 275 055 122 375 488 281 250 ÷ 2 = 954 637 527 561 187 744 140 625 + 0;
  • 954 637 527 561 187 744 140 625 ÷ 2 = 477 318 763 780 593 872 070 312 + 1;
  • 477 318 763 780 593 872 070 312 ÷ 2 = 238 659 381 890 296 936 035 156 + 0;
  • 238 659 381 890 296 936 035 156 ÷ 2 = 119 329 690 945 148 468 017 578 + 0;
  • 119 329 690 945 148 468 017 578 ÷ 2 = 59 664 845 472 574 234 008 789 + 0;
  • 59 664 845 472 574 234 008 789 ÷ 2 = 29 832 422 736 287 117 004 394 + 1;
  • 29 832 422 736 287 117 004 394 ÷ 2 = 14 916 211 368 143 558 502 197 + 0;
  • 14 916 211 368 143 558 502 197 ÷ 2 = 7 458 105 684 071 779 251 098 + 1;
  • 7 458 105 684 071 779 251 098 ÷ 2 = 3 729 052 842 035 889 625 549 + 0;
  • 3 729 052 842 035 889 625 549 ÷ 2 = 1 864 526 421 017 944 812 774 + 1;
  • 1 864 526 421 017 944 812 774 ÷ 2 = 932 263 210 508 972 406 387 + 0;
  • 932 263 210 508 972 406 387 ÷ 2 = 466 131 605 254 486 203 193 + 1;
  • 466 131 605 254 486 203 193 ÷ 2 = 233 065 802 627 243 101 596 + 1;
  • 233 065 802 627 243 101 596 ÷ 2 = 116 532 901 313 621 550 798 + 0;
  • 116 532 901 313 621 550 798 ÷ 2 = 58 266 450 656 810 775 399 + 0;
  • 58 266 450 656 810 775 399 ÷ 2 = 29 133 225 328 405 387 699 + 1;
  • 29 133 225 328 405 387 699 ÷ 2 = 14 566 612 664 202 693 849 + 1;
  • 14 566 612 664 202 693 849 ÷ 2 = 7 283 306 332 101 346 924 + 1;
  • 7 283 306 332 101 346 924 ÷ 2 = 3 641 653 166 050 673 462 + 0;
  • 3 641 653 166 050 673 462 ÷ 2 = 1 820 826 583 025 336 731 + 0;
  • 1 820 826 583 025 336 731 ÷ 2 = 910 413 291 512 668 365 + 1;
  • 910 413 291 512 668 365 ÷ 2 = 455 206 645 756 334 182 + 1;
  • 455 206 645 756 334 182 ÷ 2 = 227 603 322 878 167 091 + 0;
  • 227 603 322 878 167 091 ÷ 2 = 113 801 661 439 083 545 + 1;
  • 113 801 661 439 083 545 ÷ 2 = 56 900 830 719 541 772 + 1;
  • 56 900 830 719 541 772 ÷ 2 = 28 450 415 359 770 886 + 0;
  • 28 450 415 359 770 886 ÷ 2 = 14 225 207 679 885 443 + 0;
  • 14 225 207 679 885 443 ÷ 2 = 7 112 603 839 942 721 + 1;
  • 7 112 603 839 942 721 ÷ 2 = 3 556 301 919 971 360 + 1;
  • 3 556 301 919 971 360 ÷ 2 = 1 778 150 959 985 680 + 0;
  • 1 778 150 959 985 680 ÷ 2 = 889 075 479 992 840 + 0;
  • 889 075 479 992 840 ÷ 2 = 444 537 739 996 420 + 0;
  • 444 537 739 996 420 ÷ 2 = 222 268 869 998 210 + 0;
  • 222 268 869 998 210 ÷ 2 = 111 134 434 999 105 + 0;
  • 111 134 434 999 105 ÷ 2 = 55 567 217 499 552 + 1;
  • 55 567 217 499 552 ÷ 2 = 27 783 608 749 776 + 0;
  • 27 783 608 749 776 ÷ 2 = 13 891 804 374 888 + 0;
  • 13 891 804 374 888 ÷ 2 = 6 945 902 187 444 + 0;
  • 6 945 902 187 444 ÷ 2 = 3 472 951 093 722 + 0;
  • 3 472 951 093 722 ÷ 2 = 1 736 475 546 861 + 0;
  • 1 736 475 546 861 ÷ 2 = 868 237 773 430 + 1;
  • 868 237 773 430 ÷ 2 = 434 118 886 715 + 0;
  • 434 118 886 715 ÷ 2 = 217 059 443 357 + 1;
  • 217 059 443 357 ÷ 2 = 108 529 721 678 + 1;
  • 108 529 721 678 ÷ 2 = 54 264 860 839 + 0;
  • 54 264 860 839 ÷ 2 = 27 132 430 419 + 1;
  • 27 132 430 419 ÷ 2 = 13 566 215 209 + 1;
  • 13 566 215 209 ÷ 2 = 6 783 107 604 + 1;
  • 6 783 107 604 ÷ 2 = 3 391 553 802 + 0;
  • 3 391 553 802 ÷ 2 = 1 695 776 901 + 0;
  • 1 695 776 901 ÷ 2 = 847 888 450 + 1;
  • 847 888 450 ÷ 2 = 423 944 225 + 0;
  • 423 944 225 ÷ 2 = 211 972 112 + 1;
  • 211 972 112 ÷ 2 = 105 986 056 + 0;
  • 105 986 056 ÷ 2 = 52 993 028 + 0;
  • 52 993 028 ÷ 2 = 26 496 514 + 0;
  • 26 496 514 ÷ 2 = 13 248 257 + 0;
  • 13 248 257 ÷ 2 = 6 624 128 + 1;
  • 6 624 128 ÷ 2 = 3 312 064 + 0;
  • 3 312 064 ÷ 2 = 1 656 032 + 0;
  • 1 656 032 ÷ 2 = 828 016 + 0;
  • 828 016 ÷ 2 = 414 008 + 0;
  • 414 008 ÷ 2 = 207 004 + 0;
  • 207 004 ÷ 2 = 103 502 + 0;
  • 103 502 ÷ 2 = 51 751 + 0;
  • 51 751 ÷ 2 = 25 875 + 1;
  • 25 875 ÷ 2 = 12 937 + 1;
  • 12 937 ÷ 2 = 6 468 + 1;
  • 6 468 ÷ 2 = 3 234 + 0;
  • 3 234 ÷ 2 = 1 617 + 0;
  • 1 617 ÷ 2 = 808 + 1;
  • 808 ÷ 2 = 404 + 0;
  • 404 ÷ 2 = 202 + 0;
  • 202 ÷ 2 = 101 + 0;
  • 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;

2. Construct the base 2 representation of the positive number.

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

1 001 010 000 100 000 000 000 000 000 374(10) =


1100 1010 0010 0111 0000 0001 0000 1010 0111 0110 1000 0010 0000 1100 1101 1001 1100 1101 0101 0001 0000 0000 0001 0111 0110(2)


3. Normalize the binary representation of the number.

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


1 001 010 000 100 000 000 000 000 000 374(10) =


1100 1010 0010 0111 0000 0001 0000 1010 0111 0110 1000 0010 0000 1100 1101 1001 1100 1101 0101 0001 0000 0000 0001 0111 0110(2) =


1100 1010 0010 0111 0000 0001 0000 1010 0111 0110 1000 0010 0000 1100 1101 1001 1100 1101 0101 0001 0000 0000 0001 0111 0110(2) × 20 =


1.1001 0100 0100 1110 0000 0010 0001 0100 1110 1101 0000 0100 0001 1001 1011 0011 1001 1010 1010 0010 0000 0000 0010 1110 110(2) × 299


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


Mantissa (not normalized):
1.1001 0100 0100 1110 0000 0010 0001 0100 1110 1101 0000 0100 0001 1001 1011 0011 1001 1010 1010 0010 0000 0000 0010 1110 110


5. Adjust the exponent.

Use the 8 bit excess/bias notation:


Exponent (adjusted) =


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


99 + 2(8-1) - 1 =


(99 + 127)(10) =


226(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;
  • 226 ÷ 2 = 113 + 0;
  • 113 ÷ 2 = 56 + 1;
  • 56 ÷ 2 = 28 + 0;
  • 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) =


226(10) =


1110 0010(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. 100 1010 0010 0111 0000 0001 0000 1010 0111 0110 1000 0010 0000 1100 1101 1001 1100 1101 0101 0001 0000 0000 0001 0111 0110 =


100 1010 0010 0111 0000 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 0010


Mantissa (23 bits) =
100 1010 0010 0111 0000 0001


Decimal number 1 001 010 000 100 000 000 000 000 000 374 converted to 32 bit single precision IEEE 754 binary floating point representation:

0 - 1110 0010 - 100 1010 0010 0111 0000 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