SU1241232A2 - Device for counting number of zeroes in binary code - Google Patents
Device for counting number of zeroes in binary code Download PDFInfo
- Publication number
- SU1241232A2 SU1241232A2 SU843706138A SU3706138A SU1241232A2 SU 1241232 A2 SU1241232 A2 SU 1241232A2 SU 843706138 A SU843706138 A SU 843706138A SU 3706138 A SU3706138 A SU 3706138A SU 1241232 A2 SU1241232 A2 SU 1241232A2
- Authority
- SU
- USSR - Soviet Union
- Prior art keywords
- input
- node
- output
- inputs
- group
- Prior art date
Links
Landscapes
- Synchronisation In Digital Transmission Systems (AREA)
Abstract
Изобретение относитс к вычислительной технике, автоматике, телемеханике и может быть использовано дл обработки двоичных кодов сигналов и вл етс усовершенствованием известного устройства по ав.св, № 1019440. Целью изобретени вл етс расширение .области применени устройства путем реализации операции выбора кода числа, содержащего наибольшее количество нулей в массиве т-разр дных кодов. Дл достижени поставленной цепи в устройство дополнительно введены узел задержки, элемент И, элемент ИЛИ, группа узлов сравнени , две группы элементов И и две группы триггеров. 2 з.п. ф-лы, 3 ил. (Л СThe invention relates to computing, automation, telemechanics and can be used to process binary codes of signals and is an improvement of the known device according to A.S. No. 1019440. The purpose of the invention is to expand the use of the device by implementing the code number selection procedure containing the greatest the number of zeros in the array of t-bit codes. To achieve the delivered circuit, a delay node, an AND element, an OR element, a group of comparison nodes, two groups of AND elements and two groups of triggers are additionally introduced into the device. 2 hp f-ly, 3 ill. (Ls
Description
1one
Изобретение относитс к вычислительной технике, автоматике и телемеханике , может быть использовано дл обработки двоичных кодов сигналов и вл етс усовершенствованием известного устройства по авт.св. W 1019440.The invention relates to computing, automation and telemechanics, can be used for processing binary codes of signals and is an improvement of the known device according to author. W 1019440.
Цель изобретени - расширение области применени устройства путем реализации операции выбора кода чис- ла, содержащего наибольшее количество нулей в массиве т-разр дных кодовThe purpose of the invention is to expand the scope of the device by implementing the operation of selecting the code of the number containing the largest number of zeros in the array of t-bit codes.
На фиг. 1 представлена структурна схема устройства дл подсчета числа нулей в двоичном коде; на фиг. 2 - функциональна схема узла сравнени ; на фиг. 3 - функциональна схема узла задержки.FIG. 1 shows a block diagram of a device for counting the number of zeros in a binary code; in fig. 2 - the functional diagram of the comparison node; in fig. 3 - functional delay node circuit.
Устройство дл подсчета числа нулей в двоичном коде содержит груп- пу триггеров I, группы элементов И 2 и 3, элементы И 4 и 5, труппу элементов ИЛИ 6, элемент 7 задержки ,, счетчик 8, триггер 9, группы элементов И 10 и 11, элемент ИЛИ 12, группу узлов 13 сравнени , узел 14 задержки, группы триггеров 1.5 и 16, элемент И 17, числовой вход 18 и тактовый вход 19. .The device for counting the number of zeros in a binary code contains a group of trigger I, groups of elements AND 2 and 3, elements AND 4 and 5, a group of elements OR 6, element 7 of delay, counter 8, trigger 9, groups of elements And 10 and 11 , element OR 12, group of comparison nodes 13, node 14 delays, trigger groups 1.5 and 16, element 17, numeric input 18 and clock input 19..
Каждый узел сравнени группы име- ет входы 20-24, а также выход 25. Узел 14 задержки содержит входы 26 и 27, а также выход 28.Each group comparison node has inputs 20-24, as well as output 25. Delay node 14 contains inputs 26 and 27, as well as output 28.
Каждьй узел сравнени состоит из элементов И 29-31,.элемента И-НЕ 32 и триггера 33.Each comparison node consists of AND elements 29-31, AND-NE element 32 and trigger 33.
Узел задержки выполнен в виде элемента И 34, элемента 35 задержки и триггера 36.The delay node is made in the form of the element And 34, the element 35 of the delay and the trigger 36.
Устройство дл подсчета числа ну- лей в двоичном коде работает следующим образом.A device for counting the number of zeros in a binary code works as follows.
В исходном состо нии триггеры 1 , 15 и 16 групп, а также триггер 9 и счетчик 8 наход тс в нулевом состо НИИ. Допустим, что нужно найти число содержащее максимальное количество нулей в массиве .N т-разр дных слов. Двоичный код первого числа, поступает с входа 18 через группу элементов ИЛИ 6 на вход группы триггеров 1, устанавливает их в соответствующих разр дах в 1. После этого тактовые импульсы поступают на вход 19 и дале на входы элементов И 2 и 3 групп, oc ществл последовательное дополнение записанного в триггерах 1 группы код до единичного. Эти же импульсы черезIn the initial state, the triggers of 1, 15, and 16 groups, as well as trigger 9 and counter 8, are in the zero state of the scientific research institute. Suppose you need to find a number containing the maximum number of zeros in an array of .N t-bit words. The binary code of the first number arrives from input 18 through a group of elements OR 6 to the input of a group of flip-flops 1, sets them to the corresponding bits in 1. After that, the clock pulses are fed to input 19 and far to the inputs of elements And 2 and 3 groups the sequential addition of the recorded in the triggers of the 1 group code to a single. These same pulses through
23222322
элемент 7 задержки и элемент И 4 проход т на вход счетчика 8. В момент, когда в триггерах 1 группы сформируетс единичный код, все элементы И 3 открыты и тактовый сигнал, поступа на единичньй вход триггера 9, устанавливает его в единичное состо ние . Это приводит к прекращению подачи импульсов на вход счетчика 8. Одновременно открываетс элемент И дл прохода тактовых импульсов на узел 14 задержки и осуществл етс перезапись содефжимого счетчика 8 в триггеры 15 или 16 групп в соответствии с тем, какой элемент И (10 или 11) групп открыт. После этого по установочному входу триггеры 1 группы, триггер 9 и счетчик 8 переход т в нулевое состо ние. Таким образом , устройство дл подсчета числа нулей готово дл приема второго т-разр дного слова из массива и т.д Рассмотрим процесс сравнивани двух кодов чисел в устройстве. В первоначальньм момент группа элементов И 3 закрыта по входам 22. В результате этого триггеры 33 группы наход тс также в нулевом состо нии На выходе элементов И-НЕ 32 - высокие потенциалы, так как на первый вход каждого элемента И-НЕ 32 с входа 20 поступает низкий потенциал с пр мого выхода триггера 15 группы, а на второй вход элемента И-НЕ 32 с входа 23 поступает высокий уровень потенциала с инверсного выхода триггера 16 группы. При по влении тактового импульса на входе узла сравнени первого разр да он поступает на первыйвход элемента И 30, а также на первый вход элемента И 29 первого разр да. Элемент И 30 закрыт, так как на второй его вход подан и низкий уровень потенциала с пр мого выхода триггера 33. Поэтому тактовый импульс, пройд через элементdelay element 7 and element 4 pass to the input of counter 8. At the moment when a single code is formed in group 1 triggers, all elements 3 are open and the clock signal arriving at single input of trigger 9 sets it to one. This leads to the cessation of the supply of pulses to the input of counter 8. Simultaneously, the AND element opens for the passage of clock pulses to the delay node 14 and overwrites the index counter 8 to the triggers of 15 or 16 groups according to which And element (10 or 11) groups is open. After that, the installation input triggers group 1, the trigger 9 and the counter 8 are transferred to the zero state. Thus, the device for counting the number of zeros is ready to receive the second m-bit word from the array, etc. Consider the process of comparing two codes of numbers in the device. At the initial moment, the group of elements AND 3 is closed by the inputs 22. As a result, the group triggers 33 are also in the zero state. At the output of the AND-NE elements 32 there are high potentials, since the first input of each AND-NE element 32 from the input 20 low potential comes from the direct output of the trigger 15 of the group, and the second input of the AND-32 element from input 23 receives a high potential from the inverse output of the trigger 16 of the group. When a clock pulse appears at the input of the first-bit comparison node, it arrives at the first input of the AND 30 element, as well as at the first input of the AND 29 element of the first discharge. Element I 30 is closed, since a low potential level is supplied to its second input from the direct output of trigger 33. Therefore, the clock pulse passed through the element
И 29 первого разр да, открытый высоким уровнем потенциала с инверсногоAnd 29 is the first discharge, open high potential with inverse
выхода триггера 33, поступает во втором разр де на вход элемента И 30, а также на первый вход элемента И 29. Аналогично тактовый импульс поступает на вход узла 13 сравнени третьего разр да и т.д. Дл последнего т-го разр да тактовый импульс поступает на п-й вход (т+1)-входового элемента И 29,. закрытого низким уровнем потенциала с пр мого выхода триггера 33.the output of the trigger 33, arrives in the second bit at the input of the element I 30, as well as at the first input of the element And 29. Similarly, the clock pulse is fed to the input of the node 13 comparing the third bit, etc. For the last tth bit, the clock pulse goes to the nth input (t + 1) of the input element I 29 ,. closed low potential with direct trigger output 33.
Одновременно тактовьп- импульс потупает на вход 26 узла 24 задержки, устанавливает в нулевое состо ние триггер 36 и проходит на вход элемента 34 задержки. По истечении вре менй задержкиAt the same time, the clock pulse is lowered to the input 26 of the delay node 24, sets the trigger 36 to the zero state and passes to the input of the delay element 34. After a delay
Т (m+l)t,,T (m + l) t ,,
где врем задержки электрическо го импульса в элементах И/ИЛИ, where the delay time of the electric pulse in the AND / OR elements,
импульс, пройд через открытый высоким уровнем потенциала с инверсного выхода триггера 36 элемент И 34, пос тупает на выход 28 узла 4 задержки Тем самым элементы И 11 группы подготовлены к приему информации со счетчика 8. Таким образом, следующее слово записанное в счетчике 8, пос- тупает в триггеры 16 на место предыдущего .the impulse passed through the open high potential from the inverted output of the trigger 36 element 34 and arrives at the output 28 of the node 4 delays. Thus, the elements of group 11 are prepared to receive information from counter 8. Thus, the next word recorded in counter 8, - blunt in triggers 16 to the place of the previous one.
Допустим, что это слово имеет единицу, во втором разр де, т.е. слово , записанное в триггерах 16, боль- ше слова, хран щегос в триггерах 15. В этом случае сравнение первьк разр дов производитс аналогично рассмотренному. В узле 13 сравнени второго разр да открыт элемент И 31 подачей на его входы, высоких уровней потенциала с инверсного выхода триггера 15 и с пр мого выхода триггера 16. Триггер 33 установлен в единичное -состо ние. Тактовьй импульс с выхода элемента И 29 узла 13 сравнени первого- разр да проходит через элемент И 29, так как на остальные его входы поданы высокие уровни потенциала с выхода триггера 33 и с выхода элемента И-НЕ 32 узла сравнени первого разр да. Пройд через элемент Hltli 12, тактовый импульс по входу 27 узла 4 задержки устанавливает триггер 35 в единичное состо ние. Одновременно тактовый импульс переписывает информацию с выхода счетчика 8 через элементы И 10 группы в триггеры 15 группы. Таким образом, в результате сравнени двух кодов чисел на триггерах 16 остаетс большее число.Suppose that this word has a unit, in the second category, i.e. the word written in the flip-flops 16 is more than the word stored in the flip-flops 15. In this case, the comparison of the first bits is made similarly to that considered. At node 13 of the second-bit comparison, the element I 31 is opened by applying to its inputs high potential levels from the inverse output of the trigger 15 and from the direct output of the trigger 16. The trigger 33 is set to a single state. A clock pulse from the output of element AND 29 of node 13 of the first-bit comparison passes through element AND 29, since the other inputs have high potential levels from the output of trigger 33 and from the output of AND-HE 32 nodes of the first discharge. Passing through the Hltli element 12, a clock pulse at the input 27 of the delay node 4 sets the trigger 35 to one state. At the same time, the clock pulse rewrites the information from the output of the counter 8 through the elements AND 10 groups into the triggers of the 15th group. Thus, as a result of comparing the two codes of numbers on the flip-flops 16, a larger number remains.
В результате функционировани предлагаемого устройства на триггера 15 (16) второй (третьей) группы хранитс число, соответствующее наибольшему количеству нулей числа в массиве N га-разр дных слов.As a result of the operation of the proposed device, on the trigger 15 (16) of the second (third) group, the number corresponding to the largest number of zeros of the number is stored in the array N of n-bit words.
5 five
to to
(5 20 (5 20
5 о Q 5 0 5 o Q 5 0
5five
232Формула изобретени 232 Formula of Invention
Claims (3)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
SU843706138A SU1241232A2 (en) | 1984-02-29 | 1984-02-29 | Device for counting number of zeroes in binary code |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
SU843706138A SU1241232A2 (en) | 1984-02-29 | 1984-02-29 | Device for counting number of zeroes in binary code |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
SU1019440 Addition |
Publications (1)
Publication Number | Publication Date |
---|---|
SU1241232A2 true SU1241232A2 (en) | 1986-06-30 |
Family
ID=21105605
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
SU843706138A SU1241232A2 (en) | 1984-02-29 | 1984-02-29 | Device for counting number of zeroes in binary code |
Country Status (1)
Country | Link |
---|---|
SU (1) | SU1241232A2 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
RU2638724C1 (en) * | 2017-02-09 | 2017-12-15 | федеральное государственное автономное образовательное учреждение высшего образования "Национальный исследовательский ядерный университет "МИФИ" (НИЯУ МИФИ) | Device for order correction when normalizing numbers |
-
1984
- 1984-02-29 SU SU843706138A patent/SU1241232A2/en active
Non-Patent Citations (1)
Title |
---|
Авторское свидетельство СССР № 1019440, кл. G 06 F 7/50, 1981. * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
RU2638724C1 (en) * | 2017-02-09 | 2017-12-15 | федеральное государственное автономное образовательное учреждение высшего образования "Национальный исследовательский ядерный университет "МИФИ" (НИЯУ МИФИ) | Device for order correction when normalizing numbers |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
SU1241232A2 (en) | Device for counting number of zeroes in binary code | |
SU1198509A1 (en) | Device for ranking numbers | |
SU1520546A1 (en) | Device for sorting numbers | |
SU1132294A1 (en) | Device for simulating communication channel | |
SU884151A1 (en) | Pulse counter | |
SU1359896A1 (en) | Pulse-delay device | |
SU1108462A1 (en) | Correlation device | |
SU1320815A2 (en) | Device for processing statistical information | |
SU1223222A1 (en) | Device for sorting numbers | |
SU798810A1 (en) | Device for comparing code weights | |
SU752764A1 (en) | Pulse train generator | |
SU1297031A1 (en) | Generator of balanced codes | |
SU1012239A1 (en) | Number ordering device | |
SU1048470A1 (en) | Device for ordered sampling of parameter values | |
SU1651293A1 (en) | Digital data link simulator | |
SU1539795A1 (en) | Device for editing a list | |
SU1037258A1 (en) | Device for determination of number of ones in binary code | |
SU1260962A1 (en) | Device for test checking of time relations | |
SU1357956A1 (en) | Sequential carry digital integrator | |
SU1684919A1 (en) | Device for delaying pulses with digital control | |
SU1201855A1 (en) | Device for comparing binary numbers | |
SU1596335A1 (en) | Device for shaping control code by modulo two | |
SU1173402A1 (en) | Number generator | |
SU1070541A1 (en) | Gray/code parallel binary code translator | |
SU1606973A1 (en) | Device for sorting numbers |