KR0170729B1 - Calculator of absolute value of difference using carry select adder - Google Patents

Calculator of absolute value of difference using carry select adder Download PDF

Info

Publication number
KR0170729B1
KR0170729B1 KR1019960003956A KR19960003956A KR0170729B1 KR 0170729 B1 KR0170729 B1 KR 0170729B1 KR 1019960003956 A KR1019960003956 A KR 1019960003956A KR 19960003956 A KR19960003956 A KR 19960003956A KR 0170729 B1 KR0170729 B1 KR 0170729B1
Authority
KR
South Korea
Prior art keywords
value
carry
input
sum
output
Prior art date
Application number
KR1019960003956A
Other languages
Korean (ko)
Other versions
KR970062852A (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 KR1019960003956A priority Critical patent/KR0170729B1/en
Publication of KR970062852A publication Critical patent/KR970062852A/en
Application granted granted Critical
Publication of KR0170729B1 publication Critical patent/KR0170729B1/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
    • 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/50Adding; Subtracting
    • G06F7/501Half or full adders, i.e. basic adder cells for one denomination
    • G06F7/503Half or full adders, i.e. basic adder cells for one denomination using carry switching, i.e. the incoming carry being connected directly, or only via an inverter, to the carry output under control of a carry propagate signal

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Pure & Applied Mathematics (AREA)
  • Computing Systems (AREA)
  • Mathematical Optimization (AREA)
  • General Engineering & Computer Science (AREA)
  • Complex Calculations (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

캐리 셀렉트 애더를 이용한 두 수 차이의 절대값 계산기가 포함되어 있다. 본 발명은, 제2입력을 받아 선택신호의 상태에 따라 상기 제2입력과 동일한 값 및 상기 제2입력을 인버팅한 값중 선택된 어느 하나를 출력하는 연산 선택수단과, 상기 연산 선택수단의 출력, 제1입력, 및 제1캐리입력을 받아 덧셈을 하여 제1합산값을 출력하고 상기 제1합산값에 제2캐리입력을 받아 덧셈을 하여 제2합산값을 출력하며 동시에 캐리출력을 발생하는 캐리 셀렉트 애더와, 상기 캐리 셀렉트 애더로부터 상기 제1합산값의 MSB, 상기 제2합산값의 MSB, 및 상기 캐리출력을 받아 제어신호를 발생하는 제어수단과, 상기 캐리 셀렉트 애더의 출력인 제1 및 제2합산값을 각각 인버팅하는 제1 및 제2인버팅 수단과, 상기 제어수단의 출력인 제어신호의 상태에 따라 상기 제1합산값, 상기 제1합산값이 상기 제1인버팅 수단에서 인버팅된 값, 상기 제2합산값, 및 상기 제2합산값이 상기 제2인버팅 수단에서 인버팅된 값중 선택된 어느 하나를 출력하는 멀티플렉서르 구성되는 것을 특징으로 한다. 따라서 본 발명은 1개의 CSA와 간단한 제어로직, 및 멀티플렉서로 구성되므로 하드웨어가 차지하는 칩의 면적을 줄일 수 있고 동작속도를 향상시킬 수 있는 장점이 있다.An absolute calculator for the difference between two numbers using the carry select adder is included. According to an aspect of the present invention, there is provided an operation selection means for receiving a second input and outputting any one selected from the same value as the second input and the value inverting the second input according to a state of a selection signal, A carry that receives the first input and the first carry input, adds the result, outputs a first sum value, receives the second carry input to the first sum value, adds the result, and outputs a second sum value and simultaneously generates a carry output. Control means for receiving a select adder, the MSB of the first summed value, the MSB of the second summed value, and the carry output from the carry select adder, and generating a control signal; first and second outputs of the carry select adder; First and second inverting means for inverting a second summed value, respectively, and the first summed value and the first summed value are determined by the first inverting means according to a state of a control signal output from the control means. An inverted value, the second sum value, and And the second summation value is configured to output a selected one of the values inverted by the second inverting means. Therefore, since the present invention is composed of one CSA, a simple control logic, and a multiplexer, the area of the chip occupied by hardware can be reduced and the operation speed can be improved.

Description

캐리 셀렉트 애더를 이용한 두 수 차이의 절대값 계산기Absolute value difference between two numbers using carry select adder

제1도는 일반적인 부동소숫점 연산기에서 사용되는 종래의 두 수 차이의 절대값 계산기의 블락도.1 is a block diagram of an absolute value calculator of two conventional number differences used in a general floating point calculator.

제2도는 본 발명에 따른 CSA를 이용한 두 수 차이의 절대값 계산기의 블락도.2 is a block diagram of an absolute value calculator of two number differences using a CSA according to the present invention.

제3도는 제2도에 있어서 제어수단의 동작을 나타내는 진리표.FIG. 3 is a truth table showing the operation of the control means in FIG.

본 발명은 부동소숫점 연산기에 있어서 두 수 차이의 절대값 계산기에 관한 것으로, 특히 1개의 캐리 셀렉트 애더(Carry Select Adder, CSA)를 이용한 두 수 차이의 절대값(Absolute value of difference)계산기에 관한 것이다.The present invention relates to an absolute value calculator of two number differences in a floating point calculator, and more particularly, to an absolute value of difference calculator using one carry select adder (CSA). .

부동소숫점 연산기(Floating-point Unit)에서 두 수의 덧셈이나 뺄셈을 수행하기 위해서는, 우선 두 수의 지수(Exponent) 부분의 차이값을 계산하여 이 차이값만큼을 프랙션(Fraction)에서 라이트 쉬프터(Right Shifter)를 이용하여 정렬(Alignment)해 주어야 한다.To add or subtract two numbers in a floating-point unit, first calculate the difference between the exponents of the two numbers and use this value as the light shifter in the fraction. Use Right Shifter to align.

예컨대, A=1.111000x23과 B=1.111000x25의 두 수를 더하기 위해서는 상기 두 수의 프랙션의 자리수를 맞추어 주어야 하는 데, 이는 상기 A와 B의 지수 차이값인 2(5-3=2)만큼을 A의 프랙션에 적용하여 A=1.111000x23=0.011110x25으로 전환한다. 전환된 이 두 값을 더하면For example, to add two numbers A = 1.111000x2 3 and B = 1.111000x2 5 , the digits of the two fractions must be matched, which is 2 (5-3 = 2), which is the difference between the exponents of A and B. ) Is applied to the fraction of A and switches to A = 1.111000x2 3 = 0.011110x2 5 . Adding these two converted values

따라서 부동소숫점에서 두 수의 덧셈이나 뺄셈을 수행하기 위해서는 두 지수의 차이의 절대값을 계산하는 논리(Logic) 회로가 요구되며, 일반적인 부동소숫점 연산기에서는 두개의 애더를 사용하여 그 결과가 양수인 것을 선택하는 방법을 택하고 있다.Therefore, in order to perform addition or subtraction of two numbers in floating point, a logic circuit that calculates the absolute value of the difference between two exponents is required, and in general floating point arithmetic operators, the two adders are used to select a positive result. I choose to do it.

제1도는 일반적인 부동소숫점 연산기에서 사용되는 종래의 두 수 차이의 절대값 계산기의 블락도(Block Diagram)를 나타낸다.1 shows a block diagram of a conventional absolute value difference between two numbers used in a general floating point calculator.

제1도를 참조하면, 상기 두 수 차이의 절대값 계산기는, 두 개의 입력(A, B)를 받아 덧셈을 수행하는 제1 및 제2애더(1, 3)와, 상기 제1애더(1)에서 출력되는 캐리출력(Carry-out)(Cout)을 제어신호로하여 상기 제1 및 제2애더(1, 3)에서 연산된 출력값중 양수인 것을 택하여 출력시키는 멀티플렉서(Multiplexer)(5)로 구성된다.Referring to FIG. 1, the absolute value calculator of the difference between two numbers includes first and second adders 1 and 3 that receive two inputs A and B and perform addition, and the first adder 1. To a multiplexer (5) which selects and outputs a positive number among the output values calculated by the first and second adders (1, 3) using a carry-out (Cout) output from It is composed.

상기 제1 및 제2애더(1, 3)에서 -로 나타낸 부분은 그 연산이 뺄셈임을 가리키며, 또한 상기 제1 및 제2애더(1, 3)의 입력(A, B)은 서로 바뀌어 들어오기 때문에 그 출력은 각각 A-B 및 B-A를 갖게 된다. 일반적인 2's complement 연산에서 뺄셈의 경우에 그 결과가 양수이면 캐리출력(Cout)은 로직1의 값을 갖게되며, 그 결과가 음수이면 캐리출력(Cout)은 로직0을 갖게 된다.The part indicated by-in the first and second adders 1 and 3 indicates that the operation is subtraction, and the inputs A and B of the first and second adders 1 and 3 are interchanged. The output will therefore have AB and BA, respectively. In the case of subtraction in a general 2's complement operation, if the result is positive, the carry output Cout has a value of logic 1, and if the result is negative, the carry output Cout has a logic 0.

부동소숫점 연산기에서 위와 같은 연산은 항상 크리티칼 패쓰(Critical Path)에 놓이게 되므로, 11 내지 12비트(Bit) 정도의 데이터폭(Data Width)을 갖는 경우에 상기 제1 및 제2애더(1, 3)은 보통 캐리 셀렉트 애더(Carry-Select Adder, 이하 CSA라 칭함)나 캐리 룩어헤드 애더(Carry-Lookahead Adder, CLA)를 사용한다.In the floating point calculator, the above operations are always placed in a critical path, and thus, the first and second adders 1 and 3 may have a data width of about 11 to 12 bits. ) Usually uses Carry-Select Adder (CSA) or Carry-Lookahead Adder (CLA).

상술한 종래의 두 수 차이의 절대값 계산기는, 2개의 CSA나 2개의 CLA를 포함하여야 하므로, 하드웨어가 차지하는 면적이 증가하게 되는 단점이 있다.The above-described absolute value calculator of the difference between two numbers has to have two CSAs or two CLAs, so that the area occupied by hardware increases.

따라서 본 발명의 목적은, 하드웨어가 차지하는 면적을 줄일 수 있고 빠른 속도를 갖는, CSA를 이용한 두 수 차이의 절대값 계산기를 제공하는 데 있다.It is therefore an object of the present invention to provide an absolute value calculator of two number differences using CSA, which can reduce the area occupied by hardware and has a high speed.

상기 목적을 달성하기 위한 본 발명에 따른 CSA를 이용한 두 수 차이의 절대값 계산기는,Absolute value calculator of two number difference using CSA according to the present invention for achieving the above object,

제2입력을 받아 선택신호의 상태에 따라 상기 제2입력과 동일한 값 및 상기 제2입력을 인버팅(Inverting)한 값중 선택된 어느 하나를 출력하는 연산 선택수단;Operation selecting means for receiving a second input and outputting any one selected from the same value as the second input and an inverting value of the second input according to a state of a selection signal;

상기 연산 선택수단의 출력, 제1입력, 및 제1캐리입력(Carry-in)을 받아 덧셈을하여 제1합산값을 출력하고, 상기 제1합산값에 제2캐리입력을 받아 덧셈을하여 제2합산값을 출력하며, 동시에 캐리출력을 발생하는 CSA;Receives the output of the operation selection means, the first input, and the first carry input (Carry-in), adds the result, and outputs a first sum value, receives the second carry input to the first sum value, and adds the first sum value. A CSA for outputting a sum value and generating a carry output at the same time;

