This allows to detect errors , and in certain cases , to correct them as well .
By contrast , the simple parity code can not correct errors , and can only detect an odd number of errors .