17.482 655 336 176 638 487 993 942 026 571 965 443 278 296 913 022 492 399 407 155 894 220 541 333 154 175 027 354 250 96 Converted to 64 Bit Double Precision IEEE 754 Binary Floating Point Representation Standard

Convert decimal 17.482 655 336 176 638 487 993 942 026 571 965 443 278 296 913 022 492 399 407 155 894 220 541 333 154 175 027 354 250 96(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
17.482 655 336 176 638 487 993 942 026 571 965 443 278 296 913 022 492 399 407 155 894 220 541 333 154 175 027 354 250 96(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: 17.
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;
  • 17 ÷ 2 = 8 + 1;
  • 8 ÷ 2 = 4 + 0;
  • 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.

17(10) =


1 0001(2)


3. Convert to binary (base 2) the fractional part: 0.482 655 336 176 638 487 993 942 026 571 965 443 278 296 913 022 492 399 407 155 894 220 541 333 154 175 027 354 250 96.

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.482 655 336 176 638 487 993 942 026 571 965 443 278 296 913 022 492 399 407 155 894 220 541 333 154 175 027 354 250 96 × 2 = 0 + 0.965 310 672 353 276 975 987 884 053 143 930 886 556 593 826 044 984 798 814 311 788 441 082 666 308 350 054 708 501 92;
  • 2) 0.965 310 672 353 276 975 987 884 053 143 930 886 556 593 826 044 984 798 814 311 788 441 082 666 308 350 054 708 501 92 × 2 = 1 + 0.930 621 344 706 553 951 975 768 106 287 861 773 113 187 652 089 969 597 628 623 576 882 165 332 616 700 109 417 003 84;
  • 3) 0.930 621 344 706 553 951 975 768 106 287 861 773 113 187 652 089 969 597 628 623 576 882 165 332 616 700 109 417 003 84 × 2 = 1 + 0.861 242 689 413 107 903 951 536 212 575 723 546 226 375 304 179 939 195 257 247 153 764 330 665 233 400 218 834 007 68;
  • 4) 0.861 242 689 413 107 903 951 536 212 575 723 546 226 375 304 179 939 195 257 247 153 764 330 665 233 400 218 834 007 68 × 2 = 1 + 0.722 485 378 826 215 807 903 072 425 151 447 092 452 750 608 359 878 390 514 494 307 528 661 330 466 800 437 668 015 36;
  • 5) 0.722 485 378 826 215 807 903 072 425 151 447 092 452 750 608 359 878 390 514 494 307 528 661 330 466 800 437 668 015 36 × 2 = 1 + 0.444 970 757 652 431 615 806 144 850 302 894 184 905 501 216 719 756 781 028 988 615 057 322 660 933 600 875 336 030 72;
  • 6) 0.444 970 757 652 431 615 806 144 850 302 894 184 905 501 216 719 756 781 028 988 615 057 322 660 933 600 875 336 030 72 × 2 = 0 + 0.889 941 515 304 863 231 612 289 700 605 788 369 811 002 433 439 513 562 057 977 230 114 645 321 867 201 750 672 061 44;
  • 7) 0.889 941 515 304 863 231 612 289 700 605 788 369 811 002 433 439 513 562 057 977 230 114 645 321 867 201 750 672 061 44 × 2 = 1 + 0.779 883 030 609 726 463 224 579 401 211 576 739 622 004 866 879 027 124 115 954 460 229 290 643 734 403 501 344 122 88;
  • 8) 0.779 883 030 609 726 463 224 579 401 211 576 739 622 004 866 879 027 124 115 954 460 229 290 643 734 403 501 344 122 88 × 2 = 1 + 0.559 766 061 219 452 926 449 158 802 423 153 479 244 009 733 758 054 248 231 908 920 458 581 287 468 807 002 688 245 76;
  • 9) 0.559 766 061 219 452 926 449 158 802 423 153 479 244 009 733 758 054 248 231 908 920 458 581 287 468 807 002 688 245 76 × 2 = 1 + 0.119 532 122 438 905 852 898 317 604 846 306 958 488 019 467 516 108 496 463 817 840 917 162 574 937 614 005 376 491 52;
  • 10) 0.119 532 122 438 905 852 898 317 604 846 306 958 488 019 467 516 108 496 463 817 840 917 162 574 937 614 005 376 491 52 × 2 = 0 + 0.239 064 244 877 811 705 796 635 209 692 613 916 976 038 935 032 216 992 927 635 681 834 325 149 875 228 010 752 983 04;
  • 11) 0.239 064 244 877 811 705 796 635 209 692 613 916 976 038 935 032 216 992 927 635 681 834 325 149 875 228 010 752 983 04 × 2 = 0 + 0.478 128 489 755 623 411 593 270 419 385 227 833 952 077 870 064 433 985 855 271 363 668 650 299 750 456 021 505 966 08;
  • 12) 0.478 128 489 755 623 411 593 270 419 385 227 833 952 077 870 064 433 985 855 271 363 668 650 299 750 456 021 505 966 08 × 2 = 0 + 0.956 256 979 511 246 823 186 540 838 770 455 667 904 155 740 128 867 971 710 542 727 337 300 599 500 912 043 011 932 16;
  • 13) 0.956 256 979 511 246 823 186 540 838 770 455 667 904 155 740 128 867 971 710 542 727 337 300 599 500 912 043 011 932 16 × 2 = 1 + 0.912 513 959 022 493 646 373 081 677 540 911 335 808 311 480 257 735 943 421 085 454 674 601 199 001 824 086 023 864 32;
  • 14) 0.912 513 959 022 493 646 373 081 677 540 911 335 808 311 480 257 735 943 421 085 454 674 601 199 001 824 086 023 864 32 × 2 = 1 + 0.825 027 918 044 987 292 746 163 355 081 822 671 616 622 960 515 471 886 842 170 909 349 202 398 003 648 172 047 728 64;
  • 15) 0.825 027 918 044 987 292 746 163 355 081 822 671 616 622 960 515 471 886 842 170 909 349 202 398 003 648 172 047 728 64 × 2 = 1 + 0.650 055 836 089 974 585 492 326 710 163 645 343 233 245 921 030 943 773 684 341 818 698 404 796 007 296 344 095 457 28;
  • 16) 0.650 055 836 089 974 585 492 326 710 163 645 343 233 245 921 030 943 773 684 341 818 698 404 796 007 296 344 095 457 28 × 2 = 1 + 0.300 111 672 179 949 170 984 653 420 327 290 686 466 491 842 061 887 547 368 683 637 396 809 592 014 592 688 190 914 56;
  • 17) 0.300 111 672 179 949 170 984 653 420 327 290 686 466 491 842 061 887 547 368 683 637 396 809 592 014 592 688 190 914 56 × 2 = 0 + 0.600 223 344 359 898 341 969 306 840 654 581 372 932 983 684 123 775 094 737 367 274 793 619 184 029 185 376 381 829 12;
  • 18) 0.600 223 344 359 898 341 969 306 840 654 581 372 932 983 684 123 775 094 737 367 274 793 619 184 029 185 376 381 829 12 × 2 = 1 + 0.200 446 688 719 796 683 938 613 681 309 162 745 865 967 368 247 550 189 474 734 549 587 238 368 058 370 752 763 658 24;
  • 19) 0.200 446 688 719 796 683 938 613 681 309 162 745 865 967 368 247 550 189 474 734 549 587 238 368 058 370 752 763 658 24 × 2 = 0 + 0.400 893 377 439 593 367 877 227 362 618 325 491 731 934 736 495 100 378 949 469 099 174 476 736 116 741 505 527 316 48;
  • 20) 0.400 893 377 439 593 367 877 227 362 618 325 491 731 934 736 495 100 378 949 469 099 174 476 736 116 741 505 527 316 48 × 2 = 0 + 0.801 786 754 879 186 735 754 454 725 236 650 983 463 869 472 990 200 757 898 938 198 348 953 472 233 483 011 054 632 96;
  • 21) 0.801 786 754 879 186 735 754 454 725 236 650 983 463 869 472 990 200 757 898 938 198 348 953 472 233 483 011 054 632 96 × 2 = 1 + 0.603 573 509 758 373 471 508 909 450 473 301 966 927 738 945 980 401 515 797 876 396 697 906 944 466 966 022 109 265 92;
  • 22) 0.603 573 509 758 373 471 508 909 450 473 301 966 927 738 945 980 401 515 797 876 396 697 906 944 466 966 022 109 265 92 × 2 = 1 + 0.207 147 019 516 746 943 017 818 900 946 603 933 855 477 891 960 803 031 595 752 793 395 813 888 933 932 044 218 531 84;
  • 23) 0.207 147 019 516 746 943 017 818 900 946 603 933 855 477 891 960 803 031 595 752 793 395 813 888 933 932 044 218 531 84 × 2 = 0 + 0.414 294 039 033 493 886 035 637 801 893 207 867 710 955 783 921 606 063 191 505 586 791 627 777 867 864 088 437 063 68;
  • 24) 0.414 294 039 033 493 886 035 637 801 893 207 867 710 955 783 921 606 063 191 505 586 791 627 777 867 864 088 437 063 68 × 2 = 0 + 0.828 588 078 066 987 772 071 275 603 786 415 735 421 911 567 843 212 126 383 011 173 583 255 555 735 728 176 874 127 36;
  • 25) 0.828 588 078 066 987 772 071 275 603 786 415 735 421 911 567 843 212 126 383 011 173 583 255 555 735 728 176 874 127 36 × 2 = 1 + 0.657 176 156 133 975 544 142 551 207 572 831 470 843 823 135 686 424 252 766 022 347 166 511 111 471 456 353 748 254 72;
  • 26) 0.657 176 156 133 975 544 142 551 207 572 831 470 843 823 135 686 424 252 766 022 347 166 511 111 471 456 353 748 254 72 × 2 = 1 + 0.314 352 312 267 951 088 285 102 415 145 662 941 687 646 271 372 848 505 532 044 694 333 022 222 942 912 707 496 509 44;
  • 27) 0.314 352 312 267 951 088 285 102 415 145 662 941 687 646 271 372 848 505 532 044 694 333 022 222 942 912 707 496 509 44 × 2 = 0 + 0.628 704 624 535 902 176 570 204 830 291 325 883 375 292 542 745 697 011 064 089 388 666 044 445 885 825 414 993 018 88;
  • 28) 0.628 704 624 535 902 176 570 204 830 291 325 883 375 292 542 745 697 011 064 089 388 666 044 445 885 825 414 993 018 88 × 2 = 1 + 0.257 409 249 071 804 353 140 409 660 582 651 766 750 585 085 491 394 022 128 178 777 332 088 891 771 650 829 986 037 76;
  • 29) 0.257 409 249 071 804 353 140 409 660 582 651 766 750 585 085 491 394 022 128 178 777 332 088 891 771 650 829 986 037 76 × 2 = 0 + 0.514 818 498 143 608 706 280 819 321 165 303 533 501 170 170 982 788 044 256 357 554 664 177 783 543 301 659 972 075 52;
  • 30) 0.514 818 498 143 608 706 280 819 321 165 303 533 501 170 170 982 788 044 256 357 554 664 177 783 543 301 659 972 075 52 × 2 = 1 + 0.029 636 996 287 217 412 561 638 642 330 607 067 002 340 341 965 576 088 512 715 109 328 355 567 086 603 319 944 151 04;
  • 31) 0.029 636 996 287 217 412 561 638 642 330 607 067 002 340 341 965 576 088 512 715 109 328 355 567 086 603 319 944 151 04 × 2 = 0 + 0.059 273 992 574 434 825 123 277 284 661 214 134 004 680 683 931 152 177 025 430 218 656 711 134 173 206 639 888 302 08;
  • 32) 0.059 273 992 574 434 825 123 277 284 661 214 134 004 680 683 931 152 177 025 430 218 656 711 134 173 206 639 888 302 08 × 2 = 0 + 0.118 547 985 148 869 650 246 554 569 322 428 268 009 361 367 862 304 354 050 860 437 313 422 268 346 413 279 776 604 16;
  • 33) 0.118 547 985 148 869 650 246 554 569 322 428 268 009 361 367 862 304 354 050 860 437 313 422 268 346 413 279 776 604 16 × 2 = 0 + 0.237 095 970 297 739 300 493 109 138 644 856 536 018 722 735 724 608 708 101 720 874 626 844 536 692 826 559 553 208 32;
  • 34) 0.237 095 970 297 739 300 493 109 138 644 856 536 018 722 735 724 608 708 101 720 874 626 844 536 692 826 559 553 208 32 × 2 = 0 + 0.474 191 940 595 478 600 986 218 277 289 713 072 037 445 471 449 217 416 203 441 749 253 689 073 385 653 119 106 416 64;
  • 35) 0.474 191 940 595 478 600 986 218 277 289 713 072 037 445 471 449 217 416 203 441 749 253 689 073 385 653 119 106 416 64 × 2 = 0 + 0.948 383 881 190 957 201 972 436 554 579 426 144 074 890 942 898 434 832 406 883 498 507 378 146 771 306 238 212 833 28;
  • 36) 0.948 383 881 190 957 201 972 436 554 579 426 144 074 890 942 898 434 832 406 883 498 507 378 146 771 306 238 212 833 28 × 2 = 1 + 0.896 767 762 381 914 403 944 873 109 158 852 288 149 781 885 796 869 664 813 766 997 014 756 293 542 612 476 425 666 56;
  • 37) 0.896 767 762 381 914 403 944 873 109 158 852 288 149 781 885 796 869 664 813 766 997 014 756 293 542 612 476 425 666 56 × 2 = 1 + 0.793 535 524 763 828 807 889 746 218 317 704 576 299 563 771 593 739 329 627 533 994 029 512 587 085 224 952 851 333 12;
  • 38) 0.793 535 524 763 828 807 889 746 218 317 704 576 299 563 771 593 739 329 627 533 994 029 512 587 085 224 952 851 333 12 × 2 = 1 + 0.587 071 049 527 657 615 779 492 436 635 409 152 599 127 543 187 478 659 255 067 988 059 025 174 170 449 905 702 666 24;
  • 39) 0.587 071 049 527 657 615 779 492 436 635 409 152 599 127 543 187 478 659 255 067 988 059 025 174 170 449 905 702 666 24 × 2 = 1 + 0.174 142 099 055 315 231 558 984 873 270 818 305 198 255 086 374 957 318 510 135 976 118 050 348 340 899 811 405 332 48;
  • 40) 0.174 142 099 055 315 231 558 984 873 270 818 305 198 255 086 374 957 318 510 135 976 118 050 348 340 899 811 405 332 48 × 2 = 0 + 0.348 284 198 110 630 463 117 969 746 541 636 610 396 510 172 749 914 637 020 271 952 236 100 696 681 799 622 810 664 96;
  • 41) 0.348 284 198 110 630 463 117 969 746 541 636 610 396 510 172 749 914 637 020 271 952 236 100 696 681 799 622 810 664 96 × 2 = 0 + 0.696 568 396 221 260 926 235 939 493 083 273 220 793 020 345 499 829 274 040 543 904 472 201 393 363 599 245 621 329 92;
  • 42) 0.696 568 396 221 260 926 235 939 493 083 273 220 793 020 345 499 829 274 040 543 904 472 201 393 363 599 245 621 329 92 × 2 = 1 + 0.393 136 792 442 521 852 471 878 986 166 546 441 586 040 690 999 658 548 081 087 808 944 402 786 727 198 491 242 659 84;
  • 43) 0.393 136 792 442 521 852 471 878 986 166 546 441 586 040 690 999 658 548 081 087 808 944 402 786 727 198 491 242 659 84 × 2 = 0 + 0.786 273 584 885 043 704 943 757 972 333 092 883 172 081 381 999 317 096 162 175 617 888 805 573 454 396 982 485 319 68;
  • 44) 0.786 273 584 885 043 704 943 757 972 333 092 883 172 081 381 999 317 096 162 175 617 888 805 573 454 396 982 485 319 68 × 2 = 1 + 0.572 547 169 770 087 409 887 515 944 666 185 766 344 162 763 998 634 192 324 351 235 777 611 146 908 793 964 970 639 36;
  • 45) 0.572 547 169 770 087 409 887 515 944 666 185 766 344 162 763 998 634 192 324 351 235 777 611 146 908 793 964 970 639 36 × 2 = 1 + 0.145 094 339 540 174 819 775 031 889 332 371 532 688 325 527 997 268 384 648 702 471 555 222 293 817 587 929 941 278 72;
  • 46) 0.145 094 339 540 174 819 775 031 889 332 371 532 688 325 527 997 268 384 648 702 471 555 222 293 817 587 929 941 278 72 × 2 = 0 + 0.290 188 679 080 349 639 550 063 778 664 743 065 376 651 055 994 536 769 297 404 943 110 444 587 635 175 859 882 557 44;
  • 47) 0.290 188 679 080 349 639 550 063 778 664 743 065 376 651 055 994 536 769 297 404 943 110 444 587 635 175 859 882 557 44 × 2 = 0 + 0.580 377 358 160 699 279 100 127 557 329 486 130 753 302 111 989 073 538 594 809 886 220 889 175 270 351 719 765 114 88;
  • 48) 0.580 377 358 160 699 279 100 127 557 329 486 130 753 302 111 989 073 538 594 809 886 220 889 175 270 351 719 765 114 88 × 2 = 1 + 0.160 754 716 321 398 558 200 255 114 658 972 261 506 604 223 978 147 077 189 619 772 441 778 350 540 703 439 530 229 76;
  • 49) 0.160 754 716 321 398 558 200 255 114 658 972 261 506 604 223 978 147 077 189 619 772 441 778 350 540 703 439 530 229 76 × 2 = 0 + 0.321 509 432 642 797 116 400 510 229 317 944 523 013 208 447 956 294 154 379 239 544 883 556 701 081 406 879 060 459 52;
  • 50) 0.321 509 432 642 797 116 400 510 229 317 944 523 013 208 447 956 294 154 379 239 544 883 556 701 081 406 879 060 459 52 × 2 = 0 + 0.643 018 865 285 594 232 801 020 458 635 889 046 026 416 895 912 588 308 758 479 089 767 113 402 162 813 758 120 919 04;
  • 51) 0.643 018 865 285 594 232 801 020 458 635 889 046 026 416 895 912 588 308 758 479 089 767 113 402 162 813 758 120 919 04 × 2 = 1 + 0.286 037 730 571 188 465 602 040 917 271 778 092 052 833 791 825 176 617 516 958 179 534 226 804 325 627 516 241 838 08;
  • 52) 0.286 037 730 571 188 465 602 040 917 271 778 092 052 833 791 825 176 617 516 958 179 534 226 804 325 627 516 241 838 08 × 2 = 0 + 0.572 075 461 142 376 931 204 081 834 543 556 184 105 667 583 650 353 235 033 916 359 068 453 608 651 255 032 483 676 16;
  • 53) 0.572 075 461 142 376 931 204 081 834 543 556 184 105 667 583 650 353 235 033 916 359 068 453 608 651 255 032 483 676 16 × 2 = 1 + 0.144 150 922 284 753 862 408 163 669 087 112 368 211 335 167 300 706 470 067 832 718 136 907 217 302 510 064 967 352 32;

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.482 655 336 176 638 487 993 942 026 571 965 443 278 296 913 022 492 399 407 155 894 220 541 333 154 175 027 354 250 96(10) =


