Fundamentals of Error-Correcting Codes