JPS58146934A - Comparator for size of data - Google Patents

Comparator for size of data

Info

Publication number
JPS58146934A
JPS58146934A JP2961782A JP2961782A JPS58146934A JP S58146934 A JPS58146934 A JP S58146934A JP 2961782 A JP2961782 A JP 2961782A JP 2961782 A JP2961782 A JP 2961782A JP S58146934 A JPS58146934 A JP S58146934A
Authority
JP
Japan
Prior art keywords
circuit
output
magnitude comparison
data
comparison circuit
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
JP2961782A
Other languages
Japanese (ja)
Inventor
Shigeru Tanaka
茂 田中
Taaki Ichise
多章 市瀬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Original Assignee
Toshiba Corp
Tokyo Shibaura Electric Co Ltd
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 Toshiba Corp, Tokyo Shibaura Electric Co Ltd filed Critical Toshiba Corp
Priority to JP2961782A priority Critical patent/JPS58146934A/en
Publication of JPS58146934A publication Critical patent/JPS58146934A/en
Pending legal-status Critical Current

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/02Comparing digital values

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Manipulation Of Pulses (AREA)

Abstract

PURPOSE:To compare the size of data easily, by inputting binary data groups A, B to a comparator, inputting one of the groups A, B to a NOR or AND circuit and finding OR between the output from the NOR or AND circuit and an output from a data size comparator. CONSTITUTION:The binary data groups A, B are inputted to the size comparator 11 and the data of group B e.g. are inputted to the NOR circuit. When the whole data group B is ''0'', ''1'' is outputted from the NOR circuit and the OR circuit. When the whole data group B is not ''0'', the compared output of the size comparator 11 is outputted through the OR circuit. Consequently, the time required for the comparison of size is sharply reduced when the whole data group B is ''0''. When the maximum value is to be detected, the AND circuit is used in stead of the NOR circuit and the time required for comparison is sharply reduced when all the signals are ''1''.

Description

【発明の詳細な説明】 〔発明の技術分野〕 この発明は、例えばPWM (Pu1se Width
Motalatlam )回路に用いられ、ディジタル
入力の大小を比較する大小比較回路に関する。
[Detailed Description of the Invention] [Technical Field of the Invention] The present invention is applicable to, for example, PWM (Pulse Width
The present invention relates to a magnitude comparison circuit that is used in a circuit (Motalatlam) and compares the magnitude of a digital input.

〔発明の技術的背景〕[Technical background of the invention]

一般に、ディジタル信号の大小比較は第1図に示すよう
に行なわれている。すなわち、2組のディジタルデータ
群A、Bからの信号a・〜亀n−11bO〜1)n−1
を大小比較回路11に供給し、その大小を比較してrA
)BJ、rA−BJ。
Generally, the magnitude comparison of digital signals is performed as shown in FIG. That is, the signals a.~kame n-11bO~1)n-1 from the two digital data groups A and B
is supplied to the magnitude comparison circuit 11, and the magnitudes are compared and rA
) BJ, rA-BJ.

