34 return binary ^ (binary >> 1U);
45 return binary ^ (binary >> 1U);
56 std::uint32_t binary = gray_code;
57 binary ^= binary >> 1U;
58 binary ^= binary >> 2U;
59 binary ^= binary >> 4U;
60 binary ^= binary >> 8U;
61 binary ^= binary >> 16U;
73 std::uint64_t binary = gray_code;
74 binary ^= binary >> 1U;
75 binary ^= binary >> 2U;
76 binary ^= binary >> 4U;
77 binary ^= binary >> 8U;
78 binary ^= binary >> 16U;
79 binary ^= binary >> 32U;
constexpr auto gray_code_to_binary(std::uint32_t gray_code) -> std::uint32_t
Convert an integer from Gray code to binary warren2013.
constexpr auto binary_to_gray_code(std::uint32_t binary) -> std::uint32_t
Convert an integer from binary to Gray code warren2013.