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;
- 1 101 101 011 101 076 ÷ 2 = 550 550 505 550 538 + 0;
- 550 550 505 550 538 ÷ 2 = 275 275 252 775 269 + 0;
- 275 275 252 775 269 ÷ 2 = 137 637 626 387 634 + 1;
- 137 637 626 387 634 ÷ 2 = 68 818 813 193 817 + 0;
- 68 818 813 193 817 ÷ 2 = 34 409 406 596 908 + 1;
- 34 409 406 596 908 ÷ 2 = 17 204 703 298 454 + 0;
- 17 204 703 298 454 ÷ 2 = 8 602 351 649 227 + 0;
- 8 602 351 649 227 ÷ 2 = 4 301 175 824 613 + 1;
- 4 301 175 824 613 ÷ 2 = 2 150 587 912 306 + 1;
- 2 150 587 912 306 ÷ 2 = 1 075 293 956 153 + 0;
- 1 075 293 956 153 ÷ 2 = 537 646 978 076 + 1;
- 537 646 978 076 ÷ 2 = 268 823 489 038 + 0;
- 268 823 489 038 ÷ 2 = 134 411 744 519 + 0;
- 134 411 744 519 ÷ 2 = 67 205 872 259 + 1;
- 67 205 872 259 ÷ 2 = 33 602 936 129 + 1;
- 33 602 936 129 ÷ 2 = 16 801 468 064 + 1;
- 16 801 468 064 ÷ 2 = 8 400 734 032 + 0;
- 8 400 734 032 ÷ 2 = 4 200 367 016 + 0;
- 4 200 367 016 ÷ 2 = 2 100 183 508 + 0;
- 2 100 183 508 ÷ 2 = 1 050 091 754 + 0;
- 1 050 091 754 ÷ 2 = 525 045 877 + 0;
- 525 045 877 ÷ 2 = 262 522 938 + 1;
- 262 522 938 ÷ 2 = 131 261 469 + 0;
- 131 261 469 ÷ 2 = 65 630 734 + 1;
- 65 630 734 ÷ 2 = 32 815 367 + 0;
- 32 815 367 ÷ 2 = 16 407 683 + 1;
- 16 407 683 ÷ 2 = 8 203 841 + 1;
- 8 203 841 ÷ 2 = 4 101 920 + 1;
- 4 101 920 ÷ 2 = 2 050 960 + 0;
- 2 050 960 ÷ 2 = 1 025 480 + 0;
- 1 025 480 ÷ 2 = 512 740 + 0;
- 512 740 ÷ 2 = 256 370 + 0;
- 256 370 ÷ 2 = 128 185 + 0;
- 128 185 ÷ 2 = 64 092 + 1;
- 64 092 ÷ 2 = 32 046 + 0;
- 32 046 ÷ 2 = 16 023 + 0;
- 16 023 ÷ 2 = 8 011 + 1;
- 8 011 ÷ 2 = 4 005 + 1;
- 4 005 ÷ 2 = 2 002 + 1;
- 2 002 ÷ 2 = 1 001 + 0;
- 1 001 ÷ 2 = 500 + 1;
- 500 ÷ 2 = 250 + 0;
- 250 ÷ 2 = 125 + 0;
- 125 ÷ 2 = 62 + 1;
- 62 ÷ 2 = 31 + 0;
- 31 ÷ 2 = 15 + 1;
- 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.
1 101 101 011 101 076(10) = 11 1110 1001 0111 0010 0000 1110 1010 0000 1110 0101 1001 0100(2)
3. Determine the signed binary number bit length:
The base 2 number's actual length, in bits: 50.
- 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, 50,
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 1 101 101 011 101 076(10) converted to signed binary in two's complement representation:
Spaces were used to group digits: for binary, by 4, for decimal, by 3.