SU1121669A1 - Device for comparing number of ones in binary codes - Google Patents

Device for comparing number of ones in binary codes Download PDF

Info

Publication number
SU1121669A1
SU1121669A1 SU833630019A SU3630019A SU1121669A1 SU 1121669 A1 SU1121669 A1 SU 1121669A1 SU 833630019 A SU833630019 A SU 833630019A SU 3630019 A SU3630019 A SU 3630019A SU 1121669 A1 SU1121669 A1 SU 1121669A1
Authority
SU
USSR - Soviet Union
Prior art keywords
group
input
inputs
trigger
elements
Prior art date
Application number
SU833630019A
Other languages
Russian (ru)
Inventor
Николай Иванович Крылов
Надежда Григорьевна Коробка
Original Assignee
Войсковая Часть 25840
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 Войсковая Часть 25840 filed Critical Войсковая Часть 25840
Priority to SU833630019A priority Critical patent/SU1121669A1/en
Application granted granted Critical
Publication of SU1121669A1 publication Critical patent/SU1121669A1/en

Links

Landscapes

  • Manipulation Of Pulses (AREA)

Abstract

УСТРОЙСТВО ДЛЯ СРАВНЕНИЯ ЧИСЛА ЕДИНИЦ В ДВОР1ЧНЫХ КОДАХ, содержащее .группу из П триггеров, первую и вторую группу элементов И по Г| -1 элементов И в каждой группе, причем вход 1 -го разр да первого сравниваемого числа соединен с первым входом установки в единичное состо ниеi -го триггера группы (i 1,2,..., п , и число разр дов сравниваемых чисел), вход начальной .установки устройства соединен с первыми входами установки в ноль.триггеров группы, тактовый вход устройства подключен к первым входам элементов И первой группы, единичный выход j -го триггерагруппы ( 2,3,... ,п) соединен с вторым входом (j-l)-ro элемента И первой группы, к третьему входу которого подключен инверсный выход (jrD-ro триггера группы, выход (j-l)-ro элемента И первой группы подключен к вторым входам.установки в единичное состо ние (j-l)-ro триг гера группы и установки в ноль j -го триггера группы, отличающеес   тем, что, с целью расширени  области применени , в устройство 1введены втора  группа из П триггеров и четыре элемента И, причем первые входы установки в ноль триггеров второй группы подключены к входу начальной установки устройства , вход 1-го разр да второго сравниваемого числа соединен с первым входом установки в единичное состо ние 1 -го триггера второй группы, тактовый вход устройства подключен к первым входам элементов И второй группы и первого элемента И, вькод которого соединен с вторыми входами установки в ноль первых триггеров первой и второй групп, единичный i выход j -ГО триггера второй группы .соединен с вторь1м входом (j-l)-ro О) элемента И  торой группы, к третьему входу которого подключен инверсный выход (j-l)-ro триггера второй группы, выход (j-l)-ro элемента И второй группы подключен к вторым входам установки в единичное состо - , ние (j-l)-ro триггера второй группы и установки в ноль j -го триггера группы, единичные выходы первых триггеров первой и второй групп подключены к второму и третьему входам перрого элемента И и первым входам-соответственно второго и третьего элементов И, вторые входы которых соединены с входом вьщачи результата устройства и первым входом четвертого элемента И, второй и третий входы которого подключены к инверсным выходам первых триггеров первой и второй групп, выходы второго, третьего и четвертого элементов И  вл ютс  выходами устройства.A DEVICE FOR COMPARISON OF THE NUMBER OF UNITS IN THE PATTERNS OF COURSES, containing a group of П triggers, the first and second group of elements, And G | -1 elements And in each group, the input of the 1st bit of the first compared number is connected to the first input of the unit into the single state of the i-th trigger of the group (i 1,2, ..., n, and the number of bits of the compared numbers) , the input of the initial setup of the device is connected to the first inputs of the installation of the group triggers to zero, the device clock input is connected to the first inputs of the AND elements of the first group, the single output of the j -th group trigger (2,3, ..., n) is connected to the second input (jl) -ro element AND of the first group, to the third input of which the inverse is connected one (group trigger jrD-ro, output (jl) -ro of the element AND of the first group is connected to the second inputs. set to one state (jl) -ro of the group trigger and set to zero the j-th group trigger, characterized in that In order to expand the field of application, a second group of P triggers and four AND elements are entered into device 1, the first inputs of the installation to zero of the second group of triggers are connected to the input of the initial installation of the device, the input of the 1st bit of the second comparative number is connected to the first input of the installation in the unit state 1 th the second group trigger, the clock input of the device is connected to the first inputs of the elements of the second group and the first element I, whose code is connected to the second inputs of setting the first triggers of the first and second groups to zero, the unit i output j of its second group trigger is connected to the second input (jl) -ro O) of the element And the second group, to the third input of which is connected the inverse output (jl) -ro of the trigger of the second group, the output (jl) -ro of the element And the second group is connected to the second inputs of the unit in the unit state ( jl) -ro trigger of the second group and mustache Settings to zero of the j-th group trigger, single outputs of the first triggers of the first and second groups are connected to the second and third inputs of the first And element and the first inputs, respectively, of the second and third And elements, the second inputs of which are connected to the input of the result of the device and the first input of the fourth And, the second and third inputs of which are connected to the inverse outputs of the first triggers of the first and second groups, the outputs of the second, third and fourth elements of the AND are the outputs of the device.

