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

Convert decimal 100 010 010 100 100 000 101 101 000 237(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
100 010 010 100 100 000 101 101 000 237(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;
  • 100 010 010 100 100 000 101 101 000 237 ÷ 2 = 50 005 005 050 050 000 050 550 500 118 + 1;
  • 50 005 005 050 050 000 050 550 500 118 ÷ 2 = 25 002 502 525 025 000 025 275 250 059 + 0;
  • 25 002 502 525 025 000 025 275 250 059 ÷ 2 = 12 501 251 262 512 500 012 637 625 029 + 1;
  • 12 501 251 262 512 500 012 637 625 029 ÷ 2 = 6 250 625 631 256 250 006 318 812 514 + 1;
  • 6 250 625 631 256 250 006 318 812 514 ÷ 2 = 3 125 312 815 628 125 003 159 406 257 + 0;
  • 3 125 312 815 628 125 003 159 406 257 ÷ 2 = 1 562 656 407 814 062 501 579 703 128 + 1;
  • 1 562 656 407 814 062 501 579 703 128 ÷ 2 = 781 328 203 907 031 250 789 851 564 + 0;
  • 781 328 203 907 031 250 789 851 564 ÷ 2 = 390 664 101 953 515 625 394 925 782 + 0;
  • 390 664 101 953 515 625 394 925 782 ÷ 2 = 195 332 050 976 757 812 697 462 891 + 0;
  • 195 332 050 976 757 812 697 462 891 ÷ 2 = 97 666 025 488 378 906 348 731 445 + 1;
  • 97 666 025 488 378 906 348 731 445 ÷ 2 = 48 833 012 744 189 453 174 365 722 + 1;
  • 48 833 012 744 189 453 174 365 722 ÷ 2 = 24 416 506 372 094 726 587 182 861 + 0;
  • 24 416 506 372 094 726 587 182 861 ÷ 2 = 12 208 253 186 047 363 293 591 430 + 1;
  • 12 208 253 186 047 363 293 591 430 ÷ 2 = 6 104 126 593 023 681 646 795 715 + 0;
  • 6 104 126 593 023 681 646 795 715 ÷ 2 = 3 052 063 296 511 840 823 397 857 + 1;
  • 3 052 063 296 511 840 823 397 857 ÷ 2 = 1 526 031 648 255 920 411 698 928 + 1;
  • 1 526 031 648 255 920 411 698 928 ÷ 2 = 763 015 824 127 960 205 849 464 + 0;
  • 763 015 824 127 960 205 849 464 ÷ 2 = 381 507 912 063 980 102 924 732 + 0;
  • 381 507 912 063 980 102 924 732 ÷ 2 = 190 753 956 031 990 051 462 366 + 0;
  • 190 753 956 031 990 051 462 366 ÷ 2 = 95 376 978 015 995 025 731 183 + 0;
  • 95 376 978 015 995 025 731 183 ÷ 2 = 47 688 489 007 997 512 865 591 + 1;
  • 47 688 489 007 997 512 865 591 ÷ 2 = 23 844 244 503 998 756 432 795 + 1;
  • 23 844 244 503 998 756 432 795 ÷ 2 = 11 922 122 251 999 378 216 397 + 1;
  • 11 922 122 251 999 378 216 397 ÷ 2 = 5 961 061 125 999 689 108 198 + 1;
  • 5 961 061 125 999 689 108 198 ÷ 2 = 2 980 530 562 999 844 554 099 + 0;
  • 2 980 530 562 999 844 554 099 ÷ 2 = 1 490 265 281 499 922 277 049 + 1;
  • 1 490 265 281 499 922 277 049 ÷ 2 = 745 132 640 749 961 138 524 + 1;
  • 745 132 640 749 961 138 524 ÷ 2 = 372 566 320 374 980 569 262 + 0;
  • 372 566 320 374 980 569 262 ÷ 2 = 186 283 160 187 490 284 631 + 0;
  • 186 283 160 187 490 284 631 ÷ 2 = 93 141 580 093 745 142 315 + 1;
  • 93 141 580 093 745 142 315 ÷ 2 = 46 570 790 046 872 571 157 + 1;
  • 46 570 790 046 872 571 157 ÷ 2 = 23 285 395 023 436 285 578 + 1;
  • 23 285 395 023 436 285 578 ÷ 2 = 11 642 697 511 718 142 789 + 0;
  • 11 642 697 511 718 142 789 ÷ 2 = 5 821 348 755 859 071 394 + 1;
  • 5 821 348 755 859 071 394 ÷ 2 = 2 910 674 377 929 535 697 + 0;
  • 2 910 674 377 929 535 697 ÷ 2 = 1 455 337 188 964 767 848 + 1;
  • 1 455 337 188 964 767 848 ÷ 2 = 727 668 594 482 383 924 + 0;
  • 727 668 594 482 383 924 ÷ 2 = 363 834 297 241 191 962 + 0;
  • 363 834 297 241 191 962 ÷ 2 = 181 917 148 620 595 981 + 0;
  • 181 917 148 620 595 981 ÷ 2 = 90 958 574 310 297 990 + 1;
  • 90 958 574 310 297 990 ÷ 2 = 45 479 287 155 148 995 + 0;
  • 45 479 287 155 148 995 ÷ 2 = 22 739 643 577 574 497 + 1;
  • 22 739 643 577 574 497 ÷ 2 = 11 369 821 788 787 248 + 1;
  • 11 369 821 788 787 248 ÷ 2 = 5 684 910 894 393 624 + 0;
  • 5 684 910 894 393 624 ÷ 2 = 2 842 455 447 196 812 + 0;
  • 2 842 455 447 196 812 ÷ 2 = 1 421 227 723 598 406 + 0;
  • 1 421 227 723 598 406 ÷ 2 = 710 613 861 799 203 + 0;
  • 710 613 861 799 203 ÷ 2 = 355 306 930 899 601 + 1;
  • 355 306 930 899 601 ÷ 2 = 177 653 465 449 800 + 1;
  • 177 653 465 449 800 ÷ 2 = 88 826 732 724 900 + 0;
  • 88 826 732 724 900 ÷ 2 = 44 413 366 362 450 + 0;
  • 44 413 366 362 450 ÷ 2 = 22 206 683 181 225 + 0;
  • 22 206 683 181 225 ÷ 2 = 11 103 341 590 612 + 1;
  • 11 103 341 590 612 ÷ 2 = 5 551 670 795 306 + 0;
  • 5 551 670 795 306 ÷ 2 = 2 775 835 397 653 + 0;
  • 2 775 835 397 653 ÷ 2 = 1 387 917 698 826 + 1;
  • 1 387 917 698 826 ÷ 2 = 693 958 849 413 + 0;
  • 693 958 849 413 ÷ 2 = 346 979 424 706 + 1;
  • 346 979 424 706 ÷ 2 = 173 489 712 353 + 0;
  • 173 489 712 353 ÷ 2 = 86 744 856 176 + 1;
  • 86 744 856 176 ÷ 2 = 43 372 428 088 + 0;
  • 43 372 428 088 ÷ 2 = 21 686 214 044 + 0;
  • 21 686 214 044 ÷ 2 = 10 843 107 022 + 0;
  • 10 843 107 022 ÷ 2 = 5 421 553 511 + 0;
  • 5 421 553 511 ÷ 2 = 2 710 776 755 + 1;
  • 2 710 776 755 ÷ 2 = 1 355 388 377 + 1;
  • 1 355 388 377 ÷ 2 = 677 694 188 + 1;
  • 677 694 188 ÷ 2 = 338 847 094 + 0;
  • 338 847 094 ÷ 2 = 169 423 547 + 0;
  • 169 423 547 ÷ 2 = 84 711 773 + 1;
  • 84 711 773 ÷ 2 = 42 355 886 + 1;
  • 42 355 886 ÷ 2 = 21 177 943 + 0;
  • 21 177 943 ÷ 2 = 10 588 971 + 1;
  • 10 588 971 ÷ 2 = 5 294 485 + 1;
  • 5 294 485 ÷ 2 = 2 647 242 + 1;
  • 2 647 242 ÷ 2 = 1 323 621 + 0;
  • 1 323 621 ÷ 2 = 661 810 + 1;
  • 661 810 ÷ 2 = 330 905 + 0;
  • 330 905 ÷ 2 = 165 452 + 1;
  • 165 452 ÷ 2 = 82 726 + 0;
  • 82 726 ÷ 2 = 41 363 + 0;
  • 41 363 ÷ 2 = 20 681 + 1;
  • 20 681 ÷ 2 = 10 340 + 1;
  • 10 340 ÷ 2 = 5 170 + 0;
  • 5 170 ÷ 2 = 2 585 + 0;
  • 2 585 ÷ 2 = 1 292 + 1;
  • 1 292 ÷ 2 = 646 + 0;
  • 646 ÷ 2 = 323 + 0;
  • 323 ÷ 2 = 161 + 1;
  • 161 ÷ 2 = 80 + 1;
  • 80 ÷ 2 = 40 + 0;
  • 40 ÷ 2 = 20 + 0;
  • 20 ÷ 2 = 10 + 0;
  • 10 ÷ 2 = 5 + 0;
  • 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.

100 010 010 100 100 000 101 101 000 237(10) =


1 0100 0011 0010 0110 0101 0111 0110 0111 0000 1010 1001 0001 1000 0110 1000 1010 1110 0110 1111 0000 1101 0110 0010 1101(2)


3. Normalize the binary representation of the number.

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


100 010 010 100 100 000 101 101 000 237(10) =


1 0100 0011 0010 0110 0101 0111 0110 0111 0000 1010 1001 0001 1000 0110 1000 1010 1110 0110 1111 0000 1101 0110 0010 1101(2) =


1 0100 0011 0010 0110 0101 0111 0110 0111 0000 1010 1001 0001 1000 0110 1000 1010 1110 0110 1111 0000 1101 0110 0010 1101(2) × 20 =


1.0100 0011 0010 0110 0101 0111 0110 0111 0000 1010 1001 0001 1000 0110 1000 1010 1110 0110 1111 0000 1101 0110 0010 1101(2) × 296


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


Mantissa (not normalized):
1.0100 0011 0010 0110 0101 0111 0110 0111 0000 1010 1001 0001 1000 0110 1000 1010 1110 0110 1111 0000 1101 0110 0010 1101


5. Adjust the exponent.

Use the 8 bit excess/bias notation:


Exponent (adjusted) =


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


96 + 2(8-1) - 1 =


(96 + 127)(10) =


223(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;
  • 223 ÷ 2 = 111 + 1;
  • 111 ÷ 2 = 55 + 1;
  • 55 ÷ 2 = 27 + 1;
  • 27 ÷ 2 = 13 + 1;
  • 13 ÷ 2 = 6 + 1;
  • 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) =


223(10) =


1101 1111(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. 010 0001 1001 0011 0010 1011 1 0110 0111 0000 1010 1001 0001 1000 0110 1000 1010 1110 0110 1111 0000 1101 0110 0010 1101 =


010 0001 1001 0011 0010 1011


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) =
1101 1111


Mantissa (23 bits) =
010 0001 1001 0011 0010 1011


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

0 - 1101 1111 - 010 0001 1001 0011 0010 1011


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