0.000 000 000 000 000 000 176 181 961 Converted to 32 Bit Single Precision IEEE 754 Binary Floating Point Representation Standard
Convert decimal 0.000 000 000 000 000 000 176 181 961(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
0.000 000 000 000 000 000 176 181 961(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: 0.
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;
- 0 ÷ 2 = 0 + 0;
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.
0(10) =
0(2)
3. Convert to binary (base 2) the fractional part: 0.000 000 000 000 000 000 176 181 961.
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.000 000 000 000 000 000 176 181 961 × 2 = 0 + 0.000 000 000 000 000 000 352 363 922;
- 2) 0.000 000 000 000 000 000 352 363 922 × 2 = 0 + 0.000 000 000 000 000 000 704 727 844;
- 3) 0.000 000 000 000 000 000 704 727 844 × 2 = 0 + 0.000 000 000 000 000 001 409 455 688;
- 4) 0.000 000 000 000 000 001 409 455 688 × 2 = 0 + 0.000 000 000 000 000 002 818 911 376;
- 5) 0.000 000 000 000 000 002 818 911 376 × 2 = 0 + 0.000 000 000 000 000 005 637 822 752;
- 6) 0.000 000 000 000 000 005 637 822 752 × 2 = 0 + 0.000 000 000 000 000 011 275 645 504;
- 7) 0.000 000 000 000 000 011 275 645 504 × 2 = 0 + 0.000 000 000 000 000 022 551 291 008;
- 8) 0.000 000 000 000 000 022 551 291 008 × 2 = 0 + 0.000 000 000 000 000 045 102 582 016;
- 9) 0.000 000 000 000 000 045 102 582 016 × 2 = 0 + 0.000 000 000 000 000 090 205 164 032;
- 10) 0.000 000 000 000 000 090 205 164 032 × 2 = 0 + 0.000 000 000 000 000 180 410 328 064;
- 11) 0.000 000 000 000 000 180 410 328 064 × 2 = 0 + 0.000 000 000 000 000 360 820 656 128;
- 12) 0.000 000 000 000 000 360 820 656 128 × 2 = 0 + 0.000 000 000 000 000 721 641 312 256;
- 13) 0.000 000 000 000 000 721 641 312 256 × 2 = 0 + 0.000 000 000 000 001 443 282 624 512;
- 14) 0.000 000 000 000 001 443 282 624 512 × 2 = 0 + 0.000 000 000 000 002 886 565 249 024;
- 15) 0.000 000 000 000 002 886 565 249 024 × 2 = 0 + 0.000 000 000 000 005 773 130 498 048;
- 16) 0.000 000 000 000 005 773 130 498 048 × 2 = 0 + 0.000 000 000 000 011 546 260 996 096;
- 17) 0.000 000 000 000 011 546 260 996 096 × 2 = 0 + 0.000 000 000 000 023 092 521 992 192;
- 18) 0.000 000 000 000 023 092 521 992 192 × 2 = 0 + 0.000 000 000 000 046 185 043 984 384;
- 19) 0.000 000 000 000 046 185 043 984 384 × 2 = 0 + 0.000 000 000 000 092 370 087 968 768;
- 20) 0.000 000 000 000 092 370 087 968 768 × 2 = 0 + 0.000 000 000 000 184 740 175 937 536;
- 21) 0.000 000 000 000 184 740 175 937 536 × 2 = 0 + 0.000 000 000 000 369 480 351 875 072;
- 22) 0.000 000 000 000 369 480 351 875 072 × 2 = 0 + 0.000 000 000 000 738 960 703 750 144;
- 23) 0.000 000 000 000 738 960 703 750 144 × 2 = 0 + 0.000 000 000 001 477 921 407 500 288;
- 24) 0.000 000 000 001 477 921 407 500 288 × 2 = 0 + 0.000 000 000 002 955 842 815 000 576;
- 25) 0.000 000 000 002 955 842 815 000 576 × 2 = 0 + 0.000 000 000 005 911 685 630 001 152;
- 26) 0.000 000 000 005 911 685 630 001 152 × 2 = 0 + 0.000 000 000 011 823 371 260 002 304;
- 27) 0.000 000 000 011 823 371 260 002 304 × 2 = 0 + 0.000 000 000 023 646 742 520 004 608;
- 28) 0.000 000 000 023 646 742 520 004 608 × 2 = 0 + 0.000 000 000 047 293 485 040 009 216;
- 29) 0.000 000 000 047 293 485 040 009 216 × 2 = 0 + 0.000 000 000 094 586 970 080 018 432;
- 30) 0.000 000 000 094 586 970 080 018 432 × 2 = 0 + 0.000 000 000 189 173 940 160 036 864;
- 31) 0.000 000 000 189 173 940 160 036 864 × 2 = 0 + 0.000 000 000 378 347 880 320 073 728;
- 32) 0.000 000 000 378 347 880 320 073 728 × 2 = 0 + 0.000 000 000 756 695 760 640 147 456;
- 33) 0.000 000 000 756 695 760 640 147 456 × 2 = 0 + 0.000 000 001 513 391 521 280 294 912;
- 34) 0.000 000 001 513 391 521 280 294 912 × 2 = 0 + 0.000 000 003 026 783 042 560 589 824;
- 35) 0.000 000 003 026 783 042 560 589 824 × 2 = 0 + 0.000 000 006 053 566 085 121 179 648;
- 36) 0.000 000 006 053 566 085 121 179 648 × 2 = 0 + 0.000 000 012 107 132 170 242 359 296;
- 37) 0.000 000 012 107 132 170 242 359 296 × 2 = 0 + 0.000 000 024 214 264 340 484 718 592;
- 38) 0.000 000 024 214 264 340 484 718 592 × 2 = 0 + 0.000 000 048 428 528 680 969 437 184;
- 39) 0.000 000 048 428 528 680 969 437 184 × 2 = 0 + 0.000 000 096 857 057 361 938 874 368;
- 40) 0.000 000 096 857 057 361 938 874 368 × 2 = 0 + 0.000 000 193 714 114 723 877 748 736;
- 41) 0.000 000 193 714 114 723 877 748 736 × 2 = 0 + 0.000 000 387 428 229 447 755 497 472;
- 42) 0.000 000 387 428 229 447 755 497 472 × 2 = 0 + 0.000 000 774 856 458 895 510 994 944;
- 43) 0.000 000 774 856 458 895 510 994 944 × 2 = 0 + 0.000 001 549 712 917 791 021 989 888;
- 44) 0.000 001 549 712 917 791 021 989 888 × 2 = 0 + 0.000 003 099 425 835 582 043 979 776;
- 45) 0.000 003 099 425 835 582 043 979 776 × 2 = 0 + 0.000 006 198 851 671 164 087 959 552;
- 46) 0.000 006 198 851 671 164 087 959 552 × 2 = 0 + 0.000 012 397 703 342 328 175 919 104;
- 47) 0.000 012 397 703 342 328 175 919 104 × 2 = 0 + 0.000 024 795 406 684 656 351 838 208;
- 48) 0.000 024 795 406 684 656 351 838 208 × 2 = 0 + 0.000 049 590 813 369 312 703 676 416;
- 49) 0.000 049 590 813 369 312 703 676 416 × 2 = 0 + 0.000 099 181 626 738 625 407 352 832;
- 50) 0.000 099 181 626 738 625 407 352 832 × 2 = 0 + 0.000 198 363 253 477 250 814 705 664;
- 51) 0.000 198 363 253 477 250 814 705 664 × 2 = 0 + 0.000 396 726 506 954 501 629 411 328;
- 52) 0.000 396 726 506 954 501 629 411 328 × 2 = 0 + 0.000 793 453 013 909 003 258 822 656;
- 53) 0.000 793 453 013 909 003 258 822 656 × 2 = 0 + 0.001 586 906 027 818 006 517 645 312;
- 54) 0.001 586 906 027 818 006 517 645 312 × 2 = 0 + 0.003 173 812 055 636 013 035 290 624;
- 55) 0.003 173 812 055 636 013 035 290 624 × 2 = 0 + 0.006 347 624 111 272 026 070 581 248;
- 56) 0.006 347 624 111 272 026 070 581 248 × 2 = 0 + 0.012 695 248 222 544 052 141 162 496;
- 57) 0.012 695 248 222 544 052 141 162 496 × 2 = 0 + 0.025 390 496 445 088 104 282 324 992;
- 58) 0.025 390 496 445 088 104 282 324 992 × 2 = 0 + 0.050 780 992 890 176 208 564 649 984;
- 59) 0.050 780 992 890 176 208 564 649 984 × 2 = 0 + 0.101 561 985 780 352 417 129 299 968;
- 60) 0.101 561 985 780 352 417 129 299 968 × 2 = 0 + 0.203 123 971 560 704 834 258 599 936;
- 61) 0.203 123 971 560 704 834 258 599 936 × 2 = 0 + 0.406 247 943 121 409 668 517 199 872;
- 62) 0.406 247 943 121 409 668 517 199 872 × 2 = 0 + 0.812 495 886 242 819 337 034 399 744;
- 63) 0.812 495 886 242 819 337 034 399 744 × 2 = 1 + 0.624 991 772 485 638 674 068 799 488;
- 64) 0.624 991 772 485 638 674 068 799 488 × 2 = 1 + 0.249 983 544 971 277 348 137 598 976;
- 65) 0.249 983 544 971 277 348 137 598 976 × 2 = 0 + 0.499 967 089 942 554 696 275 197 952;
- 66) 0.499 967 089 942 554 696 275 197 952 × 2 = 0 + 0.999 934 179 885 109 392 550 395 904;
- 67) 0.999 934 179 885 109 392 550 395 904 × 2 = 1 + 0.999 868 359 770 218 785 100 791 808;
- 68) 0.999 868 359 770 218 785 100 791 808 × 2 = 1 + 0.999 736 719 540 437 570 201 583 616;
- 69) 0.999 736 719 540 437 570 201 583 616 × 2 = 1 + 0.999 473 439 080 875 140 403 167 232;
- 70) 0.999 473 439 080 875 140 403 167 232 × 2 = 1 + 0.998 946 878 161 750 280 806 334 464;
- 71) 0.998 946 878 161 750 280 806 334 464 × 2 = 1 + 0.997 893 756 323 500 561 612 668 928;
- 72) 0.997 893 756 323 500 561 612 668 928 × 2 = 1 + 0.995 787 512 647 001 123 225 337 856;
- 73) 0.995 787 512 647 001 123 225 337 856 × 2 = 1 + 0.991 575 025 294 002 246 450 675 712;
- 74) 0.991 575 025 294 002 246 450 675 712 × 2 = 1 + 0.983 150 050 588 004 492 901 351 424;
- 75) 0.983 150 050 588 004 492 901 351 424 × 2 = 1 + 0.966 300 101 176 008 985 802 702 848;
- 76) 0.966 300 101 176 008 985 802 702 848 × 2 = 1 + 0.932 600 202 352 017 971 605 405 696;
- 77) 0.932 600 202 352 017 971 605 405 696 × 2 = 1 + 0.865 200 404 704 035 943 210 811 392;
- 78) 0.865 200 404 704 035 943 210 811 392 × 2 = 1 + 0.730 400 809 408 071 886 421 622 784;
- 79) 0.730 400 809 408 071 886 421 622 784 × 2 = 1 + 0.460 801 618 816 143 772 843 245 568;
- 80) 0.460 801 618 816 143 772 843 245 568 × 2 = 0 + 0.921 603 237 632 287 545 686 491 136;
- 81) 0.921 603 237 632 287 545 686 491 136 × 2 = 1 + 0.843 206 475 264 575 091 372 982 272;
- 82) 0.843 206 475 264 575 091 372 982 272 × 2 = 1 + 0.686 412 950 529 150 182 745 964 544;
- 83) 0.686 412 950 529 150 182 745 964 544 × 2 = 1 + 0.372 825 901 058 300 365 491 929 088;
- 84) 0.372 825 901 058 300 365 491 929 088 × 2 = 0 + 0.745 651 802 116 600 730 983 858 176;
- 85) 0.745 651 802 116 600 730 983 858 176 × 2 = 1 + 0.491 303 604 233 201 461 967 716 352;
- 86) 0.491 303 604 233 201 461 967 716 352 × 2 = 0 + 0.982 607 208 466 402 923 935 432 704;
We didn't get any fractional part that was equal to zero. But we had enough iterations (over Mantissa limit) and at least one integer that was different from zero => FULL STOP (Losing precision - the converted number we get in the end will be just a very good approximation of the initial one).
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.000 000 000 000 000 000 176 181 961(10) =
0.0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0011 0011 1111 1111 1110 1110 10(2)
5. Positive number before normalization:
0.000 000 000 000 000 000 176 181 961(10) =
0.0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0011 0011 1111 1111 1110 1110 10(2)
6. Normalize the binary representation of the number.
Shift the decimal mark 63 positions to the right, so that only one non zero digit remains to the left of it:
0.000 000 000 000 000 000 176 181 961(10) =
0.0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0011 0011 1111 1111 1110 1110 10(2) =
0.0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0011 0011 1111 1111 1110 1110 10(2) × 20 =
1.1001 1111 1111 1111 0111 010(2) × 2-63
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): -63
Mantissa (not normalized):
1.1001 1111 1111 1111 0111 010
8. Adjust the exponent.
Use the 8 bit excess/bias notation:
Exponent (adjusted) =
Exponent (unadjusted) + 2(8-1) - 1 =
-63 + 2(8-1) - 1 =
(-63 + 127)(10) =
64(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;
- 64 ÷ 2 = 32 + 0;
- 32 ÷ 2 = 16 + 0;
- 16 ÷ 2 = 8 + 0;
- 8 ÷ 2 = 4 + 0;
- 4 ÷ 2 = 2 + 0;
- 2 ÷ 2 = 1 + 0;
- 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) =
64(10) =
0100 0000(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, only if necessary (not the case here).
Mantissa (normalized) =
1. 100 1111 1111 1111 1011 1010 =
100 1111 1111 1111 1011 1010
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) =
0100 0000
Mantissa (23 bits) =
100 1111 1111 1111 1011 1010
Decimal number 0.000 000 000 000 000 000 176 181 961 converted to 32 bit single precision IEEE 754 binary floating point representation:
0 - 0100 0000 - 100 1111 1111 1111 1011 1010