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;
- 110 001 110 102 ÷ 2 = 55 000 555 051 + 0;
- 55 000 555 051 ÷ 2 = 27 500 277 525 + 1;
- 27 500 277 525 ÷ 2 = 13 750 138 762 + 1;
- 13 750 138 762 ÷ 2 = 6 875 069 381 + 0;
- 6 875 069 381 ÷ 2 = 3 437 534 690 + 1;
- 3 437 534 690 ÷ 2 = 1 718 767 345 + 0;
- 1 718 767 345 ÷ 2 = 859 383 672 + 1;
- 859 383 672 ÷ 2 = 429 691 836 + 0;
- 429 691 836 ÷ 2 = 214 845 918 + 0;
- 214 845 918 ÷ 2 = 107 422 959 + 0;
- 107 422 959 ÷ 2 = 53 711 479 + 1;
- 53 711 479 ÷ 2 = 26 855 739 + 1;
- 26 855 739 ÷ 2 = 13 427 869 + 1;
- 13 427 869 ÷ 2 = 6 713 934 + 1;
- 6 713 934 ÷ 2 = 3 356 967 + 0;
- 3 356 967 ÷ 2 = 1 678 483 + 1;
- 1 678 483 ÷ 2 = 839 241 + 1;
- 839 241 ÷ 2 = 419 620 + 1;
- 419 620 ÷ 2 = 209 810 + 0;
- 209 810 ÷ 2 = 104 905 + 0;
- 104 905 ÷ 2 = 52 452 + 1;
- 52 452 ÷ 2 = 26 226 + 0;
- 26 226 ÷ 2 = 13 113 + 0;
- 13 113 ÷ 2 = 6 556 + 1;
- 6 556 ÷ 2 = 3 278 + 0;
- 3 278 ÷ 2 = 1 639 + 0;
- 1 639 ÷ 2 = 819 + 1;
- 819 ÷ 2 = 409 + 1;
- 409 ÷ 2 = 204 + 1;
- 204 ÷ 2 = 102 + 0;
- 102 ÷ 2 = 51 + 0;
- 51 ÷ 2 = 25 + 1;
- 25 ÷ 2 = 12 + 1;
- 12 ÷ 2 = 6 + 0;
- 6 ÷ 2 = 3 + 0;
- 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.
110 001 110 102(10) = 1 1001 1001 1100 1001 0011 1011 1100 0101 0110(2)
3. Determine the signed binary number bit length:
The base 2 number's actual length, in bits: 37.
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, 37,
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 110 001 110 102(10), a signed integer number (with sign), converted from decimal system (from base 10) and written as a signed binary in two's complement representation:
110 001 110 102(10) = 0000 0000 0000 0000 0000 0000 0001 1001 1001 1100 1001 0011 1011 1100 0101 0110
Spaces were used to group digits: for binary, by 4, for decimal, by 3.