Considering how esoteric some of the snippets are we’d love to know how the darkest corners found use. The page contains a variety of nifty tricks. Interview content like counting set bits makes an early appea
for relatively low cost, but even with their relative simplicity you still need to do some bit twiddling to light the diodes you need. [Dan]’s post talks about some strategies for making this easier like preconfigured lookup tables with convenient offsets and masking bits to control RGB LEDs...
or needs to work with registers directly to make the machine dance. Usually these operations are confined to the typical shifting and masking but sometimes a problem calls for more exotic solutions. If you need to descend down these dark depths you invariably come across the classicBit Twiddling...