상기 CSA로부터 상기 제1합산값의 MSB(Most Significant Bit), 상기 제2합산값의 MSB, 및 상기 캐리출력을 받아 제어신호를 발생하는 제어수단;Control means for receiving a Most Significant Bit (MSB) of the first sum, the MSB of the second sum, and the carry output from the CSA to generate a control signal;

상기 CSA의 출력인 제1 및 제2합산값을 각각 인버팅하는 제1 및 제2인버팅 수단;First and second inverting means for inverting first and second sum values, which are outputs of the CSA, respectively;

상기 제어수단의 출력인 제어신호의 상태에 따라, 상기 제1합산값, 상기 제1합산값이 상기 제1인버팅 수단에서 인버팅된 값, 상기 제2합산값, 및 상기 제2합산값이 상기 제2인버팅 수단에서 인버팅된 값중 선택된 어느 하나를 출력하는 멀티플렉서로 구성되는 것을 특징으로 한다.According to the state of the control signal that is the output of the control means, the first sum value, the first sum value is the value inverted by the first inverting means, the second sum value, and the second sum value And a multiplexer for outputting any one selected from the values inverted by the second inverting means.

이하 첨부도면을 참조하여 본 발명의 바람직한 실시예를 상세히 설명한다.Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings.

제2도는 본 발명에 따른 CSA를 이용한 두 수 차이의 절대값 계산기의 블락도를 나타낸다.2 shows the block diagram of the absolute value calculator of two number differences using CSA according to the present invention.