0.0111 1011 1000 1111 0100 1100 1101 0100 0001 1110 0101 1001 0010 1(2)

5. Positive number before normalization:

17.482 655 336 176 638 487 993 942 026 571 965 443 278 296 913 022 492 399 407 155 894 220 541 333 154 175 027 354 250 96(10) =


1 0001.0111 1011 1000 1111 0100 1100 1101 0100 0001 1110 0101 1001 0010 1(2)

6. Normalize the binary representation of the number.

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


17.482 655 336 176 638 487 993 942 026 571 965 443 278 296 913 022 492 399 407 155 894 220 541 333 154 175 027 354 250 96(10) =


1 0001.0111 1011 1000 1111 0100 1100 1101 0100 0001 1110 0101 1001 0010 1(2) =


1 0001.0111 1011 1000 1111 0100 1100 1101 0100 0001 1110 0101 1001 0010 1(2) × 20 =


1.0001 0111 1011 1000 1111 0100 1100 1101 0100 0001 1110 0101 1001 0010 1(2) × 24


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


Mantissa (not normalized):
1.0001 0111 1011 1000 1111 0100 1100 1101 0100 0001 1110 0101 1001 0010 1


8. Adjust the exponent.

Use the 11 bit excess/bias notation:


Exponent (adjusted) =


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


4 + 2(11-1) - 1 =


(4 + 1 023)(10) =


1 027(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 027 ÷ 2 = 513 + 1;
  • 513 ÷ 2 = 256 + 1;
  • 256 ÷ 2 = 128 + 0;
  • 128 ÷ 2 = 64 + 0;
  • 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) =


1027(10) =


100 0000 0011(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. 0001 0111 1011 1000 1111 0100 1100 1101 0100 0001 1110 0101 1001 0 0101 =


0001 0111 1011 1000 1111 0100 1100 1101 0100 0001 1110 0101 1001


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) =
100 0000 0011


Mantissa (52 bits) =
0001 0111 1011 1000 1111 0100 1100 1101 0100 0001 1110 0101 1001


Decimal number 17.482 655 336 176 638 487 993 942 026 571 965 443 278 296 913 022 492 399 407 155 894 220 541 333 154 175 027 354 250 96 converted to 64 bit double precision IEEE 754 binary floating point representation:

0 - 100 0000 0011 - 0001 0111 1011 1000 1111 0100 1100 1101 0100 0001 1110 0101 1001

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