SU732852A1 - Position code to large base code converter - Google Patents
Position code to large base code converter Download PDFInfo
- Publication number
- SU732852A1 SU732852A1 SU772508755A SU2508755A SU732852A1 SU 732852 A1 SU732852 A1 SU 732852A1 SU 772508755 A SU772508755 A SU 772508755A SU 2508755 A SU2508755 A SU 2508755A SU 732852 A1 SU732852 A1 SU 732852A1
- Authority
- SU
- USSR - Soviet Union
- Prior art keywords
- bit
- register
- elements
- subtractor
- code
- Prior art date
Links
Landscapes
- Complex Calculations (AREA)
Description
Изобретение относится к автоматике и цифровой вычислительной технике и может быть использовано при построении преобразователей позиционных кодов с одним произвольным основанием в коды с любым другим большим основанием. 5 The invention relates to automation and digital computer technology and can be used to construct positional code converters with one arbitrary base to codes with any other large base. 5
Известен преобразователь двоичного кода в код с любым другим основанием, содержащий пирамидальные сумматоры значений всех разрядов числа с новым основанием, при этом число разрядов первого сумматора, на котором выделяется младший разряд числа с новым основанием, равно разрядности преобразуемого двоичного числа [1] . , 5 A known converter of binary code to code with any other base, containing pyramidal adders of the values of all bits of a number with a new base, while the number of bits of the first adder, on which the least significant bit of a number with a new base is allocated, is equal to the digit capacity of the converted binary number [1]. 5
Недостатком этого преобразователя являются большие аппаратные затраты.The disadvantage of this converter is the high hardware costs.
. Наиболее близким по технической сущности и схемному решению является преобразователь кода в код с большим осно- м ванием, содержащий регистр, двухразрядный вычитатель, блок управления, блок умножения на константу, вход которого соединен с выходом К-ого разряда регистра (где К - число разрядов преобразуемого кода) и с первым входом двухразрядного вычитателя, второй вход которого соединен с выходом (К—1)—ого разряда регистра, выходы блока умножения на константу соединены соответственно с третьим и четвертым входами двухразрядного вычитателя, Кроме того, преобразователь содержит группу элементов И для сдвига кода в регистре [2].. The closest in technical essence and the schematic is the code converter to the code with a large m based vaniem comprising a register, two-bit subtracter, a control unit, a multiplication by a constant, whose input is connected to the output of register K-th bit (where K is - the number of discharges code to be converted) and with the first input of a two-bit subtractor, the second input of which is connected to the output of the (K – 1) -th bit of the register, the outputs of the constant multiplication unit are connected to the third and fourth inputs of the two-bit subtract, respectively For, in addition, the converter contains a group of AND elements for shifting code in the register [2].
Недостатком преобразователя' является относительно низкое быстродействие, В нем преобразование К-раэрядного числа осуществляется за 2 К (К—2) + 1 тактов.The disadvantage of the converter is a relatively low speed. In it, the conversion of a K-row number is carried out in 2 K (K — 2) + 1 clock cycles.
Цель изобретения - увеличение скорости преобразования.The purpose of the invention is to increase the conversion rate.
Это достигается тем, что преобразователь содержит первый, второй, третий и четвертый элементы И, первый и второй . элементы ИЛИ, выходы которых соединены соответственно с входами К-ого и первого разрядов регистра, первые 'входы элементов ИЛИ соединены соответственно с выходами первого и второго элементовThis is achieved by the fact that the converter contains the first, second, third and fourth elements And, the first and second. OR elements whose outputs are connected respectively to the inputs of the Kth and first bits of the register, the first 'inputs of OR elements are connected respectively to the outputs of the first and second elements
И, а вторые входы — с выходами третьего и четвертого элементов И соответственно, выходы старшего и младшего разрядов двухразрядного вычитателя соединены соответственно с первыми входами первого и второго элементов И, вторые входы которых соединены с первым выходом блока управления, выходы К-ого и (К-1)-ого разрядов регистра соединены соответственно с первыми входами третьего и четвертого элементов И, вторые входы которых соединены с вторым выходом блока управления.And, and the second inputs - with the outputs of the third and fourth elements And, respectively, the outputs of the senior and younger bits of a two-bit subtractor are connected respectively to the first inputs of the first and second elements And, the second inputs of which are connected to the first output of the control unit, the outputs of the Kth and (K -1) th bits of the register are connected respectively with the first inputs of the third and fourth elements And, the second inputs of which are connected to the second output of the control unit.
На фиг. 1 изображена блок-схема предлагаемого устройства; на фиг, 2 - диаграммы управляющих сигналов, вырабатываемые блоком управления устройства при преобразовании четырехразрядных кодов.In FIG. 1 shows a block diagram of the proposed device; in Fig.2 - diagrams of control signals generated by the control unit of the device when converting four-digit codes.
Преобразователь кода содержит К-разрядный R-ичный регистр 1, где X основание системы счисления, в которую переводится код, двухразрядный вычитатель 2, блок 3 умножения на константу, четыре элемента И 4, 5, 6, 7, блок 8 управления. Выход старшего (К-ого) разряда 9 регистра 1 соединен с входами блока 3 умножения на константу и младшим разрядом 10 вычитателя 2. Выход (К-1)-ого разряда 11 регистра 1 подключен к второму входу 12 вычитателя 2. Выход старшего разряда 10 вычитателя 2 через первый элемент И 4 и элемент ИЛИ 13 связан с входом младшего разряда регистра. Выход младшего разряда 12 вычитателя через второй элемент И 5 и элемент ИЛИ 14 объединен с входом первого старшего разряда 9 регистра 1. Выход разряда 9 через третий элемент И 6 подключен к младшему разряду регистра. Выход разряда 11 соединен через четвертый элемент И 7 с разрядом 9 регистра 1. Блок 8 управления связан по шине 15 с элементами 6, 7, а по шине 16 с элементами 5, 4.The code converter contains a K-bit R-ary register 1, where X is the base of the number system into which the code is translated, a two-digit subtracter 2, a constant multiplication unit 3, four AND 4, 5, 6, 7 elements, and a control unit 8. The output of the senior (K-th) bit 9 of register 1 is connected to the inputs of the block 3 of constant multiplication and the least significant bit 10 of subtractor 2. The output of the (K-1) -th bit 11 of register 1 is connected to the second input 12 of the subtracter 2. The output of the senior bit 10 subtractor 2 through the first element AND 4 and the element OR 13 is connected to the input of the least significant bit of the register. The output of the low order bit 12 of the subtractor through the second AND element 5 and the OR element 14 is combined with the input of the first high order bit 9 of register 1. The output of the bit 9 through the third element And 6 is connected to the low order bit of the register. The output of discharge 11 is connected through the fourth element And 7 to the discharge 9 of register 1. The control unit 8 is connected via bus 15 with elements 6, 7, and via bus 16 with elements 5, 4.
Работа преобразователя рассматривается на примере преобразования К - разрядных кодов при К = 4.The operation of the converter is considered on the example of the conversion of K - bit codes at K = 4.
Все схемы, входящие в состав устройства, предназначены для работы с кодами чисел в системе счисления с тем основанием, с которым необходмо получить результат; К - разрядный код целого числа, которое необходимо преобразовать, помешают в регистр 1. Код цифры, хранящейся в разряде 9 регистра 1, поступает на блок 3, где происходит умножение на константу, равную разности основан^ систем счисления. На вычитателе 2 из двух старших разрядов кода числа, поступающих на регистр 1, вычитается код числа, поступающий с выходов блока 3.All circuits that are part of the device are designed to work with number codes in the number system with the basis with which you need to get the result; K - the bit code of the integer that needs to be converted will be prevented from register 1. The code of the digit stored in bit 9 of register 1 is sent to block 3, where multiplication by a constant equal to the difference of the number systems is performed. On the subtractor 2, the number code from the outputs of block 3 is subtracted from the upper two bits of the number code entering register 1.
На первых трех тактах из блока 8 по шине 16 на элементы И 4, 5 подается разрешающий потенциал, вследствие чего код разности с выхода вычитателя 2 записывается в регистр 1 таким образом, что содержимое старшего разряда 10 вычитателя 2 записывается в младший разряд регистра 1, а содержимое разряда 12 вычитателя 2 записывается в старший разряд регистра 1.In the first three clock strokes from block 8, bus 16 is applied to the elements And 4, 5 to enable elements 4, 5, as a result of which the difference code from the output of the subtracter 2 is written into register 1 so that the contents of the upper digit 10 of the subtractor 2 are written to the least significant bit of register 1, and the contents of bit 12 of the subtracter 2 are recorded in the high bit of register 1.
На четвертом такте на элементы И 6, из блока 8 управления по шине 15 поступает разрешающий сигнал, в результате чего происходит сдвиг содержимого регистра 1 на один разряд влево, при этом код, хранящийся в старшем разряде 9 регистра 1, переписывается в младший разряд, а код, хранящийся в разряде 11, записывается в разряд 9 регистра 1.In the fourth cycle, the And signals, from the control unit 8, are sent via bus 15 from the control unit 8, as a result of which the contents of register 1 are shifted by one bit to the left, while the code stored in the high order 9 of register 1 is rewritten to the low order, and the code stored in bit 11 is recorded in bit 9 of register 1.
На пятом и шестом тактах из блока поступает по шине 15 управляющий сигнал на элементы И 6, 7, а на седьмом и восьмом тактах управляющий сигнал по шине 16 поступает на элементы И 4, 5.At the fifth and sixth clock strokes, a control signal is sent to busbars 15 and 7 via elements 15, and at the seventh and eighth clocks a control signal is sent to busbars 16 and 5 via elements 16, 5.
На (К-1) -ом такте в регистре 1 получается код числа с новым основанием системы счисления.On the (K-1) -th step in register 1, a number code is obtained with a new base of the number system.
Алгоритм преобразования построен таким образом, что на каждых К шагах (начиная с первого) последовательно обрабатываются К-1, К-2 и т.д. разрядов преобразуемого числа. Последующие К-(К-1), К-(К-2) и т.д. разряды промежуточного результата преобразования остаются без изменения.The conversion algorithm is constructed in such a way that at every K steps (starting from the first), K-1, K-2, etc. are sequentially processed. digits of the converted number. Subsequent K- (K-1), K- (K-2), etc. bits of the intermediate result of the conversion remain unchanged.
3513 3*3 = 9 __3513 запись co сдвигом3513 3 * 3 = 9 __3513 record with a shift
61326132
-6132-6132
ОсдвигOsdvig
1326 _1326 О сдвиг101326 _1326 About shift 10
32613261
3*3 = 9_3261 запись со сдвигом3 * 3 = 9_3261 record with shift
36 Г1536 g15
На временной диаграмме управляющих сигналов (фиг, 2), которые формируются блоком 8 управления, показано, что на первых четырех тактах (К=4) коды разрядов поступают на двухразрядный вычи- 20 татель 2 и блок умножения 3 (т.е. осуществляются арифметические операции над. кодами разрядов) только на первых трех тактах и четырех, управляющие сигналы с блока управления 8 на этих тактах25 поступают на тактовую шину 16. На следующем такте (четвертом) управляющий сигнал поступает на шину 15, т.е. осуществляется только сдвиг промежуточного результата перевода без арифметической 30 обработки разрядов. На следующих четырех тактах (5-8) сигналы с блока управления на шину 15 поступают уже дважды (на 7 и 8 тактах), т.е. осуществляется Два сдвига без арифметической обработки 35 и т.д. Следовательно, количество 'повторных' сдвигов определяется алгоритмом перевода и равно 1’ (где i — номер цикла перевода).On the timing diagram of the control signals (FIG. 2), which are generated by the control unit 8, it is shown that in the first four clock cycles (K = 4) the bit codes are sent to a two-bit subtractor 2 and a multiplication unit 3 (i.e., arithmetic operations on the bit codes) only on the first three clocks and four, the control signals from the control unit 8 on these clocks25 are fed to clock bus 16. At the next clock (fourth), the control signal is sent to bus 15, i.e. only the intermediate result of the translation is shifted without arithmetic processing of the digits. In the next four clock cycles (5-8), signals from the control unit to bus 15 are received twice already (in 7 and 8 clock cycles), i.e. Two shifts are carried out without arithmetic processing 35, etc. Therefore, the number of 'repeated' shifts is determined by the translation algorithm and is equal to 1 ’(where i is the number of the translation cycle).
Предлагаемый преобразователь облада- 40 ет более высоким быстродействием по сравнению с известными устройствами. Он осуществляет перевод К-разрядного числа за (К-1) 2тактов, в то время как известное устройство переводит К—разрядное число за 2К (К-2)+1 тактов. Например, 12-разрядный код устройство-прото тип переводит за 241 такт, а предлагаемый преобразователь за 121 такт.The proposed converter has 40 higher speed compared to known devices. It translates a K-bit number in (K-1) 2 cycles, while the known device translates a K-bit number in 2K (K-2) +1 clock cycles. For example, a 12-bit code prototype device translates in 241 clock cycles, and the proposed converter in 121 clock cycles.
Claims (3)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
SU772508755A SU732852A1 (en) | 1977-07-18 | 1977-07-18 | Position code to large base code converter |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
SU772508755A SU732852A1 (en) | 1977-07-18 | 1977-07-18 | Position code to large base code converter |
Publications (1)
Publication Number | Publication Date |
---|---|
SU732852A1 true SU732852A1 (en) | 1980-05-05 |
Family
ID=20718494
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
SU772508755A SU732852A1 (en) | 1977-07-18 | 1977-07-18 | Position code to large base code converter |
Country Status (1)
Country | Link |
---|---|
SU (1) | SU732852A1 (en) |
-
1977
- 1977-07-18 SU SU772508755A patent/SU732852A1/en active
Similar Documents
Publication | Publication Date | Title |
---|---|---|
SU732852A1 (en) | Position code to large base code converter | |
KR920006843A (en) | Semiconductor computing device | |
US2973511A (en) | Code converter | |
SU662935A1 (en) | Conveyer-type device for simultaneously performing arithmetic operations on a set of n-digit numbers | |
SU1545329A1 (en) | Code form converter | |
SU549801A1 (en) | Device for converting binary to decimal code to binary | |
SU581469A1 (en) | Code-to-code with greater basis converter | |
RU1774328C (en) | Decimal numbers divider | |
SU734669A1 (en) | Converter of proper binary fraction into binary-decimal fraction and integer binary-decimal numbers into binary numbers | |
SU1662004A1 (en) | Binary coded decimal to binary translator | |
SU526884A1 (en) | Code converter | |
SU779998A1 (en) | Code converter | |
SU494744A1 (en) | Binary decimal to binary converter | |
SU734670A1 (en) | Binary-decimal-to-binary code converter | |
SU1283979A1 (en) | Binary-coded decimal code-to-binary code converter | |
SU809150A1 (en) | Binary-to-bcd converter | |
SU1631554A1 (en) | Device for computing fourier-galoiz transform | |
SU132434A1 (en) | The method of converting binary code to decimal and device for its implementation | |
SU1557683A1 (en) | Device for conversion of number from position code to residue class system number | |
SU424142A1 (en) | DEVICE COMPARISON OF TWO NUMBERS IN DIGITAL CODE | |
SU860055A1 (en) | Converter of bcd numbers in 4,2,2,1 code to binary numbers | |
SU839046A1 (en) | Analogue-digital converter | |
SU1495825A1 (en) | Device for extracting square root from sum of squares of two values | |
SU1125621A1 (en) | Translator from binary system to residual class system | |
SU614435A1 (en) | Counting device |