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 111 100 205 ÷ 2 = 55 055 550 102 + 1;
- 55 055 550 102 ÷ 2 = 27 527 775 051 + 0;
- 27 527 775 051 ÷ 2 = 13 763 887 525 + 1;
- 13 763 887 525 ÷ 2 = 6 881 943 762 + 1;
- 6 881 943 762 ÷ 2 = 3 440 971 881 + 0;
- 3 440 971 881 ÷ 2 = 1 720 485 940 + 1;
- 1 720 485 940 ÷ 2 = 860 242 970 + 0;
- 860 242 970 ÷ 2 = 430 121 485 + 0;
- 430 121 485 ÷ 2 = 215 060 742 + 1;
- 215 060 742 ÷ 2 = 107 530 371 + 0;
- 107 530 371 ÷ 2 = 53 765 185 + 1;
- 53 765 185 ÷ 2 = 26 882 592 + 1;
- 26 882 592 ÷ 2 = 13 441 296 + 0;
- 13 441 296 ÷ 2 = 6 720 648 + 0;
- 6 720 648 ÷ 2 = 3 360 324 + 0;
- 3 360 324 ÷ 2 = 1 680 162 + 0;
- 1 680 162 ÷ 2 = 840 081 + 0;
- 840 081 ÷ 2 = 420 040 + 1;
- 420 040 ÷ 2 = 210 020 + 0;
- 210 020 ÷ 2 = 105 010 + 0;
- 105 010 ÷ 2 = 52 505 + 0;
- 52 505 ÷ 2 = 26 252 + 1;
- 26 252 ÷ 2 = 13 126 + 0;
- 13 126 ÷ 2 = 6 563 + 0;
- 6 563 ÷ 2 = 3 281 + 1;
- 3 281 ÷ 2 = 1 640 + 1;
- 1 640 ÷ 2 = 820 + 0;
- 820 ÷ 2 = 410 + 0;
- 410 ÷ 2 = 205 + 0;
- 205 ÷ 2 = 102 + 1;
- 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 111 100 205(10) = 1 1001 1010 0011 0010 0010 0000 1101 0010 1101(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 111 100 205(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:
110 111 100 205(10) = 0000 0000 0000 0000 0000 0000 0001 1001 1010 0011 0010 0010 0000 1101 0010 1101
Spaces were used to group digits: for binary, by 4, for decimal, by 3.