Optical algebraic processors can perform complex calculations in parallel and at high speeds. However, they commonly suffer from a low analog accuracy which hinders their widespread application. Error detection and correction codes provide one technique for improving the accuracy of optical algebraic processors. The use of these codes would allow some of the errors that may occur during a computation to be detected and possibly corrected. This paper describes the results of various computer simulations of optical matrix-vector multipliers employing error-correction codes. It discusses the application of convolutional codes to optical matrix-vector multipliers along with several block codes. Both binary and nonbinary codes are not employing error-correction codes. Also, the type of noise, whether signal-independent or signal-dependent, has a significant effect on the performance of a matrix-vector multiplier employing an error code. The encoding and decoding operations required for the error codes can be performed optically.