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

Convert decimal 100 000 101 101 010 000 000 001 000 000 251(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 000 101 101 010 000 000 001 000 000 251(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 000 101 101 010 000 000 001 000 000 251 ÷ 2 = 50 000 050 550 505 000 000 000 500 000 125 + 1;
  • 50 000 050 550 505 000 000 000 500 000 125 ÷ 2 = 25 000 025 275 252 500 000 000 250 000 062 + 1;
  • 25 000 025 275 252 500 000 000 250 000 062 ÷ 2 = 12 500 012 637 626 250 000 000 125 000 031 + 0;
  • 12 500 012 637 626 250 000 000 125 000 031 ÷ 2 = 6 250 006 318 813 125 000 000 062 500 015 + 1;
  • 6 250 006 318 813 125 000 000 062 500 015 ÷ 2 = 3 125 003 159 406 562 500 000 031 250 007 + 1;
  • 3 125 003 159 406 562 500 000 031 250 007 ÷ 2 = 1 562 501 579 703 281 250 000 015 625 003 + 1;
  • 1 562 501 579 703 281 250 000 015 625 003 ÷ 2 = 781 250 789 851 640 625 000 007 812 501 + 1;
  • 781 250 789 851 640 625 000 007 812 501 ÷ 2 = 390 625 394 925 820 312 500 003 906 250 + 1;
  • 390 625 394 925 820 312 500 003 906 250 ÷ 2 = 195 312 697 462 910 156 250 001 953 125 + 0;
  • 195 312 697 462 910 156 250 001 953 125 ÷ 2 = 97 656 348 731 455 078 125 000 976 562 + 1;
  • 97 656 348 731 455 078 125 000 976 562 ÷ 2 = 48 828 174 365 727 539 062 500 488 281 + 0;
  • 48 828 174 365 727 539 062 500 488 281 ÷ 2 = 24 414 087 182 863 769 531 250 244 140 + 1;
  • 24 414 087 182 863 769 531 250 244 140 ÷ 2 = 12 207 043 591 431 884 765 625 122 070 + 0;
  • 12 207 043 591 431 884 765 625 122 070 ÷ 2 = 6 103 521 795 715 942 382 812 561 035 + 0;
  • 6 103 521 795 715 942 382 812 561 035 ÷ 2 = 3 051 760 897 857 971 191 406 280 517 + 1;
  • 3 051 760 897 857 971 191 406 280 517 ÷ 2 = 1 525 880 448 928 985 595 703 140 258 + 1;
  • 1 525 880 448 928 985 595 703 140 258 ÷ 2 = 762 940 224 464 492 797 851 570 129 + 0;
  • 762 940 224 464 492 797 851 570 129 ÷ 2 = 381 470 112 232 246 398 925 785 064 + 1;
  • 381 470 112 232 246 398 925 785 064 ÷ 2 = 190 735 056 116 123 199 462 892 532 + 0;
  • 190 735 056 116 123 199 462 892 532 ÷ 2 = 95 367 528 058 061 599 731 446 266 + 0;
  • 95 367 528 058 061 599 731 446 266 ÷ 2 = 47 683 764 029 030 799 865 723 133 + 0;
  • 47 683 764 029 030 799 865 723 133 ÷ 2 = 23 841 882 014 515 399 932 861 566 + 1;
  • 23 841 882 014 515 399 932 861 566 ÷ 2 = 11 920 941 007 257 699 966 430 783 + 0;
  • 11 920 941 007 257 699 966 430 783 ÷ 2 = 5 960 470 503 628 849 983 215 391 + 1;
  • 5 960 470 503 628 849 983 215 391 ÷ 2 = 2 980 235 251 814 424 991 607 695 + 1;
  • 2 980 235 251 814 424 991 607 695 ÷ 2 = 1 490 117 625 907 212 495 803 847 + 1;
  • 1 490 117 625 907 212 495 803 847 ÷ 2 = 745 058 812 953 606 247 901 923 + 1;
  • 745 058 812 953 606 247 901 923 ÷ 2 = 372 529 406 476 803 123 950 961 + 1;
  • 372 529 406 476 803 123 950 961 ÷ 2 = 186 264 703 238 401 561 975 480 + 1;
  • 186 264 703 238 401 561 975 480 ÷ 2 = 93 132 351 619 200 780 987 740 + 0;
  • 93 132 351 619 200 780 987 740 ÷ 2 = 46 566 175 809 600 390 493 870 + 0;
  • 46 566 175 809 600 390 493 870 ÷ 2 = 23 283 087 904 800 195 246 935 + 0;
  • 23 283 087 904 800 195 246 935 ÷ 2 = 11 641 543 952 400 097 623 467 + 1;
  • 11 641 543 952 400 097 623 467 ÷ 2 = 5 820 771 976 200 048 811 733 + 1;
  • 5 820 771 976 200 048 811 733 ÷ 2 = 2 910 385 988 100 024 405 866 + 1;
  • 2 910 385 988 100 024 405 866 ÷ 2 = 1 455 192 994 050 012 202 933 + 0;
  • 1 455 192 994 050 012 202 933 ÷ 2 = 727 596 497 025 006 101 466 + 1;
  • 727 596 497 025 006 101 466 ÷ 2 = 363 798 248 512 503 050 733 + 0;
  • 363 798 248 512 503 050 733 ÷ 2 = 181 899 124 256 251 525 366 + 1;
  • 181 899 124 256 251 525 366 ÷ 2 = 90 949 562 128 125 762 683 + 0;
  • 90 949 562 128 125 762 683 ÷ 2 = 45 474 781 064 062 881 341 + 1;
  • 45 474 781 064 062 881 341 ÷ 2 = 22 737 390 532 031 440 670 + 1;
  • 22 737 390 532 031 440 670 ÷ 2 = 11 368 695 266 015 720 335 + 0;
  • 11 368 695 266 015 720 335 ÷ 2 = 5 684 347 633 007 860 167 + 1;
  • 5 684 347 633 007 860 167 ÷ 2 = 2 842 173 816 503 930 083 + 1;
  • 2 842 173 816 503 930 083 ÷ 2 = 1 421 086 908 251 965 041 + 1;
  • 1 421 086 908 251 965 041 ÷ 2 = 710 543 454 125 982 520 + 1;
  • 710 543 454 125 982 520 ÷ 2 = 355 271 727 062 991 260 + 0;
  • 355 271 727 062 991 260 ÷ 2 = 177 635 863 531 495 630 + 0;
  • 177 635 863 531 495 630 ÷ 2 = 88 817 931 765 747 815 + 0;
  • 88 817 931 765 747 815 ÷ 2 = 44 408 965 882 873 907 + 1;
  • 44 408 965 882 873 907 ÷ 2 = 22 204 482 941 436 953 + 1;
  • 22 204 482 941 436 953 ÷ 2 = 11 102 241 470 718 476 + 1;
  • 11 102 241 470 718 476 ÷ 2 = 5 551 120 735 359 238 + 0;
  • 5 551 120 735 359 238 ÷ 2 = 2 775 560 367 679 619 + 0;
  • 2 775 560 367 679 619 ÷ 2 = 1 387 780 183 839 809 + 1;
  • 1 387 780 183 839 809 ÷ 2 = 693 890 091 919 904 + 1;
  • 693 890 091 919 904 ÷ 2 = 346 945 045 959 952 + 0;
  • 346 945 045 959 952 ÷ 2 = 173 472 522 979 976 + 0;
  • 173 472 522 979 976 ÷ 2 = 86 736 261 489 988 + 0;
  • 86 736 261 489 988 ÷ 2 = 43 368 130 744 994 + 0;
  • 43 368 130 744 994 ÷ 2 = 21 684 065 372 497 + 0;
  • 21 684 065 372 497 ÷ 2 = 10 842 032 686 248 + 1;
  • 10 842 032 686 248 ÷ 2 = 5 421 016 343 124 + 0;
  • 5 421 016 343 124 ÷ 2 = 2 710 508 171 562 + 0;
  • 2 710 508 171 562 ÷ 2 = 1 355 254 085 781 + 0;
  • 1 355 254 085 781 ÷ 2 = 677 627 042 890 + 1;
  • 677 627 042 890 ÷ 2 = 338 813 521 445 + 0;
  • 338 813 521 445 ÷ 2 = 169 406 760 722 + 1;
  • 169 406 760 722 ÷ 2 = 84 703 380 361 + 0;
  • 84 703 380 361 ÷ 2 = 42 351 690 180 + 1;
  • 42 351 690 180 ÷ 2 = 21 175 845 090 + 0;
  • 21 175 845 090 ÷ 2 = 10 587 922 545 + 0;
  • 10 587 922 545 ÷ 2 = 5 293 961 272 + 1;
  • 5 293 961 272 ÷ 2 = 2 646 980 636 + 0;
  • 2 646 980 636 ÷ 2 = 1 323 490 318 + 0;
  • 1 323 490 318 ÷ 2 = 661 745 159 + 0;
  • 661 745 159 ÷ 2 = 330 872 579 + 1;
  • 330 872 579 ÷ 2 = 165 436 289 + 1;
  • 165 436 289 ÷ 2 = 82 718 144 + 1;
  • 82 718 144 ÷ 2 = 41 359 072 + 0;
  • 41 359 072 ÷ 2 = 20 679 536 + 0;
  • 20 679 536 ÷ 2 = 10 339 768 + 0;
  • 10 339 768 ÷ 2 = 5 169 884 + 0;
  • 5 169 884 ÷ 2 = 2 584 942 + 0;
  • 2 584 942 ÷ 2 = 1 292 471 + 0;
  • 1 292 471 ÷ 2 = 646 235 + 1;
  • 646 235 ÷ 2 = 323 117 + 1;
  • 323 117 ÷ 2 = 161 558 + 1;
  • 161 558 ÷ 2 = 80 779 + 0;
  • 80 779 ÷ 2 = 40 389 + 1;
  • 40 389 ÷ 2 = 20 194 + 1;
  • 20 194 ÷ 2 = 10 097 + 0;
  • 10 097 ÷ 2 = 5 048 + 1;
  • 5 048 ÷ 2 = 2 524 + 0;
  • 2 524 ÷ 2 = 1 262 + 0;
  • 1 262 ÷ 2 = 631 + 0;
  • 631 ÷ 2 = 315 + 1;
  • 315 ÷ 2 = 157 + 1;
  • 157 ÷ 2 = 78 + 1;
  • 78 ÷ 2 = 39 + 0;
  • 39 ÷ 2 = 19 + 1;
  • 19 ÷ 2 = 9 + 1;
  • 9 ÷ 2 = 4 + 1;
  • 4 ÷ 2 = 2 + 0;
  • 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 000 101 101 010 000 000 001 000 000 251(10) =


100 1110 1110 0010 1101 1100 0000 1110 0010 0101 0100 0100 0001 1001 1100 0111 1011 0101 0111 0001 1111 1010 0010 1100 1010 1111 1011(2)


3. Normalize the binary representation of the number.

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


100 000 101 101 010 000 000 001 000 000 251(10) =


100 1110 1110 0010 1101 1100 0000 1110 0010 0101 0100 0100 0001 1001 1100 0111 1011 0101 0111 0001 1111 1010 0010 1100 1010 1111 1011(2) =


100 1110 1110 0010 1101 1100 0000 1110 0010 0101 0100 0100 0001 1001 1100 0111 1011 0101 0111 0001 1111 1010 0010 1100 1010 1111 1011(2) × 20 =


1.0011 1011 1000 1011 0111 0000 0011 1000 1001 0101 0001 0000 0110 0111 0001 1110 1101 0101 1100 0111 1110 1000 1011 0010 1011 1110 11(2) × 2106


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


Mantissa (not normalized):
1.0011 1011 1000 1011 0111 0000 0011 1000 1001 0101 0001 0000 0110 0111 0001 1110 1101 0101 1100 0111 1110 1000 1011 0010 1011 1110 11


5. Adjust the exponent.

Use the 8 bit excess/bias notation:


Exponent (adjusted) =


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


106 + 2(8-1) - 1 =


(106 + 127)(10) =


233(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;
  • 233 ÷ 2 = 116 + 1;
  • 116 ÷ 2 = 58 + 0;
  • 58 ÷ 2 = 29 + 0;
  • 29 ÷ 2 = 14 + 1;
  • 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) =


233(10) =


1110 1001(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. 001 1101 1100 0101 1011 1000 000 1110 0010 0101 0100 0100 0001 1001 1100 0111 1011 0101 0111 0001 1111 1010 0010 1100 1010 1111 1011 =


001 1101 1100 0101 1011 1000


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 1001


Mantissa (23 bits) =
001 1101 1100 0101 1011 1000


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

0 - 1110 1001 - 001 1101 1100 0101 1011 1000


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