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

Convert decimal 10 010 111 001 010 101 111 000 001 100 171(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
10 010 111 001 010 101 111 000 001 100 171(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;
  • 10 010 111 001 010 101 111 000 001 100 171 ÷ 2 = 5 005 055 500 505 050 555 500 000 550 085 + 1;
  • 5 005 055 500 505 050 555 500 000 550 085 ÷ 2 = 2 502 527 750 252 525 277 750 000 275 042 + 1;
  • 2 502 527 750 252 525 277 750 000 275 042 ÷ 2 = 1 251 263 875 126 262 638 875 000 137 521 + 0;
  • 1 251 263 875 126 262 638 875 000 137 521 ÷ 2 = 625 631 937 563 131 319 437 500 068 760 + 1;
  • 625 631 937 563 131 319 437 500 068 760 ÷ 2 = 312 815 968 781 565 659 718 750 034 380 + 0;
  • 312 815 968 781 565 659 718 750 034 380 ÷ 2 = 156 407 984 390 782 829 859 375 017 190 + 0;
  • 156 407 984 390 782 829 859 375 017 190 ÷ 2 = 78 203 992 195 391 414 929 687 508 595 + 0;
  • 78 203 992 195 391 414 929 687 508 595 ÷ 2 = 39 101 996 097 695 707 464 843 754 297 + 1;
  • 39 101 996 097 695 707 464 843 754 297 ÷ 2 = 19 550 998 048 847 853 732 421 877 148 + 1;
  • 19 550 998 048 847 853 732 421 877 148 ÷ 2 = 9 775 499 024 423 926 866 210 938 574 + 0;
  • 9 775 499 024 423 926 866 210 938 574 ÷ 2 = 4 887 749 512 211 963 433 105 469 287 + 0;
  • 4 887 749 512 211 963 433 105 469 287 ÷ 2 = 2 443 874 756 105 981 716 552 734 643 + 1;
  • 2 443 874 756 105 981 716 552 734 643 ÷ 2 = 1 221 937 378 052 990 858 276 367 321 + 1;
  • 1 221 937 378 052 990 858 276 367 321 ÷ 2 = 610 968 689 026 495 429 138 183 660 + 1;
  • 610 968 689 026 495 429 138 183 660 ÷ 2 = 305 484 344 513 247 714 569 091 830 + 0;
  • 305 484 344 513 247 714 569 091 830 ÷ 2 = 152 742 172 256 623 857 284 545 915 + 0;
  • 152 742 172 256 623 857 284 545 915 ÷ 2 = 76 371 086 128 311 928 642 272 957 + 1;
  • 76 371 086 128 311 928 642 272 957 ÷ 2 = 38 185 543 064 155 964 321 136 478 + 1;
  • 38 185 543 064 155 964 321 136 478 ÷ 2 = 19 092 771 532 077 982 160 568 239 + 0;
  • 19 092 771 532 077 982 160 568 239 ÷ 2 = 9 546 385 766 038 991 080 284 119 + 1;
  • 9 546 385 766 038 991 080 284 119 ÷ 2 = 4 773 192 883 019 495 540 142 059 + 1;
  • 4 773 192 883 019 495 540 142 059 ÷ 2 = 2 386 596 441 509 747 770 071 029 + 1;
  • 2 386 596 441 509 747 770 071 029 ÷ 2 = 1 193 298 220 754 873 885 035 514 + 1;
  • 1 193 298 220 754 873 885 035 514 ÷ 2 = 596 649 110 377 436 942 517 757 + 0;
  • 596 649 110 377 436 942 517 757 ÷ 2 = 298 324 555 188 718 471 258 878 + 1;
  • 298 324 555 188 718 471 258 878 ÷ 2 = 149 162 277 594 359 235 629 439 + 0;
  • 149 162 277 594 359 235 629 439 ÷ 2 = 74 581 138 797 179 617 814 719 + 1;
  • 74 581 138 797 179 617 814 719 ÷ 2 = 37 290 569 398 589 808 907 359 + 1;
  • 37 290 569 398 589 808 907 359 ÷ 2 = 18 645 284 699 294 904 453 679 + 1;
  • 18 645 284 699 294 904 453 679 ÷ 2 = 9 322 642 349 647 452 226 839 + 1;
  • 9 322 642 349 647 452 226 839 ÷ 2 = 4 661 321 174 823 726 113 419 + 1;
  • 4 661 321 174 823 726 113 419 ÷ 2 = 2 330 660 587 411 863 056 709 + 1;
  • 2 330 660 587 411 863 056 709 ÷ 2 = 1 165 330 293 705 931 528 354 + 1;
  • 1 165 330 293 705 931 528 354 ÷ 2 = 582 665 146 852 965 764 177 + 0;
  • 582 665 146 852 965 764 177 ÷ 2 = 291 332 573 426 482 882 088 + 1;
  • 291 332 573 426 482 882 088 ÷ 2 = 145 666 286 713 241 441 044 + 0;
  • 145 666 286 713 241 441 044 ÷ 2 = 72 833 143 356 620 720 522 + 0;
  • 72 833 143 356 620 720 522 ÷ 2 = 36 416 571 678 310 360 261 + 0;
  • 36 416 571 678 310 360 261 ÷ 2 = 18 208 285 839 155 180 130 + 1;
  • 18 208 285 839 155 180 130 ÷ 2 = 9 104 142 919 577 590 065 + 0;
  • 9 104 142 919 577 590 065 ÷ 2 = 4 552 071 459 788 795 032 + 1;
  • 4 552 071 459 788 795 032 ÷ 2 = 2 276 035 729 894 397 516 + 0;
  • 2 276 035 729 894 397 516 ÷ 2 = 1 138 017 864 947 198 758 + 0;
  • 1 138 017 864 947 198 758 ÷ 2 = 569 008 932 473 599 379 + 0;
  • 569 008 932 473 599 379 ÷ 2 = 284 504 466 236 799 689 + 1;
  • 284 504 466 236 799 689 ÷ 2 = 142 252 233 118 399 844 + 1;
  • 142 252 233 118 399 844 ÷ 2 = 71 126 116 559 199 922 + 0;
  • 71 126 116 559 199 922 ÷ 2 = 35 563 058 279 599 961 + 0;
  • 35 563 058 279 599 961 ÷ 2 = 17 781 529 139 799 980 + 1;
  • 17 781 529 139 799 980 ÷ 2 = 8 890 764 569 899 990 + 0;
  • 8 890 764 569 899 990 ÷ 2 = 4 445 382 284 949 995 + 0;
  • 4 445 382 284 949 995 ÷ 2 = 2 222 691 142 474 997 + 1;
  • 2 222 691 142 474 997 ÷ 2 = 1 111 345 571 237 498 + 1;
  • 1 111 345 571 237 498 ÷ 2 = 555 672 785 618 749 + 0;
  • 555 672 785 618 749 ÷ 2 = 277 836 392 809 374 + 1;
  • 277 836 392 809 374 ÷ 2 = 138 918 196 404 687 + 0;
  • 138 918 196 404 687 ÷ 2 = 69 459 098 202 343 + 1;
  • 69 459 098 202 343 ÷ 2 = 34 729 549 101 171 + 1;
  • 34 729 549 101 171 ÷ 2 = 17 364 774 550 585 + 1;
  • 17 364 774 550 585 ÷ 2 = 8 682 387 275 292 + 1;
  • 8 682 387 275 292 ÷ 2 = 4 341 193 637 646 + 0;
  • 4 341 193 637 646 ÷ 2 = 2 170 596 818 823 + 0;
  • 2 170 596 818 823 ÷ 2 = 1 085 298 409 411 + 1;
  • 1 085 298 409 411 ÷ 2 = 542 649 204 705 + 1;
  • 542 649 204 705 ÷ 2 = 271 324 602 352 + 1;
  • 271 324 602 352 ÷ 2 = 135 662 301 176 + 0;
  • 135 662 301 176 ÷ 2 = 67 831 150 588 + 0;
  • 67 831 150 588 ÷ 2 = 33 915 575 294 + 0;
  • 33 915 575 294 ÷ 2 = 16 957 787 647 + 0;
  • 16 957 787 647 ÷ 2 = 8 478 893 823 + 1;
  • 8 478 893 823 ÷ 2 = 4 239 446 911 + 1;
  • 4 239 446 911 ÷ 2 = 2 119 723 455 + 1;
  • 2 119 723 455 ÷ 2 = 1 059 861 727 + 1;
  • 1 059 861 727 ÷ 2 = 529 930 863 + 1;
  • 529 930 863 ÷ 2 = 264 965 431 + 1;
  • 264 965 431 ÷ 2 = 132 482 715 + 1;
  • 132 482 715 ÷ 2 = 66 241 357 + 1;
  • 66 241 357 ÷ 2 = 33 120 678 + 1;
  • 33 120 678 ÷ 2 = 16 560 339 + 0;
  • 16 560 339 ÷ 2 = 8 280 169 + 1;
  • 8 280 169 ÷ 2 = 4 140 084 + 1;
  • 4 140 084 ÷ 2 = 2 070 042 + 0;
  • 2 070 042 ÷ 2 = 1 035 021 + 0;
  • 1 035 021 ÷ 2 = 517 510 + 1;
  • 517 510 ÷ 2 = 258 755 + 0;
  • 258 755 ÷ 2 = 129 377 + 1;
  • 129 377 ÷ 2 = 64 688 + 1;
  • 64 688 ÷ 2 = 32 344 + 0;
  • 32 344 ÷ 2 = 16 172 + 0;
  • 16 172 ÷ 2 = 8 086 + 0;
  • 8 086 ÷ 2 = 4 043 + 0;
  • 4 043 ÷ 2 = 2 021 + 1;
  • 2 021 ÷ 2 = 1 010 + 1;
  • 1 010 ÷ 2 = 505 + 0;
  • 505 ÷ 2 = 252 + 1;
  • 252 ÷ 2 = 126 + 0;
  • 126 ÷ 2 = 63 + 0;
  • 63 ÷ 2 = 31 + 1;
  • 31 ÷ 2 = 15 + 1;
  • 15 ÷ 2 = 7 + 1;
  • 7 ÷ 2 = 3 + 1;
  • 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.

10 010 111 001 010 101 111 000 001 100 171(10) =


111 1110 0101 1000 0110 1001 1011 1111 1110 0001 1100 1111 0101 1001 0011 0001 0100 0101 1111 1101 0111 1011 0011 1001 1000 1011(2)


3. Normalize the binary representation of the number.

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


10 010 111 001 010 101 111 000 001 100 171(10) =


111 1110 0101 1000 0110 1001 1011 1111 1110 0001 1100 1111 0101 1001 0011 0001 0100 0101 1111 1101 0111 1011 0011 1001 1000 1011(2) =


111 1110 0101 1000 0110 1001 1011 1111 1110 0001 1100 1111 0101 1001 0011 0001 0100 0101 1111 1101 0111 1011 0011 1001 1000 1011(2) × 20 =


1.1111 1001 0110 0001 1010 0110 1111 1111 1000 0111 0011 1101 0110 0100 1100 0101 0001 0111 1111 0101 1110 1100 1110 0110 0010 11(2) × 2102


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


Mantissa (not normalized):
1.1111 1001 0110 0001 1010 0110 1111 1111 1000 0111 0011 1101 0110 0100 1100 0101 0001 0111 1111 0101 1110 1100 1110 0110 0010 11


5. Adjust the exponent.

Use the 8 bit excess/bias notation:


Exponent (adjusted) =


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


102 + 2(8-1) - 1 =


(102 + 127)(10) =


229(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;
  • 229 ÷ 2 = 114 + 1;
  • 114 ÷ 2 = 57 + 0;
  • 57 ÷ 2 = 28 + 1;
  • 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) =


229(10) =


1110 0101(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. 111 1100 1011 0000 1101 0011 011 1111 1110 0001 1100 1111 0101 1001 0011 0001 0100 0101 1111 1101 0111 1011 0011 1001 1000 1011 =


111 1100 1011 0000 1101 0011


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 0101


Mantissa (23 bits) =
111 1100 1011 0000 1101 0011


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

0 - 1110 0101 - 111 1100 1011 0000 1101 0011


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