powered by
The function bin2gray converts a binary coded number to gray coded integer.
bin2gray(bin)
A binary coded number.
Returns the gray coded integer equivalent of the input number.
The bin2gray function works as a compliment of the gray2bin function.
gray2bin
# NOT RUN { bin = c(1,0,1,1) bin2gray(bin) # returns 1110 bin = c(1,0,1,0) bin2gray(bin) # returns 1111 # }
Run the code above in your browser using DataLab