I'm on pset 4 recover and stuck, trying to understand the bitwise operator, if (buffer & 0xf0) == 0xe0) Can someone tell me if my understanding is correct? The if condition checks the value at buffer value, and then uses the bitwise operator to compare the bitmask (0xf0) and then checks if the result is 0xe0.
1111 0000 (0xf0)
1110 0000 (0xe0)
1110 0000 (0xe00)
This is the math, I understand this, but I don't see how this if condition checks all the possible values for the fourth byte in the jpg 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, of 0xef