JPH05298068A - Comparator - Google Patents

Comparator

Info

Publication number
JPH05298068A
JPH05298068A JP10634592A JP10634592A JPH05298068A JP H05298068 A JPH05298068 A JP H05298068A JP 10634592 A JP10634592 A JP 10634592A JP 10634592 A JP10634592 A JP 10634592A JP H05298068 A JPH05298068 A JP H05298068A
Authority
JP
Japan
Prior art keywords
value
comparator
output
circuit
comparison result
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
JP10634592A
Other languages
Japanese (ja)
Inventor
Akito Fukui
章人 福井
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP10634592A priority Critical patent/JPH05298068A/en
Publication of JPH05298068A publication Critical patent/JPH05298068A/en
Pending legal-status Critical Current

Links

Landscapes

  • Manipulation Of Pulses (AREA)

Abstract

PURPOSE:To provide the comparator to control output by two threshold values and to reduce the number of circuits. CONSTITUTION:At the comparator which outputs a compared result 110 as true when an input value 101 reaches the value equal to a first threshold value 102 and outputs the compared value 110 as false when the input value 101 reaches the value smaller than a second threshold value 103 after that, whether the input value 101 reaches the value equal to the first threshold 102 or not is judged by an equivalence comparator 1. After that, whether the input value 101 reaches the value smaller than the second threshold value 103 is judged by a large/small comparator 2, and the outputs of the equivalence comparator 1 and the large/small comparator 2 is stored by a storage means 3. By a comparison result output control means 8, the compared result 110 is outputted from output 104 of the equivalence comparator 1, output 107 of the large/small comparator 2, and output 105 of the storage means 3. The number of circuits can be reduced by performing the judgement of whether the input value 101 reaches the value smaller than the second threshold value 103 or not by the large/small comparator 2.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、メモリに保持されてい
るデータ量を制御するために使用する比較器に関する。
FIELD OF THE INVENTION This invention relates to comparators used to control the amount of data held in memory.

【0002】[0002]

【従来の技術】近年、ディジタル計算機を使用したデー
タ処理を実行する場合に2つのしきい値間に入力信号値
を設定するための回路の簡略化が望まれている。
2. Description of the Related Art Recently, it has been desired to simplify a circuit for setting an input signal value between two threshold values when performing data processing using a digital computer.

【0003】以下に従来の比較器について、図面を参照
しながら説明する。図3に示すように従来の比較器は、
入力値201と第1のしきい値202が等しいとき1を
出力する同値比較器21が、記憶手段24とNOR回路
25に接続され、第2のしきい値203から1を引いた
値を出力する減算器22が同値比較器23に接続されて
いる。同値比較器23は入力値201と減算結果204
が等しいときに1を出力し、記憶手段24とNOR回路
26に接続されている。記憶手段24がNOR回路25
に接続されさらにNOR回路26に接続されて、比較結
果209を出力する。比較結果出力制御手段27は同値
比較器21の出力205と同値比較器23の出力207
と記憶手段24の出力206とから、入力値201が第
1のしきい値202と等しい値以上に達したときに、比
較結果209を1として出力し、そののち、入力値20
1が第2のしきい値203より小さい値に達したとき
に、比較結果を0として出力するものでNOR回路25
とNOR回路26によって構成されている。
A conventional comparator will be described below with reference to the drawings. As shown in FIG. 3, the conventional comparator is
An equality comparator 21 that outputs 1 when the input value 201 and the first threshold 202 are equal is connected to the storage means 24 and the NOR circuit 25, and outputs a value obtained by subtracting 1 from the second threshold 203. The subtractor 22 that performs the operation is connected to the equality comparator 23. The equivalence comparator 23 receives the input value 201 and the subtraction result 204.
When the values are equal, 1 is output and the storage means 24 and the NOR circuit 26 are connected. Storage means 24 is NOR circuit 25
Connected to the NOR circuit 26 and outputs the comparison result 209. The comparison result output control means 27 outputs the output 205 of the equivalence comparator 21 and the output 207 of the equivalence comparator 23.
And the output 206 of the storage means 24, when the input value 201 reaches a value equal to or more than the first threshold value 202, the comparison result 209 is output as 1, and then the input value 20
The NOR circuit 25 outputs the comparison result as 0 when 1 reaches a value smaller than the second threshold value 203.
And a NOR circuit 26.

