Why are 11, 111, 1111, ... equivalent to -1 in two's complement?
In an unsigned binary representation, only positive numbers can be represented,  and the weight of each bit including the most significant bit is a power of two.

So with a word size of 8 (byte),

00000000 =&gt; 0
01111111 =&gt; 127
10000000 =&gt; 128
11111111 =&gt; 255


Two's-complement, which is used for signed binary notation, encodes both positive and negative numbers in a binary number representation. The weight of each bit is a power of two, except for the most significant bit, whose weight is the negative of the corresponding power of two.

00000000 =&gt; 0
01111111 =&gt; 127
10000000 =&gt; -128    (in unsigned notation, this bit was 128, now its -128)
11111111 =&gt; -1


For a given word size N, all 1's in two's complement will represent -1.  So if the word size is only two bits, 11 is -1.  But if the word size is 8 bits (a byte), then 11 is simply 3 and 11111111 is -1.

The is because the two's complement of an n-bit number is defined as the complement with respect to 2\$^{N}\$; i.e., it is the result of subtracting the number from 2\$^{N}\$, which in binary is one followed by N zeroes.

So if N = 2 (first example), so 2\$^{2}\$=4,

 100
  -1
 011


truncating to two bits gives 11.  (-2 + 1 = -1)

For N = 8 (first example), so 2\$^{8}\$=256,

 100000000
        -1
 011111111


truncating to eight bits gives 11111111.   (-128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = -1)