제2도를 참조하면, 본 발명에 따른 두 수 차이의 절대값 계산기는, 제2입력(B[m:0])을 받아 선택신호(SE)의 상태에 따라 상기 제2입력(B[m:0])과 동일한 값 및 상기 제2입력을 인버팅한 값중 선택된 어느 하나를 출력하는 연산 선택수단(15)과, 상기 연산 선택수단의 출력, 제1입력(A[m:0]), 및 제1캐리입력(Carry-in)(0)을 받아 덧셈을 하여 제1합산값(S0)을 출력하고 상기 제1합산값에 제2캐리입력(1)을 받아 덧셈을 하여 제2합산값(S1)을 출력하며 동시에 캐리출력(Cout)을 발생하는 CSA(13)와, 상기 CSA(13)로부터 상기 제1합산값의 MSB(S0[m]), 상기 제2합산값의 MSB(S1[m]), 및 상기 캐리출력(Cout)을 받아 제어신호(SEL[1:0])를 발생하는 제어수단(17)과, 상기 CSA(13)의 출력인 상기 제1 및 제2합산값(S0,S1)을 각각 인버팅하는 제1 및 제2인버팅 수단(19, 21)과, 상기 제어수단(17)의 출력인 제어신호(SEL[1:0])의 상태에 따라, 상기 제1합산값(S0), 상기 제1합산값이 상기 제1인버팅 수단(19)에서 인버팅된 값(IS0), 상기 제2합산값(S1), 및 상기 제2합산값이 상기 제2인버팅 수단(21)에서 인버팅된 값(IS1)중 선택된 어느 하나를 출력(Result[m:0])으로 내보내는 멀티플렉서(23)로 구성된다.Referring to FIG. 2, the absolute value calculator of the difference between two numbers according to the present invention receives a second input B [m: 0] and according to the state of the selection signal SE, the second input B [m]. (0)) and an operation selecting means 15 for outputting any one selected from the value inverting the second input, an output of the operation selecting means, a first input A [m: 0], And a first carry input (Carry-in) 0 is added to output the first sum value S0 and the second carry input 1 is added to the first sum value to add the second carry value. A CSA 13 outputting S1 and generating a carry output Cout at the same time, an MSB (S0 [m]) of the first sum value from the CSA 13, and an MSB (S1) of the second sum value. [m]), the control means 17 which receives the carry output Cout and generates a control signal SEL [1: 0], and the first and second sum values which are outputs of the CSA 13; A control scene which is an output of the first and second inverting means 19, 21 for inverting (S0, S1), respectively, and the control means 17; According to the state of the arc SEL [1: 0], the first sum value S0, the value IS0 in which the first sum value is inverted by the first inverting means 19, the second The multiplexer 23 outputting any one selected from the sum S1 and the value IS1 inverted by the second inverting means 21 to the output Result [m: 0]. It consists of.

상기 두 수 차이의 절대값 계산기에서 두 수 차이의 절대값을 계산하는 방법은 아래와 같은 연산을 이용하는 데, 이는 CSA가 항상 캐리입력이 0이거나 1인 두가지 경우에 대해 모두 계산을 한다는 데 착안한 것이다.The absolute value of the difference between two numbers in the absolute value difference between two numbers is calculated using the following operation, which is conceived that the CSA always calculates for both cases where the carry input is 0 or 1. .

즉 캐리입력이 0인 쪽(식2)의 출력을 인버팅(Inverting)한 것은 B-A의 값을 갖고, 캐리입력이 1인 쪽(식1)의 출력을 그대로 전달하면 A-B의 값을 가질 수 있다. 이와 같은 값들은 통상의 CSA에서 모두 기본적으로 제공되므로, 제2도와 같은 본 발명에 따른 두 수 차이의 절대값 계산기를 구성할 수 있는 것이다.That is, the inverting output of the carry input (Equation 2) having a value of BA may have a value of BA, and the output of the carry input of the input (Equation 1) having a value of 1 may have a value of AB. . Since these values are all provided by default in a conventional CSA, it is possible to construct an absolute value calculator of two number differences according to the present invention as shown in FIG.

