1. Divide the number repeatedly by 2:
Keep track of each remainder.
Stop when you get a quotient that is equal to zero.
- division = quotient + remainder;
- 10 000 110 109 905 ÷ 2 = 5 000 055 054 952 + 1;
- 5 000 055 054 952 ÷ 2 = 2 500 027 527 476 + 0;
- 2 500 027 527 476 ÷ 2 = 1 250 013 763 738 + 0;
- 1 250 013 763 738 ÷ 2 = 625 006 881 869 + 0;
- 625 006 881 869 ÷ 2 = 312 503 440 934 + 1;
- 312 503 440 934 ÷ 2 = 156 251 720 467 + 0;
- 156 251 720 467 ÷ 2 = 78 125 860 233 + 1;
- 78 125 860 233 ÷ 2 = 39 062 930 116 + 1;
- 39 062 930 116 ÷ 2 = 19 531 465 058 + 0;
- 19 531 465 058 ÷ 2 = 9 765 732 529 + 0;
- 9 765 732 529 ÷ 2 = 4 882 866 264 + 1;
- 4 882 866 264 ÷ 2 = 2 441 433 132 + 0;
- 2 441 433 132 ÷ 2 = 1 220 716 566 + 0;
- 1 220 716 566 ÷ 2 = 610 358 283 + 0;
- 610 358 283 ÷ 2 = 305 179 141 + 1;
- 305 179 141 ÷ 2 = 152 589 570 + 1;
- 152 589 570 ÷ 2 = 76 294 785 + 0;
- 76 294 785 ÷ 2 = 38 147 392 + 1;
- 38 147 392 ÷ 2 = 19 073 696 + 0;
- 19 073 696 ÷ 2 = 9 536 848 + 0;
- 9 536 848 ÷ 2 = 4 768 424 + 0;
- 4 768 424 ÷ 2 = 2 384 212 + 0;
- 2 384 212 ÷ 2 = 1 192 106 + 0;
- 1 192 106 ÷ 2 = 596 053 + 0;
- 596 053 ÷ 2 = 298 026 + 1;
- 298 026 ÷ 2 = 149 013 + 0;
- 149 013 ÷ 2 = 74 506 + 1;
- 74 506 ÷ 2 = 37 253 + 0;
- 37 253 ÷ 2 = 18 626 + 1;
- 18 626 ÷ 2 = 9 313 + 0;
- 9 313 ÷ 2 = 4 656 + 1;
- 4 656 ÷ 2 = 2 328 + 0;
- 2 328 ÷ 2 = 1 164 + 0;
- 1 164 ÷ 2 = 582 + 0;
- 582 ÷ 2 = 291 + 0;
- 291 ÷ 2 = 145 + 1;
- 145 ÷ 2 = 72 + 1;
- 72 ÷ 2 = 36 + 0;
- 36 ÷ 2 = 18 + 0;
- 18 ÷ 2 = 9 + 0;
- 9 ÷ 2 = 4 + 1;
- 4 ÷ 2 = 2 + 0;
- 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.
10 000 110 109 905(10) = 1001 0001 1000 0101 0101 0000 0010 1100 0100 1101 0001(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.
Decimal Number 10 000 110 109 905(10) converted to signed binary in one's complement representation: