Ahh, that makes sense. Powers of two are real convenient. Your math is a little wrong though: X != (X & 0xFF) + (X >> 8), but X = (X & 0xFF) + (X >> 8) << 8
The right half can be removed entirely if you’re doing modulo 16, since the first 4 bits will always be 0. So it simply becomes X & 15
! Much cleaner for sure.
… sorry, I don’t get it