Description

Изобретение относитс  к вычислительной технике и может быть использовано в устройствах контрол  дискретных .элементов и адаптивных систек управлени . Известно устройство дл  определени  количества единиц в двоичном коде , содержащее триггер и элементы И ИЛИ дл  каждого из разр дов, счетчик элементы И, И-НЕ m . Недостатками данного устройства  вл ютс  низкое быстродействие (подсчет количества единиц в двоичном коде осуществл етс  последовательно ) и ограниченные функциональные возможности (устройство не позвол ет сравнивать количество единиц в двух кодах), что сужает область его применени . Наиболее близким к предлагаемому по технической сущности  вл етс  устройство дл  определени  количества единиц в двоичном коде, содержаще группу триггеров и две группы элемен тов И, причем входы устройства Подключены к первым единичным входам триггеров, вход установки подключен к первым нулевым входам триггеров, управл ющий вход устройства соединен с управл ющими входами первой группы элементов И, вход вьщачи результата соединен с управл ющими входами вто рой группы элементов И, единичный выход i-го триггера ((1,2,...,п) соединен с входом (i-l)-ro элемента И первой .группы (кроме i t) и с входом (i+1)-ro элемента И второй группы, нулевой выход -j -го триггера - с входом (-го элемента И пер-, вой группы (кроме 1 11) и с входом 1-го элемента И второй группы, выход j-го элемента И первой группы (J 1,2,. . . ,.п-1) соединен с единичным входом J -го триггера и с нулевым вхо дом (j+l)-ro триггера, выходы второй группы элементов И  вл ютс  выходами устройства 2 . Недостатком данного устройства  вл ютс  ограниченные функциональные возможности, поскольку устройство не позвол ет осуществл ть сравнение количества единиц в двоичных кодах, . что существенно снижает область его применени  в системах контрол . Цель изобретени  - расширение области применени . Поставленна  цель достигаетс  тем, что в устройство дл  сравнени  числа единиц в двоичных .кодах, содержащее группу из Ц триггеров, первую и вторую группы элементов И по П-1 элементов И в каждой группе, причем вход 1 -го разр да первого сравниваемого числа соединен с первым входом установки в единичное состо ние i -го триггера группы ( 1,2,.. . ,п, П - число разр дов сравниваемых чисел), вход начальной установки устройства соединен с первыми входами установки в ноль триггеров группы, тактовый, вход устройства .подключен к первым входам элементов И первой группы, единичный выход J -го триггера группы (, 3,...,п)J соединен с вторым входом () -1)го элемента И первой группы, ктретьему входу которого подключен инверсный выход (j-l)-ro триггера группы, выход (j-l)-ro элемента И первой группы подключен к вторым входам установки в единичное состо ние (j-l)-ro триггера группы и установки в ноль ) -го триггера г.руппы , введены втора  группа из П триггеров и четыре элемента И, причем первые входы установки в ноль триггеров второй группы подключены к входу начальной установки устройства , вход 1 -го разр да второго сравниваемого числа соединен с первым входом установки в единичное состо ние -го триггера второй группы , тактовый вход устройства подключен к первым входам элементов И второй группы и первого элемента И, выход которого соединен с вторыми входами установки в ноль первых триггеров первой и второй групп, единичный выход j -го триггера второй группы соединен с вторым входом (j-1)-ro элемента И второй группы, к третьему входу Которого подключен инверсный выход (j-1)-ro триггера второй группы, выход (j-1)-ro элемента И второй группы подключен к вторым входам установки в единичное состо ние (-1)-го триггера второй . группы и установки в ноль j -го триггера группы, единичные выходы первых триггеров первой и второй групп подключены к второму и третьему входам первого элемента И и первым входам соответственно второго и третьего элементов И, вторые входы которых соединены с входом выдачи результата устройства и первым входом четвертого элемента И, второй и третий входы которого подключены к инверсным выходам первых триггеров первой и второй групп, выходы второго , третьего и четвертого элементов И  вл ютс  выходами устройства. The invention relates to computing and can be used in control devices for discrete elements and adaptive control systems. A device for determining the number of units in a binary code, containing a trigger and AND elements OR for each of the bits, the counter elements AND, AND-HE m, is known. The disadvantages of this device are low speed (counting the number of units in a binary code is carried out sequentially) and limited functionality (the device does not allow to compare the number of units in two codes), which limits its scope. The closest to the proposed technical entity is a device for determining the number of units in binary code, which contains a group of triggers and two groups of elements AND, the device inputs are connected to the first single trigger inputs, the installation input is connected to the first zero inputs of the trigger, the control input device is connected to the control inputs of the first group of elements AND, the input of the result is connected to the control inputs of the second group of elements AND, the unit output of the i-th trigger ((1,2, ..., p) is connected to the input (il) -ro of the element And the first .group (except for it) and with the input (i + 1) -ro of the element And the second group, zero output of the -jth trigger - with the input of the (-th element of And the first, ( except 1 11) and with the input of the 1st element AND of the second group, the output of the j-th element AND of the first group (J 1,2, ....,. п-1) is connected to the single input of the J-th trigger and with zero input the home of the (j + l) -ro trigger, the outputs of the second group of elements I are the outputs of the device 2. The disadvantage of this device is its limited functionality, since the device does not allow comparison of the number of units binary code inits,. which significantly reduces its scope in control systems. The purpose of the invention is to expand the scope. The goal is achieved by the fact that the device for comparing the number of units in binary codes, containing a group of Q triggers, the first and second groups of elements AND by P-1 elements AND, in each group, the input of the 1st bit of the first compared number with the first input of the installation in the unit state of the i-th group trigger (1,2, ..., n, P is the number of bits of the numbers being compared), the input of the initial installation of the device is connected to the first inputs of the installation to zero of the group trigger, clock, input device. connected to the first inputs of elements And the first group, the single output of the Jth group trigger (, 3, ..., p) J is connected to the second input () -1) of the first element AND the first group, to the third input of which the inverse output (jl) -ro of the group trigger is connected , the output (jl) -ro of the element AND of the first group is connected to the second inputs of the installation in the unit state (jl) -ro of the group trigger and the installation of the zero) trigger of the group, the second group of P triggers and four elements AND, the first inputs of the installation to zero of the second group of flip-flops are connected to the input of the initial installation of the device, the input of the 1st bit of the second about the compared number is connected to the first input of the second trigger group of the second group, the device clock input is connected to the first inputs of the AND elements of the second group and the first And element, the output of which is connected to the second inputs of the first zero setting of the first and second triggers, the single output of the j-th trigger of the second group is connected to the second input (j-1) -ro of the element AND the second group, to the third input of which is connected the inverse output (j-1) -ro of the trigger of the second group, output (j-1) -ro element And the second group is connected to the second the installation inputs in the unit state (-1) of the second trigger. group and setting to zero the j-th trigger of the group, single outputs of the first triggers of the first and second groups are connected to the second and third inputs of the first element And the first inputs of the second and third elements, respectively, the second inputs of which are connected to the output output of the device and the first input the fourth And element, the second and third inputs of which are connected to the inverse outputs of the first triggers of the first and second groups, the outputs of the second, third and fourth elements And are the outputs of the device.