제2도를 참조하여 본 발명에 따른 두 수 차이의 절대값 계산기의 동작을 살펴보면 다음과 같다.Referring to Figure 2 looks at the operation of the absolute value calculator of the difference between two numbers according to the present invention.

먼저 연산 선택수단(15)은 제2입력(B[m:0]) 및 선택신호(SE)를 입력으로 하는 배타적 오아(Exclusive OR)로 구성되며, 선택신호(SE)가 로직0이면 상기 제2입력과 동일한 값(B[m:0])을 출력하여 상기 CSA(13)에서 덧셈을 수행하게 하고, 상기 선택신호(SE)가 로직1이면 상기 제2입력을 인버팅한 값(-B[m:0])을 출력하여 상기 CSA(13)에서 뺄셈을 수행하게 한다.First, the operation selecting means 15 is composed of an exclusive OR using the second input B [m: 0] and the selection signal SE. If the selection signal SE is logic 0, the first selection operation 15 is performed. Outputs the same value (B [m: 0]) equal to the second input so that the CSA 13 performs the addition, and if the selection signal SE is logic 1, the value inverting the second input (-B [m: 0]) is output so that the CSA 13 performs subtraction.

상기 CSA(13)에서 뺄셈(A[m:0]-B[m:0])을 수행할 경우를 살펴보면, 상기 선택신호(SE)가 로직1일 때, 상기 CSA(13)가 상기 연산 선택수단(15)의 출력(-B[m:0]), 제1입력(A[m:0]), 및 제1캐리입력(0)을 받아 덧셈을하여 제1합산값(S0)을 출력하고, 상기 제1합산값(S0)에 제2캐리입력(1)을 받아 덧셈을 하여 제2합산값(S1)을 출력하며 동시에 캐리출력(Cout)을 발생한다.Referring to the case where subtraction A [m: 0] -B [m: 0] is performed in the CSA 13, when the selection signal SE is logic 1, the CSA 13 selects the operation. The output of the means 15 (-B [m: 0]), the first input A [m: 0], and the first carry input 0 are received and added to output the first sum value S0. The second carry input 1 is received and added to the first sum SO, and the second sum S1 is output, and a carry output Cout is generated at the same time.

다음에 제1 및 제2인버팅 수단(19, 21)이, 상기 CSA(13)의 출력인 상기 제1 및 제2합산값(S0, S1)을 각각 인버팅하여 각각의 출력값(IS0, IS1)을 내보낸다.Next, the first and second inverting means 19, 21 invert the first and second sum values S0, S1, which are outputs of the CSA 13, respectively, to output respective output values IS0, IS1. ).

이때 A[m:0]-B[m:0]의 값이 양수인 경우에는, 멀티플렉서(23)가 제어수단(17)에서 출력되는 제어신호(SEL[1:0])에 따라 상기 제2합산값(S1)을 선택하여 출력하고, A[m:0]-B[m:0]의 값이 음수인 경우에는, 이 값의 절대값은 B[m:0]-A[m:0]이므로 상기 멀티플렉서(23)가 상기 제어수단(17)에서 출력되는 제어신호(SEL[1:0]에 따라 상기 제1합산값(S0)이 인버팅된 값(IS0)을 선택하여 출력한다.At this time, if the value of A [m: 0] -B [m: 0] is positive, the multiplexer 23 adds the second sum according to the control signal SEL [1: 0] output from the control means 17. If the value S1 is selected and output, and the value of A [m: 0] -B [m: 0] is negative, the absolute value of this value is B [m: 0] -A [m: 0] Therefore, the multiplexer 23 selects and outputs the value IS0 inverted by the first sum value S0 according to the control signal SEL [1: 0] output from the control means 17.

이와 같이 상기 멀티플렉서(23)가 상기 S0, IS0, S1, IS1중에서 상황에 따라 적절한 값을 선택하도록 제어하는 것이 제어수단(17)이며, 상기 제어수단(17)은 제3도의 진리표(Truth Table)와 같이 동작한다.As such, the multiplexer 23 controls the multiplexer 23 to select an appropriate value among the S0, IS0, S1, and IS1 according to the situation, and the control means 17 is the truth table of FIG. It works like this:

즉 제3도를 참조하면, 상기 제어수단(17)은, 상기 CSA(13)로부터 입력되는 상기 캐리출력(Cout), 상기 제1합산값의 MSB(S0[m]), 및 상기 제2합산값의 MSB(S1[m])가 로직 (0, 1, 0)이면 상기 멀티플렉서(23)에서 상기 제2합산값(S1)을 선택하게 하는 제1제어신호를 발생하고, 로직 (0, 1, 1)이면 상기 제1합산값(S0)이 상기 제1인버팅 수단(19)에서 인버팅된 값(IS0)을 선택하게 하는 제2제어신호를 발생하며, 로직 (1, 0, 0)이면 상기 제2합산값(S1)을 선택하게 하는 제3제어신호를 발생한다.That is, referring to FIG. 3, the control unit 17 includes the carry output Cout input from the CSA 13, the MSB S0 [m] of the first sum value, and the second sum. If the MSB (S1 [m]) of the value is logic (0, 1, 0), the multiplexer 23 generates a first control signal for selecting the second sum value S1, and logic (0, 1). , 1) generates a second control signal that causes the first sum value S0 to select the inverted value IS0 by the first inverting means 19, and generates logic (1, 0, 0). In this case, a third control signal for selecting the second sum value S1 is generated.

