PURPOSE:To simplify a residue operation and to realize an arithmetic unit for a numerical value whose value of digits is large by a circuit of a small scale by calculating a positive or negative value obtained by adding or subtracting a multiple of a divisor to or from a value of a correct residue at the time of executing the residue operation. CONSTITUTION:A binary number expression of a multiplicand is inputted from an input terminal 101 by putting the upper digit to the head. When the multiplicands are all inputted, '0' is inputted to the terminal 101. Whenever data is inputted to the terminal 101, a multiplicant register 102 is shifted to the right, AND of every bit of the register 102 and a multiplier register 103 is taken by an AND circuit train 104, and the number of '1' which has appeared in the output of the circuit train 104 is counted by a counting circuit 105. Subsequently, the output of the circuit 105 and the contents of an operation result register 107 are added by an adder 106. Also, an output of the adder 106 is inputted to a correcting device 108 and a simplified residue operation is executed. In the end, the output of the correcting device 108 is held in the register 107. By repeating such operation 2n times, its result is obtained.
展开▼