PURPOSE: To make the parity calculating result of parity attaching circuit that is treated as spare by redundancy constitution coincide with the parity calculating result of parity attaching circuit that is treated as existing with redundancy constitution by installing a matching circuit.
CONSTITUTION: Input data is inputted in both parity attaching circuit (A)2 and parity attaching circuit (B)3, the output from each of attaching circuit 2 and 3 is selected by selecting circuit 4 in accordance with selecting signal 5, and the result is output as output data 6. Here, when the selecting signal 5 is 'L', the output from attaching circuit (A) 2 is selected, and when the selecting signal 5 indicates 'H', the output from attaching circuit (B) 3 is selected. Accordingly, by sending the output from matching circuit 7 to attaching circuits A(2) and (B)3 in accordance with the selecting signal 5, the parity calculating results of parity attaching circuits are made to coincide with each other.