Binary Numbers

Binary numbers are a way of representing numbers using only two digits: 0 and 1. Each digit in a binary number is called a bit, and the value of each bit is determined by its position in the number. The rightmost bit represents 2^0 (1), the next bit to the left represents 2^1 (2), then 2^2 (4), and so on.

The easiest way to convert a binary number to a number, is starting at the right-most value, and then moving to the left. So from right to left on a 8-bit binary number 00000000, the values are 1, 2, 4, 8, 16, 32, 64, and 128.

0

0

0

0

0

0

0

0

128

64

32

16

8

4

2

1

0*1280
0*640
0*320
0*160
0*80
0*40
0*20
0*10
0

Because of that, given an 8-bit binary number, the maximum value of it can only ever be 255.

This is because given a binary number that's 11111111, this is how it's structured:

1

1

1

1

1

1

1

1

128

64

32

16

8

4

2

1

1*128128
1*6464
1*3232
1*1616
1*88
1*44
1*22
1*11
255