Prefer bit masking to right shifts.

Remove copy-paste characters.
Create struct `Tester`.

Convert to const char and static functions.
Clarify logic in switch on number_of_bytes.