bin hex ---- --- 0000 0 0001 1 0010 2 0011 3 0100 4 0101 5 0110 6 0111 7 1000 8 1001 9 1010 A (10) 1011 B (11) 1100 C (12) 1101 D (13) 1110 E (14) 1111 F (15) 11011000 = 1101 1000 = D 8 = 0xD8 (1 << 6) 00000001 (1) 01000000 (1 << 6) - the above shifted 6 places to the left = 0100 0000 = 4 0 = 0x40