KR100219568B1 - Squaring apparatus - Google Patents

Squaring apparatus Download PDF

Info

Publication number
KR100219568B1
KR100219568B1 KR1019960059182A KR19960059182A KR100219568B1 KR 100219568 B1 KR100219568 B1 KR 100219568B1 KR 1019960059182 A KR1019960059182 A KR 1019960059182A KR 19960059182 A KR19960059182 A KR 19960059182A KR 100219568 B1 KR100219568 B1 KR 100219568B1
Authority
KR
South Korea
Prior art keywords
data
output
input
predetermined number
bit
Prior art date
Application number
KR1019960059182A
Other languages
Korean (ko)
Other versions
KR19980040058A (en
Inventor
김정철
이영범
Original Assignee
윤종용
삼성전자주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 윤종용, 삼성전자주식회사 filed Critical 윤종용
Priority to KR1019960059182A priority Critical patent/KR100219568B1/en
Publication of KR19980040058A publication Critical patent/KR19980040058A/en
Application granted granted Critical
Publication of KR100219568B1 publication Critical patent/KR100219568B1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/38Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
    • G06F7/48Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
    • G06F7/544Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices for evaluating functions by calculation
    • G06F7/552Powers or roots, e.g. Pythagorean sums

Abstract

제곱장치가 개시된다. 소정수만큼 증분하는 데이타들로 이루어진 데이타열로부터 데이타들을 순차적으로 입력하여 제곱하는 이 제곱장치는, 현재 입력되는 데이타를 다음에 데이타가 입력될 때까지 유지하며, 현재 입력되는 데이타를 입력함과 동시에, 이전에 입력된 데이타를 출력하는 제 1 래치; 현재 입력되는 데이타와, 제 1 래치로부터 출력되는 이전에 입력된 데이타를 합하는 제 1 가산수단; 제 1 가산수단으로부터 출력된 데이타의 비트를 소정수에 상응하여 조정하는 비트 조정수단; 비트 조정수단으로부터 출력된 데이타와 이전에 제곱장치로부터 출력된 데이타를 입력하여 합하고, 합한 결과를 순차적으로 입력된 데이타의 제곱된 결과로서 출력하는 제 2 가산수단; 제곱장치로부터 출력되는 데이타를 다음에 제곱장치로부터 출력되는 데이타가 입력될 때까지 유지하며, 제곱장치로부터 출력되는 데이타를 입력함과 동시에, 이전에 제곱장치로부터 출력된 데이타를 제 2 가산수단으로 출력하는 제 2 래치를 구비하는 것을 특징으로 하고, 소정수만큼 증분하는 데이타들로 이루어진 데이타열의 데이타를 효율적으로 제곱하므로 연산 시간을 단축하고 비용을 절감하는 효과가 있다.The squarer is disclosed. This square unit, which sequentially inputs and squares data from a data string consisting of data incremented by a predetermined number, maintains the currently input data until the next data input, and simultaneously inputs the currently input data. A first latch for outputting previously input data; First adding means for adding up data currently input and previously input data output from the first latch; Bit adjusting means for adjusting a bit of data output from the first adding means corresponding to a predetermined number; Second adding means for inputting and outputting the data output from the bit adjusting means and the data previously output from the squarer, and outputting the sum result as the squared result of the sequentially input data; The data output from the square apparatus is maintained until the data output from the square apparatus is input next, and the data output from the square apparatus is input, and the data previously output from the square apparatus is output to the second adding means. And a second latch, and effectively squares the data of a data string consisting of data incremented by a predetermined number, thereby reducing the computation time and reducing the cost.

Description

제곱장치{Squaring apparatus}Square apparatus

본 발명은 곱셈장치에 관한 것이며, 특히 소정수만큼 증분하는 데이타들로 이루어진 데이타열로부터 데이타들을 순차적으로 입력하여 제곱하는 제곱장치에 관한 것이다.BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a multiplication apparatus, and more particularly, to a square apparatus for sequentially inputting and squaring data from a data string consisting of data incremented by a predetermined number.

이하, 종래의 곱셈장치를 첨부한 도면을 참조하여 다음과 같이 설명한다.Hereinafter, with reference to the accompanying drawings of a conventional multiplication apparatus will be described as follows.

도 1은 종래의 기본적인 곱셈장치의 개략적인 블럭도로서, 데이타 멀티플렉서(11), 데이타 시프터(13) 및 누산기(15)로 구성되어 있다.FIG. 1 is a schematic block diagram of a conventional basic multiplication apparatus, which is composed of a data multiplexer 11, a data shifter 13, and an accumulator 15. As shown in FIG.

도 1에 도시된 데이타 멀티플렉서(11)는 입력단자들 IN1 및 IN2을 통해 임의의 두개의 데이타 A 및 B를 입력하고, N비트인 데이타 B의 20의 자리부터 2N-1(N은 자연수)의 자리까지의 각각의 비트값에 따라서, 비트값이 1이면 제 1 데이타 A를 출력하고, 비트값이 0이면 데이타 A의 비트수만큼 '0'을 출력한다. 그 다음에, 데이타 시프터(13)는 데이타 멀티플렉서(11)로부터의 출력을 순차적으로 입력하여 데이타 B의 20의 자리의 비트값에 따른 출력이면 0비트만큼 왼쪽으로 시프트하고, 21의 자리의 비트값에 따른 출력이면 1비트만큼 왼쪽으로 시프트하고, 계속하여 2N-1의 자리의 비트값에 따른 출력이면 N-1비트만큼 왼쪽으로 시프트한다. 그 다음에, 누산기(15)는 데이타 시프터(13)로부터 시프트된 결과를 순차적으로 입력하여 계속 합한다.The data multiplexer 11 shown in FIG. 1 inputs arbitrary two data A and B through input terminals IN1 and IN2, and 2 N-1 (N is a natural number) from the position of 2 0 of the data B which is N bits. When the bit value is 1, the first data A is output, and when the bit value is 0, '0' is output as many as the number of bits of the data A. Then, the data shifter 13 sequentially inputs the outputs from the data multiplexer 11, shifts left by 0 bits if it is an output according to the bit values of the 2 0 digits of data B, and shifts the 2 1 digits. If it is an output according to the bit value, it shifts left by one bit, and if it is an output according to the bit value of 2 N-1 digits, it shifts to the left by N-1 bits. The accumulator 15 then sequentially inputs the results shifted from the data shifter 13 and continues to sum them.

전술한 종래의 곱셈장치는 임의의 데이타를 입력하여 곱셈을 수행하는 기본적인 곱셈장치로서, 소정수만큼 증분하는 데이타들로 이루어진 데이타열의 데이타를 순차적으로 입력하여 제곱하는 특정한 경우에도, 임의의 데이타를 곱셈하는 경우와 동일한 방식으로 연산한다.The above-described conventional multiplication apparatus is a basic multiplication apparatus that inputs arbitrary data and performs multiplication. Even in a specific case of sequentially inputting and squaring data of a data string consisting of data incremented by a predetermined number, arbitrary data are multiplied. Calculate in the same way.

따라서, 종래의 곱셈장치를 이용하여 임의의 데이타가 아닌 일정한 규칙을 가진 데이타의 곱셈을 수행할 경우에는 비경제적이고 비효율적이라는 문제점이 있다.Therefore, there is a problem in that it is inefficient and inefficient when multiplying data having a certain rule instead of arbitrary data using a conventional multiplication apparatus.

본 발명이 이루고자 하는 기술적 과제는, 소정수만큼 증분하는 데이타들로 이루어진 데이타열로부터의 데이타를 곱셈기를 사용하지 않고 제곱하는 제곱장치를 제공하는데 있다.An object of the present invention is to provide a square apparatus for squaring data from a data string consisting of data incremented by a predetermined number without using a multiplier.

도 1은 종래의 기본적인 곱셈장치의 개략적인 블럭도이다.1 is a schematic block diagram of a conventional basic multiplication apparatus.

도 2는 본 발명에 따른 제곱장치의 블럭도이다.2 is a block diagram of a square apparatus according to the present invention.

도 3은 도 2에 도시된 제곱장치의 비트 조정부의 일예를 구체적으로 나타내는 블럭도이다.3 is a block diagram specifically illustrating an example of a bit adjusting unit of the square apparatus illustrated in FIG. 2.

도 4는 본 발명에 따른 제곱방법을 설명하기 위한 순서도이다.4 is a flowchart illustrating a square method according to the present invention.

상기 과제를 이루기 위하여 본 발명에 의한 제곱장치는, 소정수만큼 증분하는 데이타들로 이루어진 데이타열로부터 상기 데이타들을 순차적으로 입력하여 제곱하는 제곱장치에 있어서, 현재 입력되는 데이타를 다음에 데이타가 입력될 때까지 유지하며, 상기 현재 입력되는 데이타를 입력함과 동시에, 이전에 입력된 데이타를 출력하는 제 1 래치; 상기 현재 입력되는 데이타와, 상기 제 1 래치로부터 출력되는 상기 이전에 입력된 데이타를 합하는 제 1 가산수단; 상기 제 1 가산수단으로부터 출력된 데이타의 비트를 상기 소정수에 상응하여 조정하는 비트 조정수단; 상기 비트 조정수단으로부터 출력된 데이타와 이전에 상기 제곱장치로부터 출력된 데이타를 입력하여 합하고, 합한 결과를 순차적으로 입력된 상기 데이타의 제곱된 결과로서 출력하는 제 2 가산수단; 상기 제곱장치로부터 출력되는 데이타를 다음에 상기 제곱장치로부터 출력되는 데이타가 입력될 때까지 유지하며, 상기 제곱장치로부터 출력되는 데이타를 입력함과 동시에 이전에 상기 제곱장치로부터 출력된 데이타를 상기 제 2 가산수단으로 출력하는 제 2 래치로 구성되는 것이 바람직하다.In order to achieve the above object, the squaring apparatus according to the present invention is a squaring apparatus that sequentially inputs and squares the data from a data string consisting of data incremented by a predetermined number. A first latch for holding until the current input data and outputting previously input data; First adding means for adding up the currently input data and the previously input data output from the first latch; Bit adjusting means for adjusting bits of data output from said first adding means corresponding to the predetermined number; Second adding means for inputting and adding data output from said bit adjusting means and data previously output from said square apparatus, and outputting the sum result as a squared result of said sequentially input data; The data output from the squarer is maintained until the next data output from the squarer is input, and the data output from the squarer is previously input while the data output from the squarer is input. It is preferable that it is comprised by the 2nd latch which outputs to an addition means.

이하, 본 발명에 의한 제곱장치의 구성 및 동작을 첨부한 도면을 참조하여 다음과 같이 설명한다.Hereinafter, with reference to the accompanying drawings the configuration and operation of the square apparatus according to the present invention will be described.

도 2는 본 발명에 따른 제곱장치의 블럭도로서, 제 1 래치(21), 제 1 가산기(23), 비트 조정부(25), 제 2 가산기(27) 및 제 2 래치(29)로 구성되어 있다.2 is a block diagram of a square apparatus according to the present invention, which is composed of a first latch 21, a first adder 23, a bit adjuster 25, a second adder 27, and a second latch 29. have.

도 2에 도시된 제곱장치는 입력단자 IN을 통해 입력되는 데이타(X)가 다음 수학식 1과 같이 소정수만큼 증분하는 경우에 효율적으로 제곱을 수행한다.The squaring apparatus shown in FIG. 2 efficiently performs square squaring when the data X input through the input terminal IN is incremented by a predetermined number as shown in Equation 1 below.

XN= XN-1+ △X (여기서, △X = 소정수)X N = X N-1 + ΔX (where ΔX = predetermined number)

여기서, XN는 현재 입력되는 데이타를 나타내는 변수이고, XN-1는 바로 이전에 입력된 데이타를 나타내는 변수이고, △X는 소정수로서 현재 입력되는 데이타와 바로 이전에 입력된 데이타간의 차를 나타내는 변수이다.Here, X N is a variable representing data that is currently input, X N-1 is a variable representing data that has just been input, and ΔX is a predetermined number, and the difference between the currently input data and the data immediately input is determined. It is a variable that represents.

또한, 제곱할 데이타(X)가 수학식 1과 같이 일정하게 증분할 경우에, 제곱장치로의 입력 데이타(X)와 제곱장치로부터의 출력 데이타(Y)는 다음 수학식 2와 같은 관계를 가진다.In addition, when the data X to be squared is constantly incremented as in Equation 1, the input data X to the square device and the output data Y from the square device have a relationship as shown in Equation 2 below. .

YN= YN-1+ △X*(XN+ XN-1) (여기서, △X = XN- XN-1)Y N = Y N-1 + ΔX * (X N + X N-1 ), where ΔX = X N -X N-1

여기서, YN는 현재 출력되는 데이타를 나타내는 변수이고, YN-1는 바로 이전에 출력된 데이타를 나타내는 변수이다. 수학식 2에서 알수 있는 바와 같이, 최종 출력되는 데이타(YN)는 현재 입력된 데이타(XN)와 바로 이전에 입력된 데이타(XN-1)의 합에 소정수(△X)를 곱한 값에 바로 이전에 출력된 데이타(YN-1)를 합한 결과이다.Here, Y N is a variable representing the data currently being output, and Y N-1 is a variable representing the data immediately outputted. As can be seen from Equation 2, the final output data (Y N ) is multiplied by a predetermined number (ΔX) by the sum of the currently input data (X N ) and the immediately preceding data (X N-1 ). This is the result of adding the data (Y N-1 ) just before the value.

이러한 특징은 수학식 2에 수치를 대입하여 보면, 확실히 알 수 있다. 먼저, 예를 들어 △X가 1인 경우에는 다음과 같다.This feature can be clearly seen by substituting a numerical value into the equation (2). First, for example, when ΔX is 1, it is as follows.

X = 0 1 2 3 4 5 6 ...X = 0 1 2 3 4 5 6 ...

Y = X2= 0 1 4 9 16 25 36 ...Y = X 2 = 0 1 4 9 16 25 36 ...

YN- YN-1= 0 1 3 5 7 9 11 ...Y N -Y N-1 = 0 1 3 5 7 9 11 ...

= △X*(XN+ XN-1)= ΔX * (X N + X N-1 )

또한, 예를 들어 △X가 2인 경우에는 다음과 같다.For example, when ΔX is 2, it is as follows.

X = 0 2 4 6 8 10 12 ...X = 0 2 4 6 8 10 12 ...

Y = X2= 0 4 16 36 64 100 144 ...Y = X 2 = 0 4 16 36 64 100 144 ...

YN- YN-1= 0 4 12 20 28 36 44 ...Y N -Y N-1 = 0 4 12 20 28 36 44 ...

= △X*(XN+ XN-1)= ΔX * (X N + X N-1 )

도 2에 도시된 본 발명의 제곱장치는 수학식 2에 근거하여 구현된 것으로서, 소정수만큼 증분하는 데이타들로 이루어진 데이타열의 데이타들을 순차적으로 입력하여 제곱한다.The square apparatus of the present invention shown in FIG. 2 is implemented based on Equation 2, and sequentially inputs and squares data of a data string consisting of data incremented by a predetermined number.

먼저, 제 1 래치(21)는 입력단자 IN을 통해 입력한 데이타(X)를 일시 유지하는 기능을 한다. 제 1 래치(21)는 입력단자 IN를 통해 데이타(XN)를 입력함과 동시에, 유지되어 있는 바로 이전에 입력된 데이타(XN-1)를 출력하고, 입력단자 IN을 통해 다음에 데이타(XN+1)를 입력할 때까지 현재 입력된 데이타(XN)를 유지한다.First, the first latch 21 functions to temporarily hold the data X input through the input terminal IN. The first latch 21 inputs the data X N through the input terminal IN, and simultaneously outputs the data X N-1 which has been held just before, and the next data through the input terminal IN. Keep the currently entered data (X N ) until you enter (X N + 1 ).

또한 입력단자 IN을 통해 제 1 래치(21)로 입력되는 데이타(XN)는 제 1 가산기(23)로 동시에 입력된다. 제 1 가산기(23)는 현재 입력되는 데이타(XN)와 제 1 래치(21)에 유지되어 있는 바로 이전에 입력된 데이타(XN-1)를 합하고, 합한 결과를 가산된 데이타(XN+ XN-1)로서 출력한다.In addition, the data X N input to the first latch 21 through the input terminal IN is simultaneously input to the first adder 23. The first adder 23 adds the currently input data X N and the immediately preceding data X N-1 held in the first latch 21 and adds the summed result data X N. + X N-1 ).

