RussianPatents.com
|
Method of exact division of integer binary numbers, starting from least significant bit. RU patent 2498393. |
||||||||||||||||||||
IPC classes for russian patent Method of exact division of integer binary numbers, starting from least significant bit. RU patent 2498393. (RU 2498393):
|
FIELD: information technologies. SUBSTANCE: method includes stages, at which a divisor is recorded in parallel into matrix cells on memory elements, the first bit of the quotient becomes equal to the sum of module two of the least significant bit in the first column of the matrix and the first bit of the dividend, other bits of the quotient become equal to zero; the number of units b2 is counted in a vector equal to bit-by-bit logical multiplication of the appropriate bits of the second column of the matrix and bits of the quotient, at the same time the second bit of the quotient becomes equal to the sum of module two for the least significant bit b2 and the second bit of the dividend; similarly, the number of units bi is counted in a vector, which is equal to the bit-by-bit logical multiplication of the appropriate bits of the i column of the matrix and quotient bits, afterwards the sum ci of the vector bi and the vector bi-1 shifted by one bit to the right is calculated, at the same time the i bit of the quotient becomes equal to the sum of module two of the least significant bit ci and the i bit of the dividend, as a result the m-bit quotient of initial numbers will be generated. EFFECT: increased speed of calculation. 2 dwg
The invention relates to the computer engineering and is intended for construction of high-speed parallel conveyor dividers, processing arrays of positive integers. Known iterative method of division of the whole floating point numbers. In this way the division is reduced to a sequence deduct Commission with the restoration of balance or without recovery of the balance, they are executed in sequence (http.//wwvv.distedu.ru/mirror/_inform/dmivic.chat.ru/inform/div.html) with the senior ranks of the dividend. The drawback is that, first, with the iterative method of multiplication m-1 operations subtraction, and taking into account the sequential transfers the significant bits - the number of cycles summation equal to (m-1)·2·m. Secondly, the process of determining the amount of a sequential process. The technical result from the use of the method of division of the whole binary numbers without the rest is to increase the speed of calculation due to replacement of a series of m-1 arithmetic subtraction m-bit numbers (m-1) operations counting the number of single bit in the bit cuts generated from discharges divider. On the basis of the analysis and modification of the obtained values of the sums of the number of units in all bit sections is the formation of the value of the binary number, which is the value of the required private. As a result the number of clock cycles necessary for the formation of the value of a private integer binary numbers will be equal to 2·(log 2 m)·m cycles. Thus, the proposed method ensures the operation of the formation of the works faster known iterative method ((m-1) ·2·m)/((log 2 m)·2·m)=(m-1)/log 2 m times. For example, if m=64 calculate 8 times faster. Description of job of the device: the divisor can be represented as a sequence of bits A(a m , a m-1 , ..., a 2 , a 1 ), where m is the bitness of the divider. Is parallel to the recording of the divider in the cell of the matrix on the memory elements, and the dimension of the matrix is m columns and m rows, where m is the bitness as a divider and private, and in a cell with 1 m first row of the matrix, written m-bit divisor in cells with 2 m second row of the matrix are written m-1 LSB divider, ...in cells with k m k-th row of the matrix, written m-k LSB divider, ..., m-th cell of the m-th rows of the matrix is written to the least significant digit of a divider. In all other cells of the matrix writes zeros, in General accommodation in the cells of the matrix on the memory elements is as follows: Then the first digit of the private becomes equal to the sum modulo two LSB the first column of the matrix and the first category of the dividend, the remaining digits of the private become equal to zero; then count the number of units b 2 in the vector is equal to logical multiplication of the corresponding bits of the second column of the matrix and discharges private, second grade private becomes equal to the sum modulo two of the Junior category b-2 and the second category of the dividend; then count the number of units b 3 in the vector, which is equal to logical multiplication of the corresponding bits of the third column of the matrix and discharges private and calculate the amount of c 3 vector b 3 and vector b 2 shifted by one digit to the right, and the third category of the private becomes equal to the sum modulo two of the Junior category c 3 and the third rate of the dividend; and so on computing continues similarly, count the number of units b k in the vector, which equal logical multiplication of the corresponding bits of the k-th column of the matrix and discharges private and calculate the amount of c k vector b k and vector c k-1 shifted by one digit to the right, and the k-th digit of the private becomes equal to the sum modulo two LSB c k and k-th discharge of the dividend; then count the number of units b k+1 in the vector, which is the logic multiplication of the corresponding bits (k+1)th column of the matrix and discharges private and calculate the amount of C (k+1 vector b (k+1 and vector c k shifted by one digit to the right, and the (k+1)th discharge of the private becomes equal to the sum modulo two LSB c k+1) (k+1)-th digit of the dividend; and so on computing continues similarly, count the number of units b m in the vector, which is the logic multiplication of the corresponding bits of the m-th column of the matrix and discharges of private and calculate the amount of c m a vector b m and the vector c m-1 shifted by one digit to the right, and the m-th digit of the private becomes equal to the sum modulo two LSB c m and m-th digit of the dividend; the result will be formed m-bit private initial numbers. Example: it is necessary to divide the dividend is a 1 =110111 the divisor of a 2 =1011 (m=4). We write the divider in the form of a matrix of dimension m=4 rows and m=4 columns, cells with 1 m=4, the first line is written to the divisor. In a cell with 2 m=4 second row is written as m-1=3 least significant bits of the divider. In a cell with 3 m-1=4 of the third row is written as m-2=2 LSB divider. In the fourth cell of the fourth line is written to the least significant digit of a divider. In all other cells of the matrix writes zeros: The first digit of the private d 1 =l is equal to the inversion of the sum modulo two LSB first column of the matrix and the first category of the dividend, the remaining digits of the private become equal to zero; then count the number of units b 2 =1 in the vector f 2 =(0011)&(0001)=0001 equal logical multiplication of the corresponding bits of the second column of the matrix and discharges private, with a second category of private d 2 =l⊕l=0 becomes equal to the sum modulo two of the Junior category b-2 and the second category of the dividend; then count the number of units b 3 =0 in the vector f 3 =(0110)&(0001)-0000, which is equal to logical multiplication of the corresponding bits of the third column of the matrix and discharges private and calculate the amount of c 3 =0+0=0 the vector b 3 =0 and vector b 2 =0 shifted by one digit to the right, and the third category of private d 3 =0⊕l=l becomes equal to the sum modulo two of the Junior category c 3 and the third rate of the dividend; then count the number of units b 4 =10 in the vector f 3 =(1101)&(0101)-0101, which is equal to logical multiplication of the corresponding bits of the fourth column of the matrix and discharges of private, after what sum is calculated From 4 =10+0=10 vector b 4 =10, and the vector c 3 =0 shifted by one digit to the right, and the fourth private d 4 =0⊕0=0 becomes equal to the sum modulo two LSB 4 c and the fourth class of the dividend. Thus, formed private d=0101. If we take for time of addition of a pair of m-bit numbers m cycles of the device, and during the counting of single bit in the m-bit vector log 2 m cycles, while in computing the particular device on the basis of the described method is 2·p·m cycles, where p=log 2 m, while the division iterative method is equal to 2·m-1·m cycles. Thus, the speed of the device on the basis of the described method in the (m-1)/log 2 m times higher compared with the performance of the device on the basis of the known iterative method of multiplication. The example of construction of the device on the basis of the method of division of the whole binary numbers without the rest can serve its programming for programmable logic integrated circuits (FPGA). 1 is a variant of the structural scheme of the device that implements the calculation works balances the base in General, where 1 counter for single bit in the binary vectors, 2 p - bit adder, where p=log 2 n 3 - lateral p-bit register, a 1-a n - m-bit informational inputs schemes, s 1-S m - single-digit information outputs schematic, b-1 b m - p-bit outputs counters 1, - (p+1)-bit outputs adders 2. Figure 2 contains a variant of the structural scheme of the matrix elements of memory for balance (m=3), where 1 is the logical element And, 2 - information trigger with a single input data, one input synchronization and one data release, 3 - information input trigger, 4 - trigger input trigger, 5-news trigger output x 1-x 3 - inputs scheme, which is served balance on base, y i-y 3 - inputs scheme, which served the remainder of the multiplier on base, a ij - outputs the matrix memory elements. Method of division of the whole binary numbers without the rest, starting with the least significant bits, which consists in the fact that in device: is parallel to the recording of the divider in the cell of the matrix on the memory elements, and the dimension of the matrix is m columns and m rows, where m is the bitness as a divider and private, and in a cell with 1 m first row of the matrix, written m-bit divisor in cells with 2 m second row of the matrix are written m-1 LSB divider, ...in cells with k m k-th row of the matrix, written m-k LSB divider, ..., m-th cell of the m-th rows of the matrix is written to the least significant digit of a divider in the other cells of the matrix writes zeros; then the first digit of the private becomes equal to the sum modulo two LSB first column of the matrix and the first category of the dividend, the remaining digits of the private become equal to zero; then count the number of units b 2 in the vector is equal to logical multiplication of the corresponding bits of the second column of the matrix and discharges private, while the second category to the private becomes equal to the sum modulo two of the Junior category b-2 and the second category of the dividend; then calculated the number of units b 3 in the vector, which is equal to logical multiplication of the corresponding bits of the third column of the matrix and discharges of private, after which calculates the sum of the vector b c 3 3 and vector b 2 shifted by one digit to the right, and the third category is set to private the sum modulo two Junior level 3 and the third rate of the dividend; and so on computing continues similarly, count the number of units b k in the vector, which is equal to logical multiplication of the corresponding bits of the k-th column of the matrix and discharges of private, after which calculates the sum of the c vector k b k and vector c k-1 shifted by one digit to the right, and the k-th digit of the private becomes equal to the sum modulo two LSB c k and k-th digit of the dividend; then calculated the number of units b k+1 in the vector, which is the logic of the increase the relevant bits (k+1)th column of the matrix and discharges private and calculate the amount of c (k+1 vector b (k+1 and vector c k shifted by one digit to the right, and the (k+1)-th digit of the private becomes equal to the sum modulo two LSB c k+1) (k+1)-th digit of the dividend; and further calculations are continuing similarly, count the number of units b m in the vector, which is the logic multiplication of the corresponding bits of the m-th column of the matrix and discharges private and calculate the amount of c m a vector b m and the vector c m-1 shifted by one digit to the right, the m-th digit of the private becomes equal to the sum modulo two LSB c m and m-th digit of the dividend; the result will be formed m-bit private initial numbers.
|
© 2013-2014 Russian business network RussianPatents.com - Special Russian commercial information project for world wide. Foreign filing in English. |