Convert -7 541 871 867 692 107 003 to a Signed Binary (Base 2)

How to convert -7 541 871 867 692 107 003(10), a signed base 10 integer number? How to write it as a signed binary code in base 2

What are the required steps to convert base 10 integer
number -7 541 871 867 692 107 003 to signed binary code (in base 2)?

  • A signed integer, written in base ten, or a decimal system number, is a number written using the digits 0 through 9 and the sign, which can be positive (+) or negative (-). If positive, the sign is usually not written. A number written in base two, or binary, is a number written using only the digits 0 and 1.

1. Start with the positive version of the number:

|-7 541 871 867 692 107 003| = 7 541 871 867 692 107 003

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;
  • 7 541 871 867 692 107 003 ÷ 2 = 3 770 935 933 846 053 501 + 1;
  • 3 770 935 933 846 053 501 ÷ 2 = 1 885 467 966 923 026 750 + 1;
  • 1 885 467 966 923 026 750 ÷ 2 = 942 733 983 461 513 375 + 0;
  • 942 733 983 461 513 375 ÷ 2 = 471 366 991 730 756 687 + 1;
  • 471 366 991 730 756 687 ÷ 2 = 235 683 495 865 378 343 + 1;
  • 235 683 495 865 378 343 ÷ 2 = 117 841 747 932 689 171 + 1;
  • 117 841 747 932 689 171 ÷ 2 = 58 920 873 966 344 585 + 1;
  • 58 920 873 966 344 585 ÷ 2 = 29 460 436 983 172 292 + 1;
  • 29 460 436 983 172 292 ÷ 2 = 14 730 218 491 586 146 + 0;
  • 14 730 218 491 586 146 ÷ 2 = 7 365 109 245 793 073 + 0;
  • 7 365 109 245 793 073 ÷ 2 = 3 682 554 622 896 536 + 1;
  • 3 682 554 622 896 536 ÷ 2 = 1 841 277 311 448 268 + 0;
  • 1 841 277 311 448 268 ÷ 2 = 920 638 655 724 134 + 0;
  • 920 638 655 724 134 ÷ 2 = 460 319 327 862 067 + 0;
  • 460 319 327 862 067 ÷ 2 = 230 159 663 931 033 + 1;
  • 230 159 663 931 033 ÷ 2 = 115 079 831 965 516 + 1;
  • 115 079 831 965 516 ÷ 2 = 57 539 915 982 758 + 0;
  • 57 539 915 982 758 ÷ 2 = 28 769 957 991 379 + 0;
  • 28 769 957 991 379 ÷ 2 = 14 384 978 995 689 + 1;
  • 14 384 978 995 689 ÷ 2 = 7 192 489 497 844 + 1;
  • 7 192 489 497 844 ÷ 2 = 3 596 244 748 922 + 0;
  • 3 596 244 748 922 ÷ 2 = 1 798 122 374 461 + 0;
  • 1 798 122 374 461 ÷ 2 = 899 061 187 230 + 1;
  • 899 061 187 230 ÷ 2 = 449 530 593 615 + 0;
  • 449 530 593 615 ÷ 2 = 224 765 296 807 + 1;
  • 224 765 296 807 ÷ 2 = 112 382 648 403 + 1;
  • 112 382 648 403 ÷ 2 = 56 191 324 201 + 1;
  • 56 191 324 201 ÷ 2 = 28 095 662 100 + 1;
  • 28 095 662 100 ÷ 2 = 14 047 831 050 + 0;
  • 14 047 831 050 ÷ 2 = 7 023 915 525 + 0;
  • 7 023 915 525 ÷ 2 = 3 511 957 762 + 1;
  • 3 511 957 762 ÷ 2 = 1 755 978 881 + 0;
  • 1 755 978 881 ÷ 2 = 877 989 440 + 1;
  • 877 989 440 ÷ 2 = 438 994 720 + 0;
  • 438 994 720 ÷ 2 = 219 497 360 + 0;
  • 219 497 360 ÷ 2 = 109 748 680 + 0;
  • 109 748 680 ÷ 2 = 54 874 340 + 0;
  • 54 874 340 ÷ 2 = 27 437 170 + 0;
  • 27 437 170 ÷ 2 = 13 718 585 + 0;
  • 13 718 585 ÷ 2 = 6 859 292 + 1;
  • 6 859 292 ÷ 2 = 3 429 646 + 0;
  • 3 429 646 ÷ 2 = 1 714 823 + 0;
  • 1 714 823 ÷ 2 = 857 411 + 1;
  • 857 411 ÷ 2 = 428 705 + 1;
  • 428 705 ÷ 2 = 214 352 + 1;
  • 214 352 ÷ 2 = 107 176 + 0;
  • 107 176 ÷ 2 = 53 588 + 0;
  • 53 588 ÷ 2 = 26 794 + 0;
  • 26 794 ÷ 2 = 13 397 + 0;
  • 13 397 ÷ 2 = 6 698 + 1;
  • 6 698 ÷ 2 = 3 349 + 0;
  • 3 349 ÷ 2 = 1 674 + 1;
  • 1 674 ÷ 2 = 837 + 0;
  • 837 ÷ 2 = 418 + 1;
  • 418 ÷ 2 = 209 + 0;
  • 209 ÷ 2 = 104 + 1;
  • 104 ÷ 2 = 52 + 0;
  • 52 ÷ 2 = 26 + 0;
  • 26 ÷ 2 = 13 + 0;
  • 13 ÷ 2 = 6 + 1;
  • 6 ÷ 2 = 3 + 0;
  • 3 ÷ 2 = 1 + 1;
  • 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.

