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;
- 85 084 069 034 ÷ 2 = 42 542 034 517 + 0;
- 42 542 034 517 ÷ 2 = 21 271 017 258 + 1;
- 21 271 017 258 ÷ 2 = 10 635 508 629 + 0;
- 10 635 508 629 ÷ 2 = 5 317 754 314 + 1;
- 5 317 754 314 ÷ 2 = 2 658 877 157 + 0;
- 2 658 877 157 ÷ 2 = 1 329 438 578 + 1;
- 1 329 438 578 ÷ 2 = 664 719 289 + 0;
- 664 719 289 ÷ 2 = 332 359 644 + 1;
- 332 359 644 ÷ 2 = 166 179 822 + 0;
- 166 179 822 ÷ 2 = 83 089 911 + 0;
- 83 089 911 ÷ 2 = 41 544 955 + 1;
- 41 544 955 ÷ 2 = 20 772 477 + 1;
- 20 772 477 ÷ 2 = 10 386 238 + 1;
- 10 386 238 ÷ 2 = 5 193 119 + 0;
- 5 193 119 ÷ 2 = 2 596 559 + 1;
- 2 596 559 ÷ 2 = 1 298 279 + 1;
- 1 298 279 ÷ 2 = 649 139 + 1;
- 649 139 ÷ 2 = 324 569 + 1;
- 324 569 ÷ 2 = 162 284 + 1;
- 162 284 ÷ 2 = 81 142 + 0;
- 81 142 ÷ 2 = 40 571 + 0;
- 40 571 ÷ 2 = 20 285 + 1;
- 20 285 ÷ 2 = 10 142 + 1;
- 10 142 ÷ 2 = 5 071 + 0;
- 5 071 ÷ 2 = 2 535 + 1;
- 2 535 ÷ 2 = 1 267 + 1;
- 1 267 ÷ 2 = 633 + 1;
- 633 ÷ 2 = 316 + 1;
- 316 ÷ 2 = 158 + 0;
- 158 ÷ 2 = 79 + 0;
- 79 ÷ 2 = 39 + 1;
- 39 ÷ 2 = 19 + 1;
- 19 ÷ 2 = 9 + 1;
- 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.
85 084 069 034(10) = 1 0011 1100 1111 0110 0111 1101 1100 1010 1010(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 85 084 069 034(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:
85 084 069 034(10) = 0000 0000 0000 0000 0000 0000 0001 0011 1100 1111 0110 0111 1101 1100 1010 1010
Spaces were used to group digits: for binary, by 4, for decimal, by 3.