Method and apparatus for modulo operation with a class of divisors
10162599 ยท 2018-12-25
Assignee
Inventors
Cpc classification
G06F7/38
PHYSICS
International classification
Abstract
In some applications, such as randomization and cryptography, remainder computation for a number is required. The remainder computation is also used in modulo arithmetic. The remainder computation can be simplified when the divisor belongs to a certain class of numbers. A method and apparatus are disclosed that enable low complexity implementation of remainder computation of any number when the divisor belongs to a type of numbers that can be represented as 2.sup.k+1.
Claims
1. A method for searching information of a communication signal received at a communication device from a wireless communication network for a predetermined message, in which the searching includes computation, based on the information of the communication signal, of a remainder of dividing a dividend by a divisor, and in which the divisor is equal to any of b.sup.k1, b and k are integers and b is not a power of another number, the method comprising: controlling, by a processing device, the searching, in which the searching includes: multiplying a first binary representation of a first value by a second binary representation of a second value, to obtain a product, in which the product is the dividend and a value of the product has a third binary representation of at most a predetermined number of bits; and subtracting a first sequence of bits of the third binary representation from a second sequence of bits of the third binary representation to obtain a difference, in which the first sequence includes consecutive first bits of the third binary representation decreasing in significance and beginning with a most significant bit of the third binary representation, in which the second sequence includes consecutive second bits of the third binary representation decreasing in significance and beginning with a bit of the third binary representation next less significant than a least significant bit of the first sequence of bits, and in which the first and second sequences of bits include a same number of bits, in which, when the difference is positive, the remainder is the difference, and when the difference is negative, the remainder is a sum of the difference and the divisor.
2. The method of claim 1, wherein the predetermined number is according to k.
3. The method of claim 1, wherein the first value is equal to 39,827, the second value is a non-zero value and the divisor is equal to 65,537.
4. The method of claim 1, wherein the divisor is b.sup.k+1 and k is even.
5. An apparatus for searching information of a communication signal received at a communication device from a wireless communication network for a predetermined message, in which the searching includes computation, based on the information of the communication signal, of a remainder of dividing a dividend by a divisor, and in which the divisor is equal to any of b.sup.k1, b and k are integers and b is not a power of another number, the apparatus comprising: circuitry configured to control the searching, in which the searching includes: multiplying a first binary representation of a first value by a second binary representation of a second value, to obtain a product, in which the product is the dividend and a value of the product has a third binary representation of at most a predetermined number of bits; and subtracting a first sequence of bits of the third binary representation from a second sequence of bits of the third binary representation to obtain a difference, in which the first sequence includes consecutive first bits of the third binary representation decreasing in significance and beginning with a most significant bit of the third binary representation, in which the second sequence includes consecutive second bits of the third binary representation decreasing in significance and beginning with a bit of the third binary representation next less significant than a least significant bit of the first sequence of bits, and in which the first and second sequences of bits include a same number of bits, in which, when the difference is positive, the remainder is the difference, and when the difference is negative, the remainder is a sum of the difference and the divisor.
6. The apparatus of claim 5, wherein the predetermined number is according to k.
7. The apparatus of claim 5, wherein the first value is equal to 39,827, the second value is a non-zero value and the divisor is equal to 65,537.
8. The apparatus of claim 5, wherein the divisor is b.sup.k+1 and k is even.
9. A wireless communication device comprising: a receiver to receive a communication signal obtained from a wireless communication network; a processing device configured to control searching information of the communication signal for a predetermined message, in which the searching includes computation, based on the information of the communication signal, of a remainder of dividing a dividend by a divisor, and in which the divisor is equal to any of b.sup.k1, b and k are integers and b is not a power of another number; and in which the searching includes: multiplying a first binary representation of a first value by a second binary representation of a second value, to obtain a product, in which the product is the dividend and a value of the product has a third binary representation of at most a predetermined number of bits; and subtracting a first sequence of bits of the third binary representation from a second sequence of bits of the third binary representation to obtain a difference, in which the first sequence includes consecutive first bits of the third binary representation decreasing in significance and beginning with a most significant bit of the third binary representation, in which the second sequence includes consecutive second bits of the third binary representation decreasing in significance and beginning with a bit of the third binary representation next less significant than a least significant bit of the first sequence of bits, and in which the first and second sequences of bits include a same number of bits, in which, when the difference is positive, the remainder is the difference, and when the difference is negative, the remainder is a sum of the difference and the divisor.
10. The device of claim 9, wherein the predetermined number is according to k.
11. The device of claim 9, wherein the first value is equal to 39,827, the second value is a non-zero value and the divisor is equal to 65,537.
12. The device of claim 9, wherein the divisor is b.sup.k+1 and k is even.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1)
(2)
(3)
(4)
(5)
(6)
DETAILED DESCRIPTION
(7) The foregoing aspects, features and advantages of the present invention will be further appreciated when considered with reference to the following description of exemplary embodiments and accompanying drawings, wherein like reference numerals represent like elements. In describing the exemplary embodiments of the invention illustrated in the appended drawings, specific terminology will be used for the sake of clarity. However, the invention is not intended to be limited to the specific terms used.
(8) Two methods and apparatus are described to efficiently compute the remainder of any number when the divisor is a class of Cunningham numbers. The first method is illustrated with an example where the dividend is m=173 and the divisor is n=5=2.sup.2+1. The computation of a remainder according to the aspects of the present invention is illustrated in the table contained
(9) For the 3GPP LTE specific remainder computation specified by EQ. 1, the computation of the remainder may be performed more efficiently as illustrated in
(10) Regardless of the product term that is obtained, it is then split into two parts: upper 16 bits (U16) and lower 16 bits (L16) as shown in
(11) 00011101010100111010101111100110
(12) The upper 16 bits (U16) are 0001110101010011 and the lower 16 bits (L16) are 1010101111100110. Therefore,
REM=L16U16=10101011111001100001110101010011
=440067507
=36499
Since this is a positive number, (492022758 mod 65537)=36499 is the final value of the remainder, i.e., FINAL_REM=REM.
As another example, suppose the product term (A*Y.sub.k-1)=3158323257. The binary representation of this number is:
(13) 10111100010000000011000000111001
(14) The upper 16 bits (U16) are 1011110001000000 and the lower 16 bits (L16) are 0011000000111001. Therefore,
REM=L16U16=00110000001110011011110001000000
=1234548192
=35847
(15) Since this is a negative number, value of D is added to the answer: 35847+D=29690 to obtain the final answer, i.e., FINAL_REM=REM+D. This is the same as the remainder obtained by direct computation, i.e., (3158323257 mod 65537)=29690.
(16) The methods disclosed according to aspects of this invention enable a reduced complexity implementation of remainder computation when the divisor belongs to a class of Cunningham numbers such that they are of the form b.sup.k+1 and where k is even. The disclosed method may reduce the hardware complexity and power consumption of the 3GPP LTE client terminals.
(17) By way of example only, the above described method may be implemented in a user device such as a wireless mobile station (MS).
(18) As shown in
(19) The application processor subsystem 101 as shown in
(20) In
(21) Aspects of the present invention may be implemented in firmware of the controller 108 of the application processor in
(22) The consumer electronics devices that may use the aspects of the invention may include smartphones, tablets, laptops, gaming consoles, cameras, video camcorders, TV, car entertainment systems, etc.
(23) Although aspects of the invention herein have been described with reference to particular embodiments, it is to be understood that these embodiments are merely illustrative of the principles and applications of the aspects of the present invention. It is therefore to be understood that numerous modifications may be made to the illustrative embodiments and that other arrangements may be devised without departing from the spirit and scope of the aspects of the present invention as defined by the appended claims. Aspects of each embodiment may be employed in the other embodiments described herein.