I need some help with these instructions, thanks!
Write a function called binary2Gray that takes an unsigned character and returns an unsigned character that is equal to the "reflected" Gray code equivalent of the input character. To convert to Gray code, each bit of the result is equal to an exclusive-OR of that bit position with the bit position to the left of the original number. Assume a leading zero is in front of the original number, so the MSB (most significant bit) of the result is the same as the MSB of the original. Note: if B_i and G_i are the i-th bits of the binary and Gray code values, respectively, then G_i = B_i ^ B_i+1.