3 ms·
Great write-up on the thought process of solving this problem. Bit tricks like these are one of the reasons I love working on a few microcontroller projects ea
by Construct 16y ago
Great write-up on the thought process of solving this problem.
Bit tricks like these are one of the reasons I love working on a few microcontroller projects each year. It's too easy to get lazy and sloppy when you have multiple GB of RAM and multi-GHz CPUs at your disposal. Coding for a microcontroller with 2KB of flash and 128 bytes of RAM forces you to carefully evaluate the architecture of your code and find the most efficient way of solving your problems. From my experience, that tight-code thought process tends to stick with me when I return to bigger projects in higher-level languages.