JP2890412B2 - Code conversion circuit - Google Patents

Code conversion circuit

Info

Publication number
JP2890412B2
JP2890412B2 JP63163243A JP16324388A JP2890412B2 JP 2890412 B2 JP2890412 B2 JP 2890412B2 JP 63163243 A JP63163243 A JP 63163243A JP 16324388 A JP16324388 A JP 16324388A JP 2890412 B2 JP2890412 B2 JP 2890412B2
Authority
JP
Japan
Prior art keywords
code
bit
law
linear
conversion 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.)
Expired - Fee Related
Application number
JP63163243A
Other languages
Japanese (ja)
Other versions
JPH0213133A (en
Inventor
雅弘 武田
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
Nippon 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 Nippon Electric Co Ltd filed Critical Nippon Electric Co Ltd
Priority to JP63163243A priority Critical patent/JP2890412B2/en
Publication of JPH0213133A publication Critical patent/JPH0213133A/en
Application granted granted Critical
Publication of JP2890412B2 publication Critical patent/JP2890412B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

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

Description

【発明の詳細な説明】 [産業上の利用分野] 本発明は、非直線RCM符号を直線符号に変換する符号
変換回路に関し、特に、変換規則としてA則又はμ則を
用いて非直線RCM符号を絶対値表現の直線符号に変換し
た後の補正処理回路に関する。
Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a code conversion circuit for converting a non-linear RCM code into a linear code, and more particularly, to a non-linear RCM code using an A-law or a μ-law as a conversion rule. To a correction processing circuit after converting into a linear code represented by an absolute value.

[従来の技術] 従来より、非直線RCM符号を直線符号に変換する種々
の符号変換回路が知られているが、特に、圧伸則として
A則及びμ則を用いた変換回路は、次のような変換処理
を行う構成となっている。
[Prior Art] Conventionally, various code conversion circuits for converting a non-linear RCM code into a linear code are known. In particular, conversion circuits using A-law and μ-law as companding rules are as follows. Such a conversion process is performed.

(1)8ビットの非直線PCM符号を絶対値表現の14ビ
ット直線符号に変換する。このとき、A則に基く両符号
間の対応は、下記第1表に示され、μ則に基く両符号間
の対応は下記第2表に示されている。このような対応に
基き絶対値レベルの符号変換が行われる。
(1) Convert an 8-bit non-linear PCM code into a 14-bit linear code expressed in absolute value. At this time, the correspondence between the two codes based on the A-law is shown in Table 1 below, and the correspondence between the two codes based on the μ-law is shown in Table 2 below. The sign conversion at the absolute value level is performed based on such correspondence.

(2)圧伸則がμ則の場合、第2表中の直線符号は
「33」(又は「32」)が既に加算された値であるため、
「33」(又は「32」)を減じる。
(2) When the companding rule is the μ rule, the straight line code in Table 2 is a value to which “33” (or “32”) has already been added.
Reduce "33" (or "32").

(3)14ビットの直線符号のうち、最上位ビットのサ
イン符号が「0」、即ち負を示しているときは、絶対値
表現の直線符号を2の補数表現の直線符号に変換する。
(3) When the sign code of the most significant bit of the 14-bit linear code is "0", that is, indicates a negative value, the linear code expressed in absolute value is converted into a linear code expressed in 2's complement.

ここで、第(2)項で示した補正は減算により実現さ
れるため、全加算器の被加数入力にサイン符号を除く絶
対値表現の13ビット直線符号を入力し、他方の加数入力
にA則であれば「0」、μ則であれば「−33」(又は
「−32」)を入力することにより行われる。また、第
(3)項に示した絶対値表現から2の補数表現への変換
は、13ビットの絶対値表現の直線符号から「1」を減じ
た後、全ビットを反転することにより実行される。この
ため、従来のこの種の符号変換回路は、絶対値表現の直
線符号変換回路と、この変換回路の出力を一方の入力と
する全加算器と、この全加算回路の他方の入力に
「0」,「−1」,「−33」,「−34」の4つのデータ
のうちの1つを圧伸則及びサイン符号に基いて選択して
与える切換回路とにより構成されていた。
Here, since the correction shown in the item (2) is realized by subtraction, a 13-bit linear code in absolute value excluding a sine code is input to the augend input of the full adder, and the other addend input is performed. Is input by inputting "0" for the A-law and "-33" (or "-32") for the .mu.-law. The conversion from the absolute value expression to the two's complement expression shown in the item (3) is executed by subtracting "1" from the linear code of the 13-bit absolute value expression and then inverting all the bits. You. For this reason, a conventional code conversion circuit of this type includes a linear code conversion circuit expressing an absolute value, a full adder having the output of the conversion circuit as one input, and "0" input to the other input of the full addition circuit. , "-1", "-33", and "-34", and a switching circuit for selecting and providing one of the four data based on the companding rule and the sine code.

[発明が解決しようとする課題] 上述した従来の符号変換回路は、圧伸則及びサイン符
号の組み合わせにより「0」,「−1」,「−33」,
「−34」の4つの値の中から1つを選択して全加算器の
一方の加算入力に与える必要があるため、圧伸則を選択
する信号及び絶対値表現の直線符号のサイン符号により
加算入力が切換わる回路が必要となり、回路規模が大き
くなってしまうという問題点がある。
[Problems to be Solved by the Invention] The conventional code conversion circuit described above uses “0”, “−1”, “−33”,
Since it is necessary to select one of the four values of "-34" and apply it to one addition input of the full adder, a signal for selecting a companding rule and a sine code of a linear code in an absolute value expression are used. There is a problem that a circuit for switching the addition input is required, and the circuit scale becomes large.

本発明はかかる問題点に鑑みてなされたものであっ
て、特別の切換回路を使用する必要がない簡単な構成の
符号変換回路を提供することを目的とする。
The present invention has been made in view of such a problem, and has as its object to provide a code conversion circuit having a simple configuration that does not require the use of a special switching circuit.

[課題を解決するための手段] 本発明に係る符号変換回路は、A則又はμ則に従って
圧縮された8ビット非線形PCM符号を絶対値表現の14ビ
ット直線符号に変換する直線符号変換回路と、この直線
符号変換回路からのサイン符号ビットを除く各ビット出
力が被加算入力され、最下位ビット及び(最下位+5)
ビットを除いた各ビットに1が、前記最下位ビット及び
前記(最下位+5)ビットに前記A則で圧縮された場合
は1が前記μ則で圧縮された場合は0が加算入力され、
前記サイン符号が前記最下位ビットに桁上げ入力される
全加算器と等価な論理演算を行う加算手段と、前記サイ
ン符号が1の場合に前記加算手段の出力をそのまま出力
し、前記サイン符号が0の場合に前記加算手段の出力を
反転出力する手段と、前記サイン符号の反転信号を出力
する手段とを具備したことを特徴とする。
[Means for Solving the Problems] A code conversion circuit according to the present invention includes: a linear code conversion circuit that converts an 8-bit nonlinear PCM code compressed according to the A-law or the μ-law into a 14-bit linear code expressed in absolute value; Each bit output excluding the sign code bit from this linear code conversion circuit is added and input, and the least significant bit and (the least significant +5)
1 is added to each of the bits except for the bit, and 1 is added when the least significant bit and the (least significant +5) bit are compressed according to the A-law, and 0 is added when compressed according to the μ-law.
An adder for performing a logical operation equivalent to a full adder in which the sign code carries the least significant bit; and, when the sign code is 1, outputs the output of the adder as it is, and the sign code is In the case of 0, means for inverting and outputting the output of the adding means and means for outputting an inversion signal of the sine code are provided.

[作用] 本発明によれば、全加算器の入力として圧伸則切換信
号を直接与えると共に、直線符号のサイン符号を全加算
器の桁上げ入力に与えているので、全加算器は圧伸則に
応じて異なる加算を選択することができ、また、直線符
号のサイン符号、即ち、「正」,「負」によっても異な
る加算を選択することができる。従って、本発明によれ
ば、切換回路が不要で構成の簡単な符号変換回路を提供
できる。
[Operation] According to the present invention, a companding law switching signal is directly given as an input of a full adder, and a sine code of a linear code is given to a carry input of the full adder. Different additions can be selected according to the rule, and different additions can be selected depending on the sine code of the linear code, that is, “positive” or “negative”. Therefore, according to the present invention, it is possible to provide a code conversion circuit having a simple configuration without a switching circuit.

[実施例] 以下、本発明の実施例について添付の図面を参照して
説明する。
Embodiment An embodiment of the present invention will be described below with reference to the accompanying drawings.

第1図は本発明の実施例に係る符号変換回路のブロッ
ク図である。この回路は、直線符号変換回路1と補正変
換回路2とにより構成されている。直線符号変換回路1
は、前述の第1表及び第2表に示したA則及びμ則に従
って8ビットの非直線PCM符号PCM0乃至PCM7を14ビット
の直線符号L0乃至L13に変換する。変換された直線符号
のうち、最上位ビットL13のサイン符号を除く他の直線
符号Ln(nは0乃至12)は補正変換回路2の全加算器3n
の被加数入力Anに入力されている。全加算器3nのうち、
0ビット目及び5ビット目を除いた全加算器31乃至34
36乃至312の各加数入力B1乃至B4,B6乃至B12には、定数
“1"が与えられており、0ビット目及び5ビット目の全
加算器30,35の各加数入力B0,B5には、圧伸則切換信号
Sが与えられている。また、最下位桁の全加算器30の桁
上げ入力CI0には直線符号の最上位ビット、即ち、サイ
ン符号L13が入力されている。全加算器3nからの出力SUM
nは、13個の排他的論理和回路4nの各一方の入力に与え
られている。排他的論理和回路4nの他方の入力には、サ
イン符号L13をインバータ5によって反転させた信号が
与えらえている。そして、これら排他的論理和回路4n
出力とインバータ5の出力とを併せて最終的は変換出力
である直線符号LIN0乃至LIN13が補正変換回路2の出力
として出力されている。
FIG. 1 is a block diagram of a code conversion circuit according to an embodiment of the present invention. This circuit includes a linear code conversion circuit 1 and a correction conversion circuit 2. Linear code conversion circuit 1
Converts in Tables 1 and 2 A-law and linear code 8-bit non-linear PCM code PCM 0 to PCM 7 to 14 bits in accordance with μ-law L 0 through L 13 shown in the foregoing. Among the converted linear codes, the other linear codes L n (n is 0 to 12) except for the sign code of the most significant bit L 13 are the full adders 3 n of the correction conversion circuit 2.
It is inputted to addend input A n. Of the full adders 3 n
0 full adders except for bit and 5 bit 3 1 to 3 4,
3 6 to 3 12 each addend input B 1 to B 4 of the B 6 to B 12, it is given a constant "1", 0-th bit and the 5 th bit of the full adder 3 0, 3 5 Each of the addend inputs B 0 and B 5 is supplied with a companding law switching signal S. Further, the most significant bit linear code to the carry input CI 0 of the full adder 3 0 the least significant digit, namely, the sign code L 13 is input. Output SUM from full adder 3 n
n is provided to one input of each of the 13 exclusive OR circuits 4 n . The other input of the exclusive OR circuit 4 n, the signal obtained by inverting the sign code L 13 by the inverter 5 is Ataerae. Then, the outputs of the exclusive OR circuit 4 n and the output of the inverter 5 are combined, and finally, the linear codes LIN 0 to LIN 13 which are conversion outputs are output as the outputs of the correction conversion circuit 2.

次に、以上のように構成された本実施例に係る符号変
換回路の動作について説明する。
Next, the operation of the code conversion circuit according to the present embodiment configured as described above will be described.

A則或はμ則に従って圧縮された8ビットの非直線PC
M符号PCM0乃至PCM7は、直線符号変換回路1において圧
伸則切換信号Sにより選択される圧伸則の対応表に従っ
て絶対値表現の直線符号L0乃至L13に変換される。ここ
で、直線符号の最上位ビットであるサイン符号は“0"で
あれば負、“1"であれば正を示している。
8-bit nonlinear PC compressed according to A-law or μ-law
M code PCM 0 to PCM 7 is converted into a linear code L 0 to L 13 of the absolute value representation in accordance with the correspondence table of companding law chosen by companding law switching signal S in the linear code conversion circuit 1. Here, the sign code, which is the most significant bit of the linear code, is “0” indicating negative, and “1” indicating positive.

この直線符号中の最上位ビットL13を除く直線符号Ln
は全加算器3nの被加数入力Anへ入力される。一方、全加
算器3nの加数入力Bnは、A則の場合、圧伸則切換信号S
が“1"であるから、下記第3表に示すように全ビット
“1"のデータ「−1」が与えられ、μ則の場合、圧伸則
切換信号Sが“0"であるから、第3表に示すようにB0
B5だけが“0"のデータ「−34」が与えられる。
A linear code L n excluding the most significant bit L 13 in this linear code
It is inputted to addend input A n of the full adder 3 n. On the other hand, the addend input B n of the full adder 3 n is the companding law switching signal S
Is "1", data "-1" of all bits "1" is given as shown in Table 3 below. In the case of the .mu.-law, the companding law switching signal S is "0". As shown in Table 3, B 0 ,
Only B 5 is given data "-34" of "0".

更に、サイン符号が“0"、即ち、負の符号のときは加
数入力データは上記と変わらず、サイン符号が“1"、即
ち、正の符号のときは、桁上げ入力CI0にこれが与えら
れ、A則の場合「0」、μ則の場合「−33」が与えられ
る。このようにして、圧伸則切換信号Sとサイン符号と
を直接全加算器3nへ入力することにより、切換回路を使
用することなしに、4つのデータの切換えが可能であ
る。排他的論理和回路は、サイン符号が負の場合、全加
算器3nの出力SUMnを反転され、2つの補数表現の直線符
号LIN0乃至LIN13に変換される。
Further, when the sign code is “0”, that is, when the sign is a negative sign, the addend input data is the same as above, and when the sign code is “1”, that is, when the sign is a positive sign, the carry input CI 0 is "0" for A-law and "-33" for μ-law. In this way, by inputting the companding law switching signal S and the sign code directly to the full adder 3 n, without using a switching circuit, it is possible to switching of four data. When the sign code is negative, the exclusive OR circuit inverts the output SUM n of the full adder 3 n and converts it into two's complement linear codes LIN 0 to LIN 13 .

第2図は本発明の他の実施例を示す。この実施例は第
1図で示した全加算器3nのうち、0ビット目と5ビット
目の全加算器30,35を除いた他の全加算器61乃至64,66
乃至612の構成を改良したものである。即ち、全加算器3
nは通常第3図に示すような3つのNAND回路11,12,13と
2つの排他的論理和回路14,15とで実現できるが、第1
図中の全加算器3nの加数入力Bnは、B0,B5を除き全て
“1"に固定されているため、第4図のように排他的論理
和回路21とNOR回路22と2つのインバータ23,24とで実現
できる。
FIG. 2 shows another embodiment of the present invention. This embodiment of the full adder 3 n shown in FIG. 1, 0 bit and the fifth bit of the full adder 30, 35 except for the other full adders 6 1 to 6 4, 6 6
Or which is an improvement of 6 12 configuration. That is, full adder 3
n can be usually realized by three NAND circuits 11, 12, 13 and two exclusive OR circuits 14, 15 as shown in FIG.
Since the addend inputs B n of the full adder 3 n in the figure are fixed at “1” except for B 0 and B 5 , the exclusive OR circuit 21 and the NOR circuit 22 as shown in FIG. And two inverters 23 and 24.

この実施例では、全加算器が約1/2のゲートに簡略化
されているため、ハードウェアが小さくなる利点があ
る。更に、全加算器が簡略化されているため桁上げ信号
の伝搬遅延時間が短縮され、符号変換を高速で行える利
点もある。
In this embodiment, since the full adder is simplified to about 1/2 gate, there is an advantage that hardware is reduced. Further, since the full adder is simplified, there is an advantage that the propagation delay time of the carry signal is shortened and the code conversion can be performed at high speed.

[発明の効果] 以上説明したように、本発明は圧伸則切換信号及びサ
イン符号を全加算器に直接入力することにより、これら
信号の組み合わせによる切換回路を省くことができ、ハ
ードウェア量の低減が可能である。更に、ハードウェア
量の低減により高速動作が可能で信頼性も向上するとい
う効果がある。
[Effects of the Invention] As described above, according to the present invention, by directly inputting the companding rule switching signal and the sign code to the full adder, a switching circuit based on a combination of these signals can be omitted, and the amount of hardware can be reduced. Reduction is possible. Furthermore, there is an effect that high-speed operation is possible and reliability is improved by reducing the amount of hardware.

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

第1図は本発明の実施例に係る符号変換回路のブロック
図、第2図は本発明の他の実施例に係る符号変換回路の
要部構成を示すブロック図、第3図及び第4図は同回路
における全加算器の構成を夫々示す回路図である。 1;直線符号変換回路、2;補正換回路、3n,6n;全加算
器、4n;排他的倫理和回路
FIG. 1 is a block diagram of a code conversion circuit according to an embodiment of the present invention, FIG. 2 is a block diagram showing a main part configuration of a code conversion circuit according to another embodiment of the present invention, and FIGS. 2 is a circuit diagram showing a configuration of a full adder in the same circuit. 1; linear code conversion circuit; 2; correction conversion circuit; 3 n , 6 n ; full adder, 4 n ; exclusive ethical sum circuit

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】A則又はμ則に従って圧縮された8ビット
非線形PCM符号を絶対値表現の14ビット直線符号に変換
する直線符号変換回路と、この直線符号変換回路からの
サイン符号ビットを除く各ビット出力が被加算入力さ
れ、最下位ビット及び(最下位+5)ビットを除いた各
ビットに1が、前記最下位ビット及び前記(最下位+
5)ビットに前記A則で圧縮された場合は1が前記μ則
で圧縮された場合は0が加算入力され、前記サイン符号
が前記最下位ビットに桁上げ入力される全加算器と等価
な論理演算を行う加算手段と、前記サイン符号が1の場
合に前記加算手段の出力をそのまま出力し、前記サイン
符号が0の場合に前記加算手段の出力を反転出力する手
段と、前記サイン符号の反転信号を出力する手段とを具
備したことを特徴とする符号変換回路。
1. A linear code conversion circuit for converting an 8-bit non-linear PCM code compressed in accordance with the A-law or μ-law into a 14-bit linear code expressed in absolute value. A bit output is input to be added, and 1 is added to each bit except the least significant bit and the (least significant +5) bit.
5) When the bit is compressed according to the A-law, 1 is added, and when the bit is compressed according to the μ-law, 0 is added and input. The sign code is equivalent to a full adder in which the sign is carried in the least significant bit. Adding means for performing a logical operation; means for outputting the output of the adding means as it is when the sign code is 1; means for inverting and outputting the output of the adding means when the sign code is 0; And a means for outputting an inverted signal.
JP63163243A 1988-06-30 1988-06-30 Code conversion circuit Expired - Fee Related JP2890412B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63163243A JP2890412B2 (en) 1988-06-30 1988-06-30 Code conversion circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63163243A JP2890412B2 (en) 1988-06-30 1988-06-30 Code conversion circuit