【0004】記憶手段24は、端子Jが1となった1ク
ロックのちに1を出力し、端子Kが1となった1クロッ
クのちに0を出力する。
The storage means 24 outputs 1 after 1 clock when the terminal J becomes 1 and outputs 0 after 1 clock when the terminal K becomes 1.

【0005】NOR回路25および26は、2つの入力
端子に0が入力されたときに1を出力し、それ以外のと
きには0を出力する。
The NOR circuits 25 and 26 output 1 when 0 is input to the two input terminals, and output 0 otherwise.

【0006】以上のように構成された比較器について、
以下その動作を図3および図4を用いて説明する。ここ
で、図3に示した比較器は入力値201が第1のしきい
値202と等しい値に達したときに、比較結果209を
1として出力する。一方、入力値201が第2のしきい
値203と等しい値かそれ以上の場合には1を出力し、
小さい場合には0として出力する。
Regarding the comparator configured as described above,
The operation will be described below with reference to FIGS. 3 and 4. Here, the comparator shown in FIG. 3 outputs the comparison result 209 as 1 when the input value 201 reaches a value equal to the first threshold value 202. On the other hand, when the input value 201 is equal to or greater than the second threshold value 203, 1 is output,
If it is smaller, it is output as 0.

【0007】ただし、以上の2つのしきい値は、第1の
しきい値202≧第2のしきい値203に設定してい
る。また、入力値201はカウンタなどの出力を示すも
ので1づつ増減するものとする。
However, the above two threshold values are set such that the first threshold value 202 ≧ the second threshold value 203. The input value 201 indicates the output of a counter or the like, and is incremented or decremented by one.

【0008】まず、図4の状態Aに示すように入力値2
01が第1のしきい値202と等しい値に達したときの
動作について説明する。
First, as shown in the state A of FIG.
The operation when 01 reaches a value equal to the first threshold value 202 will be described.

【0009】入力値201が第1のしきい値202と等
しい値に達したとき、同値比較器21は図4(e)に示
すように同値比較結果205を1として出力する。NO
R回路25は、図4(h)のように同値比較結果205
が1となるためNOR結果208を0として出力する。
入力値201が第1のしきい値202と等しい値に達し
たとき、同値比較器23は図4(g)のように同値比較
結果207を0として出力しているため、NOR回路2
6は図4(i)のように比較結果209を1として出力
する。
When the input value 201 reaches a value equal to the first threshold value 202, the equivalence comparator 21 outputs the equivalence comparison result 205 as 1 as shown in FIG. 4 (e). NO
The R circuit 25 outputs the equivalence comparison result 205 as shown in FIG.
Becomes 1, the NOR result 208 is output as 0.
When the input value 201 reaches a value equal to the first threshold value 202, the equivalence comparator 23 outputs the equivalence comparison result 207 as 0 as shown in FIG.
6 outputs the comparison result 209 as 1 as shown in FIG.

【0010】つぎに、図4の状態Bに示すように入力値
201が第1のしきい値202と等しい値に達したのち
の動作について説明する。
Next, the operation after the input value 201 reaches a value equal to the first threshold value 202 as shown in the state B of FIG. 4 will be described.

【0011】記憶手段24は、同値比較結果205が1
となった1クロックのち、図4(f)のように記憶値2
06を1として出力する。このとき、NOR回路25
は、記憶値206が1であるため、図4(h)のように
NOR結果208を0として出力する。NOR回路26
は、NOR結果208が0であるため、同値比較結果2
07が1となるまでは、図4(i)のように比較結果2
09を1として出力する。同値比較結果207が1とな
るのは、入力値201が第2のしきい値203より小さ
い値に達したときである。
In the storage means 24, the equivalence comparison result 205 is 1
After 1 clock, the stored value is 2 as shown in FIG.
06 is output as 1. At this time, the NOR circuit 25
Has a stored value 206 of 1, the NOR result 208 is output as 0 as shown in FIG. NOR circuit 26
, The NOR result 208 is 0, so the equivalence comparison result 2
Until 07 becomes 1, the comparison result 2 as shown in FIG.
09 is output as 1. The equivalence comparison result 207 becomes 1 when the input value 201 reaches a value smaller than the second threshold value 203.

【0012】以上の説明から、図3に示した比較器は図
4(i)に示すように入力値201が第1のしきい値2
02と等しい値以上である場合、入力値201が第2の
しきい値203より小さい値に達するまで比較結果20
9を1として出力することがわかる。
From the above description, in the comparator shown in FIG. 3, the input value 201 is the first threshold value 2 as shown in FIG.
If the input value 201 reaches a value smaller than the second threshold value 203, the comparison result 20
It can be seen that 9 is output as 1.

【0013】つぎに、図4の状態Cに示すように入力値
201が第2のしきい値203より小さい値に達したと
きの動作について説明する。
Next, the operation when the input value 201 reaches a value smaller than the second threshold value 203 as shown in the state C of FIG. 4 will be described.

【0014】減算器22は、図4(d)のように第2の
しきい値203から1を引いた減算結果204を同値比
較器23に出力する。同値比較器23は、第2のしきい
値203から1を引いた減算結果204と入力値201
が等しいとき、図4(g)のように同値比較結果207
を1として出力する。つまり、同値比較結果207は、
入力値201が第2のしきい値203より小さい値に達
したときに1となる。NOR回路26は、同値比較結果
207が1となると、図4(i)のように比較結果20
9を0として出力する。
The subtractor 22 outputs a subtraction result 204 obtained by subtracting 1 from the second threshold value 203 to the equivalence comparator 23 as shown in FIG. The equivalence comparator 23 receives the subtraction result 204 obtained by subtracting 1 from the second threshold value 203 and the input value 201.
When the two are equal, as shown in FIG.
Is output as 1. That is, the equivalence comparison result 207 is
It becomes 1 when the input value 201 reaches a value smaller than the second threshold value 203. When the equivalence comparison result 207 becomes 1, the NOR circuit 26 outputs the comparison result 20 as shown in FIG.
9 is output as 0.

【0015】つぎに、図4の状態Dに示すように入力値
201が第2のしきい値203より小さい値に達したの
ちの動作について説明する。
Next, the operation after the input value 201 reaches a value smaller than the second threshold value 203 as shown in the state D of FIG. 4 will be described.

【0016】記憶手段24は、同値比較結果207が1
となった1クロックのち、図4(f)のように記憶値2
06を0として出力する。NOR回路25は、同値比較
結果205と記憶値206のいずれもが0となるため、
図4(h)のようにNOR結果208を1として出力す
る。NOR回路26は、NOR結果208が1となるた
め、図4(i)のように比較結果209を0として出力
する。
In the storage means 24, the equivalence comparison result 207 is 1
After 1 clock, the stored value is 2 as shown in FIG.
06 is output as 0. In the NOR circuit 25, both the equivalence comparison result 205 and the stored value 206 become 0,
The NOR result 208 is output as 1 as shown in FIG. Since the NOR result 208 becomes 1, the NOR circuit 26 outputs the comparison result 209 as 0 as shown in FIG.

【0017】したがって図3に示した比較器は、入力値
201が第1のしきい値202と等しい値に達したと
き、比較結果209を1として出力する。そののち、入
力値201が第2のしきい値203と等しい値以上であ
る間は1を出力し、第2のしきい値203より小さい値
に達したときに、比較結果209を0として出力する。
Therefore, the comparator shown in FIG. 3 outputs the comparison result 209 as 1 when the input value 201 reaches a value equal to the first threshold value 202. After that, 1 is output while the input value 201 is equal to or greater than the second threshold value 203, and when it reaches a value smaller than the second threshold value 203, the comparison result 209 is output as 0. To do.

【0018】つぎに、入力値201が4ビットで表され
る値である場合、図3に示した比較器を実現する際に必
要となる回路量について説明する。
Next, when the input value 201 is a value represented by 4 bits, the circuit amount necessary for realizing the comparator shown in FIG. 3 will be described.

