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 111 000 831 713 984 348 ÷ 2 = 555 500 415 856 992 174 + 0;
- 555 500 415 856 992 174 ÷ 2 = 277 750 207 928 496 087 + 0;
- 277 750 207 928 496 087 ÷ 2 = 138 875 103 964 248 043 + 1;
- 138 875 103 964 248 043 ÷ 2 = 69 437 551 982 124 021 + 1;
- 69 437 551 982 124 021 ÷ 2 = 34 718 775 991 062 010 + 1;
- 34 718 775 991 062 010 ÷ 2 = 17 359 387 995 531 005 + 0;
- 17 359 387 995 531 005 ÷ 2 = 8 679 693 997 765 502 + 1;
- 8 679 693 997 765 502 ÷ 2 = 4 339 846 998 882 751 + 0;
- 4 339 846 998 882 751 ÷ 2 = 2 169 923 499 441 375 + 1;
- 2 169 923 499 441 375 ÷ 2 = 1 084 961 749 720 687 + 1;
- 1 084 961 749 720 687 ÷ 2 = 542 480 874 860 343 + 1;
- 542 480 874 860 343 ÷ 2 = 271 240 437 430 171 + 1;
- 271 240 437 430 171 ÷ 2 = 135 620 218 715 085 + 1;
- 135 620 218 715 085 ÷ 2 = 67 810 109 357 542 + 1;
- 67 810 109 357 542 ÷ 2 = 33 905 054 678 771 + 0;
- 33 905 054 678 771 ÷ 2 = 16 952 527 339 385 + 1;
- 16 952 527 339 385 ÷ 2 = 8 476 263 669 692 + 1;
- 8 476 263 669 692 ÷ 2 = 4 238 131 834 846 + 0;
- 4 238 131 834 846 ÷ 2 = 2 119 065 917 423 + 0;
- 2 119 065 917 423 ÷ 2 = 1 059 532 958 711 + 1;
- 1 059 532 958 711 ÷ 2 = 529 766 479 355 + 1;
- 529 766 479 355 ÷ 2 = 264 883 239 677 + 1;
- 264 883 239 677 ÷ 2 = 132 441 619 838 + 1;
- 132 441 619 838 ÷ 2 = 66 220 809 919 + 0;
- 66 220 809 919 ÷ 2 = 33 110 404 959 + 1;
- 33 110 404 959 ÷ 2 = 16 555 202 479 + 1;
- 16 555 202 479 ÷ 2 = 8 277 601 239 + 1;
- 8 277 601 239 ÷ 2 = 4 138 800 619 + 1;
- 4 138 800 619 ÷ 2 = 2 069 400 309 + 1;
- 2 069 400 309 ÷ 2 = 1 034 700 154 + 1;
- 1 034 700 154 ÷ 2 = 517 350 077 + 0;
- 517 350 077 ÷ 2 = 258 675 038 + 1;
- 258 675 038 ÷ 2 = 129 337 519 + 0;
- 129 337 519 ÷ 2 = 64 668 759 + 1;
- 64 668 759 ÷ 2 = 32 334 379 + 1;
- 32 334 379 ÷ 2 = 16 167 189 + 1;
- 16 167 189 ÷ 2 = 8 083 594 + 1;
- 8 083 594 ÷ 2 = 4 041 797 + 0;
- 4 041 797 ÷ 2 = 2 020 898 + 1;
- 2 020 898 ÷ 2 = 1 010 449 + 0;
- 1 010 449 ÷ 2 = 505 224 + 1;
- 505 224 ÷ 2 = 252 612 + 0;
- 252 612 ÷ 2 = 126 306 + 0;
- 126 306 ÷ 2 = 63 153 + 0;
- 63 153 ÷ 2 = 31 576 + 1;
- 31 576 ÷ 2 = 15 788 + 0;
- 15 788 ÷ 2 = 7 894 + 0;
- 7 894 ÷ 2 = 3 947 + 0;
- 3 947 ÷ 2 = 1 973 + 1;
- 1 973 ÷ 2 = 986 + 1;
- 986 ÷ 2 = 493 + 0;
- 493 ÷ 2 = 246 + 1;
- 246 ÷ 2 = 123 + 0;
- 123 ÷ 2 = 61 + 1;
- 61 ÷ 2 = 30 + 1;
- 30 ÷ 2 = 15 + 0;
- 15 ÷ 2 = 7 + 1;
- 7 ÷ 2 = 3 + 1;
- 3 ÷ 2 = 1 + 1;
- 1 ÷ 2 = 0 + 1;
2. Construct the base 2 representation of the positive number:
Take all the remainders starting from the bottom of the list constructed above.
1 111 000 831 713 984 348(10) = 1111 0110 1011 0001 0001 0101 1110 1011 1111 0111 1001 1011 1111 0101 1100(2)
3. Determine the signed binary number bit length:
The base 2 number's actual length, in bits: 60.
- A signed binary's bit length must be equal to a power of 2, as of:
- 21 = 2; 22 = 4; 23 = 8; 24 = 16; 25 = 32; 26 = 64; ...
- The first bit (the leftmost) indicates the sign:
- 0 = positive integer number, 1 = negative integer number
The least number that is:
1) a power of 2
2) and is larger than the actual length, 60,
3) so that the first bit (leftmost) could be zero
(we deal with a positive number at this moment)
=== is: 64.
4. Get the positive binary computer representation on 64 bits (8 Bytes):
If needed, add extra 0s in front (to the left) of the base 2 number, up to the required length, 64.
Decimal Number 1 111 000 831 713 984 348(10) converted to signed binary in two's complement representation:
Spaces were used to group digits: for binary, by 4, for decimal, by 3.