На чертеже представлена схема предлагаемого устройства. ,The drawing shows a diagram of the proposed device. ,

Устройство содержит группы триггеров 1 и 2, группы элементов И 3 и 4, элементы И 5-8, информационные входы 9 и 10, вход 11 начальной установки устройства, тактовый вход 12, вход 13 вьщачи результата, выходы 14, 15 и 16 устройства.The device contains the groups of triggers 1 and 2, groups of elements I 3 and 4, elements I 5-8, information inputs 9 and 10, input 11 of the initial installation of the device, clock input 12, input 13 of the result, outputs 14, 15 and 16 of the device.

Устройство работает следующим образом .The device works as follows.

В исходном состо нии триггеры 1 и 2 устанавливаютс  в нулевое состо ние подачей сигнала на вход 11. По входньм шинам 9 и 10 записываетс  в триггер 1 код первого числа, а в триггер 2 - код второго числа. На ВХОД 12 подаетс  тактовый сигнал.In the initial state, the triggers 1 and 2 are set to the zero state by applying a signal to the input 11. On the input buses 9 and 10, the code of the first number is written to the trigger 1, and to the trigger 2 - the code of the second number. A clock signal is applied to INPUT 12.

Если j -и триггер 1 или Z (j 1,2If j is trigger 1 or Z (j 1,2

П-1) находитс  в нулевом состо нии, а ()+1)-й триггер 1 или 2 - в единичном , то) -и элемент И 3(4) открыт и сигнал с его вькода устанавливает j-и триггер 1(2) в единичное состо ние , а (j +1)-й триггер 1(2) - в нулевое . Если первые триггеры 1 и 2 устанавливаютс  в единичное состо ние , то элемент И 5 открываетс  и сигнал с его выхода устанавливает об первых триггера 1 и 2 в нулевое состо ние . В устройстве в течение действи  сигнала на входе 12 происходит параллельно-последовательное переключение триггеров 1 и 2, в результате которого происходит сдвиг единиц в сторону первого разр да и взаимное их уничтожение в первом разр де . Если число единиц в первом коде бьшо больше, то все триггеры 2 устанавливаютс  в нулевое состо ние, а в триггерах 1 остаютс  единицы. Если количество единиц в анализируемых кодах было одинаковым, то все триггеры устройства наход тс  в нулевом состо нии. При подаче на вход вьщачи результата сигнала на одном из выходов по вл етс  результа-у. Так. по вление сигнала на вькоде 14 озйачает , что число единиц в первом коде больше. По вление сигнала на вькоде 15 свидетельствует об одинаковом количестве единиц в кодах. По вление сигнала на выходе 16 означает, что во втором коде содержитс  большее количество единиц.P-1) is in the zero state, and () +1) -th trigger 1 or 2 is in the unit state, then) -and AND 3 (4) is open and the signal from its code sets j-and trigger 1 (2 ) to one state, and (j +1) -th trigger 1 (2) - to zero. If the first triggers 1 and 2 are set to one state, then the element And 5 opens and the signal from its output sets the first trigger 1 and 2 to the zero state. In the device, during a signal at input 12, a parallel-sequential switching of the flip-flops 1 and 2 occurs, as a result of which the units are shifted towards the first discharge and their mutual destruction in the first discharge. If the number of ones in the first code was greater, then all the triggers 2 are set to the zero state, and the triggers 1 remain ones. If the number of units in the analyzed codes was the same, then all the device triggers are in the zero state. When a signal is applied to the input, a result appears at one of the outputs. So. The appearance of a signal in the code 14 indicates that the number of units in the first code is greater. The appearance of a signal in code 15 indicates the same number of units in the codes. The appearance of a signal at output 16 means that the second code contains a larger number of units.

