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

Convert decimal 111 111 101 111 110 111 110 011 101 101 100 101 109(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
111 111 101 111 110 111 110 011 101 101 100 101 109(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;
  • 111 111 101 111 110 111 110 011 101 101 100 101 109 ÷ 2 = 55 555 550 555 555 055 555 005 550 550 550 050 554 + 1;
  • 55 555 550 555 555 055 555 005 550 550 550 050 554 ÷ 2 = 27 777 775 277 777 527 777 502 775 275 275 025 277 + 0;
  • 27 777 775 277 777 527 777 502 775 275 275 025 277 ÷ 2 = 13 888 887 638 888 763 888 751 387 637 637 512 638 + 1;
  • 13 888 887 638 888 763 888 751 387 637 637 512 638 ÷ 2 = 6 944 443 819 444 381 944 375 693 818 818 756 319 + 0;
  • 6 944 443 819 444 381 944 375 693 818 818 756 319 ÷ 2 = 3 472 221 909 722 190 972 187 846 909 409 378 159 + 1;
  • 3 472 221 909 722 190 972 187 846 909 409 378 159 ÷ 2 = 1 736 110 954 861 095 486 093 923 454 704 689 079 + 1;
  • 1 736 110 954 861 095 486 093 923 454 704 689 079 ÷ 2 = 868 055 477 430 547 743 046 961 727 352 344 539 + 1;
  • 868 055 477 430 547 743 046 961 727 352 344 539 ÷ 2 = 434 027 738 715 273 871 523 480 863 676 172 269 + 1;
  • 434 027 738 715 273 871 523 480 863 676 172 269 ÷ 2 = 217 013 869 357 636 935 761 740 431 838 086 134 + 1;
  • 217 013 869 357 636 935 761 740 431 838 086 134 ÷ 2 = 108 506 934 678 818 467 880 870 215 919 043 067 + 0;
  • 108 506 934 678 818 467 880 870 215 919 043 067 ÷ 2 = 54 253 467 339 409 233 940 435 107 959 521 533 + 1;
  • 54 253 467 339 409 233 940 435 107 959 521 533 ÷ 2 = 27 126 733 669 704 616 970 217 553 979 760 766 + 1;
  • 27 126 733 669 704 616 970 217 553 979 760 766 ÷ 2 = 13 563 366 834 852 308 485 108 776 989 880 383 + 0;
  • 13 563 366 834 852 308 485 108 776 989 880 383 ÷ 2 = 6 781 683 417 426 154 242 554 388 494 940 191 + 1;
  • 6 781 683 417 426 154 242 554 388 494 940 191 ÷ 2 = 3 390 841 708 713 077 121 277 194 247 470 095 + 1;
  • 3 390 841 708 713 077 121 277 194 247 470 095 ÷ 2 = 1 695 420 854 356 538 560 638 597 123 735 047 + 1;
  • 1 695 420 854 356 538 560 638 597 123 735 047 ÷ 2 = 847 710 427 178 269 280 319 298 561 867 523 + 1;
  • 847 710 427 178 269 280 319 298 561 867 523 ÷ 2 = 423 855 213 589 134 640 159 649 280 933 761 + 1;
  • 423 855 213 589 134 640 159 649 280 933 761 ÷ 2 = 211 927 606 794 567 320 079 824 640 466 880 + 1;
  • 211 927 606 794 567 320 079 824 640 466 880 ÷ 2 = 105 963 803 397 283 660 039 912 320 233 440 + 0;
  • 105 963 803 397 283 660 039 912 320 233 440 ÷ 2 = 52 981 901 698 641 830 019 956 160 116 720 + 0;
  • 52 981 901 698 641 830 019 956 160 116 720 ÷ 2 = 26 490 950 849 320 915 009 978 080 058 360 + 0;
  • 26 490 950 849 320 915 009 978 080 058 360 ÷ 2 = 13 245 475 424 660 457 504 989 040 029 180 + 0;
  • 13 245 475 424 660 457 504 989 040 029 180 ÷ 2 = 6 622 737 712 330 228 752 494 520 014 590 + 0;
  • 6 622 737 712 330 228 752 494 520 014 590 ÷ 2 = 3 311 368 856 165 114 376 247 260 007 295 + 0;
  • 3 311 368 856 165 114 376 247 260 007 295 ÷ 2 = 1 655 684 428 082 557 188 123 630 003 647 + 1;
  • 1 655 684 428 082 557 188 123 630 003 647 ÷ 2 = 827 842 214 041 278 594 061 815 001 823 + 1;
  • 827 842 214 041 278 594 061 815 001 823 ÷ 2 = 413 921 107 020 639 297 030 907 500 911 + 1;
  • 413 921 107 020 639 297 030 907 500 911 ÷ 2 = 206 960 553 510 319 648 515 453 750 455 + 1;
  • 206 960 553 510 319 648 515 453 750 455 ÷ 2 = 103 480 276 755 159 824 257 726 875 227 + 1;
  • 103 480 276 755 159 824 257 726 875 227 ÷ 2 = 51 740 138 377 579 912 128 863 437 613 + 1;
  • 51 740 138 377 579 912 128 863 437 613 ÷ 2 = 25 870 069 188 789 956 064 431 718 806 + 1;
  • 25 870 069 188 789 956 064 431 718 806 ÷ 2 = 12 935 034 594 394 978 032 215 859 403 + 0;
  • 12 935 034 594 394 978 032 215 859 403 ÷ 2 = 6 467 517 297 197 489 016 107 929 701 + 1;
  • 6 467 517 297 197 489 016 107 929 701 ÷ 2 = 3 233 758 648 598 744 508 053 964 850 + 1;
  • 3 233 758 648 598 744 508 053 964 850 ÷ 2 = 1 616 879 324 299 372 254 026 982 425 + 0;
  • 1 616 879 324 299 372 254 026 982 425 ÷ 2 = 808 439 662 149 686 127 013 491 212 + 1;
  • 808 439 662 149 686 127 013 491 212 ÷ 2 = 404 219 831 074 843 063 506 745 606 + 0;
  • 404 219 831 074 843 063 506 745 606 ÷ 2 = 202 109 915 537 421 531 753 372 803 + 0;
  • 202 109 915 537 421 531 753 372 803 ÷ 2 = 101 054 957 768 710 765 876 686 401 + 1;
  • 101 054 957 768 710 765 876 686 401 ÷ 2 = 50 527 478 884 355 382 938 343 200 + 1;
  • 50 527 478 884 355 382 938 343 200 ÷ 2 = 25 263 739 442 177 691 469 171 600 + 0;
  • 25 263 739 442 177 691 469 171 600 ÷ 2 = 12 631 869 721 088 845 734 585 800 + 0;
  • 12 631 869 721 088 845 734 585 800 ÷ 2 = 6 315 934 860 544 422 867 292 900 + 0;
  • 6 315 934 860 544 422 867 292 900 ÷ 2 = 3 157 967 430 272 211 433 646 450 + 0;
  • 3 157 967 430 272 211 433 646 450 ÷ 2 = 1 578 983 715 136 105 716 823 225 + 0;
  • 1 578 983 715 136 105 716 823 225 ÷ 2 = 789 491 857 568 052 858 411 612 + 1;
  • 789 491 857 568 052 858 411 612 ÷ 2 = 394 745 928 784 026 429 205 806 + 0;
  • 394 745 928 784 026 429 205 806 ÷ 2 = 197 372 964 392 013 214 602 903 + 0;
  • 197 372 964 392 013 214 602 903 ÷ 2 = 98 686 482 196 006 607 301 451 + 1;
  • 98 686 482 196 006 607 301 451 ÷ 2 = 49 343 241 098 003 303 650 725 + 1;
  • 49 343 241 098 003 303 650 725 ÷ 2 = 24 671 620 549 001 651 825 362 + 1;
  • 24 671 620 549 001 651 825 362 ÷ 2 = 12 335 810 274 500 825 912 681 + 0;
  • 12 335 810 274 500 825 912 681 ÷ 2 = 6 167 905 137 250 412 956 340 + 1;
  • 6 167 905 137 250 412 956 340 ÷ 2 = 3 083 952 568 625 206 478 170 + 0;
  • 3 083 952 568 625 206 478 170 ÷ 2 = 1 541 976 284 312 603 239 085 + 0;
  • 1 541 976 284 312 603 239 085 ÷ 2 = 770 988 142 156 301 619 542 + 1;
  • 770 988 142 156 301 619 542 ÷ 2 = 385 494 071 078 150 809 771 + 0;
  • 385 494 071 078 150 809 771 ÷ 2 = 192 747 035 539 075 404 885 + 1;
  • 192 747 035 539 075 404 885 ÷ 2 = 96 373 517 769 537 702 442 + 1;
  • 96 373 517 769 537 702 442 ÷ 2 = 48 186 758 884 768 851 221 + 0;
  • 48 186 758 884 768 851 221 ÷ 2 = 24 093 379 442 384 425 610 + 1;
  • 24 093 379 442 384 425 610 ÷ 2 = 12 046 689 721 192 212 805 + 0;
  • 12 046 689 721 192 212 805 ÷ 2 = 6 023 344 860 596 106 402 + 1;
  • 6 023 344 860 596 106 402 ÷ 2 = 3 011 672 430 298 053 201 + 0;
  • 3 011 672 430 298 053 201 ÷ 2 = 1 505 836 215 149 026 600 + 1;
  • 1 505 836 215 149 026 600 ÷ 2 = 752 918 107 574 513 300 + 0;
  • 752 918 107 574 513 300 ÷ 2 = 376 459 053 787 256 650 + 0;
  • 376 459 053 787 256 650 ÷ 2 = 188 229 526 893 628 325 + 0;
  • 188 229 526 893 628 325 ÷ 2 = 94 114 763 446 814 162 + 1;
  • 94 114 763 446 814 162 ÷ 2 = 47 057 381 723 407 081 + 0;
  • 47 057 381 723 407 081 ÷ 2 = 23 528 690 861 703 540 + 1;
  • 23 528 690 861 703 540 ÷ 2 = 11 764 345 430 851 770 + 0;
  • 11 764 345 430 851 770 ÷ 2 = 5 882 172 715 425 885 + 0;
  • 5 882 172 715 425 885 ÷ 2 = 2 941 086 357 712 942 + 1;
  • 2 941 086 357 712 942 ÷ 2 = 1 470 543 178 856 471 + 0;
  • 1 470 543 178 856 471 ÷ 2 = 735 271 589 428 235 + 1;
  • 735 271 589 428 235 ÷ 2 = 367 635 794 714 117 + 1;
  • 367 635 794 714 117 ÷ 2 = 183 817 897 357 058 + 1;
  • 183 817 897 357 058 ÷ 2 = 91 908 948 678 529 + 0;
  • 91 908 948 678 529 ÷ 2 = 45 954 474 339 264 + 1;
  • 45 954 474 339 264 ÷ 2 = 22 977 237 169 632 + 0;
  • 22 977 237 169 632 ÷ 2 = 11 488 618 584 816 + 0;
  • 11 488 618 584 816 ÷ 2 = 5 744 309 292 408 + 0;
  • 5 744 309 292 408 ÷ 2 = 2 872 154 646 204 + 0;
  • 2 872 154 646 204 ÷ 2 = 1 436 077 323 102 + 0;
  • 1 436 077 323 102 ÷ 2 = 718 038 661 551 + 0;
  • 718 038 661 551 ÷ 2 = 359 019 330 775 + 1;
  • 359 019 330 775 ÷ 2 = 179 509 665 387 + 1;
  • 179 509 665 387 ÷ 2 = 89 754 832 693 + 1;
  • 89 754 832 693 ÷ 2 = 44 877 416 346 + 1;
  • 44 877 416 346 ÷ 2 = 22 438 708 173 + 0;
  • 22 438 708 173 ÷ 2 = 11 219 354 086 + 1;
  • 11 219 354 086 ÷ 2 = 5 609 677 043 + 0;
  • 5 609 677 043 ÷ 2 = 2 804 838 521 + 1;
  • 2 804 838 521 ÷ 2 = 1 402 419 260 + 1;
  • 1 402 419 260 ÷ 2 = 701 209 630 + 0;
  • 701 209 630 ÷ 2 = 350 604 815 + 0;
  • 350 604 815 ÷ 2 = 175 302 407 + 1;
  • 175 302 407 ÷ 2 = 87 651 203 + 1;
  • 87 651 203 ÷ 2 = 43 825 601 + 1;
  • 43 825 601 ÷ 2 = 21 912 800 + 1;
  • 21 912 800 ÷ 2 = 10 956 400 + 0;
  • 10 956 400 ÷ 2 = 5 478 200 + 0;
  • 5 478 200 ÷ 2 = 2 739 100 + 0;
  • 2 739 100 ÷ 2 = 1 369 550 + 0;
  • 1 369 550 ÷ 2 = 684 775 + 0;
  • 684 775 ÷ 2 = 342 387 + 1;
  • 342 387 ÷ 2 = 171 193 + 1;
  • 171 193 ÷ 2 = 85 596 + 1;
  • 85 596 ÷ 2 = 42 798 + 0;
  • 42 798 ÷ 2 = 21 399 + 0;
  • 21 399 ÷ 2 = 10 699 + 1;
  • 10 699 ÷ 2 = 5 349 + 1;
  • 5 349 ÷ 2 = 2 674 + 1;
  • 2 674 ÷ 2 = 1 337 + 0;
  • 1 337 ÷ 2 = 668 + 1;
  • 668 ÷ 2 = 334 + 0;
  • 334 ÷ 2 = 167 + 0;
  • 167 ÷ 2 = 83 + 1;
  • 83 ÷ 2 = 41 + 1;
  • 41 ÷ 2 = 20 + 1;
  • 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.

111 111 101 111 110 111 110 011 101 101 100 101 109(10) =


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


3. Normalize the binary representation of the number.

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


111 111 101 111 110 111 110 011 101 101 100 101 109(10) =


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


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


1.0100 1110 0101 1100 1110 0000 1111 0011 0101 1110 0000 0101 1101 0010 1000 1010 1011 0100 1011 1001 0000 0110 0101 1011 1111 1000 0001 1111 1011 0111 1101 01(2) × 2126


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


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


5. Adjust the exponent.

Use the 8 bit excess/bias notation:


Exponent (adjusted) =


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


126 + 2(8-1) - 1 =


(126 + 127)(10) =


253(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;
  • 253 ÷ 2 = 126 + 1;
  • 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;

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


253(10) =


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


010 0111 0010 1110 0111 0000


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


Mantissa (23 bits) =
010 0111 0010 1110 0111 0000


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

0 - 1111 1101 - 010 0111 0010 1110 0111 0000


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