1.414 213 562 373 095 048 801 688 724 209 698 078 569 671 875 376 948 073 176 679 737 990 732 478 462 107 038 850 392 4 Converted to 64 Bit Double Precision IEEE 754 Binary Floating Point Representation Standard

Convert decimal 1.414 213 562 373 095 048 801 688 724 209 698 078 569 671 875 376 948 073 176 679 737 990 732 478 462 107 038 850 392 4(10) to 64 bit double precision IEEE 754 binary floating point representation standard (1 bit for sign, 11 bits for exponent, 52 bits for mantissa)

What are the steps to convert decimal number
1.414 213 562 373 095 048 801 688 724 209 698 078 569 671 875 376 948 073 176 679 737 990 732 478 462 107 038 850 392 4(10) to 64 bit double precision IEEE 754 binary floating point representation (1 bit for sign, 11 bits for exponent, 52 bits for mantissa)

1. First, convert to binary (in base 2) the integer part: 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;
  • 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.

1(10) =


1(2)


3. Convert to binary (base 2) the fractional part: 0.414 213 562 373 095 048 801 688 724 209 698 078 569 671 875 376 948 073 176 679 737 990 732 478 462 107 038 850 392 4.

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.414 213 562 373 095 048 801 688 724 209 698 078 569 671 875 376 948 073 176 679 737 990 732 478 462 107 038 850 392 4 × 2 = 0 + 0.828 427 124 746 190 097 603 377 448 419 396 157 139 343 750 753 896 146 353 359 475 981 464 956 924 214 077 700 784 8;
  • 2) 0.828 427 124 746 190 097 603 377 448 419 396 157 139 343 750 753 896 146 353 359 475 981 464 956 924 214 077 700 784 8 × 2 = 1 + 0.656 854 249 492 380 195 206 754 896 838 792 314 278 687 501 507 792 292 706 718 951 962 929 913 848 428 155 401 569 6;
  • 3) 0.656 854 249 492 380 195 206 754 896 838 792 314 278 687 501 507 792 292 706 718 951 962 929 913 848 428 155 401 569 6 × 2 = 1 + 0.313 708 498 984 760 390 413 509 793 677 584 628 557 375 003 015 584 585 413 437 903 925 859 827 696 856 310 803 139 2;
  • 4) 0.313 708 498 984 760 390 413 509 793 677 584 628 557 375 003 015 584 585 413 437 903 925 859 827 696 856 310 803 139 2 × 2 = 0 + 0.627 416 997 969 520 780 827 019 587 355 169 257 114 750 006 031 169 170 826 875 807 851 719 655 393 712 621 606 278 4;
  • 5) 0.627 416 997 969 520 780 827 019 587 355 169 257 114 750 006 031 169 170 826 875 807 851 719 655 393 712 621 606 278 4 × 2 = 1 + 0.254 833 995 939 041 561 654 039 174 710 338 514 229 500 012 062 338 341 653 751 615 703 439 310 787 425 243 212 556 8;
  • 6) 0.254 833 995 939 041 561 654 039 174 710 338 514 229 500 012 062 338 341 653 751 615 703 439 310 787 425 243 212 556 8 × 2 = 0 + 0.509 667 991 878 083 123 308 078 349 420 677 028 459 000 024 124 676 683 307 503 231 406 878 621 574 850 486 425 113 6;
  • 7) 0.509 667 991 878 083 123 308 078 349 420 677 028 459 000 024 124 676 683 307 503 231 406 878 621 574 850 486 425 113 6 × 2 = 1 + 0.019 335 983 756 166 246 616 156 698 841 354 056 918 000 048 249 353 366 615 006 462 813 757 243 149 700 972 850 227 2;
  • 8) 0.019 335 983 756 166 246 616 156 698 841 354 056 918 000 048 249 353 366 615 006 462 813 757 243 149 700 972 850 227 2 × 2 = 0 + 0.038 671 967 512 332 493 232 313 397 682 708 113 836 000 096 498 706 733 230 012 925 627 514 486 299 401 945 700 454 4;
  • 9) 0.038 671 967 512 332 493 232 313 397 682 708 113 836 000 096 498 706 733 230 012 925 627 514 486 299 401 945 700 454 4 × 2 = 0 + 0.077 343 935 024 664 986 464 626 795 365 416 227 672 000 192 997 413 466 460 025 851 255 028 972 598 803 891 400 908 8;
  • 10) 0.077 343 935 024 664 986 464 626 795 365 416 227 672 000 192 997 413 466 460 025 851 255 028 972 598 803 891 400 908 8 × 2 = 0 + 0.154 687 870 049 329 972 929 253 590 730 832 455 344 000 385 994 826 932 920 051 702 510 057 945 197 607 782 801 817 6;
  • 11) 0.154 687 870 049 329 972 929 253 590 730 832 455 344 000 385 994 826 932 920 051 702 510 057 945 197 607 782 801 817 6 × 2 = 0 + 0.309 375 740 098 659 945 858 507 181 461 664 910 688 000 771 989 653 865 840 103 405 020 115 890 395 215 565 603 635 2;
  • 12) 0.309 375 740 098 659 945 858 507 181 461 664 910 688 000 771 989 653 865 840 103 405 020 115 890 395 215 565 603 635 2 × 2 = 0 + 0.618 751 480 197 319 891 717 014 362 923 329 821 376 001 543 979 307 731 680 206 810 040 231 780 790 431 131 207 270 4;
  • 13) 0.618 751 480 197 319 891 717 014 362 923 329 821 376 001 543 979 307 731 680 206 810 040 231 780 790 431 131 207 270 4 × 2 = 1 + 0.237 502 960 394 639 783 434 028 725 846 659 642 752 003 087 958 615 463 360 413 620 080 463 561 580 862 262 414 540 8;
  • 14) 0.237 502 960 394 639 783 434 028 725 846 659 642 752 003 087 958 615 463 360 413 620 080 463 561 580 862 262 414 540 8 × 2 = 0 + 0.475 005 920 789 279 566 868 057 451 693 319 285 504 006 175 917 230 926 720 827 240 160 927 123 161 724 524 829 081 6;
  • 15) 0.475 005 920 789 279 566 868 057 451 693 319 285 504 006 175 917 230 926 720 827 240 160 927 123 161 724 524 829 081 6 × 2 = 0 + 0.950 011 841 578 559 133 736 114 903 386 638 571 008 012 351 834 461 853 441 654 480 321 854 246 323 449 049 658 163 2;
  • 16) 0.950 011 841 578 559 133 736 114 903 386 638 571 008 012 351 834 461 853 441 654 480 321 854 246 323 449 049 658 163 2 × 2 = 1 + 0.900 023 683 157 118 267 472 229 806 773 277 142 016 024 703 668 923 706 883 308 960 643 708 492 646 898 099 316 326 4;
  • 17) 0.900 023 683 157 118 267 472 229 806 773 277 142 016 024 703 668 923 706 883 308 960 643 708 492 646 898 099 316 326 4 × 2 = 1 + 0.800 047 366 314 236 534 944 459 613 546 554 284 032 049 407 337 847 413 766 617 921 287 416 985 293 796 198 632 652 8;
  • 18) 0.800 047 366 314 236 534 944 459 613 546 554 284 032 049 407 337 847 413 766 617 921 287 416 985 293 796 198 632 652 8 × 2 = 1 + 0.600 094 732 628 473 069 888 919 227 093 108 568 064 098 814 675 694 827 533 235 842 574 833 970 587 592 397 265 305 6;
  • 19) 0.600 094 732 628 473 069 888 919 227 093 108 568 064 098 814 675 694 827 533 235 842 574 833 970 587 592 397 265 305 6 × 2 = 1 + 0.200 189 465 256 946 139 777 838 454 186 217 136 128 197 629 351 389 655 066 471 685 149 667 941 175 184 794 530 611 2;
  • 20) 0.200 189 465 256 946 139 777 838 454 186 217 136 128 197 629 351 389 655 066 471 685 149 667 941 175 184 794 530 611 2 × 2 = 0 + 0.400 378 930 513 892 279 555 676 908 372 434 272 256 395 258 702 779 310 132 943 370 299 335 882 350 369 589 061 222 4;
  • 21) 0.400 378 930 513 892 279 555 676 908 372 434 272 256 395 258 702 779 310 132 943 370 299 335 882 350 369 589 061 222 4 × 2 = 0 + 0.800 757 861 027 784 559 111 353 816 744 868 544 512 790 517 405 558 620 265 886 740 598 671 764 700 739 178 122 444 8;
  • 22) 0.800 757 861 027 784 559 111 353 816 744 868 544 512 790 517 405 558 620 265 886 740 598 671 764 700 739 178 122 444 8 × 2 = 1 + 0.601 515 722 055 569 118 222 707 633 489 737 089 025 581 034 811 117 240 531 773 481 197 343 529 401 478 356 244 889 6;
  • 23) 0.601 515 722 055 569 118 222 707 633 489 737 089 025 581 034 811 117 240 531 773 481 197 343 529 401 478 356 244 889 6 × 2 = 1 + 0.203 031 444 111 138 236 445 415 266 979 474 178 051 162 069 622 234 481 063 546 962 394 687 058 802 956 712 489 779 2;
  • 24) 0.203 031 444 111 138 236 445 415 266 979 474 178 051 162 069 622 234 481 063 546 962 394 687 058 802 956 712 489 779 2 × 2 = 0 + 0.406 062 888 222 276 472 890 830 533 958 948 356 102 324 139 244 468 962 127 093 924 789 374 117 605 913 424 979 558 4;
  • 25) 0.406 062 888 222 276 472 890 830 533 958 948 356 102 324 139 244 468 962 127 093 924 789 374 117 605 913 424 979 558 4 × 2 = 0 + 0.812 125 776 444 552 945 781 661 067 917 896 712 204 648 278 488 937 924 254 187 849 578 748 235 211 826 849 959 116 8;
  • 26) 0.812 125 776 444 552 945 781 661 067 917 896 712 204 648 278 488 937 924 254 187 849 578 748 235 211 826 849 959 116 8 × 2 = 1 + 0.624 251 552 889 105 891 563 322 135 835 793 424 409 296 556 977 875 848 508 375 699 157 496 470 423 653 699 918 233 6;
  • 27) 0.624 251 552 889 105 891 563 322 135 835 793 424 409 296 556 977 875 848 508 375 699 157 496 470 423 653 699 918 233 6 × 2 = 1 + 0.248 503 105 778 211 783 126 644 271 671 586 848 818 593 113 955 751 697 016 751 398 314 992 940 847 307 399 836 467 2;
  • 28) 0.248 503 105 778 211 783 126 644 271 671 586 848 818 593 113 955 751 697 016 751 398 314 992 940 847 307 399 836 467 2 × 2 = 0 + 0.497 006 211 556 423 566 253 288 543 343 173 697 637 186 227 911 503 394 033 502 796 629 985 881 694 614 799 672 934 4;
  • 29) 0.497 006 211 556 423 566 253 288 543 343 173 697 637 186 227 911 503 394 033 502 796 629 985 881 694 614 799 672 934 4 × 2 = 0 + 0.994 012 423 112 847 132 506 577 086 686 347 395 274 372 455 823 006 788 067 005 593 259 971 763 389 229 599 345 868 8;
  • 30) 0.994 012 423 112 847 132 506 577 086 686 347 395 274 372 455 823 006 788 067 005 593 259 971 763 389 229 599 345 868 8 × 2 = 1 + 0.988 024 846 225 694 265 013 154 173 372 694 790 548 744 911 646 013 576 134 011 186 519 943 526 778 459 198 691 737 6;
  • 31) 0.988 024 846 225 694 265 013 154 173 372 694 790 548 744 911 646 013 576 134 011 186 519 943 526 778 459 198 691 737 6 × 2 = 1 + 0.976 049 692 451 388 530 026 308 346 745 389 581 097 489 823 292 027 152 268 022 373 039 887 053 556 918 397 383 475 2;
  • 32) 0.976 049 692 451 388 530 026 308 346 745 389 581 097 489 823 292 027 152 268 022 373 039 887 053 556 918 397 383 475 2 × 2 = 1 + 0.952 099 384 902 777 060 052 616 693 490 779 162 194 979 646 584 054 304 536 044 746 079 774 107 113 836 794 766 950 4;
  • 33) 0.952 099 384 902 777 060 052 616 693 490 779 162 194 979 646 584 054 304 536 044 746 079 774 107 113 836 794 766 950 4 × 2 = 1 + 0.904 198 769 805 554 120 105 233 386 981 558 324 389 959 293 168 108 609 072 089 492 159 548 214 227 673 589 533 900 8;
  • 34) 0.904 198 769 805 554 120 105 233 386 981 558 324 389 959 293 168 108 609 072 089 492 159 548 214 227 673 589 533 900 8 × 2 = 1 + 0.808 397 539 611 108 240 210 466 773 963 116 648 779 918 586 336 217 218 144 178 984 319 096 428 455 347 179 067 801 6;
  • 35) 0.808 397 539 611 108 240 210 466 773 963 116 648 779 918 586 336 217 218 144 178 984 319 096 428 455 347 179 067 801 6 × 2 = 1 + 0.616 795 079 222 216 480 420 933 547 926 233 297 559 837 172 672 434 436 288 357 968 638 192 856 910 694 358 135 603 2;
  • 36) 0.616 795 079 222 216 480 420 933 547 926 233 297 559 837 172 672 434 436 288 357 968 638 192 856 910 694 358 135 603 2 × 2 = 1 + 0.233 590 158 444 432 960 841 867 095 852 466 595 119 674 345 344 868 872 576 715 937 276 385 713 821 388 716 271 206 4;
  • 37) 0.233 590 158 444 432 960 841 867 095 852 466 595 119 674 345 344 868 872 576 715 937 276 385 713 821 388 716 271 206 4 × 2 = 0 + 0.467 180 316 888 865 921 683 734 191 704 933 190 239 348 690 689 737 745 153 431 874 552 771 427 642 777 432 542 412 8;
  • 38) 0.467 180 316 888 865 921 683 734 191 704 933 190 239 348 690 689 737 745 153 431 874 552 771 427 642 777 432 542 412 8 × 2 = 0 + 0.934 360 633 777 731 843 367 468 383 409 866 380 478 697 381 379 475 490 306 863 749 105 542 855 285 554 865 084 825 6;
  • 39) 0.934 360 633 777 731 843 367 468 383 409 866 380 478 697 381 379 475 490 306 863 749 105 542 855 285 554 865 084 825 6 × 2 = 1 + 0.868 721 267 555 463 686 734 936 766 819 732 760 957 394 762 758 950 980 613 727 498 211 085 710 571 109 730 169 651 2;
  • 40) 0.868 721 267 555 463 686 734 936 766 819 732 760 957 394 762 758 950 980 613 727 498 211 085 710 571 109 730 169 651 2 × 2 = 1 + 0.737 442 535 110 927 373 469 873 533 639 465 521 914 789 525 517 901 961 227 454 996 422 171 421 142 219 460 339 302 4;
  • 41) 0.737 442 535 110 927 373 469 873 533 639 465 521 914 789 525 517 901 961 227 454 996 422 171 421 142 219 460 339 302 4 × 2 = 1 + 0.474 885 070 221 854 746 939 747 067 278 931 043 829 579 051 035 803 922 454 909 992 844 342 842 284 438 920 678 604 8;
  • 42) 0.474 885 070 221 854 746 939 747 067 278 931 043 829 579 051 035 803 922 454 909 992 844 342 842 284 438 920 678 604 8 × 2 = 0 + 0.949 770 140 443 709 493 879 494 134 557 862 087 659 158 102 071 607 844 909 819 985 688 685 684 568 877 841 357 209 6;
  • 43) 0.949 770 140 443 709 493 879 494 134 557 862 087 659 158 102 071 607 844 909 819 985 688 685 684 568 877 841 357 209 6 × 2 = 1 + 0.899 540 280 887 418 987 758 988 269 115 724 175 318 316 204 143 215 689 819 639 971 377 371 369 137 755 682 714 419 2;
  • 44) 0.899 540 280 887 418 987 758 988 269 115 724 175 318 316 204 143 215 689 819 639 971 377 371 369 137 755 682 714 419 2 × 2 = 1 + 0.799 080 561 774 837 975 517 976 538 231 448 350 636 632 408 286 431 379 639 279 942 754 742 738 275 511 365 428 838 4;
  • 45) 0.799 080 561 774 837 975 517 976 538 231 448 350 636 632 408 286 431 379 639 279 942 754 742 738 275 511 365 428 838 4 × 2 = 1 + 0.598 161 123 549 675 951 035 953 076 462 896 701 273 264 816 572 862 759 278 559 885 509 485 476 551 022 730 857 676 8;
  • 46) 0.598 161 123 549 675 951 035 953 076 462 896 701 273 264 816 572 862 759 278 559 885 509 485 476 551 022 730 857 676 8 × 2 = 1 + 0.196 322 247 099 351 902 071 906 152 925 793 402 546 529 633 145 725 518 557 119 771 018 970 953 102 045 461 715 353 6;
  • 47) 0.196 322 247 099 351 902 071 906 152 925 793 402 546 529 633 145 725 518 557 119 771 018 970 953 102 045 461 715 353 6 × 2 = 0 + 0.392 644 494 198 703 804 143 812 305 851 586 805 093 059 266 291 451 037 114 239 542 037 941 906 204 090 923 430 707 2;
  • 48) 0.392 644 494 198 703 804 143 812 305 851 586 805 093 059 266 291 451 037 114 239 542 037 941 906 204 090 923 430 707 2 × 2 = 0 + 0.785 288 988 397 407 608 287 624 611 703 173 610 186 118 532 582 902 074 228 479 084 075 883 812 408 181 846 861 414 4;
  • 49) 0.785 288 988 397 407 608 287 624 611 703 173 610 186 118 532 582 902 074 228 479 084 075 883 812 408 181 846 861 414 4 × 2 = 1 + 0.570 577 976 794 815 216 575 249 223 406 347 220 372 237 065 165 804 148 456 958 168 151 767 624 816 363 693 722 828 8;
  • 50) 0.570 577 976 794 815 216 575 249 223 406 347 220 372 237 065 165 804 148 456 958 168 151 767 624 816 363 693 722 828 8 × 2 = 1 + 0.141 155 953 589 630 433 150 498 446 812 694 440 744 474 130 331 608 296 913 916 336 303 535 249 632 727 387 445 657 6;
  • 51) 0.141 155 953 589 630 433 150 498 446 812 694 440 744 474 130 331 608 296 913 916 336 303 535 249 632 727 387 445 657 6 × 2 = 0 + 0.282 311 907 179 260 866 300 996 893 625 388 881 488 948 260 663 216 593 827 832 672 607 070 499 265 454 774 891 315 2;
  • 52) 0.282 311 907 179 260 866 300 996 893 625 388 881 488 948 260 663 216 593 827 832 672 607 070 499 265 454 774 891 315 2 × 2 = 0 + 0.564 623 814 358 521 732 601 993 787 250 777 762 977 896 521 326 433 187 655 665 345 214 140 998 530 909 549 782 630 4;
  • 53) 0.564 623 814 358 521 732 601 993 787 250 777 762 977 896 521 326 433 187 655 665 345 214 140 998 530 909 549 782 630 4 × 2 = 1 + 0.129 247 628 717 043 465 203 987 574 501 555 525 955 793 042 652 866 375 311 330 690 428 281 997 061 819 099 565 260 8;

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.414 213 562 373 095 048 801 688 724 209 698 078 569 671 875 376 948 073 176 679 737 990 732 478 462 107 038 850 392 4(10) =