이해를 돕기 위하여, 예로서 제2도에 제1 및 제2입력(A, B)이 입력될 때의 전체적인 연산 과정을 살펴보면,For the sake of understanding, look at the overall calculation process when the first and second inputs A and B are input in FIG.

A=01000000000, B=00111111111로서 A-B0일 때,When A = 01000000000, B = 00111111111 and A-B0,

따라서 캐리출력(Cout)은 1, 상기 제1합산값(S0)의 MSB(S0[10])는 0, 상기 제2합산값(S1)의 MSB(S1[10])는 0이 되고, 이에 따라 상기 제어수단(17)이 제3제어신호를 발생함으로써 상기 멀티플렉서(23)가 상기 제2합산값(S1)을 선택하여 출력한다. 즉 상기 멀티플렉서(23)의 출력(Result[m:0])이 │A-B│ = 00000000001=S1이 된다.Therefore, the carry output Cout is 1, the MSB (S0 [10]) of the first sum value S0 is 0, and the MSB (S1 [10]) of the second sum value S1 is 0. Accordingly, the control means 17 generates a third control signal, so that the multiplexer 23 selects and outputs the second sum value S1. That is, the output (Result [m: 0]) of the multiplexer 23 becomes | A-B | = 00000000001 = S1.

다음에 A=00111111111, B=01000000000로서 A-B0일 때는,Next, when A = 00111111111, B = 01000000000 and A-B0,

따라서 캐리출력(Cout)은 0, 상기 제1합산값(S0)의 MSB(S0[10])는 1, 상기 제2합산값(S1)의 MSB(S1[10])는 1이 되고, 이에 따라 상기 제어수단(17)이 제2제어신호를 발생함으로써 상기 멀티플렉서(23)가 상기 제1합산값(S0)이 인버팅된 값(IS0)을 선택하여 출력한다. 즉 상기 멀티플렉서(23)의 출력(Result[m:0])이 │A-B│=00000000001=IS0가 된다.Therefore, the carry output Cout is 0, the MSB S0 [10] of the first sum value S0 is 1, and the MSB S1 [10] of the second sum value S1 is 1. Accordingly, the control unit 17 generates a second control signal so that the multiplexer 23 selects and outputs the value IS0 in which the first sum value S0 is inverted. That is, the output (Result [m: 0]) of the multiplexer 23 becomes | A-B | = 00000000001 = IS0.

A=00111111111, B=00111111111로서 A-B=0일 때는,When A = 00111111111 and B = 00111111111 and A-B = 0,

따라서 상기 캐리출력(Cout)은 0, 상기 제1합산값(S0)의 MSB(S0[10])은 1, 상기 제2합산값(S1)의 MSB(S1[10])는 0이 되고, 이에 따라 상기 제어수단(17)이 제1제어신호를 발생함으로써 상기 멀티플렉서(23)가 상기 제2합산값(S1)을 선택하여 출력한다. 즉 상기 멀티플렉서(23)의 출력(Result[m:0])이 │A-B│=00000000000=S1이 된다.Therefore, the carry output Cout is 0, the MSB (S0 [10]) of the first sum value S0 is 1, and the MSB (S1 [10]) of the second sum value S1 is 0, Accordingly, the control means 17 generates a first control signal, and the multiplexer 23 selects and outputs the second sum value S1. That is, the output (Result [m: 0]) of the multiplexer 23 becomes | A-B | = 00000000000 = S1.

