Bit-twiddling... I used to have quite a bit of fun with things like this in assembly language. The need doesn't arise very often these days, especially in the later versions of the Java language where many twiddling primitives have been added.
StenoRam 3), shown at right. This was a battery-powered device, and back then there was really only one choice if you wanted a low-power microprocessor: the RCA 1802. This chip's claim to fame wasn't processing power :) The 22 key switches on that thing were read on input bits, and they needed to be debounced and decoded in firmware. Any combination of keystrokes was potentially valid, which added to the complexity. The firmware that did this work involved a lot of bit-twiddling, and because the processor was so slow, the performance was critical. I remember spending days agonizing over four or five lines of code, trying to squeeze a few cycles here and there. Lots of challenging, puzzle-solving fun!