A byte is made up of 8 bits and the highest value of a byte is 255, which would mean every bit is set.
Now:
| 1 Byte ( 8 bits ) | ||||||||||
| Place Value | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 | ||
|
0
|
0
|
0
|
1
|
0
|
1
|
1
|
0
|
=
|
22
|
|
Lets take it right to left and add up all those values together:
128 0 + 64 0 + 32 0 + 16 1 + 8 0 + 4 1 + 2 1 + 1 0 = 22