-0.000 000 000 000 000 000 000 767 605 3 Converted to 32 Bit Single Precision IEEE 754 Binary Floating Point Representation Standard
Convert decimal -0.000 000 000 000 000 000 000 767 605 3(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 000 767 605 3(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. Start with the positive version of the number:
|-0.000 000 000 000 000 000 000 767 605 3| = 0.000 000 000 000 000 000 000 767 605 3
2. 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;
3. 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)
4. Convert to binary (base 2) the fractional part: 0.000 000 000 000 000 000 000 767 605 3.
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 000 767 605 3 × 2 = 0 + 0.000 000 000 000 000 000 001 535 210 6;
- 2) 0.000 000 000 000 000 000 001 535 210 6 × 2 = 0 + 0.000 000 000 000 000 000 003 070 421 2;
- 3) 0.000 000 000 000 000 000 003 070 421 2 × 2 = 0 + 0.000 000 000 000 000 000 006 140 842 4;
- 4) 0.000 000 000 000 000 000 006 140 842 4 × 2 = 0 + 0.000 000 000 000 000 000 012 281 684 8;
- 5) 0.000 000 000 000 000 000 012 281 684 8 × 2 = 0 + 0.000 000 000 000 000 000 024 563 369 6;
- 6) 0.000 000 000 000 000 000 024 563 369 6 × 2 = 0 + 0.000 000 000 000 000 000 049 126 739 2;
- 7) 0.000 000 000 000 000 000 049 126 739 2 × 2 = 0 + 0.000 000 000 000 000 000 098 253 478 4;
- 8) 0.000 000 000 000 000 000 098 253 478 4 × 2 = 0 + 0.000 000 000 000 000 000 196 506 956 8;
- 9) 0.000 000 000 000 000 000 196 506 956 8 × 2 = 0 + 0.000 000 000 000 000 000 393 013 913 6;
- 10) 0.000 000 000 000 000 000 393 013 913 6 × 2 = 0 + 0.000 000 000 000 000 000 786 027 827 2;
- 11) 0.000 000 000 000 000 000 786 027 827 2 × 2 = 0 + 0.000 000 000 000 000 001 572 055 654 4;
- 12) 0.000 000 000 000 000 001 572 055 654 4 × 2 = 0 + 0.000 000 000 000 000 003 144 111 308 8;
- 13) 0.000 000 000 000 000 003 144 111 308 8 × 2 = 0 + 0.000 000 000 000 000 006 288 222 617 6;
- 14) 0.000 000 000 000 000 006 288 222 617 6 × 2 = 0 + 0.000 000 000 000 000 012 576 445 235 2;
- 15) 0.000 000 000 000 000 012 576 445 235 2 × 2 = 0 + 0.000 000 000 000 000 025 152 890 470 4;
- 16) 0.000 000 000 000 000 025 152 890 470 4 × 2 = 0 + 0.000 000 000 000 000 050 305 780 940 8;
- 17) 0.000 000 000 000 000 050 305 780 940 8 × 2 = 0 + 0.000 000 000 000 000 100 611 561 881 6;
- 18) 0.000 000 000 000 000 100 611 561 881 6 × 2 = 0 + 0.000 000 000 000 000 201 223 123 763 2;
- 19) 0.000 000 000 000 000 201 223 123 763 2 × 2 = 0 + 0.000 000 000 000 000 402 446 247 526 4;
- 20) 0.000 000 000 000 000 402 446 247 526 4 × 2 = 0 + 0.000 000 000 000 000 804 892 495 052 8;
- 21) 0.000 000 000 000 000 804 892 495 052 8 × 2 = 0 + 0.000 000 000 000 001 609 784 990 105 6;
- 22) 0.000 000 000 000 001 609 784 990 105 6 × 2 = 0 + 0.000 000 000 000 003 219 569 980 211 2;
- 23) 0.000 000 000 000 003 219 569 980 211 2 × 2 = 0 + 0.000 000 000 000 006 439 139 960 422 4;
- 24) 0.000 000 000 000 006 439 139 960 422 4 × 2 = 0 + 0.000 000 000 000 012 878 279 920 844 8;
- 25) 0.000 000 000 000 012 878 279 920 844 8 × 2 = 0 + 0.000 000 000 000 025 756 559 841 689 6;
- 26) 0.000 000 000 000 025 756 559 841 689 6 × 2 = 0 + 0.000 000 000 000 051 513 119 683 379 2;
- 27) 0.000 000 000 000 051 513 119 683 379 2 × 2 = 0 + 0.000 000 000 000 103 026 239 366 758 4;
- 28) 0.000 000 000 000 103 026 239 366 758 4 × 2 = 0 + 0.000 000 000 000 206 052 478 733 516 8;
- 29) 0.000 000 000 000 206 052 478 733 516 8 × 2 = 0 + 0.000 000 000 000 412 104 957 467 033 6;
- 30) 0.000 000 000 000 412 104 957 467 033 6 × 2 = 0 + 0.000 000 000 000 824 209 914 934 067 2;
- 31) 0.000 000 000 000 824 209 914 934 067 2 × 2 = 0 + 0.000 000 000 001 648 419 829 868 134 4;
- 32) 0.000 000 000 001 648 419 829 868 134 4 × 2 = 0 + 0.000 000 000 003 296 839 659 736 268 8;
- 33) 0.000 000 000 003 296 839 659 736 268 8 × 2 = 0 + 0.000 000 000 006 593 679 319 472 537 6;
- 34) 0.000 000 000 006 593 679 319 472 537 6 × 2 = 0 + 0.000 000 000 013 187 358 638 945 075 2;
- 35) 0.000 000 000 013 187 358 638 945 075 2 × 2 = 0 + 0.000 000 000 026 374 717 277 890 150 4;
- 36) 0.000 000 000 026 374 717 277 890 150 4 × 2 = 0 + 0.000 000 000 052 749 434 555 780 300 8;
- 37) 0.000 000 000 052 749 434 555 780 300 8 × 2 = 0 + 0.000 000 000 105 498 869 111 560 601 6;
- 38) 0.000 000 000 105 498 869 111 560 601 6 × 2 = 0 + 0.000 000 000 210 997 738 223 121 203 2;
- 39) 0.000 000 000 210 997 738 223 121 203 2 × 2 = 0 + 0.000 000 000 421 995 476 446 242 406 4;
- 40) 0.000 000 000 421 995 476 446 242 406 4 × 2 = 0 + 0.000 000 000 843 990 952 892 484 812 8;
- 41) 0.000 000 000 843 990 952 892 484 812 8 × 2 = 0 + 0.000 000 001 687 981 905 784 969 625 6;
- 42) 0.000 000 001 687 981 905 784 969 625 6 × 2 = 0 + 0.000 000 003 375 963 811 569 939 251 2;
- 43) 0.000 000 003 375 963 811 569 939 251 2 × 2 = 0 + 0.000 000 006 751 927 623 139 878 502 4;
- 44) 0.000 000 006 751 927 623 139 878 502 4 × 2 = 0 + 0.000 000 013 503 855 246 279 757 004 8;
- 45) 0.000 000 013 503 855 246 279 757 004 8 × 2 = 0 + 0.000 000 027 007 710 492 559 514 009 6;
- 46) 0.000 000 027 007 710 492 559 514 009 6 × 2 = 0 + 0.000 000 054 015 420 985 119 028 019 2;
- 47) 0.000 000 054 015 420 985 119 028 019 2 × 2 = 0 + 0.000 000 108 030 841 970 238 056 038 4;
- 48) 0.000 000 108 030 841 970 238 056 038 4 × 2 = 0 + 0.000 000 216 061 683 940 476 112 076 8;
- 49) 0.000 000 216 061 683 940 476 112 076 8 × 2 = 0 + 0.000 000 432 123 367 880 952 224 153 6;
- 50) 0.000 000 432 123 367 880 952 224 153 6 × 2 = 0 + 0.000 000 864 246 735 761 904 448 307 2;
- 51) 0.000 000 864 246 735 761 904 448 307 2 × 2 = 0 + 0.000 001 728 493 471 523 808 896 614 4;
- 52) 0.000 001 728 493 471 523 808 896 614 4 × 2 = 0 + 0.000 003 456 986 943 047 617 793 228 8;
- 53) 0.000 003 456 986 943 047 617 793 228 8 × 2 = 0 + 0.000 006 913 973 886 095 235 586 457 6;
- 54) 0.000 006 913 973 886 095 235 586 457 6 × 2 = 0 + 0.000 013 827 947 772 190 471 172 915 2;
- 55) 0.000 013 827 947 772 190 471 172 915 2 × 2 = 0 + 0.000 027 655 895 544 380 942 345 830 4;
- 56) 0.000 027 655 895 544 380 942 345 830 4 × 2 = 0 + 0.000 055 311 791 088 761 884 691 660 8;
- 57) 0.000 055 311 791 088 761 884 691 660 8 × 2 = 0 + 0.000 110 623 582 177 523 769 383 321 6;
- 58) 0.000 110 623 582 177 523 769 383 321 6 × 2 = 0 + 0.000 221 247 164 355 047 538 766 643 2;
- 59) 0.000 221 247 164 355 047 538 766 643 2 × 2 = 0 + 0.000 442 494 328 710 095 077 533 286 4;
- 60) 0.000 442 494 328 710 095 077 533 286 4 × 2 = 0 + 0.000 884 988 657 420 190 155 066 572 8;
- 61) 0.000 884 988 657 420 190 155 066 572 8 × 2 = 0 + 0.001 769 977 314 840 380 310 133 145 6;
- 62) 0.001 769 977 314 840 380 310 133 145 6 × 2 = 0 + 0.003 539 954 629 680 760 620 266 291 2;
- 63) 0.003 539 954 629 680 760 620 266 291 2 × 2 = 0 + 0.007 079 909 259 361 521 240 532 582 4;
- 64) 0.007 079 909 259 361 521 240 532 582 4 × 2 = 0 + 0.014 159 818 518 723 042 481 065 164 8;
- 65) 0.014 159 818 518 723 042 481 065 164 8 × 2 = 0 + 0.028 319 637 037 446 084 962 130 329 6;
- 66) 0.028 319 637 037 446 084 962 130 329 6 × 2 = 0 + 0.056 639 274 074 892 169 924 260 659 2;
- 67) 0.056 639 274 074 892 169 924 260 659 2 × 2 = 0 + 0.113 278 548 149 784 339 848 521 318 4;
- 68) 0.113 278 548 149 784 339 848 521 318 4 × 2 = 0 + 0.226 557 096 299 568 679 697 042 636 8;
- 69) 0.226 557 096 299 568 679 697 042 636 8 × 2 = 0 + 0.453 114 192 599 137 359 394 085 273 6;
- 70) 0.453 114 192 599 137 359 394 085 273 6 × 2 = 0 + 0.906 228 385 198 274 718 788 170 547 2;
- 71) 0.906 228 385 198 274 718 788 170 547 2 × 2 = 1 + 0.812 456 770 396 549 437 576 341 094 4;
- 72) 0.812 456 770 396 549 437 576 341 094 4 × 2 = 1 + 0.624 913 540 793 098 875 152 682 188 8;
- 73) 0.624 913 540 793 098 875 152 682 188 8 × 2 = 1 + 0.249 827 081 586 197 750 305 364 377 6;
- 74) 0.249 827 081 586 197 750 305 364 377 6 × 2 = 0 + 0.499 654 163 172 395 500 610 728 755 2;
- 75) 0.499 654 163 172 395 500 610 728 755 2 × 2 = 0 + 0.999 308 326 344 791 001 221 457 510 4;
- 76) 0.999 308 326 344 791 001 221 457 510 4 × 2 = 1 + 0.998 616 652 689 582 002 442 915 020 8;
- 77) 0.998 616 652 689 582 002 442 915 020 8 × 2 = 1 + 0.997 233 305 379 164 004 885 830 041 6;
- 78) 0.997 233 305 379 164 004 885 830 041 6 × 2 = 1 + 0.994 466 610 758 328 009 771 660 083 2;
- 79) 0.994 466 610 758 328 009 771 660 083 2 × 2 = 1 + 0.988 933 221 516 656 019 543 320 166 4;
- 80) 0.988 933 221 516 656 019 543 320 166 4 × 2 = 1 + 0.977 866 443 033 312 039 086 640 332 8;
- 81) 0.977 866 443 033 312 039 086 640 332 8 × 2 = 1 + 0.955 732 886 066 624 078 173 280 665 6;
- 82) 0.955 732 886 066 624 078 173 280 665 6 × 2 = 1 + 0.911 465 772 133 248 156 346 561 331 2;
- 83) 0.911 465 772 133 248 156 346 561 331 2 × 2 = 1 + 0.822 931 544 266 496 312 693 122 662 4;
- 84) 0.822 931 544 266 496 312 693 122 662 4 × 2 = 1 + 0.645 863 088 532 992 625 386 245 324 8;
- 85) 0.645 863 088 532 992 625 386 245 324 8 × 2 = 1 + 0.291 726 177 065 985 250 772 490 649 6;
- 86) 0.291 726 177 065 985 250 772 490 649 6 × 2 = 0 + 0.583 452 354 131 970 501 544 981 299 2;
- 87) 0.583 452 354 131 970 501 544 981 299 2 × 2 = 1 + 0.166 904 708 263 941 003 089 962 598 4;
- 88) 0.166 904 708 263 941 003 089 962 598 4 × 2 = 0 + 0.333 809 416 527 882 006 179 925 196 8;
- 89) 0.333 809 416 527 882 006 179 925 196 8 × 2 = 0 + 0.667 618 833 055 764 012 359 850 393 6;
- 90) 0.667 618 833 055 764 012 359 850 393 6 × 2 = 1 + 0.335 237 666 111 528 024 719 700 787 2;
- 91) 0.335 237 666 111 528 024 719 700 787 2 × 2 = 0 + 0.670 475 332 223 056 049 439 401 574 4;
- 92) 0.670 475 332 223 056 049 439 401 574 4 × 2 = 1 + 0.340 950 664 446 112 098 878 803 148 8;
- 93) 0.340 950 664 446 112 098 878 803 148 8 × 2 = 0 + 0.681 901 328 892 224 197 757 606 297 6;
- 94) 0.681 901 328 892 224 197 757 606 297 6 × 2 = 1 + 0.363 802 657 784 448 395 515 212 595 2;
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).
5. 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 000 767 605 3(10) =
0.0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0011 1001 1111 1111 1010 0101 01(2)
6. Positive number before normalization:
0.000 000 000 000 000 000 000 767 605 3(10) =
0.0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0011 1001 1111 1111 1010 0101 01(2)
7. Normalize the binary representation of the number.
Shift the decimal mark 71 positions to the right, so that only one non zero digit remains to the left of it:
0.000 000 000 000 000 000 000 767 605 3(10) =
0.0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0011 1001 1111 1111 1010 0101 01(2) =
0.0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0011 1001 1111 1111 1010 0101 01(2) × 20 =
1.1100 1111 1111 1101 0010 101(2) × 2-71
8. 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 1 (a negative number)
Exponent (unadjusted): -71
Mantissa (not normalized):
1.1100 1111 1111 1101 0010 101
9. Adjust the exponent.
Use the 8 bit excess/bias notation:
Exponent (adjusted) =
Exponent (unadjusted) + 2(8-1) - 1 =
-71 + 2(8-1) - 1 =
(-71 + 127)(10) =
56(10)
10. 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;
- 56 ÷ 2 = 28 + 0;
- 28 ÷ 2 = 14 + 0;
- 14 ÷ 2 = 7 + 0;
- 7 ÷ 2 = 3 + 1;
- 3 ÷ 2 = 1 + 1;
- 1 ÷ 2 = 0 + 1;
11. Construct the base 2 representation of the adjusted exponent.
Take all the remainders starting from the bottom of the list constructed above.
Exponent (adjusted) =
56(10) =
0011 1000(2)
12. 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. 110 0111 1111 1110 1001 0101 =
110 0111 1111 1110 1001 0101
13. The three elements that make up the number's 32 bit single precision IEEE 754 binary floating point representation:
Sign (1 bit) =
1 (a negative number)
Exponent (8 bits) =
0011 1000
Mantissa (23 bits) =
110 0111 1111 1110 1001 0101
Decimal number -0.000 000 000 000 000 000 000 767 605 3 converted to 32 bit single precision IEEE 754 binary floating point representation:
1 - 0011 1000 - 110 0111 1111 1110 1001 0101