101 111 000 110 100 011 110 101 110 001 016 Converted to 32 Bit Single Precision IEEE 754 Binary Floating Point Representation Standard

Convert decimal 101 111 000 110 100 011 110 101 110 001 016(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
101 111 000 110 100 011 110 101 110 001 016(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;
  • 101 111 000 110 100 011 110 101 110 001 016 ÷ 2 = 50 555 500 055 050 005 555 050 555 000 508 + 0;
  • 50 555 500 055 050 005 555 050 555 000 508 ÷ 2 = 25 277 750 027 525 002 777 525 277 500 254 + 0;
  • 25 277 750 027 525 002 777 525 277 500 254 ÷ 2 = 12 638 875 013 762 501 388 762 638 750 127 + 0;
  • 12 638 875 013 762 501 388 762 638 750 127 ÷ 2 = 6 319 437 506 881 250 694 381 319 375 063 + 1;
  • 6 319 437 506 881 250 694 381 319 375 063 ÷ 2 = 3 159 718 753 440 625 347 190 659 687 531 + 1;
  • 3 159 718 753 440 625 347 190 659 687 531 ÷ 2 = 1 579 859 376 720 312 673 595 329 843 765 + 1;
  • 1 579 859 376 720 312 673 595 329 843 765 ÷ 2 = 789 929 688 360 156 336 797 664 921 882 + 1;
  • 789 929 688 360 156 336 797 664 921 882 ÷ 2 = 394 964 844 180 078 168 398 832 460 941 + 0;
  • 394 964 844 180 078 168 398 832 460 941 ÷ 2 = 197 482 422 090 039 084 199 416 230 470 + 1;
  • 197 482 422 090 039 084 199 416 230 470 ÷ 2 = 98 741 211 045 019 542 099 708 115 235 + 0;
  • 98 741 211 045 019 542 099 708 115 235 ÷ 2 = 49 370 605 522 509 771 049 854 057 617 + 1;
  • 49 370 605 522 509 771 049 854 057 617 ÷ 2 = 24 685 302 761 254 885 524 927 028 808 + 1;
  • 24 685 302 761 254 885 524 927 028 808 ÷ 2 = 12 342 651 380 627 442 762 463 514 404 + 0;
  • 12 342 651 380 627 442 762 463 514 404 ÷ 2 = 6 171 325 690 313 721 381 231 757 202 + 0;
  • 6 171 325 690 313 721 381 231 757 202 ÷ 2 = 3 085 662 845 156 860 690 615 878 601 + 0;
  • 3 085 662 845 156 860 690 615 878 601 ÷ 2 = 1 542 831 422 578 430 345 307 939 300 + 1;
  • 1 542 831 422 578 430 345 307 939 300 ÷ 2 = 771 415 711 289 215 172 653 969 650 + 0;
  • 771 415 711 289 215 172 653 969 650 ÷ 2 = 385 707 855 644 607 586 326 984 825 + 0;
  • 385 707 855 644 607 586 326 984 825 ÷ 2 = 192 853 927 822 303 793 163 492 412 + 1;
  • 192 853 927 822 303 793 163 492 412 ÷ 2 = 96 426 963 911 151 896 581 746 206 + 0;
  • 96 426 963 911 151 896 581 746 206 ÷ 2 = 48 213 481 955 575 948 290 873 103 + 0;
  • 48 213 481 955 575 948 290 873 103 ÷ 2 = 24 106 740 977 787 974 145 436 551 + 1;
  • 24 106 740 977 787 974 145 436 551 ÷ 2 = 12 053 370 488 893 987 072 718 275 + 1;
  • 12 053 370 488 893 987 072 718 275 ÷ 2 = 6 026 685 244 446 993 536 359 137 + 1;
  • 6 026 685 244 446 993 536 359 137 ÷ 2 = 3 013 342 622 223 496 768 179 568 + 1;
  • 3 013 342 622 223 496 768 179 568 ÷ 2 = 1 506 671 311 111 748 384 089 784 + 0;
  • 1 506 671 311 111 748 384 089 784 ÷ 2 = 753 335 655 555 874 192 044 892 + 0;
  • 753 335 655 555 874 192 044 892 ÷ 2 = 376 667 827 777 937 096 022 446 + 0;
  • 376 667 827 777 937 096 022 446 ÷ 2 = 188 333 913 888 968 548 011 223 + 0;
  • 188 333 913 888 968 548 011 223 ÷ 2 = 94 166 956 944 484 274 005 611 + 1;
  • 94 166 956 944 484 274 005 611 ÷ 2 = 47 083 478 472 242 137 002 805 + 1;
  • 47 083 478 472 242 137 002 805 ÷ 2 = 23 541 739 236 121 068 501 402 + 1;
  • 23 541 739 236 121 068 501 402 ÷ 2 = 11 770 869 618 060 534 250 701 + 0;
  • 11 770 869 618 060 534 250 701 ÷ 2 = 5 885 434 809 030 267 125 350 + 1;
  • 5 885 434 809 030 267 125 350 ÷ 2 = 2 942 717 404 515 133 562 675 + 0;
  • 2 942 717 404 515 133 562 675 ÷ 2 = 1 471 358 702 257 566 781 337 + 1;
  • 1 471 358 702 257 566 781 337 ÷ 2 = 735 679 351 128 783 390 668 + 1;
  • 735 679 351 128 783 390 668 ÷ 2 = 367 839 675 564 391 695 334 + 0;
  • 367 839 675 564 391 695 334 ÷ 2 = 183 919 837 782 195 847 667 + 0;
  • 183 919 837 782 195 847 667 ÷ 2 = 91 959 918 891 097 923 833 + 1;
  • 91 959 918 891 097 923 833 ÷ 2 = 45 979 959 445 548 961 916 + 1;
  • 45 979 959 445 548 961 916 ÷ 2 = 22 989 979 722 774 480 958 + 0;
  • 22 989 979 722 774 480 958 ÷ 2 = 11 494 989 861 387 240 479 + 0;
  • 11 494 989 861 387 240 479 ÷ 2 = 5 747 494 930 693 620 239 + 1;
  • 5 747 494 930 693 620 239 ÷ 2 = 2 873 747 465 346 810 119 + 1;
  • 2 873 747 465 346 810 119 ÷ 2 = 1 436 873 732 673 405 059 + 1;
  • 1 436 873 732 673 405 059 ÷ 2 = 718 436 866 336 702 529 + 1;
  • 718 436 866 336 702 529 ÷ 2 = 359 218 433 168 351 264 + 1;
  • 359 218 433 168 351 264 ÷ 2 = 179 609 216 584 175 632 + 0;
  • 179 609 216 584 175 632 ÷ 2 = 89 804 608 292 087 816 + 0;
  • 89 804 608 292 087 816 ÷ 2 = 44 902 304 146 043 908 + 0;
  • 44 902 304 146 043 908 ÷ 2 = 22 451 152 073 021 954 + 0;
  • 22 451 152 073 021 954 ÷ 2 = 11 225 576 036 510 977 + 0;
  • 11 225 576 036 510 977 ÷ 2 = 5 612 788 018 255 488 + 1;
  • 5 612 788 018 255 488 ÷ 2 = 2 806 394 009 127 744 + 0;
  • 2 806 394 009 127 744 ÷ 2 = 1 403 197 004 563 872 + 0;
  • 1 403 197 004 563 872 ÷ 2 = 701 598 502 281 936 + 0;
  • 701 598 502 281 936 ÷ 2 = 350 799 251 140 968 + 0;
  • 350 799 251 140 968 ÷ 2 = 175 399 625 570 484 + 0;
  • 175 399 625 570 484 ÷ 2 = 87 699 812 785 242 + 0;
  • 87 699 812 785 242 ÷ 2 = 43 849 906 392 621 + 0;
  • 43 849 906 392 621 ÷ 2 = 21 924 953 196 310 + 1;
  • 21 924 953 196 310 ÷ 2 = 10 962 476 598 155 + 0;
  • 10 962 476 598 155 ÷ 2 = 5 481 238 299 077 + 1;
  • 5 481 238 299 077 ÷ 2 = 2 740 619 149 538 + 1;
  • 2 740 619 149 538 ÷ 2 = 1 370 309 574 769 + 0;
  • 1 370 309 574 769 ÷ 2 = 685 154 787 384 + 1;
  • 685 154 787 384 ÷ 2 = 342 577 393 692 + 0;
  • 342 577 393 692 ÷ 2 = 171 288 696 846 + 0;
  • 171 288 696 846 ÷ 2 = 85 644 348 423 + 0;
  • 85 644 348 423 ÷ 2 = 42 822 174 211 + 1;
  • 42 822 174 211 ÷ 2 = 21 411 087 105 + 1;
  • 21 411 087 105 ÷ 2 = 10 705 543 552 + 1;
  • 10 705 543 552 ÷ 2 = 5 352 771 776 + 0;
  • 5 352 771 776 ÷ 2 = 2 676 385 888 + 0;
  • 2 676 385 888 ÷ 2 = 1 338 192 944 + 0;
  • 1 338 192 944 ÷ 2 = 669 096 472 + 0;
  • 669 096 472 ÷ 2 = 334 548 236 + 0;
  • 334 548 236 ÷ 2 = 167 274 118 + 0;
  • 167 274 118 ÷ 2 = 83 637 059 + 0;
  • 83 637 059 ÷ 2 = 41 818 529 + 1;
  • 41 818 529 ÷ 2 = 20 909 264 + 1;
  • 20 909 264 ÷ 2 = 10 454 632 + 0;
  • 10 454 632 ÷ 2 = 5 227 316 + 0;
  • 5 227 316 ÷ 2 = 2 613 658 + 0;
  • 2 613 658 ÷ 2 = 1 306 829 + 0;
  • 1 306 829 ÷ 2 = 653 414 + 1;
  • 653 414 ÷ 2 = 326 707 + 0;
  • 326 707 ÷ 2 = 163 353 + 1;
  • 163 353 ÷ 2 = 81 676 + 1;
  • 81 676 ÷ 2 = 40 838 + 0;
  • 40 838 ÷ 2 = 20 419 + 0;
  • 20 419 ÷ 2 = 10 209 + 1;
  • 10 209 ÷ 2 = 5 104 + 1;
  • 5 104 ÷ 2 = 2 552 + 0;
  • 2 552 ÷ 2 = 1 276 + 0;
  • 1 276 ÷ 2 = 638 + 0;
  • 638 ÷ 2 = 319 + 0;
  • 319 ÷ 2 = 159 + 1;
  • 159 ÷ 2 = 79 + 1;
  • 79 ÷ 2 = 39 + 1;
  • 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.

101 111 000 110 100 011 110 101 110 001 016(10) =


100 1111 1100 0011 0011 0100 0011 0000 0001 1100 0101 1010 0000 0010 0000 1111 1001 1001 1010 1110 0001 1110 0100 1000 1101 0111 1000(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:


101 111 000 110 100 011 110 101 110 001 016(10) =


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


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


1.0011 1111 0000 1100 1101 0000 1100 0000 0111 0001 0110 1000 0000 1000 0011 1110 0110 0110 1011 1000 0111 1001 0010 0011 0101 1110 00(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 1111 0000 1100 1101 0000 1100 0000 0111 0001 0110 1000 0000 1000 0011 1110 0110 0110 1011 1000 0111 1001 0010 0011 0101 1110 00


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 1111 1000 0110 0110 1000 011 0000 0001 1100 0101 1010 0000 0010 0000 1111 1001 1001 1010 1110 0001 1110 0100 1000 1101 0111 1000 =


001 1111 1000 0110 0110 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 1111 1000 0110 0110 1000


Decimal number 101 111 000 110 100 011 110 101 110 001 016 converted to 32 bit single precision IEEE 754 binary floating point representation:

0 - 1110 1001 - 001 1111 1000 0110 0110 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