Ok I've got most of the code written now im just down to the last part...I obviously don't want or expect any code written for me I just need a little push into the right direction. After I have opened a file which I have done I need to read the sequence of bytes from the binary file and then decompose each byte into 2 gray coded 4 bit numbers..then it goes on to decode them into hexadecimal values and then display them. I have these 2 lines of code to include into this function but I'm a bit stuck on how to read the file and change it into the 2 gray coded bit numbers.
Code:
/* define the decoding table */
unsigned char decodingTable[16] = { 0, 1, 3, 2, 7, 6, 4, 5, 0xF, 0xE, 0xC, 0xD, 8, 9, 0xB, 0xA };
/* get a decoded value from the position equal its Gray code */
hexValue = decodingTable[ grayCode ];
Any help would be great.
Thanks