How to swap the nibble bit positions of a number?
For example: 534, convert it into binary, the rightmost 4 bits has to be interchanged with the leftmost 4 bits and
Sean Anderson's bit twiddling guide has the following:
// swap nibbles ... v = ((v >> 4) & 0x0F0F0F0F) | ((v & 0x0F0F0F0F) << 4);
under the entry for Reverse an N-bit quantity in parallel in 5 * lg(N) operations.