Hi,

Just to make things obvious, I am a student. I have been learning C given an assignment to code a program similar to that used on the Voyager 9 probe. It uses hadamard matrices to make sure that bits transmitted through space have redundancy and are not lost.

Each line of a n by n Hadamard matrix is different in n/2 ways from each other line. Here a small example.

\left| \begin{array}{ccc}1 & 1 & 1 & 1 \\1 & 0 & 1 & 0 \\1 & 1 & 0 & 0 \\1 & 0 & 0 & 1 \end{array} \right| `00`

would be sent as row 1, `01`

would be row 2, `10`

would be row 3 and `11`

would be row 4.

If you can be bothered reading (it is actually quite interesting for general knowledge), here is a better explaination:

http://www.cs.princeton.edu/courses/archive/spring03/cs126/assignments/mariner.html

So far I have have made the program structure and generated the hadamard matrix (a 2D matrix of ints). I am a little confused as to how I should be comparing the matrix to the number. I am working with 5 bit image files. A 1x1 white pixel would be 63 63 63 in represented in binary. How do I take the file pointer, read in binary mode, and convert it to somthing I can compare against each integer row of the matrix?

I have a feeling I should maybe make the matrix `unsigned long`

type, but I don't understand what unsigned actually does.

Also, the "advanced level implementation" asks for the program to work with *any* bit image file (i.e. a 16 bit image file). Apparently this can be done with bitwise operators, but I don't understand them very well either. I'm fairly experienced with other languages but this is my first C program so all the binary stuff is just *whoosh* over my head.

Sorry for the long explaination. I'm not looking for a complete answer (I have read the rules, and I do enjoy coding), I just would just like a little help please.