Method and apparatus for arithmetic operation and recording medium of method of operation
AssigneeMitsubishi Denki Kabushiki Kaisha
InventorMitsuru Matsui
Life of this patent
Estimating the term…
Abstract
An integer Z101 is divided by an integer I102 to obtain a remainder R109. The integer I102 includes a polynomial of power of a basic operational unit of a computer. In this way, the integer I for divisor is limited based on the basic operational unit of the computer, thus a shift operation, which is required for a conventional operation method, can be eliminated. The remainder can be calculated by only addition and subtraction. Accordingly, a code size becomes compact and the remainder of the integer can be calculated at a high speed.
Claims9
An operation apparatus for calculating, at a bit level, a remainder R of data Z which is divided by a prime number P comprising;
- a judging unit for determining if the prime number P is equal to a predetermined divisor I;
- and
- an addition/subtraction unit that calculates the remainder R in accordance with data provided by the divisor I, upon the determination that prime number P is equal to I, where I is given over a range of bit values in which addition and subtraction is performed by borrowing and carrying operations for each bit value over said range;
- wherein remainder R is obtained from the results of the addition/subtraction calculation.
An operation method for calculating at a bit level a remainder R of data Z which is divided by a prime number P comprising the steps of:
- determining by a judging unit if the prime number P is equal to a predetermined divisor I;
- and
- calculating, using an addition/subtraction unit, the remainder R in accordance with data provided by the divisor I, upon the determination that prime number P is equal to I, where I is given over a range of bit value in which addition and subtraction is performed by borrowing and carrying operations for each bit value over said range;
- wherein remainder R is obtained from the results of the addition/subtraction calculation.
A computer readable recording medium having a computer readable program stored therein or causing a computer to perform an operation process using an operation apparatus for calculating, at a bit level, a remainder R of data Z which is divided by a prime number P, wherein the operation process comprises:
- a judging process for determining if the prime number P is equal to a predetermined divisor I;
- and
- an addition/subtraction process for calculating the remainder R in accordance with data provided by the divisor I, upon the determination that prime number P is equal to I, where I is given over a range of bit values in which addition and subtraction is performed by borrowing and carrying operations for each bit value over said range;
- wherein remainder R is obtained from the results of the addition/subtraction calculation.
Dependencies are inferred from the claim text.