While working on this year’s advent of code, I was reminded of gray code, something I hadn’t thought about for a few years. Gray code is a cool invention with some interesting uses. From Wikipedia: The reflected binary code (RBC), also known just as reflected binary (RB) or Gray code after Frank Gray, is an ordering of the binary numeral system such that two successive values differ in only one bit (binary digit).