JPH06224780A - Code conversion circuit - Google Patents

Code conversion circuit

Info

Publication number
JPH06224780A
JPH06224780A JP3011830A JP1183091A JPH06224780A JP H06224780 A JPH06224780 A JP H06224780A JP 3011830 A JP3011830 A JP 3011830A JP 1183091 A JP1183091 A JP 1183091A JP H06224780 A JPH06224780 A JP H06224780A
Authority
JP
Japan
Prior art keywords
circuit
complement
data
output
linear code
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.)
Withdrawn
Application number
JP3011830A
Other languages
Japanese (ja)
Inventor
Masahiro Takeda
雅弘 武田
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.)
NEC Corp
Original Assignee
NEC Corp
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 NEC Corp filed Critical NEC Corp
Priority to JP3011830A priority Critical patent/JPH06224780A/en
Publication of JPH06224780A publication Critical patent/JPH06224780A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

PURPOSE:To suppress the errors of + or -1 bit in code conversion data due to noise or the like by adding '1' at the time of the decrease of data by a comparator circuit. CONSTITUTION:A delay circuit 1 is provided and binary linear code input data represented by the complement of '2' inputted at a certain sampling period are held for one sampling period. By the comparator circuit 2, the output of the delay circuit 1 is compared with the linear code input data and comparison signals are outputted. A complement circuit 3 is provided and the complement of '1' of the linear code input data is obtained. An exclusive OR circuit 4 is provided and the exclusive OR of the code bit of the linear code input data and the comparison signal is taken. An adding circuit 5 letting exclusive OR output be the carry input of a least significant bit is provided and the output of the complement circuit 3 is defined as input A conversion circuit 6 is provided and the output of the adding circuit 5 is converted to nonlinear PCM codes.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は符号変換回路に関し、特
に2の補数表現の直線符号データを非直線PCM符号デ
ータに変換する符号変換回路に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a code conversion circuit, and more particularly to a code conversion circuit for converting linear code data represented by 2's complement into non-linear PCM code data.

【0002】[0002]

【従来の技術】従来、2の補数表現の直線符号データを
8ビットの13折線形A特性の非直線PCM符号(以下
A非直線符号)に変換する符号変換回路は、図7に示す
様に、13ビットの直線符号データLD0 〜LD12の1
の補数を取る排他的論理和ゲート301〜312により
構成された補数回路3と、全加算器501〜512によ
り構成された加算回路5と、図6で示す絶対値表現の直
線符号データとA非直線符号の対応表に従ってコード変
換を行う変換回路6から構成されていた。
2. Description of the Related Art Conventionally, a code conversion circuit for converting linear code data represented by 2's complement into 8-bit non-linear PCM code of 13-fold linear A characteristic (hereinafter referred to as A non-linear code) is as shown in FIG. , 13-bit linear code data LD 0 to 1 of LD 12
Complement circuit 3 composed of exclusive OR gates 301 to 312 for taking the complement of A, adder circuit 5 composed of full adders 501 to 512, linear code data of absolute value expression shown in FIG. The conversion circuit 6 performs code conversion according to the linear code correspondence table.

【0003】次に、動作について説明する。Next, the operation will be described.

【0004】2の補数表現の直線符号データLD12〜L
0 は、最上位ビットLD12が極性を示す符号ビットで
あり、正のデータ時“0”,負のデータ時“1”であ
る。
Linear code data LD 12 to L in 2's complement representation
D 0 is a sign bit indicating the polarity of the most significant bit LD 12 , and is “0” for positive data and “1” for negative data.

