No. What I was getting at is this (note, these numbers are not correct for your example, you have to modify them):
& with 0xF000 leaves the left 4 bits (0xF000 = 1111 0000 0000 0000) the way they are and clears the rest of them. The >> 12 moves everything to the right 12 places, so that you have numbers, from, say 0-8 instead of 8192-57344.Code:command = (number & 0xF000) >> 12;