Introduced here is a technique to detect and / or correct errors in computation. The ability to correct errors in computation can increase the speed of the processor, reduce the
power consumption of the processor, and reduce the distance between the transistors within the processor because the errors thus generated can be detected and corrected. In one embodiment, an
error correcting module, running either in
software or in hardware, can detect an error in
matrix multiplication, by calculating an expected sum of all elements in the resulting matrix, and an actual sum of all elements in the resulting matrix. When there is a difference between the expected sum and the resulting sum, the
error correcting module detects an error. In another embodiment, in addition to detecting the error, the
error correcting module can determine the location and the magnitude of the error, thus correcting the erroneous computation.