1. Start with the positive version of the number:
|-85 084 069 090| = 85 084 069 090
2. 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;
- 85 084 069 090 ÷ 2 = 42 542 034 545 + 0;
- 42 542 034 545 ÷ 2 = 21 271 017 272 + 1;
- 21 271 017 272 ÷ 2 = 10 635 508 636 + 0;
- 10 635 508 636 ÷ 2 = 5 317 754 318 + 0;
- 5 317 754 318 ÷ 2 = 2 658 877 159 + 0;
- 2 658 877 159 ÷ 2 = 1 329 438 579 + 1;
- 1 329 438 579 ÷ 2 = 664 719 289 + 1;
- 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;
3. 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 090(10) = 1 0011 1100 1111 0110 0111 1101 1100 1110 0010(2)
4. 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.
5. 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.