「ム(BJに応じた所定の値を出力する。"Mu (Outputs a predetermined value according to BJ.

〔背景技術の問題点〕[Problems with background technology]

しかし、上記のような構成では、データ群A。 However, in the above configuration, data group A.

Bが入力されてから出力が生成されるまでに比較的大き
い時間的な遅れ(遅低時間)を生じ、この回路の高速化
が望まれている。
There is a relatively large time delay (delay time) from when B is input until output is generated, and it is desired to speed up this circuit.

〔発明の目的〕[Purpose of the invention]

この発明は上記のような事情に鑑みてなされえもので、
その目的とするところは、2wM回路等の特定の被比較
データ入力に対してより短い遅れ時間で出力を生成でき
る改良し九大小比較回路を提供することである。
This invention was made in view of the above circumstances,
The objective is to provide an improved nine-large-small comparator circuit that can produce outputs with shorter delay times for specific compared data inputs, such as 2wM circuits.

〔発明の概要〕[Summary of the invention]

すなわち、この発明においては、二組の二進データ群が
供給される大小比較回路に、入力データ群の一方あるい
は両方が二進数として最小値あるいは最大値であること
を検出する論理回路を設け、入力データ群が最小値ある
いは最大値の時は大小比較回路の出力に優先して出力を
得るように構成したものである。
That is, in the present invention, a magnitude comparison circuit to which two binary data groups are supplied is provided with a logic circuit that detects whether one or both of the input data groups is a minimum value or a maximum value as a binary number, When the input data group has a minimum value or a maximum value, the output is given priority over the output of the magnitude comparison circuit.

〔発明の実施例〕[Embodiments of the invention]

以下、この発明の一実施的について図面を参照して説明
する。箒2図はその構成を示すもので、図においてノア
回路NORは、データ群Bから信号b・〜’+a−1が
最小値であることを検出するもので、オア回路ORはノ
ア回路NORの出力を大小比較回路11の出力に優先さ
せるものである。上記のような構成において、入力デー
タ群Bが全て@0”になった時はノア回路NORおよび
オア回路ORから成る論理回路によって@1”が出力さ
れ、データ群Bが全て@θ′以外の時は大小比較回路1
1の比較出力をオア回路ORを介して得る。
Hereinafter, one embodiment of the present invention will be described with reference to the drawings. Figure 2 shows its configuration. In the figure, the NOR circuit NOR detects that the signal b・~'+a-1 is the minimum value from the data group B, and the OR circuit OR detects the minimum value of the signal b・~'+a-1 from the data group B. The output is given priority over the output of the magnitude comparison circuit 11. In the above configuration, when the input data group B becomes all @0'', the logic circuit consisting of the NOR circuit NOR and the OR circuit OR outputs @1'', and all the data group B become @θ' Time is magnitude comparison circuit 1
A comparison output of 1 is obtained via an OR circuit OR.

このような構成によれば、入力データ群A。According to such a configuration, the input data group A.

Bをhピットの大小比較回路11で比較した結果が出力
されるまでの時間に対し、被比較データ群人ないしBの
最小値を検出する時間の方が短かいので高速化できる。
The time required to detect the minimum value of the data to be compared or the minimum value of B is shorter than the time required to output the result of comparing B with the h-pit magnitude comparison circuit 11, so that the speed can be increased.

すなわち、一方の入力データが最大値もしくは最小値で
ある場合、比較すべき相手のデータの値とは無関係に大
小比較結果が決まる。今、仮に大小比較回路11の機能
を「ム≧B」の時に出力が“1m1「ムぐ1の時に出力
が″0#と設定し、比較データ群人。
That is, when one input data is the maximum value or the minimum value, the magnitude comparison result is determined regardless of the value of the other data to be compared. Now, suppose that the function of the magnitude comparison circuit 11 is set to ``1m1'' when ``MU≧B'', and the output is ``0#'' when ``MU≧B'', and the comparison data group is generated.

B Finピットの@01または正の整数とする。こ 
  。
Set to @01 of B Fin pit or a positive integer. child
.

の場合、ガえば入力データ群Bが全て最小値の@0”で
ある時には、大小比較回路11の出力はデータ群Aの値
とは無関係K”l”である、したがうて、データ群1が
全て@0”の状態を検出してこの信号を大小比較回路1
1の出力に優先させて出力すれば、大小比較回路11の
出力の遅延時間を大幅に短くできる。
In this case, when the input data group B is all the minimum value @0'', the output of the magnitude comparison circuit 11 is K"l" regardless of the value of the data group A. Therefore, data group 1 is Detects the state of “all @0” and converts this signal into the magnitude comparison circuit 1
By giving priority to the output of 1 and outputting it, the delay time of the output of the magnitude comparison circuit 11 can be significantly shortened.

第3図は、入力データ群Aの最大値を検出する回路で、
図において、アンド回路ANDは、データ群Aの信号a
o〜1n−1が最大値であることを検出するもので、オ
ア回路ORは、アンド回路ムぬの出力を大小比較回路1
1(D出力に優先させる4のである。このような構成に
よれば、入力データ群ムが最大値(全て@1”)Kなう
走時には、アンド1路駒およびオア回路ORから成る論
理回路によって短時間で11”が出力される。
Figure 3 shows a circuit that detects the maximum value of input data group A.
In the figure, the AND circuit AND outputs a signal a of data group A.
It detects that o~1n-1 is the maximum value, and the OR circuit OR outputs the output from the AND circuit Munu to the magnitude comparison circuit 1
1 (priority is given to the D output). According to such a configuration, when the input data group is at its maximum value (all @ 1"), the logic circuit consisting of the AND1 block and the OR circuit 11" is output in a short time.

なお、上記各実施例では、入力データ群AあるいはBの
一方に論理回路を設け、最大値あるいは最小値を検出す
るようにしたが、データ群ムおよびBK上記論1lFn
A路を設け、最大値および最小値を検出するように構成
してもよいのはもちろんである。
In each of the above embodiments, a logic circuit is provided in one of the input data groups A or B to detect the maximum value or the minimum value.
Of course, the configuration may be such that path A is provided and the maximum value and minimum value are detected.

ところで、この発明を適用して特に大きな効果が得られ
るものとして、第4図に示すPWM回路がある。PWM
回路は、入力ディジタルデータの大きさに対応するノ4
ルス幅の・fルス信号を発生する回路でちゃ、図におい
て、データ群AはP■変換されるべきデータで、基準と
なるのはアップ(UP)カウンタ12の出力である。
By the way, there is a PWM circuit shown in FIG. 4 that can obtain particularly great effects by applying the present invention. PWM
The circuit has a number 4 corresponding to the size of the input digital data.
In a circuit that generates a pulse signal with a pulse width of .f, the data group A in the figure is data to be converted into P■, and the reference is the output of the UP counter 12.

上記のような構成において、UPカウンタ12の内容が
クロックパルスCPをカウントしてカウントアタグし、
データ群ムの値と等しくなった時大小比較回路11の出
力PWMは@1”から@0”へと変化する。そして、U
Pカウンタ12が桁あふれして信号a−〜an−1が全
て@″1”の状態から@0”の状態へ変化した時出力P
WMが@0#から11”になる、したがって、大小比較
回路11の出力PWMはデータ群Aの大きさに対応し九
ノfルス幅のパルス信号が得られる。ここで、UPカク
ンタ12の内容は11mずつ加算されて行くので、−一
タ1群ムとの比較時には全ビットを比較する必畳がない
ので比較的短い時間で出力が得られるが、UPカウンタ
12の内容が(1,1,1・・・1)から(o、o、o
、−o)へと変化する時には全ビットが変化する九め大
小比較には最も時間がかかシ、この変化に要する遅延時
間がPWM回路の動作速度を決定している。したがって
、ノア回路NORおよびオア回路ORから成る論理回路
を設けてUPカウンタ12の最小値(0,0,0,・・
・0)の状態を検出し、大小比較回路11の出力に優先
させることくよシ遅延時間を大幅に減少できる。このり
明を適用することにより、高速な大小比較回路をI”L
で実現した回路では、従来の約1.5倍の速度が得られ
九。
In the above configuration, the contents of the UP counter 12 count and tag clock pulses CP,
When it becomes equal to the value of the data group, the output PWM of the magnitude comparison circuit 11 changes from @1'' to @0''. And U
When the P counter 12 overflows and the signals a- to an-1 all change from the state @"1" to the state @0", the output P
WM changes from @0# to 11". Therefore, the output PWM of the magnitude comparison circuit 11 corresponds to the size of the data group A, and a pulse signal with a width of 9 f is obtained. Here, the contents of the UP kakunta 12 is added in 11m increments, so there is no need to compare all bits when comparing with -1 and 1 group, so an output can be obtained in a relatively short time, but if the contents of the UP counter 12 are (1, 1 ,1...1) to (o, o, o
, -o), the ninth magnitude comparison in which all bits change takes the longest time, and the delay time required for this change determines the operating speed of the PWM circuit. Therefore, by providing a logic circuit consisting of a NOR circuit NOR and an OR circuit OR, the minimum value of the UP counter 12 (0, 0, 0, . . .
・By detecting the state of 0) and giving priority to the output of the magnitude comparison circuit 11, the delay time can be significantly reduced. By applying this principle, a high-speed magnitude comparison circuit can be realized with I”L
The circuit realized by this method is approximately 1.5 times faster than conventional circuits9.

なお、この発明は上記実施例に限定されるものではなく
、種々変形が可能であシ、最大値シよび最小値を検出し
、この出力を大小比較回路の出力に優先させる論理回路
は他の回路でも東現できる。
Note that the present invention is not limited to the above-mentioned embodiments, and can be modified in various ways.The logic circuit that detects the maximum value and the minimum value and prioritizes this output over the output of the magnitude comparison circuit may be implemented using other logic circuits. Togen can also be used for circuits.

〔発明の効果〕〔Effect of the invention〕

以上説明したようKこの発明によれば、特定の被比較デ
ータ入力に対してより短かい遅れ時間で出力を生成でき
る改良された大小比較回路が得られる。
As described above, according to the present invention, an improved magnitude comparison circuit can be obtained that can generate an output with a shorter delay time for a specific data input to be compared.

【図面の簡単な説明】[Brief explanation of drawings]

第1図は従来の大小比較回路を示す図、第2図はこの発
明の一笑施例に係る大小比較回路を示す構成図、第3図
および第4図はそれぞれこの発明の他の実施例を示す構
成図である。 11・・・大小比較回路* A −B・・・データ群。 NOR・・・ノア回路、OR・・・オア回路、 AND
−・・アンド回路。 出願人代理人 弁理士 鈴 江 武 彦第1図 第3図
FIG. 1 is a diagram showing a conventional magnitude comparison circuit, FIG. 2 is a block diagram showing a magnitude comparison circuit according to an embodiment of the present invention, and FIGS. 3 and 4 are diagrams showing other embodiments of the invention, respectively. FIG. 11... Size comparison circuit * A - B... Data group. NOR...NOR circuit, OR...OR circuit, AND
−...AND circuit. Applicant's representative Patent attorney Takehiko Suzue Figure 1 Figure 3

Claims (3)

【特許請求の範囲】[Claims] (1)  二組の二進データ群が供給されその大小を比
較する大小比較回路と、入力データ群の一方あるいは両
方が二進数として最小値あるいは最大値であることを検
出するとともに入力−−メタ群最小値あるい社最大値の
時に上記大小比較回路の出力に優先して出力を得る論理
回路とを真情することを特徴とする大小比較回路。
(1) A magnitude comparison circuit that is supplied with two binary data groups and compares their magnitude, and detects that one or both of the input data groups is the minimum or maximum value as a binary number, and A magnitude comparison circuit characterized in that a logic circuit obtains an output with priority over the output of the magnitude comparison circuit at the time of a group minimum value or a group maximum value.
(2)  上記論理回路は、一方のデータ群が供給され
るノア回路と、上記ノア回路の出力および大小比較回路
の出力が供給されるオア回路とから成シ、一方のデータ
群の最小値を検出するように構成したことを特徴とする
特許請求の範囲第1項記載の大小比較回路。
(2) The above logic circuit consists of a NOR circuit to which one data group is supplied, and an OR circuit to which the output of the NOR circuit and the output of the magnitude comparison circuit is supplied, and the minimum value of one data group is 2. The magnitude comparison circuit according to claim 1, wherein the magnitude comparison circuit is configured to perform detection.
(3)  上記論理回路は、一方のデータ群が供給され
るアンド回路と、上記アンド回路の出力および大小比較
回路の出力が供給されるオア回路とから成り、一方のデ
ータ群の最大値を検出するように構成したことを特徴と
する特許請求の範囲第1項記載の大小比較回路。
(3) The above logic circuit consists of an AND circuit to which one data group is supplied, and an OR circuit to which the output of the AND circuit and the output of the magnitude comparison circuit are supplied, and detects the maximum value of one data group. A magnitude comparison circuit according to claim 1, characterized in that the circuit is configured to perform the following.
JP2961782A 1982-02-25 1982-02-25 Comparator for size of data Pending JPS58146934A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2961782A JPS58146934A (en) 1982-02-25 1982-02-25 Comparator for size of data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2961782A JPS58146934A (en) 1982-02-25 1982-02-25 Comparator for size of data

Publications (1)

Publication Number Publication Date
JPS58146934A true JPS58146934A (en) 1983-09-01

Family

ID=12281034

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2961782A Pending JPS58146934A (en) 1982-02-25 1982-02-25 Comparator for size of data

Country Status (1)

Country Link
JP (1) JPS58146934A (en)

Similar Documents

Publication Publication Date Title
US4163211A (en) Tree-type combinatorial logic circuit
JPH0746310B2 (en) Semiconductor logic circuit
KR970016931A (en) High speed error or equivalent comparator circuit
US4903005A (en) Comparator circuit
US5548270A (en) Bit sequential type parallel comparator
JPS58146934A (en) Comparator for size of data
US6492855B1 (en) Flip flop which has complementary, symmetric, minimal timing skew outputs
US3313927A (en) Pulse width comparator
US4741005A (en) Counter circuit having flip-flops for synchronizing carry signals between stages
KR930015435A (en) Synchronous Detection Circuit of Digital Signal
JP3589527B2 (en) Displacement measuring device
JP3504316B2 (en) Multi-bit counter
TWI835503B (en) Edge detector
JP2643470B2 (en) Synchronous counter
US7349937B2 (en) Fast incrementer using zero detection and increment method thereof
TWI273772B (en) Data-sampling strobe signal generator and input buffer using the same
JPH0324619A (en) Binary negative number display converter
US6667646B2 (en) Small-sized digital generator producing clock signals
JPH03102265A (en) Maximum value detecting circuit
JPH01117420A (en) Phase comparator
SU864279A1 (en) Number comparator
JPH0490196A (en) Clock pulse detecting circuit
JPS61105640A (en) Parallel complement circuit
JPH0376314A (en) Counter test method
JPH04291654A (en) Interruption control circuit