The reflected binary code (RBC), also known as Gray code after Frank Gray, is a binary numeral system where two successive values differ in only one bit (binary digit). The reflected binary code was originally designed to prevent spurious output from electromechanical switches. Today, Gray codes are widely used to facilitate error correction in digital communications such as digital terrestrial television and some cable TV systems.
Abbas Manthiri S (2019). Gray code for all base numbers (https://www.mathworks.com/matlabcentral/fileexchange/62403-gray-code-for-all-base-numbers), MATLAB Central File Exchange. Retrieved .