"Unsigned" means that the integer has no negative sign, it's either zero or a positive number. With four bits we can represent 16 different numbers, from 0 to 15.
When using bits, the amount of numbers we can represent is always a power of two since a bit has two states, zero or one. The formula to calculate how many numbers you can represent with a given amount of bits is ${2}^{\mathrm{nr\; of\; bits\; available}}$.
2^{1} = 2 ← One bit lets us express two different numbers.
2^{2} = 4
2^{3} = 8
2^{4} = 16
2^{5} = 32
2^{6} = 64
2^{7} = 128
2^{8} = 256 ← Eight bits are a byte. If that byte is an unsigned integer, it can represent the numbers from 0 to 255.
2^{16} = 65,536
2^{32} = 4,294,967,296 ← Java uses 32 bits for integers, the data type is called int. But they are signed to allow for negative numbers. To represent numbers below zero, Java uses two's complement (see below).
2^{64} = 18,446,744,073,709,551,616 ← Java uses 64 bits for the data type long. 64 bits allow for 18 quintillion (18 x 10^{18}) numbers.
Signed Integers with Sign Bit
bits
decimal
0
0
0
0
=
0

4
2
1
Signed Integers with Ones' Complement
bits
decimal
0
0
0
0
=
0
7
4
2
1
1
1
1
1
← All ones

0
0
0
0
← Number to negate (0)
—
—
—
—
1
1
1
1
← Ones' complement (0)
To negate a number using ones' complement, we flip all the bits. Flipping bits is equivalent to subtracting them from a binary number consisting of all ones: 1111
Signed Integers with Two's Complement
bits
decimal
0
0
0
0
=
0
8
4
2
1
1
0
0
0
0
← Power of two: ${2}^{4}$ (16)

0
0
0
0
← Number to negate (0)
—
—
—
—
—
1
0
0
0
0
← Two's complement (0)
To negate a number using two's complement, we flip all the bits and add one. This is equivalent to subtracting it from a power of two: ${2}^{4}$, which is: 1 0000