Introduction
Recently I came over this old school xor swap trick. It’s a trick that impressed me when I was a young coder and one of my friends first showed it to me. As I’ve grown older and with more understanding of computer architecture I use this trick as an example of how more complex solution does not really imply better. And in the fact of the XOR swap trick it is one of the things that makes you feel good over a tricky implementation, but will hurt performance at the end of the day.
Now, there were a lot of specific problems related to the actual version of the e-ink screen that I got, but this post in particular is not going to focus on those. They might be covered in a future post if I get around to it. For now, this post is only going to cover dithering, and more specifically Floyd-Steinberg and algorithms derived from those.