The easiest way to look at hex is that every 2 hex 'digits', i.e. the hex value formated out for human reading, is a byte.
So 0x40 is one byte. Each of the digits is a 'nibble', or 4 bits. The second digit (0 here) is the low 4 bits (0 through 3), and the first digit is the high 4 bits (4 through 7).
So if you think of each formatted digit as a value from 0 to 15 (0 to 0xF in hex), it's easier to deal with. Get a little cheat sheet that shows the bits of the 16 possible combinations, and you can translate from the formatted hex digits to the bits that they represent.
0 = 0000
1 = 0001
2 = 0010
3 = 0011
4 = 0100
5 = 0101
6 = 0110
7 = 0111
8 = 1000
9 = 1001
A = 1010
B = 1011
C = 1100
D = 1101
E = 1110
F = 1111
So for 0x40, look up 4 and look up 0 and those are the bits that that value represents.