Gray2Bin | R Documentation |
Map Gray code to binary.
Gray2Bin(x)
x |
Gray code (boolean vector). |
Start with the highest order bit, and
r[k-i]<- xor(n[k], n[k-1])
.
Binary code (boolean vector).
Gray, Frank (1953): Pulse Code Communication. US Patent 2 632 058.
Gray2Bin(c(1, 0, 0, 0))
Gray2Bin(c(1, 1, 1, 1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.