그 다음에, 비트 조정부(25)는 가산된 데이타(XN+ XN-1)에 현재 입력된 데이타와 바로 이전에 입력된 데이타간의 차, 즉 소정수(△X)를 곱한 값(△X*(XN+ XN-1))을 출력한다. 그러나, 본 발명의 비트 조정부(25)는 종래의 곱셈기를 사용하여 곱셈을 수행하는 것이 아니라, 단지 소정수(△X)에 상응하여 가산된 데이타(XN+ XN-1)의 비트를 조정함으로써 곱셈한 결과를 가져오는 것이다.Next, the bit adjusting unit 25 multiplies the added data X N + X N-1 by the difference between the currently input data and the data immediately input, that is, a predetermined number ΔX (ΔX). Print * (X N + X N-1 )). However, the bit adjuster 25 of the present invention does not perform the multiplication using a conventional multiplier, but adjusts the bits of the added data X N + X N-1 corresponding to only a predetermined number ΔX. This results in a multiplication.

즉, △X가 1인 경우에는 가산된 데이타를 시프트하지 않고 그대로 출력하면, 가산된 데이타에 1을 곱한 값을 얻는다.That is, when DELTA X is 1, when the added data is output as it is without shifting, a value obtained by multiplying the added data by 1 is obtained.

