I have a byte[] array of 4 bytes. Also there are a corresponding 4 byte bitmasks in form of hex values (like 0x02000000) and I need to verify those masks against my byte[] array. While I'm perfectly understand how should I do it on paper with bitwise operations I not sure how to proceed in C# code. Should I separate each byte in mask and verify it against corresponding byte in the array or is there a better way to do it?