Go back to Richel Bilderbeek's homepage.
Go back to Richel Bilderbeek's C++ page.
GetGrayCodes is a bit operation code snippet to generate the Gray code for 1 to and including 16 bits. It does so by flipping a single bit and checking if this number has been used already.
Related functions to GetGrayCodes are GrayToInt and IntToGray.
#include <iostream> |
Go back to Richel Bilderbeek's C++ page.
Go back to Richel Bilderbeek's homepage.