Таким образом, применение изобретени  позвол ет расширить область применени  устройства, а именно использовать его дл  сравнени  кодов двоичных чисел по числу значащих разр дов за врем , равное длительности переходных процессов в устройстве Это обеспечивает возможность использовани  предлагаемого устройства не только в системах контрол , ,но и в системах адаптивного управлени .Thus, the application of the invention allows to expand the field of application of the device, namely to use it to compare the codes of binary numbers by the number of significant bits in a time equal to the duration of transients in the device. This provides the possibility of using the proposed device not only in control systems, but also in adaptive control systems.

3 3

9 о о9 o o o

W /6W / 6

toto

No

roro

Claims (1)

УСТРОЙСТВО ДЛЯ СРАВНЕНИЯ ЧИСЛА ЕДИНИЦ В ДВОИЧНЫХ КОДАХ, содержащее группу из П триггеров, первую и вторую группу элементов И по В-1 элементов И в каждой группе, причем вход i-го разряда первого сравниваемого числа соединен с первым входом установки в единичное состояние' 1 -го триггера группы (Ϊ =1,2,.. ., ц , и число разрядов сравниваемых чисел), вход начальной .установки устройства соединен с первыми входами установки в ноль.триггеров группы, тактовый вход устройства подключен к первым входам элементов И первой группы, единичный выход j -го триггера' группы (j=2,3,...,п) соединен с вторым входом (j-l)-ro элемента И первой группы, к третьему входу которого подключен инверсный выход (jrl)-ro триггера группы, выход (j-l)-ro элемента И первой группы подключен к вторым входам установки в единичное состояние (j-l)-ro триг’гера группы и установки в ноль j -го триггера группы, отличающеес я тем, что, с целью расширения области применения, в устройство •введены вторая группа из П триггеров и четыре элемента И, причем первые входы установки в ноль триггеров второй группы подключены к входу начальной установки- устройства, вход 1-го разряда второго сравниваемого. числа соединен с первым входом установки в единичное состояние i -го триггера второй группы, тактовый вход устройства подключен к первым входам элементов И второй группы и первого элемента И, выход которого соединен с вторыми входами установки в ноль первых триггеров первой и второй групп, единичный выход j-го триггера второй группы соединен с вторым входом (j-1)-ro элемента И второй группы, к третьему входу которого подключен инверсный выход (j-1)-ro триггера второй (группы, выход (j-l)-ro элемента И второй группы подключен к вторым входам установки в единичное состояние (j-1)-ro триггера второй группы и установки в ноль } -го триггера группы, единичные выходы первых триггеров первой и второй групп подключены к второму и третьему входам первого элемента И и первым входам соответственно второго и третьего элементов И, вторые входы которых соединены с входом выдачи результата устройства и первым входом четвертого элемента И, второй и третий входы которого подключены к инверсным выходам первых триггеров первой и второй групп, выходы второго, третьего и четвертого элементов И являются выходами устройства..A DEVICE FOR COMPARING THE NUMBER OF UNITS IN BINARY CODES, containing a group of P triggers, a first and second group of AND elements with B-1 AND elements in each group, the input of the i-th category of the first compared number being connected to the first input of the unit to the unit state '1 group trigger (Ϊ = 1,2, ..., q, and the number of digits of the numbers to be compared), the input of the initial installation of the device is connected to the first inputs of the installation to zero of the group triggers, the clock input of the device is connected to the first inputs of the elements And the first groups, single output of the jth trigger a 'of the group (j = 2,3, ..., n) is connected to the second input (jl) -ro of the And element of the first group, to the third input of which the inverse output (jrl) -ro of the group trigger is connected, the output (jl) is ro of the And element of the first group is connected to the second inputs of setting the unit trigger (jl) -ro of the group trigger and setting the jth group trigger to zero, characterized in that, in order to expand the scope, the second group is introduced into the device of P triggers and four AND elements, the first inputs of setting to zero the triggers of the second group are connected to the input of the initial installation - device CTBA, input 1-th digit of the second being compared. the number is connected to the first input of the installation in the single state of the i-th trigger of the second group, the clock input of the device is connected to the first inputs of the elements AND of the second group and the first element And, the output of which is connected to the second inputs of the installation to zero the first triggers of the first and second groups, a single output of the j-th trigger of the second group is connected to the second input of the (j-1) -ro element And the second group, to the third input of which is connected the inverse output of the (j-1) -ro trigger of the second ( group, output (jl) -ro element And the second groups connected to the second inputs of the installation the single state of the (j-1) -ro trigger of the second group and setting to the zero} th trigger of the group, the individual outputs of the first triggers of the first and second groups are connected to the second and third inputs of the first element And and the first inputs of the second and third elements And, second the inputs of which are connected to the input of the output of the result of the device and the first input of the fourth element And, the second and third inputs of which are connected to the inverse outputs of the first triggers of the first and second groups, the outputs of the second, third and fourth elements And are the output of the apparatus .. SU .,„1121669SU., „1121669
SU833630019A 1983-07-29 1983-07-29 Device for comparing number of ones in binary codes SU1121669A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
SU833630019A SU1121669A1 (en) 1983-07-29 1983-07-29 Device for comparing number of ones in binary codes

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
SU833630019A SU1121669A1 (en) 1983-07-29 1983-07-29 Device for comparing number of ones in binary codes