【0005】直線符号データLD12〜LD0 を図6に示
した直線符号とA非直線符号の対応表に適合する絶対値
表現の直線符号データに変換するためには、直線符号デ
ータLD12〜LD0 が負であれば、符号ビットを除く下
位12ビットのデータLD11〜LD0 を反転し+1を加
える2の補数を取る必要がある。
[0005] In order to convert the linear code data of the straight line code data LD 12 magnitude representation conforming the to Ld 0 in the correspondence table of the linear code and A nonlinear code illustrated in FIG. 6, the linear code data LD 12 ~ if LD 0 is negative, it is necessary to take 2's complement addition of the data is inverted LD 11 to Ld 0 of lower 12 bits excluding the sign bit plus.

【0006】補数回路3は直線符号データの最上位ビッ
トLD12を一方の入力とし、他方に各ビットLD11〜L
0 を入力する排他的論理和ゲート301〜312で構
成され、1の補数を取る。加算回路5は、この補数回路
3の出力に対し、直線符号データLD12〜LD0 が負の
場合1を加えるための全加算器501〜512により構
成され最下位ビットの全加算器501のキャリー入力C
に符号ビットLD12を入力するものである。これらの全
加算器501〜512は、図4で示す様なゲート回路に
より構成される。
The complement circuit 3 receives the most significant bit LD 12 of the linear code data as one input and the other bits LD 11 to L to the other.
It is composed of exclusive OR gates 301 to 312 for inputting D 0 , and takes 1's complement. The adder circuit 5 is constituted by full adders 501 to 512 for adding 1 to the output of the complement circuit 3 when the linear code data LD 12 to LD 0 is negative, and carries the carry of the least significant bit full adder 501. Input C
The code bit LD 12 is input to. These full adders 501 to 512 are composed of gate circuits as shown in FIG.

【0007】加算回路5の出力は、図6で示す対応表に
よりコード変換を行う変換回路6により変換され、8ビ
ットのA非直線符号データPCM7 〜PCM0 として出
力されるというものであった。
The output of the adder circuit 5 is converted by the conversion circuit 6 which performs code conversion according to the correspondence table shown in FIG. 6, and is output as 8-bit A nonlinear code data PCM 7 to PCM 0 . .

【0008】[0008]

【発明が解決しようとする課題】この従来の符号変換回
路では、A非直線符号が0コードを持たないため、直線
符号に対するA非直線符号が直線符号の0近傍におい
て、ノイズ等により量子化ステップ幅に相当するあいま
いさ、すなわち、±1ビットの誤差を発生するという欠
点がある。
In this conventional code conversion circuit, since the A non-linear code does not have a 0 code, when the A non-linear code to the linear code is near 0 of the linear code, the quantization step is caused by noise or the like. There is a ambiguity corresponding to the width, that is, an error of ± 1 bit is generated.

【0009】また、この符号変換回路の0近傍でのふる
まいは、音声等の信号処理において無信号入力時におけ
るばたつき雑音となるという問題点を有している。
Further, the behavior of the code conversion circuit near 0 has a problem that it causes fluttering noise at the time of no signal input in signal processing of voice and the like.

【0010】[0010]

【課題を解決するための手段】本発明の符号変換回路
は、予め定められたサンプリング周期で入力されるnビ
ットの2の補数で表現される2進数の直線符号入力デー
タを1前記サンプリング周期の間保持する遅延回路と、
前記遅延回路の出力と前記直線符号入力データとを比較
し比較信号を出力する比較回路と、前記直線符号入力デ
ータの1の補数を取る補数回路と、前記直線符号入力デ
ータの最上位ビットである符号ビットと前記比較信号と
の排他的論理和を取り排他的論理和出力を出力する排他
的論理和回路と、前記補数回路の出力を入力し前記排他
的論理和出力を最下位ビットの桁上げ入力とする加算回
路と、前記加算回路の出力を非直線PCM符号に変換す
る変換回路とを備えて構成されている。
In the code conversion circuit of the present invention, binary linear code input data represented by a two's complement of n bits input at a predetermined sampling period is used for one sampling period. Delay circuit for holding
A comparison circuit for comparing the output of the delay circuit with the linear code input data and outputting a comparison signal, a complement circuit for taking the one's complement of the linear code input data, and the most significant bit of the linear code input data. An exclusive OR circuit that takes an exclusive OR of the sign bit and the comparison signal and outputs an exclusive OR output, and the output of the complement circuit is input and the exclusive OR output is carried to the least significant bit. It is provided with an adder circuit for inputting and a conversion circuit for converting the output of the adder circuit into a non-linear PCM code.

【0011】[0011]

【実施例】次に本発明について図面を参照して説明す
る。
The present invention will be described below with reference to the drawings.

【0012】図1は本発明の一実施例を示すブロック図
である。
FIG. 1 is a block diagram showing an embodiment of the present invention.

【0013】図1において、本発明の符号変換回路は、
遅延回路1と、比較回路2と、排他的論理和ゲート4
と、従来例と共通の構成要素である補数回路3と、加算
回路5と、変換回路6とから構成されている。
In FIG. 1, the code conversion circuit of the present invention is
The delay circuit 1, the comparison circuit 2, and the exclusive OR gate 4
And a complement circuit 3, which is a component common to the conventional example, an adder circuit 5, and a conversion circuit 6.

【0014】次に本実施例の動作について説明する。Next, the operation of this embodiment will be described.

【0015】一定のサンプリング間隔で入力される13
ビットの2の補数表現の直線符号データLD12〜LD0
は、ラッチ回路により構成される遅延回路1に1サンプ
リングの間保持される。
13 input at constant sampling intervals
Linear code data LD 12 to LD 0 expressed in 2's complement of bits
Are held in the delay circuit 1 constituted by the latch circuit for one sampling.

【0016】遅延回路1に保持された遅延データの反転
出力信号と、直線符号データLD12〜LD0 は最下位ビ
ットのキャリー入力に“1”を入力する全加算器201
及び全加算器202〜213からなる比較回路2に入力
され、減算を実現することにより、比較が行なわれる。
この比較回路2の最上位ビットCが前回入力の直線符号
データと今回入力された直線符号データとの比較結果を
示しており、“0”の時直線符号データの増加を、
“1”の時直線符号データの減少をそれぞれ示す。
[0016] and the inverted output signal of the delay data stored in the delay circuit 1, the linear code data LD 12 to Ld 0 is the full adder 201 for inputting "1" to the carry input of the least significant bit
And the full adders 202 to 213 are input to the comparison circuit 2, and the comparison is performed by realizing the subtraction.
The most significant bit C of the comparison circuit 2 indicates the result of comparison between the previously input linear code data and the currently input linear code data. When "0", the linear code data increases.
When the value is "1", the linear code data decrease is shown.

【0017】ここで、比較回路2を構成する全加算器2
01〜212は、加算出力信号Sを必要としないため図
3で示すゲート構成の加算器を用いることが可能であ
る。
Here, the full adder 2 constituting the comparison circuit 2
Since 01 to 212 do not require the addition output signal S, it is possible to use the adder having the gate configuration shown in FIG.

【0018】直線符号データLD12〜LD0 は、従来の
実施例で説明した図7の回路と同様に、極性が負の場
合、1の補数を取る補数回路3の排他的論理和ゲート3
01〜312により反転処理が行なわれる。
Like the circuit of FIG. 7 described in the conventional embodiment, the linear code data LD 12 to LD 0 take the 1's complement when the polarity is negative. The exclusive OR gate 3 of the complement circuit 3 is used.
The inversion processing is performed by 01 to 312.

【0019】補数回路3の出力は全加算器501〜51
2により構成される加算回路5により直線符号データL
12〜LD0 が負の場合“1”を加算する。ここで、比
較回路2により検出された直線符号データの増減を示す
比較結果出力信号Cと、直線符号データLD12〜LD0
の極性を示す符号ビットLD12とを入力とする排他的論
理和ゲート4の出力信号Eを加算回路5の最下位ビット
のキャリー入力信号とすることにより、直線符号データ
の2の補数を取る際の負データ時の“1”加算と前回デ
ータとの比較時の減少検出による“1”加算を同時に行
う。
The outputs of the complement circuit 3 are full adders 501 to 51.
The linear code data L
When D 12 to LD 0 are negative, “1” is added. Here, the comparison result output signal C indicating the increase / decrease of the linear code data detected by the comparison circuit 2 and the linear code data LD 12 to LD 0.
When the two's complement of the linear code data is obtained by setting the output signal E of the exclusive OR gate 4 that receives the sign bit LD 12 indicating the polarity of The "1" addition for negative data and the "1" addition by decrease detection at the time of comparison with the previous data are simultaneously performed.

【0020】この動作を具体的に説明する。This operation will be specifically described.

【0021】まず、正データから正データによるデータ
の減少時には、排他的論理和ゲート4の入力が(0,
1)となり、“1”が加算される。また、正データから
負データ、あるいは、負データから負データによるデー
タの減少時には排他的論理和ゲート4の入力が(1,
1)となり、“0”が加算されるが、負データの反転処
理のみが残り、1を加算した後、2の補数を取った結果
と等価となる。また、負データから負データによるデー
タの増加の場合には、排他的論理和ゲート4の入力は
(1,0)となり、“1”が加算される。
First, when data from positive data is reduced by positive data, the input of the exclusive OR gate 4 is (0,
1), and "1" is added. In addition, when the data decreases from the positive data to the negative data or from the negative data to the negative data, the input of the exclusive OR gate 4 is (1,
1) and "0" is added, but only the inversion processing of negative data remains, which is equivalent to the result of adding 1 and then taking the complement of 2. Further, in the case where the data increases from the negative data to the negative data, the input of the exclusive OR gate 4 becomes (1,0), and "1" is added.

【0022】これらの加算処理後、加算回路5の出力及
び直線符号データの最上位ビットLD12は、図6で示す
対応表に従って8ビットのA非直線符号データPCM7
〜PCM0 に変換回路6により変換される。
After these addition processes, the output of the adder circuit 5 and the most significant bit LD 12 of the linear code data are the 8-bit A non-linear code data PCM 7 according to the correspondence table shown in FIG.
To PCM 0 are converted by the conversion circuit 6.

【0023】次に本発明の第二の実施例について説明す
る。
Next, a second embodiment of the present invention will be described.

【0024】図2は、第二の実施例を示すブロック図で
ある。
FIG. 2 is a block diagram showing the second embodiment.

【0025】本実施例の第一の実施例との相違点は、入
力される直線符号データがシリアルデータの場合である
ことである。
The difference of this embodiment from the first embodiment is that the input linear code data is serial data.

【0026】図2において、シフトレジスタ7,8と、
インバータ9と、シリアル加算回路10と、ラッチ回路
10とが図1の第一の実施例と同様の補数回路3と、排
他的論理和ゲート4と、加算回路5と、変換回路6とに
追加されている。
In FIG. 2, shift registers 7 and 8 are provided.
The inverter 9, the serial adder circuit 10, and the latch circuit 10 are added to the complement circuit 3, the exclusive OR gate 4, the adder circuit 5, and the conversion circuit 6 similar to those of the first embodiment of FIG. Has been done.

【0027】次に、本実施例の動作について説明する。Next, the operation of this embodiment will be described.

【0028】シリアルで入力される直線符号データSD
inは、シフトレジスタ7により、パラレルデータに変換
されると同時に、シフトレジスタ7のシリアル出力デー
タSDout はインバータ9を介してシフトレジスタ8へ
入力される。シフトレジスタ8が、遅延回路で1サンプ
リング前のデータを保持する。
Linear code data SD input serially
The in is converted into parallel data by the shift register 7, and at the same time, the serial output data SD out of the shift register 7 is input to the shift register 8 via the inverter 9. The shift register 8 holds the data one sampling before in the delay circuit.

【0029】シフトレジスタ7及び8のシリアル出力S
Oは、シリアル加算回路10により加算が行なわれ比較
される。加算結果、すなわち、比較結果は、ラッチ回路
11に保持される。
Serial output S of shift registers 7 and 8
O is added by the serial adder circuit 10 and compared. The addition result, that is, the comparison result is held in the latch circuit 11.

【0030】このシリアル加算回路10は図5で示す全
加算器とフリップフロップにより構成されている。
The serial adder circuit 10 is composed of a full adder and a flip-flop shown in FIG.

【0031】ラッチ回路11の出力、すなわち、比較結
果出力信号Cは、排他的論理和ゲート4の一方の入力と
なる。
The output of the latch circuit 11, that is, the comparison result output signal C becomes one input of the exclusive OR gate 4.

【0032】以下の変換動作は前述の第一の実施例の動
作と同様である。
The following conversion operation is similar to the operation of the first embodiment described above.

【0033】本実施例では比較動作をシリアル演算で実
施するために加算器を1個しか必要とせず回路の簡略化
が可能となる。
In the present embodiment, only one adder is required to carry out the comparison operation by serial operation, so that the circuit can be simplified.

【0034】[0034]

【発明の効果】以上説明したように、本発明は比較回路
によりデータの増減を点検し、データの減少時に1を加
えることにより、ヒステリシス特性を持たせたため、符
号変換データにおけるノイズ等による±1ビットの誤差
の発生を抑圧できるという効果がある。さらに、音声等
の信号処理における無信号時のばたつき雑音についても
符号変換データの誤差の抑圧により低減できるという効
果がある。
As described above, according to the present invention, since the increase / decrease of the data is checked by the comparison circuit and 1 is added when the data is decreased, the hysteresis characteristic is provided. This has the effect of suppressing the occurrence of bit errors. Further, there is an effect that fluttering noise when there is no signal in signal processing of voice or the like can be reduced by suppressing an error in code conversion data.

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

【図1】本発明の符号変換回路の一実施例を示すブロッ
ク図である。
FIG. 1 is a block diagram showing an embodiment of a code conversion circuit of the present invention.

【図2】本発明の符号変換回路の第二の実施例を示すブ
ロック図である。
FIG. 2 is a block diagram showing a second embodiment of the code conversion circuit of the present invention.

【図3】図1,図2,図7に示す補数回路の全加算器の
一例を示す回路図である。
FIG. 3 is a circuit diagram showing an example of a full adder of the complement circuit shown in FIGS. 1, 2 and 7.

【図4】図1,図2,図7に示す加算回路の全加算器の
一例を示す回路図である。
FIG. 4 is a circuit diagram showing an example of a full adder of the adder circuit shown in FIGS. 1, 2 and 7.

【図5】図2に示すシリアル加算回路の全加算器の一例
を示す回路図である。
5 is a circuit diagram showing an example of a full adder of the serial addition circuit shown in FIG.

【図6】絶対値表現の直線符号データとA非直線符号デ
ータとの対応表を示す図である。
FIG. 6 is a diagram showing a correspondence table between linear code data of absolute value representation and A non-linear code data.

【図7】従来の符号変換回路の一例を示すブロック図で
ある。
FIG. 7 is a block diagram showing an example of a conventional code conversion circuit.

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

1 遅延回路 2 比較回路 3 補数回路 4,301〜312 排他的論理和ゲート 5 加算回路 6 変換回路 7,8 シフトレジスタ 9 インバータ 10 シリアル加算回路 11 ラッチ回路 201〜212,501〜512 全加算器 DESCRIPTION OF SYMBOLS 1 Delay circuit 2 Comparison circuit 3 Complement circuit 4,301 to 312 312 Exclusive OR gate 5 Addition circuit 6 Conversion circuit 7 and 8 Shift register 9 Inverter 10 Serial addition circuit 11 Latch circuit 201 to 212, 501 to 512 Full adder

【手続補正書】[Procedure amendment]

【提出日】平成5年10月22日[Submission date] October 22, 1993

【手続補正1】[Procedure Amendment 1]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】図7[Name of item to be corrected] Figure 7

【補正方法】削除[Correction method] Delete

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 予め定められたサンプリング周期で入力
されるnビットの2の補数で表現される2進数の直線符
号入力データを1前記サンプリング周期の間保持する遅
延回路と、 前記遅延回路の出力と前記直線符号入力データとを比較
し比較信号を出力する比較回路と、 前記直線符号入力データの1の補数を取る補数回路と、 前記直線符号入力データの最上位ビットである符号ビッ
トと前記比較信号との排他的論理和を取り排他的論理和
出力を出力する排他的論理和回路と、 前記補数回路の出力を入力し前記排他的論理和出力を最
下位ビットの桁上げ入力とする加算回路と、 前記加算回路の出力を非直線PCM符号に変換する変換
回路とを備えることを特徴とする符号変換回路。
1. A delay circuit for holding, for one sampling period, binary linear code input data represented by an n-bit two's complement input at a predetermined sampling period, and an output of the delay circuit. And a comparison circuit for comparing the linear code input data with each other and outputting a comparison signal, a complement circuit for taking a one's complement of the linear code input data, and a comparison with the code bit which is the most significant bit of the linear code input data. An exclusive OR circuit that takes an exclusive OR with a signal and outputs an exclusive OR output, and an adder circuit that inputs the output of the complement circuit and uses the exclusive OR output as a carry input of the least significant bit. And a conversion circuit for converting the output of the addition circuit into a non-linear PCM code.
JP3011830A 1991-02-01 1991-02-01 Code conversion circuit Withdrawn JPH06224780A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3011830A JPH06224780A (en) 1991-02-01 1991-02-01 Code conversion circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3011830A JPH06224780A (en) 1991-02-01 1991-02-01 Code conversion circuit

Publications (1)

Publication Number Publication Date
JPH06224780A true JPH06224780A (en) 1994-08-12

Family

ID=11788676

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3011830A Withdrawn JPH06224780A (en) 1991-02-01 1991-02-01 Code conversion circuit

Country Status (1)

Country Link
JP (1) JPH06224780A (en)

Similar Documents

Publication Publication Date Title
JP2819006B2 (en) Thermometer binary encoding method
JPH07182141A (en) Arithmetic unit/method
US6211806B1 (en) Efficient error correction in pipelined analog-to-digital converters
JP2757671B2 (en) Priority encoder and floating point adder / subtracter
JPS62258530A (en) Decoder for digital signal
US4924421A (en) Priority encoding system
GB1597468A (en) Conversion between linear pcm representation and compressed pcm
JPH06224780A (en) Code conversion circuit
JPWO2004086628A1 (en) Encoder circuit and A / D conversion circuit
JPS62281523A (en) Modulation circuit
JPS6057774B2 (en) Logical operation type digital compandor
JP2599984B2 (en) Input data peak value detection circuit
JPH01212921A (en) A/d conversion circuit
JP2890412B2 (en) Code conversion circuit
JPH03102265A (en) Maximum value detecting circuit
JPS63104526A (en) Arithmetic circuit for finite body
JP3083119B2 (en) Encoding / decoding circuit using adaptive delta modulation scheme
JPS61189026A (en) Adding circuit
JPS63201719A (en) Complement generating circuit
JPH05257643A (en) Binary complement unit
JPS61210427A (en) Converting circuit
JP2000174629A (en) Code modulation method, circuit and information recording and reproducing device using the same
JPH0377538B2 (en)
JPH0137050B2 (en)
JPH0376312A (en) Pulse width modulation circuit

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 19980514