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;
- 65 053 679 434 ÷ 2 = 32 526 839 717 + 0;
- 32 526 839 717 ÷ 2 = 16 263 419 858 + 1;
- 16 263 419 858 ÷ 2 = 8 131 709 929 + 0;
- 8 131 709 929 ÷ 2 = 4 065 854 964 + 1;
- 4 065 854 964 ÷ 2 = 2 032 927 482 + 0;
- 2 032 927 482 ÷ 2 = 1 016 463 741 + 0;
- 1 016 463 741 ÷ 2 = 508 231 870 + 1;
- 508 231 870 ÷ 2 = 254 115 935 + 0;
- 254 115 935 ÷ 2 = 127 057 967 + 1;
- 127 057 967 ÷ 2 = 63 528 983 + 1;
- 63 528 983 ÷ 2 = 31 764 491 + 1;
- 31 764 491 ÷ 2 = 15 882 245 + 1;
- 15 882 245 ÷ 2 = 7 941 122 + 1;
- 7 941 122 ÷ 2 = 3 970 561 + 0;
- 3 970 561 ÷ 2 = 1 985 280 + 1;
- 1 985 280 ÷ 2 = 992 640 + 0;
- 992 640 ÷ 2 = 496 320 + 0;
- 496 320 ÷ 2 = 248 160 + 0;
- 248 160 ÷ 2 = 124 080 + 0;
- 124 080 ÷ 2 = 62 040 + 0;
- 62 040 ÷ 2 = 31 020 + 0;
- 31 020 ÷ 2 = 15 510 + 0;
- 15 510 ÷ 2 = 7 755 + 0;
- 7 755 ÷ 2 = 3 877 + 1;
- 3 877 ÷ 2 = 1 938 + 1;
- 1 938 ÷ 2 = 969 + 0;
- 969 ÷ 2 = 484 + 1;
- 484 ÷ 2 = 242 + 0;
- 242 ÷ 2 = 121 + 0;
- 121 ÷ 2 = 60 + 1;
- 60 ÷ 2 = 30 + 0;
- 30 ÷ 2 = 15 + 0;
- 15 ÷ 2 = 7 + 1;
- 7 ÷ 2 = 3 + 1;
- 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.
65 053 679 434(10) = 1111 0010 0101 1000 0000 0101 1111 0100 1010(2)
3. Determine the signed binary number bit length:
The base 2 number's actual length, in bits: 36.
- 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, 36,
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 65 053 679 434(10) converted to signed binary in two's complement representation:
Spaces were used to group digits: for binary, by 4, for decimal, by 3.