Publications (1)

Publication Number Publication Date
SU1121669A1 true SU1121669A1 (en) 1984-10-30

Family

ID=21077354

Family Applications (1)

Application Number Title Priority Date Filing Date
SU833630019A SU1121669A1 (en) 1983-07-29 1983-07-29 Device for comparing number of ones in binary codes

Country Status (1)

Country Link
SU (1) SU1121669A1 (en)

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
1. Авторское свидетельство СССР № 716041, кл. Q 06 F 11/10, 1977. 2. Авторское сеидетельство СССР № 1037258, кл. G 06 F 11/10, 1982 (прототип). *

Similar Documents

Publication Publication Date Title
SU1121669A1 (en) Device for comparing number of ones in binary codes
SU646325A1 (en) Information exchange arrangement
SU1092494A2 (en) Device for sorting numbers
SU1688406A1 (en) A synchronous counter
SU1198507A2 (en) Device for comparing number of ones in binary codes
SU1425650A1 (en) Device for comparing numbers with tolerances
SU1173402A1 (en) Number generator
SU1633529A1 (en) Device for majority sampling of asynchronous signals
RU1809431C (en) Gray code generator
SU943707A1 (en) Device for sorting numbers
SU1583934A1 (en) Device for sorting numbers
SU1054825A1 (en) Device for determination of number position on digital axis
SU1365358A1 (en) Device for monitoring "m out of n" code
SU1166111A1 (en) Device for connecting information sources with changeable priorities to bus
SU1233167A1 (en) Device for generating addresses for fast fourier transform algorithm
SU1644123A1 (en) Device for data input
SU1278853A1 (en) Majority device
SU962920A1 (en) Device for determining extremum number
SU1587493A1 (en) Device for sorting numbers
SU1120329A1 (en) Multichannel priority device
SU1691833A1 (en) Apparatus for sorting numbers
SU1037246A1 (en) Number sorting device
SU1144109A1 (en) Device for polling information channels
SU1501037A1 (en) Device for comparing numbers
SU1195360A1 (en) Device for determining extreme points