Design and implementation of error detection and correction system for semiconductor memory applications