【0019】図5に示すように同値比較器21および2
3の回路構成は、トランジスタ4個によって1ゲートを
構成するものとすれば同値比較器は15ゲート必要であ
り、図6に示す減算器22の回路構成では、17ゲート
必要である。
As shown in FIG. 5, equivalence comparators 21 and 2 are provided.
In the circuit configuration of 3, if the four transistors form one gate, the equivalence comparator requires 15 gates, and the circuit configuration of the subtractor 22 shown in FIG. 6 requires 17 gates.

【0020】したがって、図3に示した比較器を実現す
るには、 同値比較器21 15ゲート 減算器22 17ゲート 同値比較器23 15ゲート 記憶手段24 9ゲート NOR回路25 1ゲート NOR回路26 1ゲート 合計58ゲートが必要になる。
Therefore, in order to realize the comparator shown in FIG. 3, the equivalence comparator 21 15 gates subtractor 22 17 gates equivalence comparator 23 15 gates storage means 24 9 gates NOR circuit 25 1 gate NOR circuit 26 1 gate A total of 58 gates are required.

【0021】以上のように従来の構成でも、2つのしき
い値によって比較結果が制御される比較器を実現するこ
とができる。
As described above, even with the conventional configuration, it is possible to realize a comparator in which the comparison result is controlled by two threshold values.

【0022】[0022]

【発明が解決しようとする課題】しかしながら上記従来
の構成では、入力値201が4ビットで表される値であ
る場合でも、実現する際に58ゲートが必要となり、回
路量が大きくなるという問題点を有していた。
However, in the above-mentioned conventional configuration, even when the input value 201 is a value represented by 4 bits, 58 gates are required to realize it, and the circuit amount becomes large. Had.

【0023】本発明は上記従来の問題点を解決するもの
で、従来の比較器よりも回路量の小さい比較器を提供す
ることを目的とする。
The present invention solves the above-mentioned conventional problems, and an object thereof is to provide a comparator having a smaller circuit amount than the conventional comparator.

【0024】[0024]

【課題を解決するための手段】上記目的を達成するため
に本発明の比較器は、減算器22と同値比較器23に換
えて大小比較器を設けることにより大小比較器からの出
力を用いて比較結果を制御するような構成を有してい
る。
In order to achieve the above object, the comparator of the present invention uses the outputs from the large and small comparators by providing a large and small comparator in place of the subtractor 22 and the equivalence comparator 23. It has a configuration for controlling the comparison result.

【0025】[0025]

【作用】本発明は上記した構成において従来の減算器と
同値比較器に換え大小比較器を用いたことで、従来の比
較器よりも回路量を小さくすることができることとな
る。
According to the present invention, the circuit amount can be made smaller than that of the conventional comparator by using the magnitude subtractor in place of the conventional subtractor and the equal value comparator in the above-mentioned structure.

【0026】[0026]

【実施例】以下本発明の一実施例について、図面を参照
しながら説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings.

【0027】図1に示すように本実施例の比較器は、入
力値101が第1のしきい値102と等しいときに1を
出力する同値比較器1が、記憶手段3とOR回路4に接
続され、入力値101が第2のしきい値103以上であ
るときに1を出力する大小比較器2が、反転回路6とN
AND回路5に接続されている。記憶手段3は、OR回
路4とNAND回路5に接続され、NAND回路5はN
OR回路7に接続され、反転回路6は、記憶手段3とN
OR回路7に接続され、NOR回路7から比較結果11
0を出力している。比較結果出力制御手段8は同値比較
器1の出力104と大小比較器2の出力107と記憶手
段3の出力105とから、入力値101が第1のしきい
値102と同じ値以上に達したときに、比較結果110
を1として出力し、そののち、入力値101が第2のし
きい値103より小さい値に達したときに、比較結果1
10を0として出力するもので、OR回路4とNAND
回路5と反転回路6とNOR回路7によって構成されて
いる。
As shown in FIG. 1, in the comparator of the present embodiment, the equivalence comparator 1 that outputs 1 when the input value 101 is equal to the first threshold value 102 is stored in the storage means 3 and the OR circuit 4. The magnitude comparator 2 that is connected and outputs 1 when the input value 101 is the second threshold value 103 or more is
It is connected to the AND circuit 5. The storage unit 3 is connected to the OR circuit 4 and the NAND circuit 5, and the NAND circuit 5 is N
The inverting circuit 6 is connected to the OR circuit 7 and is connected to the storage means 3 and N.
Connected to the OR circuit 7, the comparison result 11 from the NOR circuit 7
0 is output. The comparison result output control means 8 determines that the input value 101 has reached the same value as the first threshold value 102 or more from the output 104 of the equality comparator 1, the output 107 of the magnitude comparator 2 and the output 105 of the storage means 3. Sometimes the comparison result 110
Is output as 1, and thereafter, when the input value 101 reaches a value smaller than the second threshold value 103, the comparison result 1
10 is output as 0, and the OR circuit 4 and NAND
It is composed of a circuit 5, an inverting circuit 6, and a NOR circuit 7.