7 541 871 867 692 107 003(10) = 110 1000 1010 1010 0001 1100 1000 0001 0100 1111 0100 1100 1100 0100 1111 1011(2)


4. Determine the signed binary number bit length:

  • The base 2 number's actual length, in bits: 63.

  • 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) is reserved for 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, 63,

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:


7 541 871 867 692 107 003(10) = 0110 1000 1010 1010 0001 1100 1000 0001 0100 1111 0100 1100 1100 0100 1111 1011

6. Get the negative integer number representation:

To get the negative integer number representation on 64 bits (8 Bytes),


... change the first bit (the leftmost), from 0 to 1...


-7 541 871 867 692 107 003(10) Base 10 integer number converted and written as a signed binary code (in base 2):

-7 541 871 867 692 107 003(10) = 1110 1000 1010 1010 0001 1100 1000 0001 0100 1111 0100 1100 1100 0100 1111 1011

Spaces were used to group digits: for binary, by 4, for decimal, by 3.


How to convert signed base 10 integers in decimal to binary code system

Follow the steps below to convert a signed base ten integer number to signed binary:

  • 1. In a signed binary, first bit (the leftmost) is reserved for sign: 0 = positive integer number, 1 = positive integer number. If the number to be converted is negative, start with its positive version.
  • 2. Divide repeatedly by 2 the positive integer number keeping track of each remainder. STOP when we get a quotient that is ZERO.
  • 3. Construct the base 2 representation of the positive number, by taking all the remainders starting from the bottom of the list constructed above. Thus, the last remainder of the divisions becomes the first symbol (the leftmost) of the base two number, while the first remainder becomes the last symbol (the rightmost).
  • 4. Binary numbers represented in computer language have a length of 4, 8, 16, 32, 64, ... bits (power of 2) - if needed, fill in extra '0' bits in front of the base 2 number (to the left), up to the right length; this way the first bit (the leftmost one) is always '0', as for a positive representation.
  • 5. To get the negative reprezentation of the number, simply switch the first bit (the leftmost one), from '0' to '1'.

Example: convert the negative number -63 from decimal system (base ten) to signed binary code system:

  • 1. Start with the positive version of the number: |-63| = 63;
  • 2. Divide repeatedly 63 by 2, keeping track of each remainder, until we get a quotient that is equal to zero:
    • division = quotient + remainder
    • 63 ÷ 2 = 31 + 1
    • 31 ÷ 2 = 15 + 1
    • 15 ÷ 2 = 7 + 1
    • 7 ÷ 2 = 3 + 1
    • 3 ÷ 2 = 1 + 1
    • 1 ÷ 2 = 0 + 1
  • 3. Construct the base 2 representation of the positive number, by taking all the remainders starting from the bottom of the list constructed above:
    63(10) = 11 1111(2)
  • 4. The actual length of base 2 representation number is 6, so the positive binary computer representation length of the signed binary will take in this case 8 bits (the least power of 2 higher than 6) - add extra '0's in front (to the left), up to the required length; this way the first bit (the leftmost one) is to be '0', as for a positive number:
    63(10) = 0011 1111(2)
  • 5. To get the negative integer number representation simply change the first bit (the leftmost), from '0' to '1':
    -63(10) = 1011 1111
  • Number -63(10), signed integer, converted from decimal system (base 10) to signed binary = 1011 1111