따라서 상술한 본 발명에 따른 CSA를 이용한 두 수 차이의 절대값 계산기는,Therefore, the absolute value of the difference between the two numbers using the CSA according to the present invention described above,

1개의 CSA와 간단한 제어로직, 및 멀티플렉서로 구성되므로, 하드웨어가 차지하는 칩의 면적을 줄일 수 있고 동작속도를 향상시킬 수 있는 장점이 있다.Since it consists of one CSA, simple control logic, and multiplexer, it can reduce the area of the chip occupied by hardware and improve the operation speed.

또한 본 발명은 상기 실시예에 한정되지 않으며, 본 발명의 기술적 사상내에서 당 기술분야에서 통상의 지식을 가진자에 의해 다양한 변형이 가능함은 명백하다.In addition, the present invention is not limited to the above embodiments, and it is apparent that various modifications are possible by those skilled in the art within the technical idea of the present invention.

Claims (4)

캐리 셀렉트 애더를 이용한 두 수 차이의 절대값 계산기에 있어서, 제2입력을 받아 선택신호의 상태에 따라 상기 제2입력과 동일한 값 및 상기 제2입력을 인버팅한 값중 선택된 어느 하나를 출력하는 연산 선택수단; 상기 연산 선택수단의 출력, 제1입력, 및 제1캐리입력을 받아 덧셈을하여 제1합산값을 출력하고 상기 제1합산값에 제2캐리입력을 받아 뎃셈을하여 제2합산값을 출력하며, 동시에 캐리출력을 발생하는 캐리 셀렉트 애더; 상기 캐리 셀렉트 애더로부터 상기 제1합산값의 MSB, 상기 제2합산값의 MSB, 및 상기 캐리출력을 받아 제어신호를 발생하는 제어수단; 상기 캐리 셀렉트 애더의 출력인 제1 및 제2합산값을 각각 인버팅하는 제1 및 제2인버팅 수단; 상기 제어수단의 출력인 제어신호의 상태에 따라, 상기 제1합산값, 상기 제1합산값이 상기 제1인버팅 수단에서 인버팅된 값, 상기 제2합산값, 및 상기 제2합산값이 상기 제2인버팅 수단에서 인버팅된 값중 선택된 어느 하나를 충력하는 멀티플렉서로 구성되는 것을 특징으로 하는 캐리 셀렉트 애더를 이용한 두 수 차이의 절대값 계산기.In the absolute value of the difference between two numbers using the carry select adder, an operation for receiving a second input and outputs any one selected from the same value as the second input and the value inverting the second input according to the state of the selection signal Selection means; Receives the output of the operation selecting means, the first input, and the first carry input, adds the result, outputs a first sum value, receives the second carry input to the first sum value, adds the sum, and outputs a second sum value; A carry select adder for generating a carry output at the same time; Control means for receiving the MSB of the first sum value, the MSB of the second sum value, and the carry output from the carry select adder and generating a control signal; First and second inverting means for inverting first and second sum values, which are outputs of the carry select adder, respectively; According to the state of the control signal that is the output of the control means, the first sum value, the first sum value is the value inverted by the first inverting means, the second sum value, and the second sum value And a multiplexer for impinging any one selected from the values inverted by the second inverting means. 제1항에 있어서, 상기 연산 선택수단은 상기 제2입력 및 상기 선택신호를 입력으로 하는 배타적 오아(Ecclusive OR)로 구성되고, 상기 선택신호가 로직0이면 상기 제2입력과 동일한 값을 출력하고 상기 선택신호가 로직1이면 상기 제2입력을 인버팅한 값을 출력하는 것을 특징으로하는 캐리 셀렉트 애더를 이요한 두 수 차이의 절대값 계산기.The method of claim 1, wherein the operation selecting means comprises an exclusive OR using the second input and the selection signal as inputs, and outputs the same value as the second input if the selection signal is logic 0. And outputting the inverted value of the second input when the selection signal is logic 1. The absolute value calculator of the difference between two numbers using the carry select adder. 제1항에 있어서, 상기 캐리 셀렉트 애더에 입력되는 상기 제1캐리입력은 로직0이고, 상기 제2캐리입력은 로직1인 것을 특징으로 하는 캐리 셀렉트 애더를 이용한 두 수 차이의 절대값 계산기.2. The absolute value calculator of claim 1, wherein the first carry input is logic 0 and the second carry input is logic 1. 5. 제1항에 있어서, 상기 제어수단은, 상기 캐리 셀렉트 애더로부터 입력되는 상기 캐리출력, 상기 제1합산값의 MSB, 및 상기 제2합산값의 MSB가 로직 (0, 1, 0)이면 상기 멀티플렉서에서 상기 제2합산값을 선택하게 하는 제1제어신호를 발생하고, 로직 (0, 1, 1)이면 상기 제1합산값이 상기 1인버팅 수단에서 인버팅된 값을 선택하게 하는 제2제어신호를 발생하며, 로직 (1, 0, 0)이면 상기 제2합산값을 선택하게 하는 제3제어신호를 발생하는 것을 특징으로 하는 캐리 셀렉트 애더를 이용한 두 수 사이의 절대값 계산기.The multiplexer according to claim 1, wherein the control means comprises: the multiplexer if the carry output input from the carry select adder, the MSB of the first sum value, and the MSB of the second sum value are logic (0, 1, 0). Generates a first control signal for selecting the second sum value, and if the logic is (0, 1, 1), a second control for causing the first sum value to select an inverted value from the first inverting means. And a third control signal that generates a signal and, if logic (1, 0, 0), selects the second summation value. The absolute value calculator between two numbers using a carry select adder.
KR1019960003956A 1996-02-17 1996-02-17 Calculator of absolute value of difference using carry select adder KR0170729B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1019960003956A KR0170729B1 (en) 1996-02-17 1996-02-17 Calculator of absolute value of difference using carry select adder

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1019960003956A KR0170729B1 (en) 1996-02-17 1996-02-17 Calculator of absolute value of difference using carry select adder

