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;
- 379 999 999 910 ÷ 2 = 189 999 999 955 + 0;
- 189 999 999 955 ÷ 2 = 94 999 999 977 + 1;
- 94 999 999 977 ÷ 2 = 47 499 999 988 + 1;
- 47 499 999 988 ÷ 2 = 23 749 999 994 + 0;
- 23 749 999 994 ÷ 2 = 11 874 999 997 + 0;
- 11 874 999 997 ÷ 2 = 5 937 499 998 + 1;
- 5 937 499 998 ÷ 2 = 2 968 749 999 + 0;
- 2 968 749 999 ÷ 2 = 1 484 374 999 + 1;
- 1 484 374 999 ÷ 2 = 742 187 499 + 1;
- 742 187 499 ÷ 2 = 371 093 749 + 1;
- 371 093 749 ÷ 2 = 185 546 874 + 1;
- 185 546 874 ÷ 2 = 92 773 437 + 0;
- 92 773 437 ÷ 2 = 46 386 718 + 1;
- 46 386 718 ÷ 2 = 23 193 359 + 0;
- 23 193 359 ÷ 2 = 11 596 679 + 1;
- 11 596 679 ÷ 2 = 5 798 339 + 1;
- 5 798 339 ÷ 2 = 2 899 169 + 1;
- 2 899 169 ÷ 2 = 1 449 584 + 1;
- 1 449 584 ÷ 2 = 724 792 + 0;
- 724 792 ÷ 2 = 362 396 + 0;
- 362 396 ÷ 2 = 181 198 + 0;
- 181 198 ÷ 2 = 90 599 + 0;
- 90 599 ÷ 2 = 45 299 + 1;
- 45 299 ÷ 2 = 22 649 + 1;
- 22 649 ÷ 2 = 11 324 + 1;
- 11 324 ÷ 2 = 5 662 + 0;
- 5 662 ÷ 2 = 2 831 + 0;
- 2 831 ÷ 2 = 1 415 + 1;
- 1 415 ÷ 2 = 707 + 1;
- 707 ÷ 2 = 353 + 1;
- 353 ÷ 2 = 176 + 1;
- 176 ÷ 2 = 88 + 0;
- 88 ÷ 2 = 44 + 0;
- 44 ÷ 2 = 22 + 0;
- 22 ÷ 2 = 11 + 0;
- 11 ÷ 2 = 5 + 1;
- 5 ÷ 2 = 2 + 1;
- 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.
379 999 999 910(10) = 101 1000 0111 1001 1100 0011 1101 0111 1010 0110(2)
3. Determine the signed binary number bit length:
The base 2 number's actual length, in bits: 39.
- 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, 39,
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 379 999 999 910(10) converted to signed binary in one's complement representation: