JPS6399609A - Digital arithmetic circuit - Google Patents

Digital arithmetic circuit

Info

Publication number
JPS6399609A
JPS6399609A JP61244550A JP24455086A JPS6399609A JP S6399609 A JPS6399609 A JP S6399609A JP 61244550 A JP61244550 A JP 61244550A JP 24455086 A JP24455086 A JP 24455086A JP S6399609 A JPS6399609 A JP S6399609A
Authority
JP
Japan
Prior art keywords
value
output
input
bits
input value
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
JP61244550A
Other languages
Japanese (ja)
Inventor
Yoshiro Omotani
重谷 好郎
Kenta Sagawa
寒川 賢太
Atsushi Ishizu
石津 厚
Masanobu Tanaka
正信 田中
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 JP61244550A priority Critical patent/JPS6399609A/en
Publication of JPS6399609A publication Critical patent/JPS6399609A/en
Pending legal-status Critical Current

Links

Landscapes

  • Tone Control, Compression And Expansion, Limiting Amplitude (AREA)

Abstract

PURPOSE:To attain the characteristic, which executes the desired clipping operation, with a few logic circuits and a few control circuits by detecting an input value by means of a zero detection circuit and specifying an output value by means of an output switch circuit. CONSTITUTION:The input value which is represented by complements of '2' and composed of N-bits (N: optional integer greater than zero) is inputted, and M-bits (M: optional integer greater than zero and not greater than N) from the most significant bit of the input value is inputted. The zero detection circuit 4 judges whether the most significant bit and the subsequent M-bits of the input value are logical value '0'. When the result of judgement says that all of the M-bits are the logical value '0', the output switch circuit 6 regards the constant of N-bits '0' as an output value. If the result of the judgement says that one of the M-bits is not logical value '0', the output switch circuit regards the input value as an output value. Thus a few of control circuits can execute the clipping operation.

Description

【発明の詳細な説明】 産業上の利用分野 本発明はディジタル信号処理における非線形演算回路に
関するものであり、ディジタル信号の比較的低レベルの
振幅成分をクリップするような特性を有するディジタル
演算回路を提供しようとするものである。
Detailed Description of the Invention Field of the Invention The present invention relates to a nonlinear arithmetic circuit in digital signal processing, and provides a digital arithmetic circuit having a characteristic of clipping relatively low-level amplitude components of a digital signal. This is what I am trying to do.

従来の技術 近年、ディジタル技術の進歩に伴ない、論理素子、記憶
素子等の大集積化、高速化がめざましく、このため従来
のアナログ信号処理手法に替えてディジタル信号処理手
法の導入が高まっている。ディジタル信号処理手法では
信号を2進表現の数値として取り扱い、これらの数値に
対して種々の演算を行うことにより処理される。このよ
うなディジタル信号処理の1つとして非線形処理が挙げ
られる。この非線形処理は文字通り非線形演算により処
理されるが、一般に非線形演算は演算のアルゴリズムが
線形演算である加算演算等に比べて複雑となる。このた
め簡易な方法として、ROM(リードオンリーメモリ:
続出し専用メモリ)による演算テーブル参照方式と呼ば
れる方式が従来より用いられている。ROMによる演算
テーブル参照方式は、あらかじめ所望の非線形特性をR
OMに記憶しておき、ROMに入力値が与えられること
により非線形特性に応じた出力値が出力されるようにし
たものである。
Conventional technology In recent years, with the advancement of digital technology, logic elements, memory elements, etc. have become more integrated and faster, and as a result, digital signal processing methods are increasingly being introduced in place of conventional analog signal processing methods. . In digital signal processing techniques, signals are treated as numerical values expressed in binary, and these numerical values are processed by performing various operations. Nonlinear processing is one example of such digital signal processing. This nonlinear processing is literally performed by nonlinear calculations, but nonlinear calculations are generally more complex than addition calculations, etc. whose calculation algorithms are linear calculations. For this reason, a simple method is to use ROM (read-only memory).
Conventionally, a method called an arithmetic table reference method using a sequential read-only memory has been used. In the calculation table reference method using ROM, the desired nonlinear characteristics are determined in advance by R.
The input value is stored in the OM, and when the input value is given to the ROM, an output value corresponding to the nonlinear characteristic is output.

上記方式を用いた非線形処理の1つとして、入力値が所
定値の範囲内のときには定数“0”を出力値とし、入力
値が所定値の範囲外のときには入力値を出力値とするク
リップ処理がある。
One of the non-linear processes using the above method is a clipping process that uses a constant "0" as the output value when the input value is within a predetermined value range, and uses the input value as the output value when the input value is outside the predetermined value range. There is.

このクリップ処理はディジタル信号に重量した微少振幅
の雑音除去等に用いられており、特に上記演算テーブル
参照方式を用いることにより所望の特性が任意に可変で
きるなど柔軟な処理が可能となり、アナログ信号処理に
比べて大きな利点がある。
This clip processing is used to remove minute amplitude noise from digital signals, etc. In particular, by using the calculation table reference method mentioned above, it is possible to perform flexible processing such as arbitrarily changing the desired characteristics, and analog signal processing has a big advantage over.

以下図面を参照しながら上述した従来の演算テーブル参
照方式によりクリップ処理を行うディジタル演算回路の
一例について説明する。
An example of a digital arithmetic circuit that performs clip processing using the conventional arithmetic table reference method described above will be described below with reference to the drawings.

第6図は従来の演算テーブル参照方式によりクリップ処
理を行うディジタル演算回路の構成を示すブロック図で
あり、第7図は具体例を示すブロック図である。また、
第2図にクリップ処理の入出力特性の一例を示す。実線
で表わしたのが入出力特性である。第6図において1は
入力値を入力する入力端子、9はクリップ処理を行なっ
た出力値を出力する出力端子、2は従来の演算テーブル
参照方式によりクリップ処理を行うクリップ処理回路で
ある。第7図で第6図と同じ番号を付したものはそれぞ
れ対応しており、2aは人力値に対応した各アドレスに
第2図に示すような出力値をデータとして記憶したRO
Mであり、2bはROM2aのアドレス端子、2cはR
OMのデータ出力端子である。
FIG. 6 is a block diagram showing the configuration of a digital arithmetic circuit that performs clip processing using a conventional arithmetic table reference method, and FIG. 7 is a block diagram showing a specific example. Also,
FIG. 2 shows an example of input/output characteristics of clip processing. The solid line represents the input/output characteristics. In FIG. 6, 1 is an input terminal for inputting an input value, 9 is an output terminal for outputting an output value subjected to clip processing, and 2 is a clip processing circuit for performing clip processing using a conventional arithmetic table reference method. In Fig. 7, the same numbers as in Fig. 6 correspond to each other, and 2a is an RO that stores output values as data as shown in Fig. 2 at each address corresponding to the human power value.
M, 2b is the address terminal of ROM2a, and 2c is R
This is the data output terminal of OM.

以上のように構成された演算テーブル参照方式によりク
リップ処理を行うディジタル演算回路について、以下そ
の動作について説明する。入力端子lおよび出力端子、
9はそれぞれROM2aのアドレス端子2b、データ出
力端子2cに接続されている。
The operation of the digital arithmetic circuit that performs clip processing using the arithmetic table reference method configured as described above will be described below. input terminal l and output terminal,
9 are connected to the address terminal 2b and data output terminal 2c of the ROM 2a, respectively.

またROM2aは入力端子1からの入力値に対応した各
アドレスに第2図に示すような出力値をデータとしで記
憶している。これより、まず入力端子1に入力値が与え
られると、入力値に対応したROM2aのアドレスが選
択される。このアドレスには第2図に示すような出力値
がデータとしてあらかじめ記憶されているため、この結
果データ出力端7−20には入力値が所定値の範囲内(
第2図では“0”から“k”まで)のときには定数“O
”を、入力値が所定値の範囲外(第2図では“k”以上
)のときには入力値を出力値として得ることができ、こ
れによりクリップ処理が実現できる。
The ROM 2a also stores output values as shown in FIG. 2 at each address corresponding to the input value from the input terminal 1 as data. From this, when an input value is first given to the input terminal 1, the address of the ROM 2a corresponding to the input value is selected. Since the output value as shown in FIG. 2 is stored in advance as data at this address, the input value is within the predetermined range (
In Figure 2, from “0” to “k”), the constant “O”
”, when the input value is outside the predetermined value range (“k” or more in FIG. 2), the input value can be obtained as the output value, thereby realizing the clipping process.

(参考文献:村上、榎並:カラー補正器、テレビジョン
学会誌、33.4 (1979) P 291〜295
)発明が解決しようとする問題点 しかしながら上記のような構成では、ROMを用いてい
るため入力値のビット数が増えるに従いROMの容量が
増大(人力ビット数をnビット増すと容量は2a倍とな
る)するので、素子数が非常に多(なり、例えば上記の
ような構成をディジタル信号処理用のLSI(大規模集
積回路)に導入しようとした場合LSIの規模が非常に
大きくなるというような問題点を有していた。
(Reference: Murakami, Enami: Color corrector, Journal of the Television Society, 33.4 (1979) P 291-295
) Problems to be Solved by the Invention However, in the above configuration, since a ROM is used, the capacity of the ROM increases as the number of bits of the input value increases. For example, if you try to introduce the above configuration into an LSI (Large Scale Integrated Circuit) for digital signal processing, the scale of the LSI will become very large. It had some problems.

本発明は上記問題点に鑑み、ディジタル演算回路を構成
する素子数を増大することなく、また入力値のビット数
増加が素子数増加に大きく影響を与えるということのな
いディジタル演算回路を提供するものである。
In view of the above problems, the present invention provides a digital arithmetic circuit without increasing the number of elements constituting the digital arithmetic circuit, and in which an increase in the number of bits of an input value does not significantly affect the increase in the number of elements. It is.

問題点を解決するための手段 上記問題点を解決するために本発明のディジタル演算回
路は、Nピッl−(Nは0以上の任意の整数)の2の補
数表現の入力値を入力し、前記人力値の最上位ビットよ
りMビット(Mは0以上、N以下の任意の整数)を入力
し、前記入力値の最上位ビットよりMビットがすべて論
理値“0”であるか判断し、その判断結果を出力するゼ
ロ検出回路と、前記入力値と前記ゼロ検出回路からの判
断結果を入力し、前記ゼロ検出回路からの判断結果が前
記入力値の最上位ビットよりMビットがすべて論理値“
0゛である場合にはNビットの定数“0”を出力値とし
、前記ゼロ検出回路からの判断結果が前記入力値の最上
位ビットよりMビットの中で1つでも論理値“O”でな
いビットがある場合には前記入力値を出力値とする出力
スイッチ回路とを備えたものである。
Means for Solving the Problems In order to solve the above problems, the digital arithmetic circuit of the present invention inputs an input value in two's complement representation of N pitches (N is any integer greater than or equal to 0), Input M bits (M is any integer greater than or equal to 0 and less than or equal to N) from the most significant bit of the human input value, and determine whether all M bits from the most significant bit of the input value are logical “0”; A zero detection circuit outputs the judgment result, and the input value and the judgment result from the zero detection circuit are input, and the judgment result from the zero detection circuit is such that all M bits from the most significant bit of the input value are logical values. “
If it is 0, the N-bit constant "0" is set as the output value, and the judgment result from the zero detection circuit is that even one of the M bits from the most significant bit of the input value is not a logical value "O". If there is a bit, the output switch circuit outputs the input value as the output value.

作用 本発明は上記した構成により、まず2の補数表現の入力
値が比較的小さな値の場合には入力値の上位ビットの論
理値は“0”が連続することを利用し、ゼロ検出回路に
より入力値の上位ビットの論理値がすべて0″であるか
を検出し、すべて“0”である場合には出力スイッチ回
路により定数“O”を出力値とし、1つでも論理値“0
”でないビットがある場合には出力スイッチ回路により
入力値を出力値とすることにより、所望のクリップ処理
を行う特性をわずかな論理回路とコントロール回路によ
り実現している。
Operation The present invention has the above-described configuration. First, when the input value expressed in two's complement representation is a relatively small value, the logic value of the upper bit of the input value is a continuous "0", and the zero detection circuit detects the It detects whether the logic values of the upper bits of the input value are all 0", and if they are all "0", the output switch circuit sets the constant "O" as the output value, and even one logic value is "0".
If there is a bit that is not "," the input value is made the output value by the output switch circuit, thereby achieving the characteristic of performing the desired clipping process with a small number of logic circuits and control circuits.

実施例 以下本発明の一実施例のディジタル演算回路について、
図面を用いて説明する。
Example Below, regarding a digital arithmetic circuit according to an example of the present invention,
This will be explained using drawings.

第1図は本発明のクリップ処理を行うディジタル演算回
路の構成を示すブロック図である。第1図においてIは
入力端子でありNビット(Nは0以上の任意の整数)の
2の補数表現の入力値10を入力する。通常Nビットの
自然2進表現とは、ゼロ〜2N−1の正整数XをNビッ
トの符号X。
FIG. 1 is a block diagram showing the configuration of a digital arithmetic circuit that performs clip processing according to the present invention. In FIG. 1, I is an input terminal to which an input value 10 in two's complement representation of N bits (N is any integer greater than or equal to 0) is input. Normally, N-bit natural binary representation means that a positive integer X from zero to 2N-1 is represented by an N-bit code X.

(i=l〜N)を用いて符号列(X I +  XZ 
t  X3・・・XN) とし、 ■ X−Σ  Xi  42”−’ 、  xt = (0
,1)i=1 として表現する。また以下X、を最上位ピント、XNを
最下位ビットと呼ぶ。ここでNビットの2の補数表現と
は、ゼロ〜2 (N−1)の正整数Yの負値−YをNビ
ットの符号y;’(+=1〜N)を用いて符号列(3’
+  ’+  3’2  ’+  y3  ’・・・y
、、’)として表現するとき、Nピントのゼロ〜2(N
−11までの正整数Yを表現する符号列(y++Yz+
y3・・・yn)のそれぞれの符号を論理反転し、1を
加えた数を符号列(yI  ’、Yz  ’、Y3 ’
・・・y、、’)として表現することである。
(i=l~N) to create a code string (X I + XZ
t X3...XN), ■
, 1) Expressed as i=1. Further, hereinafter, X will be referred to as the most significant bit, and XN will be referred to as the least significant bit. Here, the N-bit two's complement representation means that the negative value -Y of a positive integer Y from zero to 2 (N-1) is expressed as a code string ( 3'
+'+3'2'+y3'...y
,,'), zero to 2(N
A code string (y++Yz+
Logically invert each sign of y3...yn) and add 1 to the code string (yI', Yz', Y3'
...y,,').

例えば5ビツトの自然2進数表現で正整数“3”を表現
するには符号例(00011)となり、5ビツトの2の
補数表現で負値“−1”を表現するには符号例(111
11)となる。
For example, to represent the positive integer "3" in 5-bit natural binary representation, use the code example (00011), and to represent the negative value "-1" in 5-bit two's complement representation, use the code example (111).
11).

4はゼロ検出回路であり、入力値10の最上位ビットよ
りMピッI−(Mは0以上、N以下の任意の整数)分で
あるゼロ検出回路入力値100を入力し、このゼロ検出
回路人力値100のすべてのビットが論理値“0”であ
るかを判断し、その判断結果をゼロ検出回路出力49と
して出力する。
4 is a zero detection circuit, input the zero detection circuit input value 100 which is M pips I- (M is any integer greater than or equal to 0 and less than or equal to N) from the most significant bit of the input value 10, and this zero detection circuit It is determined whether all bits of the human input value 100 have a logical value of "0", and the determination result is outputted as the zero detection circuit output 49.

6は出力スイッチ回路であり、ゼロ検出回路出力49と
入力値10を入力し、スイッチ6Sにより、ゼロ検出回
路出力49の判断結果が、ゼロ検出回路人力値100の
すべてのビットが論理値“0”である場合にはNビット
の定数“0”を出力値60とし、ゼロ検出回路出力49
の判断結果が、ゼロ検出回路入力値100の各ビットの
中で1つでも論理値“0”でないビットがある場合には
人力値10を出力値60としている。9は出力端子であ
りクリップ処理を行なった出力値60を出力する。
6 is an output switch circuit, which inputs the zero detection circuit output 49 and the input value 10, and the switch 6S determines that the judgment result of the zero detection circuit output 49 is such that all bits of the zero detection circuit human power value 100 are set to the logical value "0". ”, the N-bit constant “0” is set as the output value 60, and the zero detection circuit output 49
If the judgment result is that there is even one bit that is not a logic value "0" among the bits of the input value 100 of the zero detection circuit, the human input value 10 is set as the output value 60. Reference numeral 9 denotes an output terminal which outputs an output value 60 which has been subjected to clip processing.

以上のように構成されたクリップ処理を行うディジタル
演算回路について以下第1図及び第2図を用いてその動
作を説明する。
The operation of the digital arithmetic circuit configured as above that performs clip processing will be described below with reference to FIGS. 1 and 2.

まず第2図は本発明のクリップ処理を行うディジクル演
算回路の入出力特性を示している。すなわち入力値が“
0″から“k ”までは出力値は“0°′であり、“k
”以上では出力値は入力値と等しい。
First, FIG. 2 shows the input/output characteristics of the digital calculation circuit that performs the clipping process of the present invention. In other words, if the input value is “
The output value is “0°” from “0” to “k”, and “k
``The output value is equal to the input value.

ここで入力値10のビット数をN、ゼロ検出回路入力値
100のビット数をMとし、クリップ処理を行う範囲“
k”を、 “k″=2H−M とすると、“k”未満では人力値10の上位ビットから
Mピント分、すなわちゼロ検出回路人力100の各ビッ
トはすべて論理値“0”である。すなわち入力値10の
上位Mビットのそれぞれのビットを論理値゛0”か“1
”かを判断し、すべて“0”であれば定数“0”を出力
値60とし、それ以外は入力値10を出力値60とする
ことにより第2図に示すような入出力特性を得ることが
できる。
Here, the number of bits of input value 10 is N, the number of bits of zero detection circuit input value 100 is M, and the range for clipping is "
If "k" is "k"=2H-M, then below "k", the M focus portion from the upper bit of the human power value 10, that is, each bit of the zero detection circuit human power 100, is all logical value "0". Set each bit of the upper M bits of input value 10 to logical value “0” or “1”
”, and if they are all “0”, set the constant “0” to the output value 60, otherwise set the input value 10 to the output value 60, thereby obtaining the input/output characteristics shown in Figure 2. Can be done.

さて入力端子1にNビット・の入力値10が与えられる
と、ゼロ検出回路4には入力値10の最上位ビットより
Mピット分のゼロ検出回路入力値100が入力される。
Now, when an N-bit input value 10 is given to the input terminal 1, the zero detection circuit input value 100 corresponding to M pits is inputted to the zero detection circuit 4 from the most significant bit of the input value 10.

ゼロ検出回路4では、このゼロ検出回路入力値100の
ずべてのビ1,1・が論理値“0゛であるかどうかを判
断する。この判断結果はすべてのビットが論理値“0”
の場合かあるいは1つでも論理値“0”でないピッ1−
がある場合かをゼロ検出回路出力49として出力スイッ
チ回路6に出力する。すなわちゼロ検出回路入力値10
0のすべてのビットが論理値゛′0”の場合には、先の
理由より入力値10は“k”未満であるため、定数“0
”を出力値60とし、それ以外は入力値10ば“k ”
以上であるため人力値10を出力値60とすることによ
り所望のクリップ特性が得られる。この処理を行なって
いるのが次に述べる出力スイッチ回路6である。出力ス
イッチ回路6はゼロ検出回路出力49と入力値10を入
力し、スイッチ6Sにより、ゼロ検出回路出力49の判
断結果においてゼロ検出回路入力値100のすべてのビ
ットが論理値“0”の場合にはあらかじめ定数“′O”
を記憶した定数6kを選冊 訳し、ゼロ検出回路出力49の判断結果においてゼロ検
出回路入力値100のビットの中で1つでも論理値“0
”でないピッ1−がある場合には入力値10を選択して
、この選択された値が出力値60として出力される。以
−し、この出力値60は入力値10が“0”から“k”
までの範囲は定数“0”であり、“k”以上では入力値
10であり、この結果入力値10と出力値600Å出力
特性は第2図の実線で示すようになる。ゼロ検出回路4
は論理素子により、また出力スイッチ回路6の定数6に
はレジスタにより、また出力スイッチ回路6のスイッチ
6Sはマルチプレクサにより容易に実現できる。
The zero detection circuit 4 judges whether or not all bits 1, 1 of the zero detection circuit input value 100 have the logical value "0".The result of this judgment is that all the bits have the logical value "0".
or if even one of the pins is not logical “0”
If so, it is outputted to the output switch circuit 6 as a zero detection circuit output 49. In other words, zero detection circuit input value 10
If all bits of 0 are logical value ``0'', the input value 10 is less than ``k'' due to the above reason, so the constant ``0'' is set.
” is the output value 60, otherwise the input value is 10, “k”
Therefore, by setting the human power value of 10 to the output value of 60, desired clipping characteristics can be obtained. This process is performed by the output switch circuit 6 described below. The output switch circuit 6 inputs the zero detection circuit output 49 and the input value 10, and uses the switch 6S to switch the output when all bits of the zero detection circuit input value 100 are logical "0" in the judgment result of the zero detection circuit output 49. is a constant "'O" in advance
The constant 6k that has been memorized is translated into a selected book, and the judgment result of the zero detection circuit output 49 shows that even one of the 100 bits of the zero detection circuit input value has a logical value of "0".
If there is a pin that is not "0", input value 10 is selected, and this selected value is output as output value 60. k”
The range up to is a constant "0", and above "k", the input value is 10, and as a result, the input value is 10 and the output value is 600 Å.The output characteristics are as shown by the solid line in FIG. Zero detection circuit 4
can be easily realized by a logic element, the constant 6 of the output switch circuit 6 by a register, and the switch 6S of the output switch circuit 6 by a multiplexer.

以−トのように本実施例によれば、ゼロ検出回路4によ
り入力値10の最上位ビットよりMピット分の各ピッ1
への論理値が“0”か“1”かを判断し、すべて“0”
である場合には入力値10が“k”未満であることを利
用し、出力スイッチ回路6により、ゼロ検出回路4の判
断結果が、ゼロ検出回路入力値100のすべてのビット
が論理値“0”の場合には定数“0゛を出力値60とし
、ゼロ検出回路入力値100のビットの中で1つでも論
理値“0”でないビットがある場合には入力値10を出
力値60とすることにより、第2図の実線で示したよう
なりリップ処理を行う入出力特性を有するディジタル演
算回路をわずかなコントロール回路により実現している
As described above, according to this embodiment, the zero detection circuit 4 detects each of the M pits from the most significant bit of the input value 10.
Determine whether the logical value to is “0” or “1”, and all are “0”
In this case, by utilizing the fact that the input value 10 is less than "k", the output switch circuit 6 changes the determination result of the zero detection circuit 4 so that all bits of the zero detection circuit input value 100 have a logic value of "0". ”, the constant “0” is set as the output value 60, and if there is even one bit that is not the logical value “0” among the bits of the zero detection circuit input value 100, the input value 10 is set as the output value 60. As a result, a digital arithmetic circuit having input/output characteristics for performing rip processing as shown by the solid line in FIG. 2 can be realized with a small number of control circuits.

第3図は本発明のクリップ処理を行うディジタル演算回
路の一具体例を示すブロック図である。
FIG. 3 is a block diagram showing a specific example of a digital arithmetic circuit that performs clip processing according to the present invention.

ここでは説明をわかりやすくするため、第1図の入力値
10、定数6k、および出力値60のビット数を5ビツ
トとし、ゼロ検出回路4のゼロ検出回路入力値1000
ビツト数を3ビツトとした例を挙げて説明する。ここで
第2図における“k”はk”−2N−O−4″ であり、クリップ処理を行う範囲は“0”から“3”ま
でとなる。第3図において第1図と同じ番号を付したも
のはそれぞれ対応している。第1図の入力値10に対応
するのが第3図の入力線11〜15であり、入力線11
が最上位ビット、入力線15が最下位ビットであって、
入力線11〜15により5ビソトの入力値10を表わし
ている。同様に出力値6゜は出力線61〜65により表
わしている。6a〜6eはマルチプレクサであり、4a
はNORゲートであってこれらの入出力論理を第5図に
示す。
Here, in order to make the explanation easier to understand, the number of bits of the input value 10, constant 6k, and output value 60 in FIG.
An example will be explained in which the number of bits is 3 bits. Here, "k" in FIG. 2 is k"-2N-O-4", and the range to be clipped is from "0" to "3". In FIG. 3, the same numbers as in FIG. 1 correspond to each other. Input lines 11 to 15 in FIG. 3 correspond to input value 10 in FIG.
is the most significant bit, input line 15 is the least significant bit,
Input lines 11-15 represent a 5-bit input value 10. Similarly, an output value of 6° is represented by output lines 61-65. 6a to 6e are multiplexers; 4a to 6e are multiplexers;
are NOR gates, and their input/output logic is shown in FIG.

以上のように構成されたクリップ処理を行うディジタル
演算回路の一具体例について説明する。
A specific example of the digital arithmetic circuit configured as described above that performs clip processing will be described.

まず入力端子1より5ピツI・の2の補数表現の入力値
10が入力′ffAl1〜15により入力される。また
入力線11〜13ばゼロ検出回路4に入力される。本具
体例ではゼロ検出回路4をNORゲート4aにより実現
している。すなわち入力線11〜13の論理値がすべて
“0”の時のみゼロ検出回路出力49は論理値“1”と
なる。さて本具体例ではクリップ処理を行う範囲を“0
”から“3”までとした例を挙げていることより、′O
″〜“3”までの入力値10は、入力線11〜15によ
り(00000)〜(00011)と表現され、この範
囲のみ入力線11〜13の論理値がすべて“0”と、な
りNORゲーグー4aにより所望のクリップ処理を行う
範囲を検出できる。NORゲート4aの出力はゼロ検出
回路出力49として出力スイッチ回路6に出力され、マ
ルチプレクサ6a〜6eのセレクト端子Sに接続される
。第5図に示すようなマルチプレクサの論理により、N
ORゲート4aの出力が論理値“1”のときには5ビッ
トの定数“0”が選択され、NORゲーグー4aの出力
が論理値“0”のときには入力線11〜15が選択され
、出力線61〜65を通して出力端子9に出力される。
First, input value 10 in two's complement representation of 5-pix I is input from input terminal 1 through inputs 'ffAl1-15. The input lines 11 to 13 are also input to the zero detection circuit 4. In this specific example, the zero detection circuit 4 is realized by a NOR gate 4a. That is, the zero detection circuit output 49 has a logic value of "1" only when the logic values of the input lines 11 to 13 are all "0". Now, in this specific example, the range for clipping is “0”.
” to “3”, ’O
Input value 10 from '' to 3'' is expressed as (00000) to (00011) by input lines 11 to 15, and only in this range, the logical values of input lines 11 to 13 are all ``0'', which is NOR game. 4a, it is possible to detect the range in which the desired clipping process is to be performed.The output of the NOR gate 4a is output as the zero detection circuit output 49 to the output switch circuit 6, and is connected to the select terminals S of the multiplexers 6a to 6e. With the multiplexer logic as shown, N
When the output of the OR gate 4a is a logical value "1", a 5-bit constant "0" is selected, and when the output of the NOR gate 4a is a logical value "0", input lines 11-15 are selected, and output lines 61-15 are selected. It is output to the output terminal 9 through 65.

以−ヒの動作により本具体例では第2図において“k”
−“3”となるようなりリップ処理を行う入出力特性が
得られる。
In this specific example, "k" in FIG.
- An input/output characteristic that performs rip processing is obtained, such as "3".

第5図は本具体例において、人力値10、ゼロ検出回路
出力49、出力値60のそれぞれの比較を具体的に示し
たものである。
FIG. 5 specifically shows a comparison of the human power value 10, the zero detection circuit output 49, and the output value 60 in this specific example.

なお本具体例では入出力のビット数を5ピント、ゼロ検
出回路入力のピント数を3ビツトとしたが、これは説明
をわかりやすくするための例で、入出力のビット数、お
よび所望のクリップ処理の特性に応じて、マルチプレク
サおよびゼロ検出回路入力のヒント数を増減ずればよい
。また本具体例ではゼロ検出回路4をNORゲーグーa
で実現したが、七ロ検出回路入力値のすべての論理値が
“0”かどうかを判断できるものなら何でもよい。
In this specific example, the number of input/output bits is 5 pins, and the number of pins of the zero detection circuit input is 3 bits, but this is an example to make the explanation easier to understand, and the number of input/output bits and the desired clip Depending on the processing characteristics, the number of hints input to the multiplexer and zero detection circuit may be increased or decreased. In addition, in this specific example, the zero detection circuit 4 is
However, any method that can determine whether all the logical values of the input values of the seven-lo detection circuit are "0" may be used.

発明の効果 以トのように本発明は、Nビット(Nは0以上の任意の
整数)の2の補数表現の入力値を入力し、入力値の最上
位ビットよりMピッl(Mは0以」二、N以下の任意の
整数)を入力し、入力値の最上位ピッ1−よりMビット
がすべて論理値“0”であるかをゼロ検出回路により判
断し、出力スイッチ回路により判断結果が入力値の最上
位ビットよりMビットがすべて論理値“0”である場合
にはNビットの定数“0”を出力値とし、判断結果が入
力値の最上位ビットよりMピントの中で1つでも論理値
゛′0”でないピッYがある場合には入力値を出力値と
するように構成しているので、クリップ処理を行うディ
ジタル演算回路を構成する素子数を増大することなく、
また入力値のビット数増加が素子数増加に大きく影響を
与えるということもなく、わずかなコントロール回路に
よりクリップ処理を行うディジタル演算回路が実現でき
るという優れた効果が得られる。
Effects of the Invention As described above, the present invention inputs an input value in two's complement representation of N bits (N is any integer greater than or equal to 0), and converts the most significant bit of the input value to M bits (M is 0). 2, any integer less than or equal to N), the zero detection circuit determines whether all M bits are logical "0" from the most significant bit 1- of the input value, and the output switch circuit outputs the determination result. If all M bits from the most significant bit of the input value are logical “0”, the N-bit constant “0” is set as the output value, and the judgment result is 1 among the M pintos from the most significant bit of the input value. If there is a pitch Y that does not have a logical value of ``0'' at any time, the input value is set as the output value.
Furthermore, an increase in the number of bits of an input value does not have a large effect on an increase in the number of elements, and an excellent effect can be obtained in that a digital arithmetic circuit that performs clip processing can be realized with a small number of control circuits.

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

第1図は本発明の一実施例におけるディジクル演算回路
のブロック図、第2図は本発明のディジタル演算回路の
入出力特性を示す入出力特性図、第3図は本発明の一具
体例におけるディジタル演算回路のブロック図、第4図
は本発明の具体例の入出力値を比較した入出力特性図の
図、第5図は第3図の各論理素子の論理を示す論理図、
第6図は従来のディジタル演算回路の構成を示すプロ・
ツク図、第7図は第6図の具体例を示すプロ・ツク図で
ある。 1・・・・・・入力端子、2・・・・・・従来のディジ
タル演算回路、4・・・・・・ゼロ検出回路、6・・・
・・・出力スイ・ノチ回路、9・・・・・・出力端子。 代理人の氏名 弁理士 中尾敏男 はか1名第4図 第5図 第6図 ?
FIG. 1 is a block diagram of a digital arithmetic circuit according to an embodiment of the present invention, FIG. 2 is an input/output characteristic diagram showing the input/output characteristics of the digital arithmetic circuit of the present invention, and FIG. 3 is a block diagram of a digital arithmetic circuit according to an embodiment of the present invention. A block diagram of a digital arithmetic circuit, FIG. 4 is an input/output characteristic diagram comparing input and output values of a specific example of the present invention, FIG. 5 is a logic diagram showing the logic of each logic element in FIG. 3,
Figure 6 shows the configuration of a conventional digital arithmetic circuit.
7 is a process diagram showing a specific example of FIG. 6. 1...Input terminal, 2...Conventional digital arithmetic circuit, 4...Zero detection circuit, 6...
...Output switch/nochi circuit, 9...Output terminal. Name of agent: Patent attorney Toshio Nakao (1 person) Figure 4 Figure 5 Figure 6?

Claims (1)

【特許請求の範囲】[Claims] Nビット(Nは0以上の任意の整数)の2の補数表現の
入力値を入力し、前記入力値の上位ビットよりMビット
(Mは0以上、N以下の任意の整数)を入力し、前記入
力値の上位ビットよりMビットがすべて論理値“0”で
あるか判断し、その判断結果を出力するゼロ検出回路と
、前記入力値と前記ゼロ検出回路からの判断結果を入力
し、前記ゼロ検出回路からの判断結果が前記入力値の上
位ビットよりMビットがすべて論理値“0”である場合
にはNビットの定数“0”を出力値とし、前記ゼロ検出
回路からの判断結果が前記入力値の上位ビットよりMビ
ットの中で1つでも論理値“0”でないビットがある場
合には前記入力値を出力値とする出力スイッチ回路を有
することを特徴とするディジタル演算回路。
Input an input value in two's complement representation of N bits (N is any integer greater than or equal to 0), input M bits (M is any integer greater than or equal to 0 and less than or equal to N) from the upper bits of the input value, a zero detection circuit that determines whether all M bits have a logical value "0" from the upper bits of the input value and outputs the determination result; If the judgment result from the zero detection circuit is that all M bits from the upper bits of the input value are logical "0", the N-bit constant "0" is set as the output value, and the judgment result from the zero detection circuit is A digital arithmetic circuit comprising an output switch circuit which sets the input value as an output value when there is even one bit among the M bits higher than the upper bits of the input value that does not have a logical value of "0".
JP61244550A 1986-10-15 1986-10-15 Digital arithmetic circuit Pending JPS6399609A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61244550A JPS6399609A (en) 1986-10-15 1986-10-15 Digital arithmetic circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61244550A JPS6399609A (en) 1986-10-15 1986-10-15 Digital arithmetic circuit

Publications (1)

Publication Number Publication Date
JPS6399609A true JPS6399609A (en) 1988-04-30

Family

ID=17120367

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61244550A Pending JPS6399609A (en) 1986-10-15 1986-10-15 Digital arithmetic circuit

Country Status (1)

Country Link
JP (1) JPS6399609A (en)

Similar Documents

Publication Publication Date Title
JPH0479013B2 (en)
US5721809A (en) Maximum value selector
US4728927A (en) Apparatus and method for performing comparison of two signals
JPS6399609A (en) Digital arithmetic circuit
JPH04350724A (en) Shift extent detecting circuit
JP2565730B2 (en) Overflow detection circuit
JPS6399608A (en) Digital arithmetic circuit
US6044063A (en) Unsigned integer comparator
JPS6399610A (en) Digital arithmetic circuit
JPS6374308A (en) Digital arithmetic circuit
JPS6399606A (en) Digital arithmetic circuit
JPS6374309A (en) Digital arithmetic circuit
KR960015194A (en) Absolute value calculation method and circuit
JPS62173530A (en) Digital arithmetic circuit
JPS62256035A (en) Shift mechanism for program control in program unit having variable data bus range
JP2705162B2 (en) Arithmetic processing unit
JPS6399607A (en) Digital arithmetic circuit
JPS6374311A (en) Digital arithmetic circuit
JPS6374310A (en) Digital arithmetic circuit
JP2832921B2 (en) Functional simulation device
KR100226757B1 (en) Parallel divider
JPS63262910A (en) Digital arithmetic circuit
JPH0764768A (en) Absolute value accumulator
JP3109080B2 (en) Word length limiting circuit
JPH0417026A (en) Data clipping device