1. A matched filter for calculating a correlation value between an input data sequence of a specified length and a code sequence of a specified length, comprising: a circuit calculating an exclusive-OR of two input data; a circuit calculating an exclusive-OR of two codes corresponding to the two input data, respectively; and a correlation calculating means that, using the exclusive-OR of the two input data, one of the two input data, the exclusive-OR of the two codes, and the code corresponding to one of the two input data, calculates a correlation value of the two input data and the two codes.