SU1438008A1 - Code converter - Google Patents
Code converter Download PDFInfo
- Publication number
- SU1438008A1 SU1438008A1 SU864115702A SU4115702A SU1438008A1 SU 1438008 A1 SU1438008 A1 SU 1438008A1 SU 864115702 A SU864115702 A SU 864115702A SU 4115702 A SU4115702 A SU 4115702A SU 1438008 A1 SU1438008 A1 SU 1438008A1
- Authority
- SU
- USSR - Soviet Union
- Prior art keywords
- input
- outputs
- inputs
- output
- control unit
- Prior art date
Links
Landscapes
- Compression, Expansion, Code Conversion, And Decoders (AREA)
Abstract
Изоб ретение относитс к вычислительной технике и может быть использовано дл преобразовани двоич ного кода в код Фибоначчи. Целью изобретени вл етс повышение быстродействи . Преобразователь содержит коммутатор 1, сумматор 2, регистр 3, блок 4 пам ти, блок 5 сравнени кодов , блок 6 управлени . 1 з.п. ф-лы, 3 табл., 3 ил.The invention relates to computing and can be used to convert a binary code to a Fibonacci code. The aim of the invention is to increase speed. The converter comprises a switch 1, an adder 2, a register 3, a memory block 4, a code comparison block 5, a control block 6. 1 hp f-crystals, 3 tab., 3 Il.
Description
(Л С(Ls
fflLifflLi
lzlz
4:four:
СО 00CO 00
0000
9U2.19U2.1
Изобретение относитс к вычнслк- тельной технике и может быть использовано дл преобразовани двоичного кода в код Фибоначчи.The invention relates to a computational technique and can be used to convert a binary code into a Fibonacci code.
Цель изобретени - повьшение быстродействи преобразовател .The purpose of the invention is to increase the speed of the converter.
На фиг,, 1 приведена фyнкu Joнaпьнa схема преобразовател кодов; на фиг.2 - функциональна схема блока управлени J на фиг.З - временные диаграммы работы преобразовател кодов .Fig, 1 shows the Jonapna function code converter circuit; Fig. 2 is a functional block diagram of the control unit J in Fig. 3; timing diagrams of the operation of the code converter.
Преобразователь кодов содержит коммутатор I,, сумматор 2 регистр 3, блок 4 пам ти, блок 5 сравнени кодов и блок 6 управлени ,The code converter comprises a switch I, an adder 2, a register 3, a block 4 of memory, a block 5 of comparison of codes and a block 6 of control,
Блок 6 управлени образуют элементы И.ПИ 7 и 8,, элементы НЕ 9 и 10, элементы И 11-13, регистры 14 и 5, триггеры 16 и 17 и счетчик 18„The control unit 6 is formed by elements I.PI 7 and 8 ,, elements NOT 9 and 10, elements 11-13, registers 14 and 5, triggers 16 and 17 and counter 18 "
Преобразователь кодов работает следующим образом.Converter codes works as follows.
На второй вход блока 6 управлени поступает тактова частота. После TorOj как на входную шину преобразовател подаетс преобразуемый двоичный -код, на первый вход блока 6 управлени поступает команда Начаао преобразовани . По этой команде регистры 14 и 15 и счетчик 18 обнул ютс , триггер 16 устанавливаетс в состо ние едини1;ы, а триггер 17 - в состо ние нул , коммутатора 1 подключает информагудонные входы регистра 3 к входной шине и по сигналу в поступаю 1Дему на управл ющий вход регистра 3 с выхода злемента ИЛИ 83 происходит запись информации в регистр 3, после чего с выхода регистра 3 информа- подаетс на второй вход блока 5 сравнени кодовThe second input of the control unit 6 receives the clock frequency. After the TorOj, as the input bus of the converter, the converted binary code is fed, the Nachao conversion command is sent to the first input of the control unit 6. On this command, registers 14 and 15 and counter 18 are zeroed, trigger 16 is set to state 1, s, and trigger 17 is zero, switch 1 connects wake-up inputs of register 3 to the input bus and sends a signal to receive 1 Demo on control the input of the register 3 from the output of the element OR 83 information is recorded in the register 3, after which from the output of the register 3 information is fed to the second input of the block 5 of the code comparison
Счетчик 18 формирует адрес эквивалента веса кода Фибоначчи, которьш необходимо подать на первые входы блока 5 сравнени кодов с блока 4 пам ти ,Counter 18 forms the address of the equivalent weight of the Fibonacci code, which must be fed to the first inputs of block 5, which compares codes from memory block 4,
В начальный момент преобразовани содержимое счетчика 18 равно нулЮэ что указаывает на нулевой адресj по которому записан эквивалент старшего веса кода Фибоначчи Значение адреса со счетчика 18 по.ступает на третьи входы блока 4 пам ти.At the initial moment of the conversion, the contents of counter 18 are equal to zero, which indicates the zero addressj at which the equivalent of the highest Fibonacci code weight is written. The address value from counter 18 to steps on the third inputs of memory block 4.
Триггер 17 делит тактовую частоту пополам. По приходу первого тактовог импульса он устанавливаетс в состо ние единихщ. С пр мого выхода триггера 17- на первый вход блока 4 пам тиTrigger 17 divides the clock frequency in half. Upon the arrival of the first clock pulse, it is set to single. From the direct output of the trigger 17- to the first input of the memory block 4
- -
iOiO
1515
380082380082
поступает импульс Разрешение с-шты- вани . По приходу этого импульса на вторых выходах блока 4 пам ти по вл етс двоичный эквивалент веса кода Фибоначчиimpulse arrives. Resolution with shtyvani. Upon the arrival of this pulse, a binary equivalent of the weight of the Fibonacci code appears at the second outputs of memory block 4
При помощи блока 5 сравнени кодов производитс сравнение кодов, посту- паюищх с выходов регистра 3 и блока 4 пам ти На первом выходе блока 5 сравнени кодов по вл етс единицаj если содержимое регистра 3 больше, чем вес кода Фибоначчи, в противном случае на этом присутствует нуль. На втором выходе блока 5 сравнени кодов по вл етс единица в том случае, если содержимое регистра 3 больше нул . Эти сигналы поступают на третий и четвертый входы блока 6 управлени . При помощи элементов ИЛИ 7 и НЕ 9 формируютс два разр да выходного кода, которые по переднему фронту импульса 3 формируемого элементом И 12, записываютс в регистры 14 и 15, и производитс сдвиг на один разр д причем в регистр 14 производитс запись четных разр дов ко- да, а в регистр 15 - нечетных.Using the code comparison block 5, a comparison is made of codes received from the outputs of register 3 and memory block 4 On the first output of code comparison block 5, the unit appears if the contents of register 3 are greater than the weight of the Fibonacci code, otherwise zero. At the second output of block 5, a code comparison appears in the case that the contents of register 3 are greater than zero. These signals arrive at the third and fourth inputs of control unit 6. Using the elements OR 7 and NOT 9, two bits of the output code are formed, which, on the leading edge of the pulse 3 formed by the AND 12 element, are written to registers 14 and 15, and are shifted by one bit and even bits are written to register 14 - yes, and in register 15 - odd.
После этого будет полностью сформирован второй адрес дл блока 4 пам ти . Этот адрес состоит из двух частей, Первую часть (два младших разр да адреса) составл ют последние два раз- р да выходного кода которые снимаютс ,с выходов регистров 14 и 15, причем разр д, снимаег-ьш с выхода ре20After that, a second address for memory block 4 will be fully formed. This address consists of two parts. The first part (the two least significant bits of the address) consists of the last two bits of the output code that are removed from the outputs of registers 14 and 15, and the bits that are removed from the output of the reg20
2525
30thirty
3535
00
5five
00
5five
гистра 14, определ ет разр д адреса с весом два9. а разр д, скимае 1ый с выхода регистра 15., определ ет разр д адреса с весом один. Вторую . часть (оставшеес разр ды адреса) составл ет адрес, сформированный счетчиком 18„gistra 14, determines the address bit with a weight of two9. and the bit, the first from the output of register 15, determines the address bit with a weight of one. The second. the part (the remaining address bits) is the address formed by the counter 18 "
По приходу второго тактового-импульса триггер 17 измен ет свое состо ние и на второй вход блока 4 пам ти поступает команда Разрешение, счи- тываь-ш , после чего на вход сумматора 2 поступает двоичный эквивалент веса кода Фибоначчи, подлежащий вычитанию Однако так как положительные веса записаны в дополнительном коде, а отрицательные - в пр мом, операци вычитаки .замен етс опера- цизй сложени ;Upon the arrival of the second clock-pulse, the trigger 17 changes its state and the resolution, read-w, is sent to the second input of the memory block 4, then the input of the adder 2 receives the binary equivalent of the Fibonacci code weight to be subtracted. However, positive the weights are written in the additional code, and the negative ones are in the direct one, the operation of reading. replaces the addition operation;
По сигналу, поступающему на управ- а ю.ш;ий вход регистра 3, результат сложени через коммутатор 1 записываетс в регистр 3 Одновременно соAccording to the signal arriving at the control unit, the input of the register 3, the result of the addition through the switch 1 is written to the register 3 at the same time
держимое счетчика 18 увеличиваетс на единицу.holding the counter 18 is increased by one.
Первый такт преобразовани закончен .The first conversion cycle is completed.
Все такты преобразовани , кроме последнего, отличаютс от описанного тем, что в них не производитс обнуление регистров и не записываетс информаци из входной шины ( отсутствует команда Начало преобразовани ) .All transformation cycles, except for the last one, differ from the one described in that they do not reset the registers and do not record information from the input bus (there is no conversion start command).
Последний такт преобразовани отличаетс тем, что по приходу п-го тактового импульса на выходе переноса счетчика 18 по вл етс импульс переноса , который устанавливает тригге 16 в нулевое состо ние, что, в свою очередь, запрещает прохождение тактовых импульсов через элемент И 1I. К этому моменту выходной код полностью сформирован и записан в регистрах 14 и 15, начина с вторых разр дов, так как после записи информации происходит сдвиг.The last conversion clock is characterized in that upon the arrival of the nth clock pulse at the transfer output of counter 18, a transfer pulse appears, which sets the trigger 16 to the zero state, which, in turn, prohibits the passage of clock pulses through the AND 1I element. At this point, the output code is fully formed and recorded in registers 14 and 15, starting from the second bits, since a shift occurs after recording the information.
Таким образом, цикл преобразовани закончен, выходной код находитс в регистрах 14 и 15, выходы которых образуют выходную шину, причем выходы регистра 14 - четньш, а выходы регистра 15 - нечетные разр ды выходного кода.Thus, the conversion cycle is completed, the output code is in registers 14 and 15, the outputs of which form the output bus, and the outputs of register 14 are even, and the outputs of register 15 are odd bits of the output code.
Пусть разр дность выходного кода . На вход преобразовател поступает число +12. В двоичном коде оно представл етс какLet the size of the output code. The input of the converter receives the number +12. In binary code, it is represented as
Зн. 16 8 4 2 1Zn 16 8 4 2 1
О 01100About 01100
По приходу команды Начало преобразовани коммутатор 1 подключает входную шину к входам регистра 3 и импульсом с элемента ИЛИ 8 входна информаци записьшаетс в регистр 3 и подаетс на первый вход сумматора 2 и второй вход блока 5 сравнени ко дев. Одновременно обнул ютс регистры 14 и 15 и счетчик 18, а триггер ;16 устанавливаетс в состо ние единицы .Upon the arrival of the command to start the conversion, switch 1 connects the input bus to the inputs of register 3 and impulses from the OR 8 element the input information is written to register 3 and is fed to the first input of the adder 2 and the second input of block 5 of the comparison to the virgins. At the same time, registers 14 and 15 and counter 18 are zeroed, and the trigger; 16 is set to unit state.
На третьи входы блока 4 пам ти по ступает нулевой адрес, по которому записан двоичный эквивалент дес тогоThe third inputs of memory block 4 are followed by the zero address at which the binary equivalent of the tenth one is written.
ТО 9 34 -21 1 1TO 9 34 -21 1 1
87654321 12 -8 5 -3 2 -1 10 О 1 10 11 11,87654321 12 -8 5 -3 2 -1 10 O 1 10 11 11,
что соответствует максимальной форме числа +12 в коде Фибоначчи, причемwhich corresponds to the maximum form of the number +12 in the Fibonacci code, and
00
00
5five
веса кода Фибоначчи. При переходе в единичное состо ние триггера 17 на первый вход блока 4 пам ти поступает команда Разрешение считывани , после чего на первые,входа блока 5 сравнени кодов поступает информаци из блока 4 пам ти. Таким образом, блок 5 анализирует два кода: с выхода регистра 3 - О 01100 и с вторых выходов блока 4 пам ти - О 100010. В дан ном случае преобразуема величина : меньше веса кода Фибоначчи и больше нул ..Поэтому на третий и четвертый 5 входы блока 6 поступают соответственно 1 и 1 . В результате этого элементы ИЛИ 7 и НЕ 9 формируют два разр да выходного кода 1 1, которые по переднему фронту импульса с элемента К 12 записьшаютс соответственно в регистры 14 и 15, и происходит сдвиг информации в этих регистрах.Fibonacci weights. When switching to the unit state of the trigger 17, the Read Enable command is received at the first input of the memory block 4, after which the first inputs of the code comparison block 5 receive information from the memory block 4. Thus, block 5 analyzes two codes: from the output of register 3 - O 01100 and from the second outputs of block 4 of memory - O 100010. In this case, the value is convertible: less than the weight of the Fibonacci code and more than zero .. Therefore, the third and fourth 5 the inputs of block 6 are received respectively 1 and 1. As a result, the elements OR 7 and NOT 9 form two bits of the output code 1 1, which are recorded on registers 14 and 15 on the leading edge of the pulse from element K 12, respectively, and information in these registers is shifted.
Теперь полностью сформирован адрес дл блока 4 пам ти, поступающий на его четвертые входы. Адрес будет равен 000011. Первые четыре старших би- , та - это адрес, сформированный счетчиком 18, а последние два бита - последние биты выходного , которые снимаютс с вторых разр дов выходов регистров 14 и 15. По приходу второго тактового импульса происходит сложение кода, записанного в регистре 3, и кода, поступаклцего на вторые входы сумматора 2 с блока 4 пам ти.The address for memory block 4, arriving at its fourth inputs, is now fully formed. The address will be 000011. The first four older bi-, that is the address formed by the counter 18, and the last two bits - the last bits of the output, which are removed from the second bits of the outputs of registers 14 and 15. Upon the arrival of the second clock pulse, the code is added, recorded in register 3, and the code received from the second inputs of adder 2 from memory block 4.
00
5five
5 five
0 0
00
00110011
11001100
О ОOh oh
1one
1one
Регистр 3 Блок 4 пам ти (первые выходы ) Register 3 Block 4 memory (first outputs)
Ц 111111Ts 111111
По переднему фронту импульса с выхода элемента ИЛИ 8 результат операции сложени записываетс в регистр 3.On the leading edge of the pulse from the output of the element OR 8, the result of the addition operation is written to register 3.
Первый такт преобразовани закончен . Следующие такты преобразовани осуществл ютс аналогично. Дп нагл дности пример преобразовани числа +12 представлен в виде табл.1.The first conversion cycle is completed. The following conversion cycles are performed similarly. In the dash, an example of converting the number +12 is presented in the form of table 1.
По окончании п того такта работы преобразовател в регистрах 14 и 15 будет сформирован выходной код -At the end of the fifth cycle of operation of the converter in registers 14 and 15, the output code will be generated:
четные разр ды записаны в регистре 14, а нечетные - в регистре 15.even bits are written in register 14, and odd bits are in register 15.
Дл более полного понимани работы преобразовател приведены табл.2 и 3 - таблицы прошивки посто нных эаFor a more complete understanding of the operation of the converter, Tables 2 and 3 are given - permanent firmware tables
поминающих устройств блока 4 пам тиmemory devices of memory block 4
Claims (1)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
SU864115702A SU1438008A1 (en) | 1986-09-08 | 1986-09-08 | Code converter |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
SU864115702A SU1438008A1 (en) | 1986-09-08 | 1986-09-08 | Code converter |
Publications (1)
Publication Number | Publication Date |
---|---|
SU1438008A1 true SU1438008A1 (en) | 1988-11-15 |
Family
ID=21255891
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
SU864115702A SU1438008A1 (en) | 1986-09-08 | 1986-09-08 | Code converter |
Country Status (1)
Country | Link |
---|---|
SU (1) | SU1438008A1 (en) |
-
1986
- 1986-09-08 SU SU864115702A patent/SU1438008A1/en active
Non-Patent Citations (1)
Title |
---|
Авторское свидетельство СССР №662933, кп. G 06 F 3/02, 13/12, 1979. * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
SU1438008A1 (en) | Code converter | |
SU1578810A1 (en) | Converter of non-position code to binary code | |
SU1571761A1 (en) | Analog-digital converter | |
SU1046932A1 (en) | Threshold element | |
SU993245A1 (en) | Series binary code-to-unit counting code converter | |
SU1695389A1 (en) | Device for shifting pulses | |
SU1193827A1 (en) | Series-to-parallel translator | |
SU1662005A1 (en) | Binary to binary coded decimal translator | |
SU1401479A1 (en) | Multifunction converter | |
SU1367163A1 (en) | Binary serial code to unit-counting code converter | |
SU1302437A1 (en) | Device for converting parallel code to serial code | |
SU1285465A1 (en) | Function generator | |
SU1174919A1 (en) | Device for comparing numbers | |
SU1545213A1 (en) | Device for solving booolean functions | |
SU1383330A1 (en) | Data input device | |
SU1450112A1 (en) | Code converter | |
SU1425828A1 (en) | A-d conversion apparatus | |
SU1259494A1 (en) | Code converter | |
SU1571587A1 (en) | Device for selection of priority subscriber | |
SU1133669A1 (en) | Translator from residual class system code to binary code | |
SU1397936A2 (en) | Device for combination searching | |
SU1591010A1 (en) | Digital integrator | |
SU1651383A1 (en) | Bipulse-to-binary code converter | |
SU1562966A1 (en) | Device for selection of asynchronous signals on basis of criterion "m out of n" | |
RU1784963C (en) | Code translator from gray to parallel binary one |