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;
- 410 075 007 400 671 ÷ 2 = 205 037 503 700 335 + 1;
- 205 037 503 700 335 ÷ 2 = 102 518 751 850 167 + 1;
- 102 518 751 850 167 ÷ 2 = 51 259 375 925 083 + 1;
- 51 259 375 925 083 ÷ 2 = 25 629 687 962 541 + 1;
- 25 629 687 962 541 ÷ 2 = 12 814 843 981 270 + 1;
- 12 814 843 981 270 ÷ 2 = 6 407 421 990 635 + 0;
- 6 407 421 990 635 ÷ 2 = 3 203 710 995 317 + 1;
- 3 203 710 995 317 ÷ 2 = 1 601 855 497 658 + 1;
- 1 601 855 497 658 ÷ 2 = 800 927 748 829 + 0;
- 800 927 748 829 ÷ 2 = 400 463 874 414 + 1;
- 400 463 874 414 ÷ 2 = 200 231 937 207 + 0;
- 200 231 937 207 ÷ 2 = 100 115 968 603 + 1;
- 100 115 968 603 ÷ 2 = 50 057 984 301 + 1;
- 50 057 984 301 ÷ 2 = 25 028 992 150 + 1;
- 25 028 992 150 ÷ 2 = 12 514 496 075 + 0;
- 12 514 496 075 ÷ 2 = 6 257 248 037 + 1;
- 6 257 248 037 ÷ 2 = 3 128 624 018 + 1;
- 3 128 624 018 ÷ 2 = 1 564 312 009 + 0;
- 1 564 312 009 ÷ 2 = 782 156 004 + 1;
- 782 156 004 ÷ 2 = 391 078 002 + 0;
- 391 078 002 ÷ 2 = 195 539 001 + 0;
- 195 539 001 ÷ 2 = 97 769 500 + 1;
- 97 769 500 ÷ 2 = 48 884 750 + 0;
- 48 884 750 ÷ 2 = 24 442 375 + 0;
- 24 442 375 ÷ 2 = 12 221 187 + 1;
- 12 221 187 ÷ 2 = 6 110 593 + 1;
- 6 110 593 ÷ 2 = 3 055 296 + 1;
- 3 055 296 ÷ 2 = 1 527 648 + 0;
- 1 527 648 ÷ 2 = 763 824 + 0;
- 763 824 ÷ 2 = 381 912 + 0;
- 381 912 ÷ 2 = 190 956 + 0;
- 190 956 ÷ 2 = 95 478 + 0;
- 95 478 ÷ 2 = 47 739 + 0;
- 47 739 ÷ 2 = 23 869 + 1;
- 23 869 ÷ 2 = 11 934 + 1;
- 11 934 ÷ 2 = 5 967 + 0;
- 5 967 ÷ 2 = 2 983 + 1;
- 2 983 ÷ 2 = 1 491 + 1;
- 1 491 ÷ 2 = 745 + 1;
- 745 ÷ 2 = 372 + 1;
- 372 ÷ 2 = 186 + 0;
- 186 ÷ 2 = 93 + 0;
- 93 ÷ 2 = 46 + 1;
- 46 ÷ 2 = 23 + 0;
- 23 ÷ 2 = 11 + 1;
- 11 ÷ 2 = 5 + 1;
- 5 ÷ 2 = 2 + 1;
- 2 ÷ 2 = 1 + 0;
- 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.
410 075 007 400 671(10) = 1 0111 0100 1111 0110 0000 0111 0010 0101 1011 1010 1101 1111(2)
3. Determine the signed binary number bit length:
The base 2 number's actual length, in bits: 49.
- 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, 49,
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 410 075 007 400 671(10) converted to signed binary in two's complement representation:
Spaces were used to group digits: for binary, by 4, for decimal, by 3.