또한, △X가 2M(여기서, M은 자연수)인 경우에는, 제 1 가산기(23)로부터 출력되는 데이타를 왼쪽으로 M비트만큼 시프트하고, 시프트된 데이타의 최하위 비트(LSB:Least Significant Bit)쪽으로 '0'을 M비트만큼 추가하면, 가산된 데이타(XN+ XN-1)에 소정수(△X)를 곱한 값을 얻는다.In addition, when ΔX is 2 M (where M is a natural number), the data output from the first adder 23 is shifted by M bits to the left, and the least significant bit (LSB: Least Significant Bit) of the shifted data. By adding '0' by M bits, the value obtained by multiplying the added data (X N + X N-1 ) by a predetermined number (ΔX) is obtained.

예컨대, △X가 21(=2)인 경우에 가산된 데이타를 왼쪽으로 1비트 시프트하고, 시프트된 데이타의 최하위 비트쪽으로 '0'을 1비트 추가하면, 가산된 데이타에 2를 곱한 값을 얻는다. △X가 22(=4)인 경우에 가산된 데이타를 왼쪽으로 2비트 시프트하고, 시프트된 데이타의 최하위 비트쪽으로 '0'을 2비트 추가하면, 가산된 데이타에 4를 곱한 값을 얻는다.For example, when ΔX is 2 1 (= 2), if the shifted data is shifted 1 bit to the left and '0' is added 1 bit to the least significant bit of the shifted data, the added data is multiplied by 2. Get When DELTA X is 2 2 (= 4), the added data is shifted two bits to the left, and two bits of '0' are added to the least significant bit of the shifted data, so that the added data is multiplied by four.