【0028】記憶手段3は、端子Jが1となった1クロ
ックのちに1を出力し、端子Kが1となった1クロック
のちに0を出力する。
The storage means 3 outputs 1 after 1 clock when the terminal J becomes 1 and outputs 0 after 1 clock when the terminal K becomes 1.

【0029】OR回路4は、2つの入力端子に0が入力
されたときに0を出力し、それ以外のときには1を出力
する。
The OR circuit 4 outputs 0 when 0 is input to the two input terminals, and outputs 1 otherwise.

【0030】NAND回路5は、2つの入力端子に1が
入力されたときに0を出力し、それ以外のときには1を
出力する。
The NAND circuit 5 outputs 0 when 1 is input to the two input terminals, and outputs 1 otherwise.

【0031】反転回路6は、入力された値の正負を反転
した値を出力する。NOR回路7は、2つの入力端子に
0が入力されたときに1を出力し、それ以外のときには
0を出力する。
The inverting circuit 6 outputs a value obtained by inverting the positive / negative of the input value. The NOR circuit 7 outputs 1 when 0 is input to the two input terminals, and outputs 0 otherwise.

【0032】以上のように構成された比較器について、
以下図1および図2を用いてその動作を説明する。
Regarding the comparator configured as described above,
The operation will be described below with reference to FIGS. 1 and 2.

【0033】まず、図2の状態Aに示すように入力値1
01が第1のしきい値102と等しい値に達したときの
動作について説明する。
First, as shown in the state A of FIG.
The operation when 01 reaches a value equal to the first threshold value 102 will be described.

【0034】入力値101が第1のしきい値102と等
しい値に達したときに同値比較器1は、図4(d)に示
すように同値比較結果104を1として出力する。OR
回路4は、同値比較結果104が1となるため、図2
(f)のようにOR結果106を1として出力する。こ
のとき、大小比較器2は、入力値101が第2のしきい
値103以上であるため、図2(g)のように大小比較
結果107を1として出力している。NAND回路5
は、OR結果106と大小比較結果107が1であるた
め、図2(i)のようにNAND結果109を0として
出力する。反転回路6は、大小比較結果107が1であ
るため、図2(h)のように反転結果108を0として
出力する。したがって、NOR回路7は反転結果108
とNAND結果109のいずれもが0であるため、図2
(j)のように比較結果110を1として出力する。
When the input value 101 reaches a value equal to the first threshold value 102, the equivalence comparator 1 outputs the equivalence comparison result 104 as 1, as shown in FIG. OR
In the circuit 4, since the equivalence comparison result 104 is 1, the circuit shown in FIG.
The OR result 106 is output as 1 as shown in (f). At this time, since the input value 101 is equal to or larger than the second threshold value 103, the magnitude comparator 2 outputs the magnitude comparison result 107 as 1 as shown in FIG. NAND circuit 5
Outputs 1 as the OR result 106 and the magnitude comparison result 107, the NAND result 109 is output as 0 as shown in FIG. Since the magnitude comparison result 107 is 1, the inverting circuit 6 outputs the inversion result 108 as 0 as shown in FIG. Therefore, the NOR circuit 7 outputs the inversion result 108.
Since both the NAND result 109 and 0 are 0,
The comparison result 110 is output as 1 as in (j).

【0035】つぎに、図2の状態Bに示すように入力値
101が第1のしきい値102と等しい値に達したのち
の動作について説明する。
Next, the operation after the input value 101 reaches the value equal to the first threshold value 102 as shown in the state B of FIG. 2 will be described.

