Designing Energy-Efficient Systems By Exploiting Error-Correction Codes