0.0110 1010 0000 1001 1110 0110 0110 0111 1111 0011 1011 1100 1100 1(2)

5. Positive number before normalization:

1.414 213 562 373 095 048 801 688 724 209 698 078 569 671 875 376 948 073 176 679 737 990 732 478 462 107 038 850 392 4(10) =


1.0110 1010 0000 1001 1110 0110 0110 0111 1111 0011 1011 1100 1100 1(2)

6. Normalize the binary representation of the number.

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


1.414 213 562 373 095 048 801 688 724 209 698 078 569 671 875 376 948 073 176 679 737 990 732 478 462 107 038 850 392 4(10) =


1.0110 1010 0000 1001 1110 0110 0110 0111 1111 0011 1011 1100 1100 1(2) =


1.0110 1010 0000 1001 1110 0110 0110 0111 1111 0011 1011 1100 1100 1(2) × 20


7. Up to this moment, there are the following elements that would feed into the 64 bit double precision IEEE 754 binary floating point representation:

Sign 0 (a positive number)


Exponent (unadjusted): 0


Mantissa (not normalized):
1.0110 1010 0000 1001 1110 0110 0110 0111 1111 0011 1011 1100 1100 1


8. Adjust the exponent.

Use the 11 bit excess/bias notation:


Exponent (adjusted) =


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