【0036】記憶手段3は同値比較結果104が1とな
った1クロックのち、図2(e)のように記憶値105
を1として出力する。OR回路4は、記憶値105が1
であるため、図2(f)のようにOR結果106を1と
して出力する。このとき、NAND回路5は大小比較結
果107が1であるため、図2(i)のようにNAND
結果109を0として出力する。また、反転回路6は大
小比較結果107が1であるため、図2(h)のように
反転結果108を0として出力する。したがって、NO
R回路7は反転結果108とNAND結果109のいず
れもが0であるため、図2(j)のように比較結果11
0を1として出力する。
The storage means 3 stores the stored value 105 as shown in FIG. 2E after one clock when the equivalence comparison result 104 becomes 1.
Is output as 1. The storage value 105 of the OR circuit 4 is 1
Therefore, the OR result 106 is output as 1 as shown in FIG. At this time, since the magnitude comparison result 107 of the NAND circuit 5 is 1, the NAND circuit 5 performs NAND as shown in FIG.
The result 109 is output as 0. Further, since the magnitude comparison result 107 is 1, the inverting circuit 6 outputs the inversion result 108 as 0 as shown in FIG. Therefore, NO
Since both the inversion result 108 and the NAND result 109 are 0 in the R circuit 7, as shown in FIG.
Output 0 as 1.

【0037】以上の説明から、図1に示した比較器は入
力値101が第1のしきい値102と等しい値以上であ
る場合、比較結果110を1として出力することがわか
る。
From the above description, it is understood that the comparator shown in FIG. 1 outputs the comparison result 110 as 1 when the input value 101 is equal to or larger than the first threshold value 102.

【0038】つぎに、図2の状態Cに示すように入力値
101が第2のしきい値103より小さい値に達したと
きの動作について説明する。
Next, the operation when the input value 101 reaches a value smaller than the second threshold value 103 as shown in the state C of FIG. 2 will be described.

【0039】入力値101が第2のしきい値103より
小さい値に達したとき、大小比較器2は図2(g)のよ
うに大小比較結果107を0として出力する。NAND
回路5は、大小比較結果107が0であるため図2
(i)のようにNAND結果109を1として出力す
る。NOR回路7は、NAND結果109が1であるた
め図2(j)のように比較結果110を0として出力す
る。このとき、反転回路6は大小比較結果107が0で
あるため、図2(h)のように反転結果108を1とし
て出力する。
When the input value 101 reaches a value smaller than the second threshold value 103, the magnitude comparator 2 outputs the magnitude comparison result 107 as 0 as shown in FIG. 2 (g). NAND
In the circuit 5, the magnitude comparison result 107 is 0, so that FIG.
The NAND result 109 is output as 1 as shown in (i). Since the NAND result 109 is 1, the NOR circuit 7 outputs the comparison result 110 as 0 as shown in FIG. At this time, since the magnitude comparison result 107 is 0, the inversion circuit 6 outputs the inversion result 108 as 1 as shown in FIG.

【0040】つぎに、図2の状態Dに示すように入力値
101が第2のしきい値103より小さい値に達したの
ちの動作について説明する。
Next, the operation after the input value 101 reaches a value smaller than the second threshold value 103 as shown in the state D of FIG. 2 will be described.

【0041】記憶手段3は、反転結果108が1となっ
た1クロックのち、図2(e)のように記憶値105を
0として出力する。このとき、OR回路4は同値比較結
果104と記憶値105が0であるため、図2(f)の
ようにOR結果106を0として出力する。NAND回
路5は、OR結果106が0であるため図2(i)のよ
うにNAND結果109を1として出力する。NOR回
路7は、NAND結果109が1であるため、図2
(j)のように比較結果110を0として出力する。
The storage means 3 outputs the stored value 105 as 0 after one clock when the inversion result 108 becomes 1, as shown in FIG. At this time, the OR circuit 4 outputs the OR result 106 as 0, as shown in FIG. 2F, because the equivalence comparison result 104 and the stored value 105 are 0. Since the OR result 106 is 0, the NAND circuit 5 outputs the NAND result 109 as 1 as shown in FIG. Since the NAND result 109 is 1 in the NOR circuit 7, FIG.
The comparison result 110 is output as 0 as in (j).

