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;
- 11 001 100 110 103 ÷ 2 = 5 500 550 055 051 + 1;
- 5 500 550 055 051 ÷ 2 = 2 750 275 027 525 + 1;
- 2 750 275 027 525 ÷ 2 = 1 375 137 513 762 + 1;
- 1 375 137 513 762 ÷ 2 = 687 568 756 881 + 0;
- 687 568 756 881 ÷ 2 = 343 784 378 440 + 1;
- 343 784 378 440 ÷ 2 = 171 892 189 220 + 0;
- 171 892 189 220 ÷ 2 = 85 946 094 610 + 0;
- 85 946 094 610 ÷ 2 = 42 973 047 305 + 0;
- 42 973 047 305 ÷ 2 = 21 486 523 652 + 1;
- 21 486 523 652 ÷ 2 = 10 743 261 826 + 0;
- 10 743 261 826 ÷ 2 = 5 371 630 913 + 0;
- 5 371 630 913 ÷ 2 = 2 685 815 456 + 1;
- 2 685 815 456 ÷ 2 = 1 342 907 728 + 0;
- 1 342 907 728 ÷ 2 = 671 453 864 + 0;
- 671 453 864 ÷ 2 = 335 726 932 + 0;
- 335 726 932 ÷ 2 = 167 863 466 + 0;
- 167 863 466 ÷ 2 = 83 931 733 + 0;
- 83 931 733 ÷ 2 = 41 965 866 + 1;
- 41 965 866 ÷ 2 = 20 982 933 + 0;
- 20 982 933 ÷ 2 = 10 491 466 + 1;
- 10 491 466 ÷ 2 = 5 245 733 + 0;
- 5 245 733 ÷ 2 = 2 622 866 + 1;
- 2 622 866 ÷ 2 = 1 311 433 + 0;
- 1 311 433 ÷ 2 = 655 716 + 1;
- 655 716 ÷ 2 = 327 858 + 0;
- 327 858 ÷ 2 = 163 929 + 0;
- 163 929 ÷ 2 = 81 964 + 1;
- 81 964 ÷ 2 = 40 982 + 0;
- 40 982 ÷ 2 = 20 491 + 0;
- 20 491 ÷ 2 = 10 245 + 1;
- 10 245 ÷ 2 = 5 122 + 1;
- 5 122 ÷ 2 = 2 561 + 0;
- 2 561 ÷ 2 = 1 280 + 1;
- 1 280 ÷ 2 = 640 + 0;
- 640 ÷ 2 = 320 + 0;
- 320 ÷ 2 = 160 + 0;
- 160 ÷ 2 = 80 + 0;
- 80 ÷ 2 = 40 + 0;
- 40 ÷ 2 = 20 + 0;
- 20 ÷ 2 = 10 + 0;
- 10 ÷ 2 = 5 + 0;
- 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.
11 001 100 110 103(10) = 1010 0000 0001 0110 0100 1010 1010 0000 1001 0001 0111(2)
3. Determine the signed binary number bit length:
The base 2 number's actual length, in bits: 44.
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, 44,
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.
Number 11 001 100 110 103(10), a signed integer number (with sign), converted from decimal system (from base 10) and written as a signed binary in one's complement representation:
11 001 100 110 103(10) = 0000 0000 0000 0000 0000 1010 0000 0001 0110 0100 1010 1010 0000 1001 0001 0111
Spaces were used to group digits: for binary, by 4, for decimal, by 3.