59 999 999 999 999 999 999 999 999 999 999 999 791 Converted to 32 Bit Single Precision IEEE 754 Binary Floating Point Representation Standard

Convert decimal 59 999 999 999 999 999 999 999 999 999 999 999 791(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
59 999 999 999 999 999 999 999 999 999 999 999 791(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;
  • 59 999 999 999 999 999 999 999 999 999 999 999 791 ÷ 2 = 29 999 999 999 999 999 999 999 999 999 999 999 895 + 1;
  • 29 999 999 999 999 999 999 999 999 999 999 999 895 ÷ 2 = 14 999 999 999 999 999 999 999 999 999 999 999 947 + 1;
  • 14 999 999 999 999 999 999 999 999 999 999 999 947 ÷ 2 = 7 499 999 999 999 999 999 999 999 999 999 999 973 + 1;
  • 7 499 999 999 999 999 999 999 999 999 999 999 973 ÷ 2 = 3 749 999 999 999 999 999 999 999 999 999 999 986 + 1;
  • 3 749 999 999 999 999 999 999 999 999 999 999 986 ÷ 2 = 1 874 999 999 999 999 999 999 999 999 999 999 993 + 0;
  • 1 874 999 999 999 999 999 999 999 999 999 999 993 ÷ 2 = 937 499 999 999 999 999 999 999 999 999 999 996 + 1;
  • 937 499 999 999 999 999 999 999 999 999 999 996 ÷ 2 = 468 749 999 999 999 999 999 999 999 999 999 998 + 0;
  • 468 749 999 999 999 999 999 999 999 999 999 998 ÷ 2 = 234 374 999 999 999 999 999 999 999 999 999 999 + 0;
  • 234 374 999 999 999 999 999 999 999 999 999 999 ÷ 2 = 117 187 499 999 999 999 999 999 999 999 999 999 + 1;
  • 117 187 499 999 999 999 999 999 999 999 999 999 ÷ 2 = 58 593 749 999 999 999 999 999 999 999 999 999 + 1;
  • 58 593 749 999 999 999 999 999 999 999 999 999 ÷ 2 = 29 296 874 999 999 999 999 999 999 999 999 999 + 1;
  • 29 296 874 999 999 999 999 999 999 999 999 999 ÷ 2 = 14 648 437 499 999 999 999 999 999 999 999 999 + 1;
  • 14 648 437 499 999 999 999 999 999 999 999 999 ÷ 2 = 7 324 218 749 999 999 999 999 999 999 999 999 + 1;
  • 7 324 218 749 999 999 999 999 999 999 999 999 ÷ 2 = 3 662 109 374 999 999 999 999 999 999 999 999 + 1;
  • 3 662 109 374 999 999 999 999 999 999 999 999 ÷ 2 = 1 831 054 687 499 999 999 999 999 999 999 999 + 1;
  • 1 831 054 687 499 999 999 999 999 999 999 999 ÷ 2 = 915 527 343 749 999 999 999 999 999 999 999 + 1;
  • 915 527 343 749 999 999 999 999 999 999 999 ÷ 2 = 457 763 671 874 999 999 999 999 999 999 999 + 1;
  • 457 763 671 874 999 999 999 999 999 999 999 ÷ 2 = 228 881 835 937 499 999 999 999 999 999 999 + 1;
  • 228 881 835 937 499 999 999 999 999 999 999 ÷ 2 = 114 440 917 968 749 999 999 999 999 999 999 + 1;
  • 114 440 917 968 749 999 999 999 999 999 999 ÷ 2 = 57 220 458 984 374 999 999 999 999 999 999 + 1;
  • 57 220 458 984 374 999 999 999 999 999 999 ÷ 2 = 28 610 229 492 187 499 999 999 999 999 999 + 1;
  • 28 610 229 492 187 499 999 999 999 999 999 ÷ 2 = 14 305 114 746 093 749 999 999 999 999 999 + 1;
  • 14 305 114 746 093 749 999 999 999 999 999 ÷ 2 = 7 152 557 373 046 874 999 999 999 999 999 + 1;
  • 7 152 557 373 046 874 999 999 999 999 999 ÷ 2 = 3 576 278 686 523 437 499 999 999 999 999 + 1;
  • 3 576 278 686 523 437 499 999 999 999 999 ÷ 2 = 1 788 139 343 261 718 749 999 999 999 999 + 1;
  • 1 788 139 343 261 718 749 999 999 999 999 ÷ 2 = 894 069 671 630 859 374 999 999 999 999 + 1;
  • 894 069 671 630 859 374 999 999 999 999 ÷ 2 = 447 034 835 815 429 687 499 999 999 999 + 1;
  • 447 034 835 815 429 687 499 999 999 999 ÷ 2 = 223 517 417 907 714 843 749 999 999 999 + 1;
  • 223 517 417 907 714 843 749 999 999 999 ÷ 2 = 111 758 708 953 857 421 874 999 999 999 + 1;
  • 111 758 708 953 857 421 874 999 999 999 ÷ 2 = 55 879 354 476 928 710 937 499 999 999 + 1;
  • 55 879 354 476 928 710 937 499 999 999 ÷ 2 = 27 939 677 238 464 355 468 749 999 999 + 1;
  • 27 939 677 238 464 355 468 749 999 999 ÷ 2 = 13 969 838 619 232 177 734 374 999 999 + 1;
  • 13 969 838 619 232 177 734 374 999 999 ÷ 2 = 6 984 919 309 616 088 867 187 499 999 + 1;
  • 6 984 919 309 616 088 867 187 499 999 ÷ 2 = 3 492 459 654 808 044 433 593 749 999 + 1;
  • 3 492 459 654 808 044 433 593 749 999 ÷ 2 = 1 746 229 827 404 022 216 796 874 999 + 1;
  • 1 746 229 827 404 022 216 796 874 999 ÷ 2 = 873 114 913 702 011 108 398 437 499 + 1;
  • 873 114 913 702 011 108 398 437 499 ÷ 2 = 436 557 456 851 005 554 199 218 749 + 1;
  • 436 557 456 851 005 554 199 218 749 ÷ 2 = 218 278 728 425 502 777 099 609 374 + 1;
  • 218 278 728 425 502 777 099 609 374 ÷ 2 = 109 139 364 212 751 388 549 804 687 + 0;
  • 109 139 364 212 751 388 549 804 687 ÷ 2 = 54 569 682 106 375 694 274 902 343 + 1;
  • 54 569 682 106 375 694 274 902 343 ÷ 2 = 27 284 841 053 187 847 137 451 171 + 1;
  • 27 284 841 053 187 847 137 451 171 ÷ 2 = 13 642 420 526 593 923 568 725 585 + 1;
  • 13 642 420 526 593 923 568 725 585 ÷ 2 = 6 821 210 263 296 961 784 362 792 + 1;
  • 6 821 210 263 296 961 784 362 792 ÷ 2 = 3 410 605 131 648 480 892 181 396 + 0;
  • 3 410 605 131 648 480 892 181 396 ÷ 2 = 1 705 302 565 824 240 446 090 698 + 0;
  • 1 705 302 565 824 240 446 090 698 ÷ 2 = 852 651 282 912 120 223 045 349 + 0;
  • 852 651 282 912 120 223 045 349 ÷ 2 = 426 325 641 456 060 111 522 674 + 1;
  • 426 325 641 456 060 111 522 674 ÷ 2 = 213 162 820 728 030 055 761 337 + 0;
  • 213 162 820 728 030 055 761 337 ÷ 2 = 106 581 410 364 015 027 880 668 + 1;
  • 106 581 410 364 015 027 880 668 ÷ 2 = 53 290 705 182 007 513 940 334 + 0;
  • 53 290 705 182 007 513 940 334 ÷ 2 = 26 645 352 591 003 756 970 167 + 0;
  • 26 645 352 591 003 756 970 167 ÷ 2 = 13 322 676 295 501 878 485 083 + 1;
  • 13 322 676 295 501 878 485 083 ÷ 2 = 6 661 338 147 750 939 242 541 + 1;
  • 6 661 338 147 750 939 242 541 ÷ 2 = 3 330 669 073 875 469 621 270 + 1;
  • 3 330 669 073 875 469 621 270 ÷ 2 = 1 665 334 536 937 734 810 635 + 0;
  • 1 665 334 536 937 734 810 635 ÷ 2 = 832 667 268 468 867 405 317 + 1;
  • 832 667 268 468 867 405 317 ÷ 2 = 416 333 634 234 433 702 658 + 1;
  • 416 333 634 234 433 702 658 ÷ 2 = 208 166 817 117 216 851 329 + 0;
  • 208 166 817 117 216 851 329 ÷ 2 = 104 083 408 558 608 425 664 + 1;
  • 104 083 408 558 608 425 664 ÷ 2 = 52 041 704 279 304 212 832 + 0;
  • 52 041 704 279 304 212 832 ÷ 2 = 26 020 852 139 652 106 416 + 0;
  • 26 020 852 139 652 106 416 ÷ 2 = 13 010 426 069 826 053 208 + 0;
  • 13 010 426 069 826 053 208 ÷ 2 = 6 505 213 034 913 026 604 + 0;
  • 6 505 213 034 913 026 604 ÷ 2 = 3 252 606 517 456 513 302 + 0;
  • 3 252 606 517 456 513 302 ÷ 2 = 1 626 303 258 728 256 651 + 0;
  • 1 626 303 258 728 256 651 ÷ 2 = 813 151 629 364 128 325 + 1;
  • 813 151 629 364 128 325 ÷ 2 = 406 575 814 682 064 162 + 1;
  • 406 575 814 682 064 162 ÷ 2 = 203 287 907 341 032 081 + 0;
  • 203 287 907 341 032 081 ÷ 2 = 101 643 953 670 516 040 + 1;
  • 101 643 953 670 516 040 ÷ 2 = 50 821 976 835 258 020 + 0;
  • 50 821 976 835 258 020 ÷ 2 = 25 410 988 417 629 010 + 0;
  • 25 410 988 417 629 010 ÷ 2 = 12 705 494 208 814 505 + 0;
  • 12 705 494 208 814 505 ÷ 2 = 6 352 747 104 407 252 + 1;
  • 6 352 747 104 407 252 ÷ 2 = 3 176 373 552 203 626 + 0;
  • 3 176 373 552 203 626 ÷ 2 = 1 588 186 776 101 813 + 0;
  • 1 588 186 776 101 813 ÷ 2 = 794 093 388 050 906 + 1;
  • 794 093 388 050 906 ÷ 2 = 397 046 694 025 453 + 0;
  • 397 046 694 025 453 ÷ 2 = 198 523 347 012 726 + 1;
  • 198 523 347 012 726 ÷ 2 = 99 261 673 506 363 + 0;
  • 99 261 673 506 363 ÷ 2 = 49 630 836 753 181 + 1;
  • 49 630 836 753 181 ÷ 2 = 24 815 418 376 590 + 1;
  • 24 815 418 376 590 ÷ 2 = 12 407 709 188 295 + 0;
  • 12 407 709 188 295 ÷ 2 = 6 203 854 594 147 + 1;
  • 6 203 854 594 147 ÷ 2 = 3 101 927 297 073 + 1;
  • 3 101 927 297 073 ÷ 2 = 1 550 963 648 536 + 1;
  • 1 550 963 648 536 ÷ 2 = 775 481 824 268 + 0;
  • 775 481 824 268 ÷ 2 = 387 740 912 134 + 0;
  • 387 740 912 134 ÷ 2 = 193 870 456 067 + 0;
  • 193 870 456 067 ÷ 2 = 96 935 228 033 + 1;
  • 96 935 228 033 ÷ 2 = 48 467 614 016 + 1;
  • 48 467 614 016 ÷ 2 = 24 233 807 008 + 0;
  • 24 233 807 008 ÷ 2 = 12 116 903 504 + 0;
  • 12 116 903 504 ÷ 2 = 6 058 451 752 + 0;
  • 6 058 451 752 ÷ 2 = 3 029 225 876 + 0;
  • 3 029 225 876 ÷ 2 = 1 514 612 938 + 0;
  • 1 514 612 938 ÷ 2 = 757 306 469 + 0;
  • 757 306 469 ÷ 2 = 378 653 234 + 1;
  • 378 653 234 ÷ 2 = 189 326 617 + 0;
  • 189 326 617 ÷ 2 = 94 663 308 + 1;
  • 94 663 308 ÷ 2 = 47 331 654 + 0;
  • 47 331 654 ÷ 2 = 23 665 827 + 0;
  • 23 665 827 ÷ 2 = 11 832 913 + 1;
  • 11 832 913 ÷ 2 = 5 916 456 + 1;
  • 5 916 456 ÷ 2 = 2 958 228 + 0;
  • 2 958 228 ÷ 2 = 1 479 114 + 0;
  • 1 479 114 ÷ 2 = 739 557 + 0;
  • 739 557 ÷ 2 = 369 778 + 1;
  • 369 778 ÷ 2 = 184 889 + 0;
  • 184 889 ÷ 2 = 92 444 + 1;
  • 92 444 ÷ 2 = 46 222 + 0;
  • 46 222 ÷ 2 = 23 111 + 0;
  • 23 111 ÷ 2 = 11 555 + 1;
  • 11 555 ÷ 2 = 5 777 + 1;
  • 5 777 ÷ 2 = 2 888 + 1;
  • 2 888 ÷ 2 = 1 444 + 0;
  • 1 444 ÷ 2 = 722 + 0;
  • 722 ÷ 2 = 361 + 0;
  • 361 ÷ 2 = 180 + 1;
  • 180 ÷ 2 = 90 + 0;
  • 90 ÷ 2 = 45 + 0;
  • 45 ÷ 2 = 22 + 1;
  • 22 ÷ 2 = 11 + 0;
  • 11 ÷ 2 = 5 + 1;
  • 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.

59 999 999 999 999 999 999 999 999 999 999 999 791(10) =


10 1101 0010 0011 1001 0100 0110 0101 0000 0011 0001 1101 1010 1001 0001 0110 0000 0101 1011 1001 0100 0111 1011 1111 1111 1111 1111 1111 1111 1111 0010 1111(2)


3. Normalize the binary representation of the number.

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


59 999 999 999 999 999 999 999 999 999 999 999 791(10) =


10 1101 0010 0011 1001 0100 0110 0101 0000 0011 0001 1101 1010 1001 0001 0110 0000 0101 1011 1001 0100 0111 1011 1111 1111 1111 1111 1111 1111 1111 0010 1111(2) =


10 1101 0010 0011 1001 0100 0110 0101 0000 0011 0001 1101 1010 1001 0001 0110 0000 0101 1011 1001 0100 0111 1011 1111 1111 1111 1111 1111 1111 1111 0010 1111(2) × 20 =


1.0110 1001 0001 1100 1010 0011 0010 1000 0001 1000 1110 1101 0100 1000 1011 0000 0010 1101 1100 1010 0011 1101 1111 1111 1111 1111 1111 1111 1111 1001 0111 1(2) × 2125


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


Mantissa (not normalized):
1.0110 1001 0001 1100 1010 0011 0010 1000 0001 1000 1110 1101 0100 1000 1011 0000 0010 1101 1100 1010 0011 1101 1111 1111 1111 1111 1111 1111 1111 1001 0111 1


5. Adjust the exponent.

Use the 8 bit excess/bias notation:


Exponent (adjusted) =


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


125 + 2(8-1) - 1 =


(125 + 127)(10) =


252(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;
  • 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;

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


252(10) =


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


011 0100 1000 1110 0101 0001


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 1100


Mantissa (23 bits) =
011 0100 1000 1110 0101 0001


Decimal number 59 999 999 999 999 999 999 999 999 999 999 999 791 converted to 32 bit single precision IEEE 754 binary floating point representation:

0 - 1111 1100 - 011 0100 1000 1110 0101 0001


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