또한, △X가 2M+1(여기서, M은 자연수)인 경우에는, △X가 2M인 경우와 △X가 1인 경우의 출력값을 더하면 된다. 그 밖에, △X가 1,2M및 2M+1이외인 경우에는 이들 3가지 경우의 출력값을 조합하여 구하면 된다.In addition, when ΔX is 2M + 1 (where M is a natural number), the output values of ΔX of 2M and ΔX of 1 may be added. In addition, when ΔX is other than 1,2 M and 2 M +1, the output values of these three cases may be combined.

그 다음에, 제 2 가산기(27)는 비트 조정부(25)으로부터의 출력 즉, △X*(XN+ XN-1)과 바로 이전에 출력된 데이타(YN-1)를 입력하여 합하고, 합한 결과를 현재 출력되는 데이타(YN), 즉, 입력단자 IN을 통해 입력한 데이타(XN)의 제곱된 결과로서 출력한다.Next, the second adder 27 inputs and sums the output from the bit adjuster 25, that is, ΔX * (X N + X N-1 ) and the immediately preceding data Y N-1 . The sum is output as the squared result of the currently output data (Y N ), that is, the data (X N ) input through the input terminal IN.

또한, 제 2 래치(29)는 출력단자(OUT)로 출력되는 데이타(Y)를 일시 유지하는 기능을 한다. 제 2 래치(29)는 제 2 가산기(27)로부터 데이타(YN)를 입력함과 동시에, 유지되어 있는 바로 이전에 출력된 데이타(YN-1)를 제 2 가산기(27)로 출력하고, 제 2 가산기(27)로부터 다음에 출력되는 데이타(YN+1)를 입력할 때까지 현재의 출력 데이타(YN)를 유지한다.In addition, the second latch 29 functions to temporarily hold the data Y output to the output terminal OUT. The second latch 29 inputs the data Y N from the second adder 27, and at the same time, outputs the immediately previous data Y N-1 that is held to the second adder 27. The current output data Y N is maintained until the next output data Y N + 1 is input from the second adder 27.

