46 574 056 167 123 186 045 404 654 068 674.5 Converted to 32 Bit Single Precision IEEE 754 Binary Floating Point Representation Standard

Convert decimal 46 574 056 167 123 186 045 404 654 068 674.5(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
46 574 056 167 123 186 045 404 654 068 674.5(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. First, convert to binary (in base 2) the integer part: 46 574 056 167 123 186 045 404 654 068 674.
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;
  • 46 574 056 167 123 186 045 404 654 068 674 ÷ 2 = 23 287 028 083 561 593 022 702 327 034 337 + 0;
  • 23 287 028 083 561 593 022 702 327 034 337 ÷ 2 = 11 643 514 041 780 796 511 351 163 517 168 + 1;
  • 11 643 514 041 780 796 511 351 163 517 168 ÷ 2 = 5 821 757 020 890 398 255 675 581 758 584 + 0;
  • 5 821 757 020 890 398 255 675 581 758 584 ÷ 2 = 2 910 878 510 445 199 127 837 790 879 292 + 0;
  • 2 910 878 510 445 199 127 837 790 879 292 ÷ 2 = 1 455 439 255 222 599 563 918 895 439 646 + 0;
  • 1 455 439 255 222 599 563 918 895 439 646 ÷ 2 = 727 719 627 611 299 781 959 447 719 823 + 0;
  • 727 719 627 611 299 781 959 447 719 823 ÷ 2 = 363 859 813 805 649 890 979 723 859 911 + 1;
  • 363 859 813 805 649 890 979 723 859 911 ÷ 2 = 181 929 906 902 824 945 489 861 929 955 + 1;
  • 181 929 906 902 824 945 489 861 929 955 ÷ 2 = 90 964 953 451 412 472 744 930 964 977 + 1;
  • 90 964 953 451 412 472 744 930 964 977 ÷ 2 = 45 482 476 725 706 236 372 465 482 488 + 1;
  • 45 482 476 725 706 236 372 465 482 488 ÷ 2 = 22 741 238 362 853 118 186 232 741 244 + 0;
  • 22 741 238 362 853 118 186 232 741 244 ÷ 2 = 11 370 619 181 426 559 093 116 370 622 + 0;
  • 11 370 619 181 426 559 093 116 370 622 ÷ 2 = 5 685 309 590 713 279 546 558 185 311 + 0;
  • 5 685 309 590 713 279 546 558 185 311 ÷ 2 = 2 842 654 795 356 639 773 279 092 655 + 1;
  • 2 842 654 795 356 639 773 279 092 655 ÷ 2 = 1 421 327 397 678 319 886 639 546 327 + 1;
  • 1 421 327 397 678 319 886 639 546 327 ÷ 2 = 710 663 698 839 159 943 319 773 163 + 1;
  • 710 663 698 839 159 943 319 773 163 ÷ 2 = 355 331 849 419 579 971 659 886 581 + 1;
  • 355 331 849 419 579 971 659 886 581 ÷ 2 = 177 665 924 709 789 985 829 943 290 + 1;
  • 177 665 924 709 789 985 829 943 290 ÷ 2 = 88 832 962 354 894 992 914 971 645 + 0;
  • 88 832 962 354 894 992 914 971 645 ÷ 2 = 44 416 481 177 447 496 457 485 822 + 1;
  • 44 416 481 177 447 496 457 485 822 ÷ 2 = 22 208 240 588 723 748 228 742 911 + 0;
  • 22 208 240 588 723 748 228 742 911 ÷ 2 = 11 104 120 294 361 874 114 371 455 + 1;
  • 11 104 120 294 361 874 114 371 455 ÷ 2 = 5 552 060 147 180 937 057 185 727 + 1;
  • 5 552 060 147 180 937 057 185 727 ÷ 2 = 2 776 030 073 590 468 528 592 863 + 1;
  • 2 776 030 073 590 468 528 592 863 ÷ 2 = 1 388 015 036 795 234 264 296 431 + 1;
  • 1 388 015 036 795 234 264 296 431 ÷ 2 = 694 007 518 397 617 132 148 215 + 1;
  • 694 007 518 397 617 132 148 215 ÷ 2 = 347 003 759 198 808 566 074 107 + 1;
  • 347 003 759 198 808 566 074 107 ÷ 2 = 173 501 879 599 404 283 037 053 + 1;
  • 173 501 879 599 404 283 037 053 ÷ 2 = 86 750 939 799 702 141 518 526 + 1;
  • 86 750 939 799 702 141 518 526 ÷ 2 = 43 375 469 899 851 070 759 263 + 0;
  • 43 375 469 899 851 070 759 263 ÷ 2 = 21 687 734 949 925 535 379 631 + 1;
  • 21 687 734 949 925 535 379 631 ÷ 2 = 10 843 867 474 962 767 689 815 + 1;
  • 10 843 867 474 962 767 689 815 ÷ 2 = 5 421 933 737 481 383 844 907 + 1;
  • 5 421 933 737 481 383 844 907 ÷ 2 = 2 710 966 868 740 691 922 453 + 1;
  • 2 710 966 868 740 691 922 453 ÷ 2 = 1 355 483 434 370 345 961 226 + 1;
  • 1 355 483 434 370 345 961 226 ÷ 2 = 677 741 717 185 172 980 613 + 0;
  • 677 741 717 185 172 980 613 ÷ 2 = 338 870 858 592 586 490 306 + 1;
  • 338 870 858 592 586 490 306 ÷ 2 = 169 435 429 296 293 245 153 + 0;
  • 169 435 429 296 293 245 153 ÷ 2 = 84 717 714 648 146 622 576 + 1;
  • 84 717 714 648 146 622 576 ÷ 2 = 42 358 857 324 073 311 288 + 0;
  • 42 358 857 324 073 311 288 ÷ 2 = 21 179 428 662 036 655 644 + 0;
  • 21 179 428 662 036 655 644 ÷ 2 = 10 589 714 331 018 327 822 + 0;
  • 10 589 714 331 018 327 822 ÷ 2 = 5 294 857 165 509 163 911 + 0;
  • 5 294 857 165 509 163 911 ÷ 2 = 2 647 428 582 754 581 955 + 1;
  • 2 647 428 582 754 581 955 ÷ 2 = 1 323 714 291 377 290 977 + 1;
  • 1 323 714 291 377 290 977 ÷ 2 = 661 857 145 688 645 488 + 1;
  • 661 857 145 688 645 488 ÷ 2 = 330 928 572 844 322 744 + 0;
  • 330 928 572 844 322 744 ÷ 2 = 165 464 286 422 161 372 + 0;
  • 165 464 286 422 161 372 ÷ 2 = 82 732 143 211 080 686 + 0;
  • 82 732 143 211 080 686 ÷ 2 = 41 366 071 605 540 343 + 0;
  • 41 366 071 605 540 343 ÷ 2 = 20 683 035 802 770 171 + 1;
  • 20 683 035 802 770 171 ÷ 2 = 10 341 517 901 385 085 + 1;
  • 10 341 517 901 385 085 ÷ 2 = 5 170 758 950 692 542 + 1;
  • 5 170 758 950 692 542 ÷ 2 = 2 585 379 475 346 271 + 0;
  • 2 585 379 475 346 271 ÷ 2 = 1 292 689 737 673 135 + 1;
  • 1 292 689 737 673 135 ÷ 2 = 646 344 868 836 567 + 1;
  • 646 344 868 836 567 ÷ 2 = 323 172 434 418 283 + 1;
  • 323 172 434 418 283 ÷ 2 = 161 586 217 209 141 + 1;
  • 161 586 217 209 141 ÷ 2 = 80 793 108 604 570 + 1;
  • 80 793 108 604 570 ÷ 2 = 40 396 554 302 285 + 0;
  • 40 396 554 302 285 ÷ 2 = 20 198 277 151 142 + 1;
  • 20 198 277 151 142 ÷ 2 = 10 099 138 575 571 + 0;
  • 10 099 138 575 571 ÷ 2 = 5 049 569 287 785 + 1;
  • 5 049 569 287 785 ÷ 2 = 2 524 784 643 892 + 1;
  • 2 524 784 643 892 ÷ 2 = 1 262 392 321 946 + 0;
  • 1 262 392 321 946 ÷ 2 = 631 196 160 973 + 0;
  • 631 196 160 973 ÷ 2 = 315 598 080 486 + 1;
  • 315 598 080 486 ÷ 2 = 157 799 040 243 + 0;
  • 157 799 040 243 ÷ 2 = 78 899 520 121 + 1;
  • 78 899 520 121 ÷ 2 = 39 449 760 060 + 1;
  • 39 449 760 060 ÷ 2 = 19 724 880 030 + 0;
  • 19 724 880 030 ÷ 2 = 9 862 440 015 + 0;
  • 9 862 440 015 ÷ 2 = 4 931 220 007 + 1;
  • 4 931 220 007 ÷ 2 = 2 465 610 003 + 1;
  • 2 465 610 003 ÷ 2 = 1 232 805 001 + 1;
  • 1 232 805 001 ÷ 2 = 616 402 500 + 1;
  • 616 402 500 ÷ 2 = 308 201 250 + 0;
  • 308 201 250 ÷ 2 = 154 100 625 + 0;
  • 154 100 625 ÷ 2 = 77 050 312 + 1;
  • 77 050 312 ÷ 2 = 38 525 156 + 0;
  • 38 525 156 ÷ 2 = 19 262 578 + 0;
  • 19 262 578 ÷ 2 = 9 631 289 + 0;
  • 9 631 289 ÷ 2 = 4 815 644 + 1;
  • 4 815 644 ÷ 2 = 2 407 822 + 0;
  • 2 407 822 ÷ 2 = 1 203 911 + 0;
  • 1 203 911 ÷ 2 = 601 955 + 1;
  • 601 955 ÷ 2 = 300 977 + 1;
  • 300 977 ÷ 2 = 150 488 + 1;
  • 150 488 ÷ 2 = 75 244 + 0;
  • 75 244 ÷ 2 = 37 622 + 0;
  • 37 622 ÷ 2 = 18 811 + 0;
  • 18 811 ÷ 2 = 9 405 + 1;
  • 9 405 ÷ 2 = 4 702 + 1;
  • 4 702 ÷ 2 = 2 351 + 0;
  • 2 351 ÷ 2 = 1 175 + 1;
  • 1 175 ÷ 2 = 587 + 1;
  • 587 ÷ 2 = 293 + 1;
  • 293 ÷ 2 = 146 + 1;
  • 146 ÷ 2 = 73 + 0;
  • 73 ÷ 2 = 36 + 1;
  • 36 ÷ 2 = 18 + 0;
  • 18 ÷ 2 = 9 + 0;
  • 9 ÷ 2 = 4 + 1;
  • 4 ÷ 2 = 2 + 0;
  • 2 ÷ 2 = 1 + 0;
  • 1 ÷ 2 = 0 + 1;

2. Construct the base 2 representation of the integer part of the number.

Take all the remainders starting from the bottom of the list constructed above.

46 574 056 167 123 186 045 404 654 068 674(10) =


10 0100 1011 1101 1000 1110 0100 0100 1111 0011 0100 1101 0111 1101 1100 0011 1000 0101 0111 1101 1111 1110 1011 1110 0011 1100 0010(2)


3. Convert to binary (base 2) the fractional part: 0.5.

Multiply it repeatedly by 2.


Keep track of each integer part of the results.


Stop when we get a fractional part that is equal to zero.


  • #) multiplying = integer + fractional part;
  • 1) 0.5 × 2 = 1 + 0;

4. Construct the base 2 representation of the fractional part of the number.

Take all the integer parts of the multiplying operations, starting from the top of the constructed list above:


0.5(10) =


0.1(2)

5. Positive number before normalization:

46 574 056 167 123 186 045 404 654 068 674.5(10) =


10 0100 1011 1101 1000 1110 0100 0100 1111 0011 0100 1101 0111 1101 1100 0011 1000 0101 0111 1101 1111 1110 1011 1110 0011 1100 0010.1(2)

6. Normalize the binary representation of the number.

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


46 574 056 167 123 186 045 404 654 068 674.5(10) =


10 0100 1011 1101 1000 1110 0100 0100 1111 0011 0100 1101 0111 1101 1100 0011 1000 0101 0111 1101 1111 1110 1011 1110 0011 1100 0010.1(2) =


10 0100 1011 1101 1000 1110 0100 0100 1111 0011 0100 1101 0111 1101 1100 0011 1000 0101 0111 1101 1111 1110 1011 1110 0011 1100 0010.1(2) × 20 =


1.0010 0101 1110 1100 0111 0010 0010 0111 1001 1010 0110 1011 1110 1110 0001 1100 0010 1011 1110 1111 1111 0101 1111 0001 1110 0001 01(2) × 2105


7. 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): 105


Mantissa (not normalized):
1.0010 0101 1110 1100 0111 0010 0010 0111 1001 1010 0110 1011 1110 1110 0001 1100 0010 1011 1110 1111 1111 0101 1111 0001 1110 0001 01


8. Adjust the exponent.

Use the 8 bit excess/bias notation:


Exponent (adjusted) =


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


105 + 2(8-1) - 1 =


(105 + 127)(10) =


232(10)


9. 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;
  • 232 ÷ 2 = 116 + 0;
  • 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;

10. Construct the base 2 representation of the adjusted exponent.

Take all the remainders starting from the bottom of the list constructed above.


Exponent (adjusted) =


232(10) =


1110 1000(2)


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


001 0010 1111 0110 0011 1001


12. 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 1000


Mantissa (23 bits) =
001 0010 1111 0110 0011 1001


Decimal number 46 574 056 167 123 186 045 404 654 068 674.5 converted to 32 bit single precision IEEE 754 binary floating point representation:

0 - 1110 1000 - 001 0010 1111 0110 0011 1001

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