Publications (2)

Publication Number Publication Date
JPH0213133A JPH0213133A (en) 1990-01-17
JP2890412B2 true JP2890412B2 (en) 1999-05-17

Family

ID=15770073

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63163243A Expired - Fee Related JP2890412B2 (en) 1988-06-30 1988-06-30 Code conversion circuit

Country Status (1)

Country Link
JP (1) JP2890412B2 (en)

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62271525A (en) * 1986-05-20 1987-11-25 Oki Electric Ind Co Ltd Code compression conversion system

Also Published As

Publication number Publication date
JPH0213133A (en) 1990-01-17

Similar Documents

Publication Publication Date Title
JP3345894B2 (en) Floating point multiplier
JPS61214025A (en) Comparator for difference absolute value
JPS595349A (en) Adder
US5181184A (en) Apparatus for multiplying real-time 2's complement code in a digital signal processing system and a method for the same
US3688097A (en) Digital attenuator for non-linear pulse code modulation signals
US4623872A (en) Circuit for CSD-coding of a binary number represented in two's complement
JP2890412B2 (en) Code conversion circuit
US6546411B1 (en) High-speed radix 100 parallel adder
JPH0149973B2 (en)
JPS6027024A (en) Arithmetic device
JPH0216632A (en) Fixed point number/floating point number converting circuit
KR100196520B1 (en) Apparatus for conversion of two's complement numbers
JP3187402B2 (en) Floating point data addition / subtraction circuit
JP3261742B2 (en) Redundant binary / binary conversion circuit including rounding processing
JP2901463B2 (en) Addition device
JPS61274425A (en) Digital compressing curcuit
JPS6175431A (en) Arithmetic device
JPH0527949A (en) Exponential part arithmetic circuit for floating point multiplication
JPH04149728A (en) Rom type digital arithmetic circuit
KR100188088B1 (en) Numerical operating device of binary data
JPS61105640A (en) Parallel complement circuit
JPH07120964B2 (en) Extension circuit
JPH0438520A (en) Binary data converter
JPH05100825A (en) Normalization floating point adder/subtracter
JPH01276227A (en) Digital rounding circuit

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees