Should be pretty self-explanatory, provided you're familiar with binary.
Uh, yeah. I made this. xD Includes shifting and XOR.