Reading text is easy: MSDN
byte data = File.ReadAllBytes(path);
Converting to binary is easy: MSDN
string s = Convert.ToString(myByte, 2);
Put them together with a foreach loop and a StringBuilder and you have a program...
But, since this is your homework, I'm leaving the actual code to you!