10 101 101 000 100 001 011 000 000 100 207 Converted to 32 Bit Single Precision IEEE 754 Binary Floating Point Representation Standard

Convert decimal 10 101 101 000 100 001 011 000 000 100 207(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 101 101 000 100 001 011 000 000 100 207(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 101 101 000 100 001 011 000 000 100 207 ÷ 2 = 5 050 550 500 050 000 505 500 000 050 103 + 1;
  • 5 050 550 500 050 000 505 500 000 050 103 ÷ 2 = 2 525 275 250 025 000 252 750 000 025 051 + 1;
  • 2 525 275 250 025 000 252 750 000 025 051 ÷ 2 = 1 262 637 625 012 500 126 375 000 012 525 + 1;
  • 1 262 637 625 012 500 126 375 000 012 525 ÷ 2 = 631 318 812 506 250 063 187 500 006 262 + 1;
  • 631 318 812 506 250 063 187 500 006 262 ÷ 2 = 315 659 406 253 125 031 593 750 003 131 + 0;
  • 315 659 406 253 125 031 593 750 003 131 ÷ 2 = 157 829 703 126 562 515 796 875 001 565 + 1;
  • 157 829 703 126 562 515 796 875 001 565 ÷ 2 = 78 914 851 563 281 257 898 437 500 782 + 1;
  • 78 914 851 563 281 257 898 437 500 782 ÷ 2 = 39 457 425 781 640 628 949 218 750 391 + 0;
  • 39 457 425 781 640 628 949 218 750 391 ÷ 2 = 19 728 712 890 820 314 474 609 375 195 + 1;
  • 19 728 712 890 820 314 474 609 375 195 ÷ 2 = 9 864 356 445 410 157 237 304 687 597 + 1;
  • 9 864 356 445 410 157 237 304 687 597 ÷ 2 = 4 932 178 222 705 078 618 652 343 798 + 1;
  • 4 932 178 222 705 078 618 652 343 798 ÷ 2 = 2 466 089 111 352 539 309 326 171 899 + 0;
  • 2 466 089 111 352 539 309 326 171 899 ÷ 2 = 1 233 044 555 676 269 654 663 085 949 + 1;
  • 1 233 044 555 676 269 654 663 085 949 ÷ 2 = 616 522 277 838 134 827 331 542 974 + 1;
  • 616 522 277 838 134 827 331 542 974 ÷ 2 = 308 261 138 919 067 413 665 771 487 + 0;
  • 308 261 138 919 067 413 665 771 487 ÷ 2 = 154 130 569 459 533 706 832 885 743 + 1;
  • 154 130 569 459 533 706 832 885 743 ÷ 2 = 77 065 284 729 766 853 416 442 871 + 1;
  • 77 065 284 729 766 853 416 442 871 ÷ 2 = 38 532 642 364 883 426 708 221 435 + 1;
  • 38 532 642 364 883 426 708 221 435 ÷ 2 = 19 266 321 182 441 713 354 110 717 + 1;
  • 19 266 321 182 441 713 354 110 717 ÷ 2 = 9 633 160 591 220 856 677 055 358 + 1;
  • 9 633 160 591 220 856 677 055 358 ÷ 2 = 4 816 580 295 610 428 338 527 679 + 0;
  • 4 816 580 295 610 428 338 527 679 ÷ 2 = 2 408 290 147 805 214 169 263 839 + 1;
  • 2 408 290 147 805 214 169 263 839 ÷ 2 = 1 204 145 073 902 607 084 631 919 + 1;
  • 1 204 145 073 902 607 084 631 919 ÷ 2 = 602 072 536 951 303 542 315 959 + 1;
  • 602 072 536 951 303 542 315 959 ÷ 2 = 301 036 268 475 651 771 157 979 + 1;
  • 301 036 268 475 651 771 157 979 ÷ 2 = 150 518 134 237 825 885 578 989 + 1;
  • 150 518 134 237 825 885 578 989 ÷ 2 = 75 259 067 118 912 942 789 494 + 1;
  • 75 259 067 118 912 942 789 494 ÷ 2 = 37 629 533 559 456 471 394 747 + 0;
  • 37 629 533 559 456 471 394 747 ÷ 2 = 18 814 766 779 728 235 697 373 + 1;
  • 18 814 766 779 728 235 697 373 ÷ 2 = 9 407 383 389 864 117 848 686 + 1;
  • 9 407 383 389 864 117 848 686 ÷ 2 = 4 703 691 694 932 058 924 343 + 0;
  • 4 703 691 694 932 058 924 343 ÷ 2 = 2 351 845 847 466 029 462 171 + 1;
  • 2 351 845 847 466 029 462 171 ÷ 2 = 1 175 922 923 733 014 731 085 + 1;
  • 1 175 922 923 733 014 731 085 ÷ 2 = 587 961 461 866 507 365 542 + 1;
  • 587 961 461 866 507 365 542 ÷ 2 = 293 980 730 933 253 682 771 + 0;
  • 293 980 730 933 253 682 771 ÷ 2 = 146 990 365 466 626 841 385 + 1;
  • 146 990 365 466 626 841 385 ÷ 2 = 73 495 182 733 313 420 692 + 1;
  • 73 495 182 733 313 420 692 ÷ 2 = 36 747 591 366 656 710 346 + 0;
  • 36 747 591 366 656 710 346 ÷ 2 = 18 373 795 683 328 355 173 + 0;
  • 18 373 795 683 328 355 173 ÷ 2 = 9 186 897 841 664 177 586 + 1;
  • 9 186 897 841 664 177 586 ÷ 2 = 4 593 448 920 832 088 793 + 0;
  • 4 593 448 920 832 088 793 ÷ 2 = 2 296 724 460 416 044 396 + 1;
  • 2 296 724 460 416 044 396 ÷ 2 = 1 148 362 230 208 022 198 + 0;
  • 1 148 362 230 208 022 198 ÷ 2 = 574 181 115 104 011 099 + 0;
  • 574 181 115 104 011 099 ÷ 2 = 287 090 557 552 005 549 + 1;
  • 287 090 557 552 005 549 ÷ 2 = 143 545 278 776 002 774 + 1;
  • 143 545 278 776 002 774 ÷ 2 = 71 772 639 388 001 387 + 0;
  • 71 772 639 388 001 387 ÷ 2 = 35 886 319 694 000 693 + 1;
  • 35 886 319 694 000 693 ÷ 2 = 17 943 159 847 000 346 + 1;
  • 17 943 159 847 000 346 ÷ 2 = 8 971 579 923 500 173 + 0;
  • 8 971 579 923 500 173 ÷ 2 = 4 485 789 961 750 086 + 1;
  • 4 485 789 961 750 086 ÷ 2 = 2 242 894 980 875 043 + 0;
  • 2 242 894 980 875 043 ÷ 2 = 1 121 447 490 437 521 + 1;
  • 1 121 447 490 437 521 ÷ 2 = 560 723 745 218 760 + 1;
  • 560 723 745 218 760 ÷ 2 = 280 361 872 609 380 + 0;
  • 280 361 872 609 380 ÷ 2 = 140 180 936 304 690 + 0;
  • 140 180 936 304 690 ÷ 2 = 70 090 468 152 345 + 0;
  • 70 090 468 152 345 ÷ 2 = 35 045 234 076 172 + 1;
  • 35 045 234 076 172 ÷ 2 = 17 522 617 038 086 + 0;
  • 17 522 617 038 086 ÷ 2 = 8 761 308 519 043 + 0;
  • 8 761 308 519 043 ÷ 2 = 4 380 654 259 521 + 1;
  • 4 380 654 259 521 ÷ 2 = 2 190 327 129 760 + 1;
  • 2 190 327 129 760 ÷ 2 = 1 095 163 564 880 + 0;
  • 1 095 163 564 880 ÷ 2 = 547 581 782 440 + 0;
  • 547 581 782 440 ÷ 2 = 273 790 891 220 + 0;
  • 273 790 891 220 ÷ 2 = 136 895 445 610 + 0;
  • 136 895 445 610 ÷ 2 = 68 447 722 805 + 0;
  • 68 447 722 805 ÷ 2 = 34 223 861 402 + 1;
  • 34 223 861 402 ÷ 2 = 17 111 930 701 + 0;
  • 17 111 930 701 ÷ 2 = 8 555 965 350 + 1;
  • 8 555 965 350 ÷ 2 = 4 277 982 675 + 0;
  • 4 277 982 675 ÷ 2 = 2 138 991 337 + 1;
  • 2 138 991 337 ÷ 2 = 1 069 495 668 + 1;
  • 1 069 495 668 ÷ 2 = 534 747 834 + 0;
  • 534 747 834 ÷ 2 = 267 373 917 + 0;
  • 267 373 917 ÷ 2 = 133 686 958 + 1;
  • 133 686 958 ÷ 2 = 66 843 479 + 0;
  • 66 843 479 ÷ 2 = 33 421 739 + 1;
  • 33 421 739 ÷ 2 = 16 710 869 + 1;
  • 16 710 869 ÷ 2 = 8 355 434 + 1;
  • 8 355 434 ÷ 2 = 4 177 717 + 0;
  • 4 177 717 ÷ 2 = 2 088 858 + 1;
  • 2 088 858 ÷ 2 = 1 044 429 + 0;
  • 1 044 429 ÷ 2 = 522 214 + 1;
  • 522 214 ÷ 2 = 261 107 + 0;
  • 261 107 ÷ 2 = 130 553 + 1;
  • 130 553 ÷ 2 = 65 276 + 1;
  • 65 276 ÷ 2 = 32 638 + 0;
  • 32 638 ÷ 2 = 16 319 + 0;
  • 16 319 ÷ 2 = 8 159 + 1;
  • 8 159 ÷ 2 = 4 079 + 1;
  • 4 079 ÷ 2 = 2 039 + 1;
  • 2 039 ÷ 2 = 1 019 + 1;
  • 1 019 ÷ 2 = 509 + 1;
  • 509 ÷ 2 = 254 + 1;
  • 254 ÷ 2 = 127 + 0;
  • 127 ÷ 2 = 63 + 1;
  • 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 101 101 000 100 001 011 000 000 100 207(10) =


111 1111 0111 1110 0110 1010 1110 1001 1010 1000 0011 0010 0011 0101 1011 0010 1001 1011 1011 0111 1110 1111 1011 0111 0110 1111(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 101 101 000 100 001 011 000 000 100 207(10) =


111 1111 0111 1110 0110 1010 1110 1001 1010 1000 0011 0010 0011 0101 1011 0010 1001 1011 1011 0111 1110 1111 1011 0111 0110 1111(2) =


111 1111 0111 1110 0110 1010 1110 1001 1010 1000 0011 0010 0011 0101 1011 0010 1001 1011 1011 0111 1110 1111 1011 0111 0110 1111(2) × 20 =


1.1111 1101 1111 1001 1010 1011 1010 0110 1010 0000 1100 1000 1101 0110 1100 1010 0110 1110 1101 1111 1011 1110 1101 1101 1011 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 1101 1111 1001 1010 1011 1010 0110 1010 0000 1100 1000 1101 0110 1100 1010 0110 1110 1101 1111 1011 1110 1101 1101 1011 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 1110 1111 1100 1101 0101 110 1001 1010 1000 0011 0010 0011 0101 1011 0010 1001 1011 1011 0111 1110 1111 1011 0111 0110 1111 =


111 1110 1111 1100 1101 0101


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 1110 1111 1100 1101 0101


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

0 - 1110 0101 - 111 1110 1111 1100 1101 0101


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