도 3은 도 2에 도시된 제곱장치의 비트 조정부(25)의 일예를 구체적으로 나타내는 블럭도로서, 비트 조정부(25)는 데이타 시프터(32) 및 제 3 가산기(34)로 구성되어 있다.FIG. 3 is a block diagram specifically showing an example of the bit adjuster 25 of the square apparatus shown in FIG. 2, and the bit adjuster 25 includes a data shifter 32 and a third adder 34. As shown in FIG.

데이타 시프터(32)는 제 1 가산기(23)로부터 출력된 데이타의 비트를 M비트만큼 시프트하고, 시프트된 데이타의 최하위 비트쪽으로 0을 M비트만큼 추가한다. 제 3 가산기(34)는 제 1 가산기(23)로부터 출력된 데이타와 데이타 시프터(32)로부터 출력된 데이타를 합한다.The data shifter 32 shifts the bits of data output from the first adder 23 by M bits, and adds 0 by M bits toward the least significant bit of the shifted data. The third adder 34 sums the data output from the first adder 23 and the data output from the data shifter 32.

도 3에 도시된 비트 조정부(25)는 소정수(△X)에 응답하여 제 1 가산기(23)로부터 출력된 데이타의 비트를 조정한다. △X가 1인 경우에, 비트 조정부(25)의 데이타 시프터(32)는 구동되지 않으며, 제 3 가산기(34)만이 구동되어 제 1 가산기(23)로부터 출력된 데이타를 그대로 출력한다. 또한, △X가 2M(여기서, M은 자연수)인 경우에, 비트 조정부(25)의 제 3 가산기(34)는 구동되지 않으며, 데이타 시프터(32)만이 구동되어 제 1 가산기(23)로부터 출력된 데이타의 비트를 M비트만큼 시프트한다. 또한, △X가 2M+1(여기서, M은 자연수)인 경우에는, 데이타 시프터(32) 및 제 3 가산기(34)가 모두 구동되어 데이타 시프터(32)는 제 1 가산기(23)로부터 출력된 데이타의 비트를 M비트만큼 시프트하고, 제 3 가산기(34)는 제 1 가산기(23)로부터 출력된 데이타와 데이타 시프터(32)로부터 출력되는 데이타를 합한다.The bit adjuster 25 shown in FIG. 3 adjusts the bits of the data output from the first adder 23 in response to the predetermined number [Delta] X. When ΔX is 1, the data shifter 32 of the bit adjuster 25 is not driven, and only the third adder 34 is driven to output the data output from the first adder 23 as it is. In addition, when DELTA X is 2 M (where M is a natural number), the third adder 34 of the bit adjuster 25 is not driven, only the data shifter 32 is driven to drive the first adder 23 from the first adder 23. Shift the bits of the output data by M bits. In addition, when ΔX is 2M + 1 (where M is a natural number), both the data shifter 32 and the third adder 34 are driven so that the data shifter 32 outputs from the first adder 23. The bit of the converted data is shifted by M bits, and the third adder 34 sums the data output from the first adder 23 and the data output from the data shifter 32.