0 + 2(11-1) - 1 =


(0 + 1 023)(10) =


1 023(10)


9. Convert the adjusted exponent from the decimal (base 10) to 11 bit binary.

Use the same technique of repeatedly dividing by 2:


  • division = quotient + remainder;
  • 1 023 ÷ 2 = 511 + 1;
  • 511 ÷ 2 = 255 + 1;
  • 255 ÷ 2 = 127 + 1;
  • 127 ÷ 2 = 63 + 1;
  • 63 ÷ 2 = 31 + 1;
  • 31 ÷ 2 = 15 + 1;
  • 15 ÷ 2 = 7 + 1;
  • 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) =


1023(10) =


011 1111 1111(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 52 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. 0110 1010 0000 1001 1110 0110 0110 0111 1111 0011 1011 1100 1100 1 =


0110 1010 0000 1001 1110 0110 0110 0111 1111 0011 1011 1100 1100


12. The three elements that make up the number's 64 bit double precision IEEE 754 binary floating point representation:

Sign (1 bit) =
0 (a positive number)


Exponent (11 bits) =
011 1111 1111


Mantissa (52 bits) =
0110 1010 0000 1001 1110 0110 0110 0111 1111 0011 1011 1100 1100


Decimal number 1.414 213 562 373 095 048 801 688 724 209 698 078 569 671 875 376 948 073 176 679 737 990 732 478 462 107 038 850 392 4 converted to 64 bit double precision IEEE 754 binary floating point representation:

0 - 011 1111 1111 - 0110 1010 0000 1001 1110 0110 0110 0111 1111 0011 1011 1100 1100

How to convert numbers from the decimal system (base ten) to 64 bit double precision IEEE 754 binary floating point standard

Follow the steps below to convert a base 10 decimal number to 64 bit double 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 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 from the previous 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 multiplying operations, starting from the top of the list constructed 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, shifting the decimal mark (the decimal point) "n" positions either to the left, or to the right, so that only one non zero digit remains to the left of the decimal mark.
  • 7. Adjust the exponent in 11 bit excess/bias notation and then convert it from decimal (base 10) to 11 bit binary, by using the same technique of repeatedly dividing by 2, as shown above:
    Exponent (adjusted) = Exponent (unadjusted) + 2(11-1) - 1
  • 8. Normalize mantissa, remove the leading (leftmost) bit, since it's allways '1' (and the decimal mark, if the case) and adjust its length to 52 bits, either by removing the excess bits from the right (losing precision...) or by adding extra bits set on '0' 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 -31.640 215 from the decimal system (base ten) to 64 bit double precision IEEE 754 binary floating point:

  • 1. Start with the positive version of the number:

    |-31.640 215| = 31.640 215

  • 2. First convert the integer part, 31. Divide it repeatedly by 2, keeping track of each remainder, until we get a quotient that is equal to zero:
    • division = quotient + remainder;
    • 31 ÷ 2 = 15 + 1;
    • 15 ÷ 2 = 7 + 1;
    • 7 ÷ 2 = 3 + 1;
    • 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:

    31(10) = 1 1111(2)

  • 4. Then, convert the fractional part, 0.640 215. 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.640 215 × 2 = 1 + 0.280 43;
    • 2) 0.280 43 × 2 = 0 + 0.560 86;
    • 3) 0.560 86 × 2 = 1 + 0.121 72;
    • 4) 0.121 72 × 2 = 0 + 0.243 44;
    • 5) 0.243 44 × 2 = 0 + 0.486 88;
    • 6) 0.486 88 × 2 = 0 + 0.973 76;
    • 7) 0.973 76 × 2 = 1 + 0.947 52;
    • 8) 0.947 52 × 2 = 1 + 0.895 04;
    • 9) 0.895 04 × 2 = 1 + 0.790 08;
    • 10) 0.790 08 × 2 = 1 + 0.580 16;
    • 11) 0.580 16 × 2 = 1 + 0.160 32;
    • 12) 0.160 32 × 2 = 0 + 0.320 64;
    • 13) 0.320 64 × 2 = 0 + 0.641 28;
    • 14) 0.641 28 × 2 = 1 + 0.282 56;
    • 15) 0.282 56 × 2 = 0 + 0.565 12;
    • 16) 0.565 12 × 2 = 1 + 0.130 24;
    • 17) 0.130 24 × 2 = 0 + 0.260 48;
    • 18) 0.260 48 × 2 = 0 + 0.520 96;
    • 19) 0.520 96 × 2 = 1 + 0.041 92;
    • 20) 0.041 92 × 2 = 0 + 0.083 84;
    • 21) 0.083 84 × 2 = 0 + 0.167 68;
    • 22) 0.167 68 × 2 = 0 + 0.335 36;
    • 23) 0.335 36 × 2 = 0 + 0.670 72;
    • 24) 0.670 72 × 2 = 1 + 0.341 44;
    • 25) 0.341 44 × 2 = 0 + 0.682 88;
    • 26) 0.682 88 × 2 = 1 + 0.365 76;
    • 27) 0.365 76 × 2 = 0 + 0.731 52;
    • 28) 0.731 52 × 2 = 1 + 0.463 04;
    • 29) 0.463 04 × 2 = 0 + 0.926 08;
    • 30) 0.926 08 × 2 = 1 + 0.852 16;
    • 31) 0.852 16 × 2 = 1 + 0.704 32;
    • 32) 0.704 32 × 2 = 1 + 0.408 64;
    • 33) 0.408 64 × 2 = 0 + 0.817 28;
    • 34) 0.817 28 × 2 = 1 + 0.634 56;
    • 35) 0.634 56 × 2 = 1 + 0.269 12;
    • 36) 0.269 12 × 2 = 0 + 0.538 24;
    • 37) 0.538 24 × 2 = 1 + 0.076 48;
    • 38) 0.076 48 × 2 = 0 + 0.152 96;
    • 39) 0.152 96 × 2 = 0 + 0.305 92;
    • 40) 0.305 92 × 2 = 0 + 0.611 84;
    • 41) 0.611 84 × 2 = 1 + 0.223 68;
    • 42) 0.223 68 × 2 = 0 + 0.447 36;
    • 43) 0.447 36 × 2 = 0 + 0.894 72;
    • 44) 0.894 72 × 2 = 1 + 0.789 44;
    • 45) 0.789 44 × 2 = 1 + 0.578 88;
    • 46) 0.578 88 × 2 = 1 + 0.157 76;
    • 47) 0.157 76 × 2 = 0 + 0.315 52;
    • 48) 0.315 52 × 2 = 0 + 0.631 04;
    • 49) 0.631 04 × 2 = 1 + 0.262 08;
    • 50) 0.262 08 × 2 = 0 + 0.524 16;
    • 51) 0.524 16 × 2 = 1 + 0.048 32;
    • 52) 0.048 32 × 2 = 0 + 0.096 64;
    • 53) 0.096 64 × 2 = 0 + 0.193 28;
    • We didn't get any fractional part that was equal to zero. But we had enough iterations (over Mantissa limit = 52) 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.640 215(10) = 0.1010 0011 1110 0101 0010 0001 0101 0111 0110 1000 1001 1100 1010 0(2)

  • 6. Summarizing - the positive number before normalization:

    31.640 215(10) = 1 1111.1010 0011 1110 0101 0010 0001 0101 0111 0110 1000 1001 1100 1010 0(2)

  • 7. Normalize the binary representation of the number, shifting the decimal mark 4 positions to the left so that only one non-zero digit stays to the left of the decimal mark:

    31.640 215(10) =
    1 1111.1010 0011 1110 0101 0010 0001 0101 0111 0110 1000 1001 1100 1010 0(2) =
    1 1111.1010 0011 1110 0101 0010 0001 0101 0111 0110 1000 1001 1100 1010 0(2) × 20 =
    1.1111 1010 0011 1110 0101 0010 0001 0101 0111 0110 1000 1001 1100 1010 0(2) × 24

  • 8. Up to this moment, there are the following elements that would feed into the 64 bit double precision IEEE 754 binary floating point representation:

    Sign: 1 (a negative number)

    Exponent (unadjusted): 4

    Mantissa (not-normalized): 1.1111 1010 0011 1110 0101 0010 0001 0101 0111 0110 1000 1001 1100 1010 0

  • 9. Adjust the exponent in 11 bit excess/bias notation and then convert it from decimal (base 10) to 11 bit binary (base 2), by using the same technique of repeatedly dividing it by 2, as shown above:

    Exponent (adjusted) = Exponent (unadjusted) + 2(11-1) - 1 = (4 + 1023)(10) = 1027(10) =
    100 0000 0011(2)

  • 10. Normalize mantissa, remove the leading (leftmost) bit, since it's allways '1' (and the decimal sign) and adjust its length to 52 bits, by removing the excess bits, from the right (losing precision...):

    Mantissa (not-normalized): 1.1111 1010 0011 1110 0101 0010 0001 0101 0111 0110 1000 1001 1100 1010 0

    Mantissa (normalized): 1111 1010 0011 1110 0101 0010 0001 0101 0111 0110 1000 1001 1100

  • Conclusion:

    Sign (1 bit) = 1 (a negative number)

    Exponent (8 bits) = 100 0000 0011

    Mantissa (52 bits) = 1111 1010 0011 1110 0101 0010 0001 0101 0111 0110 1000 1001 1100

  • Number -31.640 215, converted from decimal system (base 10) to 64 bit double precision IEEE 754 binary floating point =
    1 - 100 0000 0011 - 1111 1010 0011 1110 0101 0010 0001 0101 0111 0110 1000 1001 1100