by Tom Pydeski (16 Submissions)
Category: Math/Dates
Compatability: VB Script
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (3 Votes)
Example to convert Decimal to Binary Reflected Gray Code.
I did some poking around and found some info, but could not find any examples in visual basic. I took the C examples and converted them to VB.
I only tried it up to a byte leve(255)
Can probably easily be changed to convert integers and larger, but for my purpose, 255 was enough.
Inputs
Enter either a decimal or gray code
Assumes
see above
Code Returns
the converted gray code or decimal value