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;
- 111 011 001 072 ÷ 2 = 55 505 500 536 + 0;
- 55 505 500 536 ÷ 2 = 27 752 750 268 + 0;
- 27 752 750 268 ÷ 2 = 13 876 375 134 + 0;
- 13 876 375 134 ÷ 2 = 6 938 187 567 + 0;
- 6 938 187 567 ÷ 2 = 3 469 093 783 + 1;
- 3 469 093 783 ÷ 2 = 1 734 546 891 + 1;
- 1 734 546 891 ÷ 2 = 867 273 445 + 1;
- 867 273 445 ÷ 2 = 433 636 722 + 1;
- 433 636 722 ÷ 2 = 216 818 361 + 0;
- 216 818 361 ÷ 2 = 108 409 180 + 1;
- 108 409 180 ÷ 2 = 54 204 590 + 0;
- 54 204 590 ÷ 2 = 27 102 295 + 0;
- 27 102 295 ÷ 2 = 13 551 147 + 1;
- 13 551 147 ÷ 2 = 6 775 573 + 1;
- 6 775 573 ÷ 2 = 3 387 786 + 1;
- 3 387 786 ÷ 2 = 1 693 893 + 0;
- 1 693 893 ÷ 2 = 846 946 + 1;
- 846 946 ÷ 2 = 423 473 + 0;
- 423 473 ÷ 2 = 211 736 + 1;
- 211 736 ÷ 2 = 105 868 + 0;
- 105 868 ÷ 2 = 52 934 + 0;
- 52 934 ÷ 2 = 26 467 + 0;
- 26 467 ÷ 2 = 13 233 + 1;
- 13 233 ÷ 2 = 6 616 + 1;
- 6 616 ÷ 2 = 3 308 + 0;
- 3 308 ÷ 2 = 1 654 + 0;
- 1 654 ÷ 2 = 827 + 0;
- 827 ÷ 2 = 413 + 1;
- 413 ÷ 2 = 206 + 1;
- 206 ÷ 2 = 103 + 0;
- 103 ÷ 2 = 51 + 1;
- 51 ÷ 2 = 25 + 1;
- 25 ÷ 2 = 12 + 1;
- 12 ÷ 2 = 6 + 0;
- 6 ÷ 2 = 3 + 0;
- 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.
111 011 001 072(10) = 1 1001 1101 1000 1100 0101 0111 0010 1111 0000(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 111 011 001 072(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: