BPalhano / NumericalMethods

My repository to study more of C++.
0 stars 0 forks source link

Binary to gray and gray to binary encoding #2

Open tfmaciel opened 1 year ago

tfmaciel commented 1 year ago

In communications, symbols are usually mapped to gray encoded binary representations to ensure that only a single bit changes from a word to another. Gray encoding can be implemented using binary xor operations on the bits of the binary representation. Could you implement a pair gray encoding and decoding functions (bin2gray and gray2bin)?

BPalhano commented 1 year ago

Good afternoon, I liked the suggestion professor, thank you. I can try to implement the suggestion. Do you have any directions on how I can do this coding?