【0042】以上の説明から、図1に示した比較器は、
入力値101が第2のしきい値103より小さい値に達
したのちは、比較結果110を0として出力することが
わかる。
From the above description, the comparator shown in FIG.
It can be seen that the comparison result 110 is output as 0 after the input value 101 reaches a value smaller than the second threshold value 103.

【0043】したがって、図1に示した比較器は、入力
値101が第1のしきい値102と等しい値に達したと
き、比較結果110を1として出力する。そののちに、
入力値101が第2のしきい値103と等しい値以上で
ある間は1を出力し、入力値101が第2のしきい値1
03より小さい値に達したときに、比較結果110を0
として出力する。
Therefore, the comparator shown in FIG. 1 outputs the comparison result 110 as 1 when the input value 101 reaches a value equal to the first threshold value 102. After that,
1 is output while the input value 101 is equal to or greater than the second threshold value 103, and the input value 101 is the second threshold value 1
When the value less than 03 is reached, the comparison result 110 is set to 0.
Output as.

【0044】つぎに、入力値101が4ビットで表され
る値である場合、図1に示した比較器を実現する際に必
要となる回路量について説明する。
Next, when the input value 101 is a value represented by 4 bits, the circuit amount necessary for realizing the comparator shown in FIG. 1 will be described.

【0045】前述の従来例で示したように、各組み合わ
せ回路とゲート数の対応関係は、1ゲートをトランジス
タ4個によって構成するものとすれば図5に示した同値
比較器は実現するために15ゲートが必要であり、図7
に示した大小比較器は実現するために22ゲートが必要
である。
As shown in the above-mentioned conventional example, the correspondence relationship between each combinational circuit and the number of gates is to realize the equivalence comparator shown in FIG. 5 if one gate is composed of four transistors. 15 gates are required, as shown in FIG.
The size comparator shown in (2) requires 22 gates to realize.

【0046】したがって、図1の比較器を実現するに
は、 同値比較器1 15ゲート 大小比較器2 22ゲート 記憶手段3 9ゲート OR回路4とNAND回路5 2ゲート 反転回路6 1ゲート NOR回路7 1ゲート 合計50ゲートが必要になる。
Therefore, in order to realize the comparator of FIG. 1, the equality comparator 1 15 gates magnitude comparator 2 22 gates storage means 3 9 gates OR circuit 4 and NAND circuit 5 2 gates inverting circuit 6 1 gate NOR circuit 7 1 gate A total of 50 gates are required.

【0047】このように上記実施例によれば、2つのし
きい値によって比較結果が制御される比較器を実現する
際に必要となる回路量を削減することができるという効
果を有する。
As described above, according to the above-described embodiment, it is possible to reduce the circuit amount required for realizing the comparator in which the comparison result is controlled by the two threshold values.

【0048】たとえば、入力値が4ビットで表される値
である場合、従来58ゲートの回路量が必要であったの
に対して、50ゲートの回路量で実現することができ
る。つまり、約15%の回路量を削減することができ
る。削減できる回路量は入力値のビット数が大きくなる
にしたがって増大する。
For example, when the input value is a value represented by 4 bits, the circuit amount of 58 gates is conventionally required, whereas the circuit amount of 50 gates can be realized. That is, the circuit amount can be reduced by about 15%. The circuit amount that can be reduced increases as the number of bits of the input value increases.

【0049】なお、以上の説明で比較結果出力制御手段
8からの比較結果110が1として出力した場合を真と
し、比較結果110が0として出力した場合を偽として
表示する場合もある。
In the above description, the case where the comparison result 110 from the comparison result output control means 8 is output as 1 may be displayed as true, and the case where the comparison result 110 is output as 0 may be displayed as false.

【0050】[0050]

【発明の効果】以上の実施例から明らかなように、本発
明によれば2つのしきい値によって比較結果が制御され
る比較器を実現する際に必要となる回路量を削減する優
れた比較器を実現できるものである。
As is apparent from the above embodiments, according to the present invention, it is possible to reduce the amount of circuits required to realize a comparator in which the comparison result is controlled by two threshold values. Can be realized.

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

