private int ControlDecode(byte b) { int itype = -1; int ipacekttype = b & 0xF0; switch (ipacekttype) { case 0x40: if ((b & 0x0F) != 0x0F) itype = 0x45; else itype = 0x4F; break; case 0x50: itype = 0x45; break; case 0x00: itype = 0x00; break; case 0x80: itype = 0x89; break; case 0x90: itype = 0x89; break; default: break; } return itype; } If b=51, ipacekttype=48( according to code execution) but theoratically when masking we should get 50 as answer can anyone explain me how (b & 0xF0) works here please?