이하, 본 발명에 의한 제곱방법을 첨부한 도면을 참조하여 다음과 같이 설명한다.Hereinafter, the square method according to the present invention will be described with reference to the accompanying drawings.

도 4는 본 발명에 따른 제곱방법을 설명하기 위한 순서도로서, 소정수만큼 증분하는 데이타를 입력하여 이전 입력 데이타와 현재 입력 데이타를 가산하는 단계들(제40 및 42단계), 가산된 데이타를 소정수에 상응하여 비트 조정하는 단계들(제44,48,50,54,56 및 58단계) 및 비트 조정된 데이타와 이전 출력 데이타를 가산하여 제곱 결과로서 출력하는 단계들(제46,52,60 및 62단계)로 이루어진다.FIG. 4 is a flowchart illustrating a square method according to the present invention. Steps of inputting data incremented by a predetermined number to add previous input data and current input data (steps 40 and 42), and add the added data Bit adjusting according to the number (steps 44, 48, 50, 54, 56 and 58) and adding bit adjusted data and previous output data and outputting as a squared result (46, 52, 60) And step 62).

먼저, 소정수만큼 증분하는 데이타들로 이루어진 데이타열로부터 데이타를 입력한다(제40단계). 제40단계 후에, 이전에 입력된 데이타와 현재 입력된 데이타를 가산한다(제42단계). 제42단계 후에, 소정수가 1인가 판단한다 (제44단계).First, data is input from a data string consisting of data incremented by a predetermined number (step 40). After step 40, previously input data and currently input data are added (step 42). After step 42, it is determined whether the predetermined number is 1 (step 44).

만일, 소정수가 1이면, 즉, 입력되는 데이타들이 1만큼 증분하는 데이타들이면, 가산된 데이타와 이전에 출력된 데이타를 가산한다(제46단계). 제46단계 후에, 최종 가산된 데이타를 입력 데이타의 제곱된 결과로서 출력한다(제62단계). 그러나, 소정수가 1이 아니라면, 소정수가 2M(M은 자연수)인가 판단한다(제48단계).If the predetermined number is 1, that is, the data to be input is data incremented by one, the added data and previously output data are added (step 46). After step 46, the final added data is output as the squared result of the input data (step 62). However, if the predetermined number is not 1, it is determined whether the predetermined number is 2 M (M is a natural number) (step 48).

만일, 소정수가 소정수가 2M이면, 가산된 데이타를 M비트만큼 시프트하고, 0을 M비트만큼 추가하여 비트조정한다(제50단계). 제50단계 후에, 비트 조정된 데이타와 이전에 출력된 데이타를 가산한다(제52단계). 제52단계 후에, 최종 가산된 데이타를 입력 데이타의 제곱된 결과로서 출력한다. 즉, 제62단계로 진행한다. 그러나, 소정수가 2M이 아니라면, 소정수가 2M+1인가 판단한다(제54단계).If the predetermined number is 2 M , the added data is shifted by M bits, and bit is adjusted by adding 0 by M bits (step 50). After step 50, bit adjusted data and previously output data are added (step 52). After step 52, the final added data is output as the squared result of the input data. In other words, the process proceeds to step 62. However, if the predetermined number is not 2M , it is determined whether the predetermined number is 2M + 1 (step 54).

만일, 소정수가 2M+1이면, 가산된 데이타를 M비트만큼 시프트하고, 0을 M비트만큼 추가하여 비트조정한다(제56단계). 제56단계 후에, 비트조정된 데이타와 가산된 데이타를 가산한다(제58단계). 제58단계 후에, 최종 가산된 데이타와 이전에 출력된 데이타를 가산한다(제60단계). 제60단계 후에, 최종 가산된 데이타를 입력 데이타의 제곱된 결과로서 출력한다(제62단계). 그러나, 소정수가 2M+1이 아니라면, 본 발명에서 처리할 수 있는 특정 입력 데이타가 아니므로, 실행을 종료한다.If the predetermined number is 2M + 1, the added data is shifted by M bits, and bit is adjusted by adding 0 by M bits (step 56). After step 56, bit adjusted data and added data are added (step 58). After step 58, the final added data and previously output data are added (step 60). After step 60, the final added data is output as the squared result of the input data (step 62). However, if the predetermined number is not 2M + 1, it is not the specific input data that can be processed by the present invention, and thus execution ends.

이상에서 설명한 바와 같이, 본 발명에 의한 제곱장치는, 소정수만큼 증분하는 데이타들로 이루어진 데이타열의 데이타를 효율적으로 제곱하므로 연산 시간을 단축하고 비용을 절감하는 효과가 있다.As described above, the square apparatus according to the present invention effectively squares the data of a data string consisting of data incremented by a predetermined number, thereby reducing the computation time and the cost.

Claims (4)