【図1】本発明の一実施例の比較器のブロック図FIG. 1 is a block diagram of a comparator according to an embodiment of the present invention.

【図2】同実施例の動作タイミング図FIG. 2 is an operation timing chart of the embodiment.

【図3】従来の比較器のブロック図FIG. 3 is a block diagram of a conventional comparator.

【図4】同比較器の動作タイミング図FIG. 4 is an operation timing chart of the comparator.

【図5】同値比較器の構成回路図FIG. 5 is a configuration circuit diagram of an equivalence comparator.

【図6】減算器の構成回路図FIG. 6 is a configuration circuit diagram of a subtractor.

【図7】大小比較器の構成回路図FIG. 7 is a circuit diagram of a size comparator.

【符号の説明】[Explanation of symbols]

1 同値比較器 2 大小比較器 3 記憶手段 8 比較結果出力制御手段 101 入力値 102 第1のしきい値 103 第2のしきい値 110 比較結果 1 Equivalence Comparator 2 Large / Small Comparator 3 Storage Means 8 Comparison Result Output Control Means 101 Input Value 102 First Threshold 103 Second Threshold 110 Comparison Results

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 第1および第2の2つのしきい値によっ
て出力を制御するとともに、入力値が前記第1のしきい
値と同じ値に達したかどうかを判定する同値比較器と、
入力値が前記第2のしきい値以上であるかどうかを判定
する大小比較器と、入力値が前記第1のしきい値に達し
たことを記憶する記憶手段と、前記同値比較器の出力と
前記大小比較器の出力と前記記憶手段の出力とから、前
記入力値が前記第1のしきい値と同じ値に達したとき、
比較結果を真として出力し、そののち、前記入力値が前
記第2のしきい値より小さい値に達したとき、比較結果
を偽として出力するように配された比較結果出力制御手
段を具備してなる比較器。
1. An equality comparator for controlling an output by two first and second threshold values and determining whether or not an input value has reached the same value as the first threshold value,
A magnitude comparator that determines whether or not the input value is equal to or greater than the second threshold value, a storage unit that stores that the input value has reached the first threshold value, and an output of the equal value comparator. From the output of the magnitude comparator and the output of the storage means, when the input value reaches the same value as the first threshold value,
Comparison result output control means arranged to output the comparison result as true and then output the comparison result as false when the input value reaches a value smaller than the second threshold value. Comparable comparator.
JP10634592A 1992-04-24 1992-04-24 Comparator Pending JPH05298068A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10634592A JPH05298068A (en) 1992-04-24 1992-04-24 Comparator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10634592A JPH05298068A (en) 1992-04-24 1992-04-24 Comparator

Publications (1)

Publication Number Publication Date
JPH05298068A true JPH05298068A (en) 1993-11-12

Family

ID=14431231

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10634592A Pending JPH05298068A (en) 1992-04-24 1992-04-24 Comparator

Country Status (1)

Country Link
JP (1) JPH05298068A (en)

Similar Documents

Publication Publication Date Title
JPH10161850A (en) Absolute value comparing circuit
JPH05298068A (en) Comparator
JPH06348507A (en) Microcomputer
JPH04165810A (en) Pulse generating circuit
JP2656251B2 (en) Signal level adjusting circuit and signal level adjusting method
JPH06188872A (en) Synchronization protective circuit
JP3166458B2 (en) Timer circuit
JP2557066B2 (en) Priority control circuit
JP2810584B2 (en) Serial data transfer circuit
JPH0227854B2 (en)
JPS63253598A (en) Rom device
JP3074958B2 (en) Serial multiplier with addition function
JP3245869B2 (en) Polarity selection processing circuit
JP2664109B2 (en) Real-time port
JPH0422220A (en) Synchronous output circuit
JPH0636028A (en) Histogram generating device
JPH0127609B2 (en)
JPH02178831A (en) Circuit and method for multiplying data by-1
JPH05204604A (en) Absolute value circuit
JPS5935453B2 (en) Interrupt priority determination circuit
JPH08329670A (en) Semiconductor device
JPH03102265A (en) Maximum value detecting circuit
JPH0417489B2 (en)
JPH06160453A (en) Method for evaluating phase comparator
JPH01198115A (en) Signal selection circuit