Publications (2)

Publication Number Publication Date
KR970062852A KR970062852A (en) 1997-09-12
KR0170729B1 true KR0170729B1 (en) 1999-03-30

Family

ID=19451433

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019960003956A KR0170729B1 (en) 1996-02-17 1996-02-17 Calculator of absolute value of difference using carry select adder

Country Status (1)

Country Link
KR (1) KR0170729B1 (en)

Also Published As

Publication number Publication date
KR970062852A (en) 1997-09-12

Similar Documents

Publication Publication Date Title
EP0483864B1 (en) Hardware arrangement for floating-point addition and subtraction
US7395304B2 (en) Method and apparatus for performing single-cycle addition or subtraction and comparison in redundant form arithmetic
US5027308A (en) Circuit for adding/subtracting two floating point operands
KR100232962B1 (en) Fused floating point multiply and accumulate unit with carry correction
KR20010014992A (en) Divider and method with high radix
KR100264962B1 (en) Combined leading one and leading zero anticipator
US5148386A (en) Adder-subtracter for signed absolute values
KR100203468B1 (en) Arithmetic apparatus for floating point numbers
US5111421A (en) System for performing addition and subtraction of signed magnitude floating point binary numbers
US7428567B2 (en) Arithmetic unit for addition or subtraction with preliminary saturation detection
US5901076A (en) Ripple carry shifter in a floating point arithmetic unit of a microprocessor
Quach et al. An improved algorithm for high-speed floating-point addition
US5726926A (en) Shifter for shifting floating point number utilizing arithmetic operation of redundant binary number, and adder containing the same
KR100627993B1 (en) Three input split-adder
KR950004225B1 (en) High speed carry adding adder
US20050188000A1 (en) Adder
KR100290906B1 (en) method and appratus for performing simultaneously addition and rounding in a floating point multiplier
KR0170729B1 (en) Calculator of absolute value of difference using carry select adder
Schwarz Binary Floating-Point Unit Design: the fused multiply-add dataflow
EP0332215B1 (en) Operation circuit based on floating-point representation
US7240085B2 (en) Faster shift value calculation using modified carry-lookahead adder
JP3187402B2 (en) Floating point data addition / subtraction circuit
KR0172308B1 (en) Modified booth multiplier
JP3077880B2 (en) Sticky bit detection circuit
KR19980073858A (en) Carry-Selective Adder (CSA) Circuit

Legal Events

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

Payment date: 20060928

Year of fee payment: 9

LAPS Lapse due to unpaid annual fee