소정수만큼 증분하는 데이타들로 이루어진 데이타열로부터 상기 데이타들을 순차적으로 입력하여 제곱하는 제곱장치에 있어서,In a square device that sequentially inputs and squares the data from a data string consisting of data incremented by a predetermined number, 현재 입력되는 데이타를 다음에 데이타가 입력될 때까지 유지하며, 상기 현재 입력되는 데이타를 입력함과 동시에, 이전에 입력된 데이타를 출력하는 제 1 래치;A first latch for holding the currently input data until the next data is input, and at the same time inputting the currently input data and outputting previously input data; 상기 현재 입력되는 데이타와, 상기 제 1 래치로부터 출력되는 상기 이전에 입력된 데이타를 합하는 제 1 가산수단;First adding means for adding up the currently input data and the previously input data output from the first latch; 상기 제 1 가산수단으로부터 출력된 데이타의 비트를 상기 소정수에 상응하여 조정하는 비트 조정수단;Bit adjusting means for adjusting bits of data output from said first adding means corresponding to the predetermined number; 상기 비트 조정수단으로부터 출력된 데이타와 이전에 상기 제곱장치로부터 출력된 데이타를 입력하여 합하고, 합한 결과를 순차적으로 입력된 상기 데이타의 제곱된 결과로서 출력하는 제 2 가산수단; 및Second adding means for inputting and adding data output from said bit adjusting means and data previously output from said square apparatus, and outputting the sum result as a squared result of said sequentially input data; And 상기 제곱장치로부터 출력되는 데이타를 다음에 상기 제곱장치로부터 출력되는 데이타가 입력될 때까지 유지하며, 상기 제곱장치로부터 출력되는 데이타를 입력함과 동시에 이전에 상기 제곱장치로부터 출력된 데이타를 상기 제 2 가산수단으로 출력하는 제 2 래치를 구비하는 것을 특징으로 하는 제곱장치.The data output from the squarer is maintained until the next data output from the squarer is input, and the data output from the squarer is previously input while the data output from the squarer is input. And a second latch for outputting to the adding means. 제 1 항에 있어서, 상기 비트 조정수단은,The method of claim 1, wherein the bit adjusting means, 상기 소정수가 1인 경우에, 상기 제 1 가산수단으로부터 출력된 데이타의 비트를 조정없이 그대로 상기 제 2 가산수단으로 출력하는 것을 특징으로 하는 제곱장치.And when the predetermined number is 1, outputting the bits of data output from the first adding means to the second adding means without adjustment. 제 1 항에 있어서, 상기 비트 조정수단은,The method of claim 1, wherein the bit adjusting means, 상기 소정수가 2M(M은 자연수)인 경우에, 상기 제 1 가산수단으로부터 출력된 데이타를 왼쪽으로 M비트만큼 시프트하고, 시프트된 데이타의 최하위 비트쪽으로 0을 M비트만큼 추가하여 상기 제 2 가산수단으로 출력하는 데이타 시프터를 구비하는 것을 특징으로 하는 제곱장치.When the predetermined number is 2 M (M is a natural number), the data output from the first adding means is shifted left by M bits, and 0 is added by M bits toward the least significant bit of the shifted data to add the second addition. And a data shifter for outputting by means. 제 1 항에 있어서, 상기 비트 조정수단은,The method of claim 1, wherein the bit adjusting means, 상기 소정수가 2M+1(M은 자연수)인 경우에, 상기 제 1 가산수단으로부터 출력된 데이타를 왼쪽으로 M비트만큼 시프트하고, 시프트된 데이타의 최하위 비트쪽으로 0을 M비트만큼 추가하는 데이타 시프터; 및When the predetermined number is 2 M +1 (M is a natural number), the data shifter shifts the data output from the first adding means to the left by M bits and adds 0 to the M least significant bits toward the least significant bit of the shifted data. ; And 상기 제 1 가산수단으로부터 출력된 데이타와 상기 데이타 시프터로부터 출력된 데이타를 합하여 상기 제 2 가산수단으로 출력하는 제 3 가산수단을 구비하는 것을 특징으로 하는 제곱장치.And third adding means for adding up the data output from the first adding means and the data output from the data shifter and outputting the sum to the second adding means.
KR1019960059182A 1996-11-28 1996-11-28 Squaring apparatus KR100219568B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1019960059182A KR100219568B1 (en) 1996-11-28 1996-11-28 Squaring apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1019960059182A KR100219568B1 (en) 1996-11-28 1996-11-28 Squaring apparatus

Publications (2)

Publication Number Publication Date
KR19980040058A KR19980040058A (en) 1998-08-17
KR100219568B1 true KR100219568B1 (en) 1999-09-01

Family

ID=19484394

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019960059182A KR100219568B1 (en) 1996-11-28 1996-11-28 Squaring apparatus

Country Status (1)

Country Link
KR (1) KR100219568B1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6581867B2 (en) 2000-08-19 2003-06-24 Samsung Electronics Co., Ltd. Reel braking apparatus for a tape recorder

Also Published As

Publication number Publication date
KR19980040058A (en) 1998-08-17

Similar Documents

Publication Publication Date Title
US5894428A (en) Recursive digital filter
US6732130B2 (en) Fast hadamard transform device
US5177703A (en) Division circuit using higher radices
EP0137386B1 (en) Digital multiplying circuit
US4719589A (en) Floating-point adder circuit
JPH04332036A (en) Floating decimal point multiplier and its multiplying system
KR19980080981A (en) Multiplication method and multiplication circuit
KR100219568B1 (en) Squaring apparatus
JPH09325955A (en) Square root arithmetic circuit for sum of squares
EP0637797A1 (en) Calculation apparatus
US8090013B2 (en) Method and system of providing a high speed Tomlinson-Harashima Precoder
EP0606775A1 (en) System and method for approximating nonlinear functions
US6275558B1 (en) Circuit and method for arbitrarily shifting M-sequence
KR0146655B1 (en) Multi-nary and logic device
US7003544B1 (en) Method and apparatus for generating a squared value for a signed binary number
KR0146656B1 (en) Multi-nary or logic device
US5912827A (en) Digital filter with low rolloff factor
US6167422A (en) Booth multiplication structure which selectively integrates the function of either of incrementing or negating with the function of booth multiplication
KR19980024202A (en) Digital signal processor
JP4658821B2 (en) Bezier curve generation circuit
JP2951685B2 (en) Fixed-point arithmetic unit
KR19990010732A (en) Selective Multiplication Method for Selective Output of Multipliers
KR100292067B1 (en) Cell for discrete time cellular neural networks
KR100525378B1 (en) square device
JP3159774B2 (en) Digital attenuator

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20070514

Year of fee payment: 9

LAPS Lapse due to unpaid annual fee