SU1104504A1 - Device for sorting binary numbers - Google Patents
Device for sorting binary numbers Download PDFInfo
- Publication number
- SU1104504A1 SU1104504A1 SU833576571A SU3576571A SU1104504A1 SU 1104504 A1 SU1104504 A1 SU 1104504A1 SU 833576571 A SU833576571 A SU 833576571A SU 3576571 A SU3576571 A SU 3576571A SU 1104504 A1 SU1104504 A1 SU 1104504A1
- Authority
- SU
- USSR - Soviet Union
- Prior art keywords
- input
- output
- analysis
- prohibition
- cell
- Prior art date
Links
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
УСТРОЙСТВО ДЛЯ СОРТИРОВКИ ДВОИЧНЫХ ЧИСЕЛ, содержащее матрицу И- Ш чеек анализа, где п - количество чисел и число строк,m - число разр дов чисел и число столбцов, кажда чейка анализа включает элемент И, элемент ИЛИ и элемент запрета , причем в каждой чейке анализа управл ющий вход элемента запрета соединен с первым входом элемента ИЛИ данной чейки, к второму входу которого подключен выход элемента И этой чейки, шина пр мого кода j -го разр да 1 -го числа устройства, где i 1,2,...,п, j 1,2,...,ni, подключена к информационному входу элемента запрета ij -и чейки анализа, шина инверсного кода J -го разр да i-ro числа устройства подключена к первому входу элемента И i j -и чейки анализа, кроме того, устройство дополнительно содержит элемент задержки , в первой и п -и строках - элемент НЕ, элемент запрета и триггер, ,в строках с второй по (п-1)-ю - элемент НЕ, элемент запрета, триггер, элемент ИЛИ, а в каждом столбце многовходовый элемент ИЛИ и элемент И съема j-го разр да числа, информационный вход которого соединен с выходом )-го многовходового элемента ИЛИ и вторыми входами элемейтов И j-X чеек анализа всех строк, выход элемента И съема j -го разр да числа вл етс выходом -го разр да числа устройства, входы j -го многовходового элемента ИЛИ соединены с выходами элементов запрета j -х чеек анализа всех строк, выход элемента ИЛИ k -и чейки анализа i -и строки , где k 1,2,..., (m-1), соединен с управл ющим входом элемента запрета A DEVICE FOR SORTING BINARY NUMBERS containing the matrix of I-W cells of the analysis, where n is the number of numbers and the number of rows, m is the number of bits of numbers and the number of columns, each cell of the analysis includes the element AND, the element OR and the element of the ban, and in each cell analysis of the control input of the prohibition element is connected to the first input of the OR element of this cell, to the second input of which the output of the AND element of this cell is connected, the direct code bus of the jth digit of the 1st number of the device, where i 1,2, ... , n, j 1,2, ..., ni, is connected to the information input of the element zap eta ij and analysis cells, the J-bit inverse code bus of the i-th number of the device is connected to the first input of the element AND ij and the analysis cell, in addition, the device additionally contains a delay element, in the first and n lines - the element NOT, a prohibition element and a trigger,, in the rows from the second to (n-1) -th are the NO element, a prohibition element, a trigger, an OR element, and in each column there is a multi-input OR element and a J th digit of the digit, information input of which is connected to the output of the) th multi-input element OR and the second inputs of elements AND jX analysis cells of all rows, the output of the element AND removal of the jth digit of the number is the output of the th digit of the device number, the inputs of the jth multi-input element OR are connected to the outputs of the prohibition elements of the jth analysis cells of all rows, the output of the element OR k - and analysis cells of the i th line, where k 1,2, ..., (m-1), is connected to the control input of the prohibition element
Description
НИИ области применени устройства за счет обеспечени вьщачи упор доче ной последовательности чисел в задан ном интервале без потерь информации при одинаковых числах, в него введены регистры-максимального и минималь ного чисел, блок сравнени и элемент И управлени выдачейчисла, в каждую строку - элемент ИЛИ запрета выдачи i -го числа, а в каждую чейку анализа - два элемента запрета и второй элемент ИЛИ, причем пр мой выход j-го разр да регистра максимального числа соединен с первыми Информационными входами вторых элементов запрета j -х чеек анализа всех строк, а инверсный выход j -го разр да максимального числа - с первыми информационными входами третьих элементов запрета j-х чеек анализа всех строк, выходы разр дов регистра минимального числа подключены к соответствующим входам первой группы блока сравнени , соответствующие входы второй группы которого соединены с выходами J -X многовходовых элементов .ИЛИ, первьм выход блока сравнени подключен к первому входу элемента И управлени выдачей числа второй вход которого подключен к шине тактовых импульсов устройства, а 1 А выход - к управл ющим входам элементов И съема числа всех столбцов и входу элемента задержки, второй выход блока сравнени вл етс выходом конца работы устройства, в каждой чейке анализа выходы второго и третьего элементов запрета соединены с первым и вторым входами второго элемента ИЛИ, вторые информационные входы второго и третьего элементов запрета1 -й чейки анализа соединены соответственно с шинами инверсного и пр мого кода j -го разр да i -го числа устройства, выход второго элемента ИЛИ k-и чейки анализа i -и строки подключен к управл ющим входам второго и третьего элементов запрета и третьему входу элемента ИЛИ ()-й чейки анализа этой строки, выходы третьих элементов запрета всех чеек анализа и инверсный выход триггера i-и строки соединены с входами i -го элемента ИЛИ запрета вьщачи i-го числа, выход которого соединен с управл ющим входом первого элемента запрета первой чейки анализа i -и строки, управл ющие входы второго и третьего элементов запрета чеек анализа первого столбца всех строк подключены к нулевой шине устройства .The scientific research institute of the device application area by ensuring the ordering of an ordering sequence of numbers in a given interval without loss of information with the same numbers, the registers of the maximum and minimum numbers, the comparison block and the AND control of the issuance of numbers are entered into it, the OR OR prohibition element is entered into each line issuing the i-th number, and in each cell of the analysis - two prohibition elements and the second element OR, and the direct output of the j-th digit of the register of the maximum number is connected to the first Information inputs of the second prohibition elements j analysis cells of all rows, and the inverse output of the jth digit of the maximum number — with the first information inputs of the third prohibition elements of the jth analysis cells of all rows; the outputs of the bits of the minimum number register are connected to the corresponding inputs of the first group of the comparator unit, the corresponding inputs of the second group which are connected to the outputs J-X of the multi-input elements. OR, the first output of the comparator unit is connected to the first input of the AND control unit by issuing a number whose second input is connected to the device clock bus, and 1A output - to the control inputs of the elements AND removal of the number of all columns and the input of the delay element, the second output of the comparison unit is the output of the end of operation of the device, in each analysis cell the outputs of the second and third prohibition elements are connected to the first and second inputs of the second element OR , the second information inputs of the second and third prohibition elements of the 1 st analysis cell are connected respectively to the inverse and direct code buses of the j th bit of the i th device number, the output of the second element OR the k cell and the first cell of the i th line is connected to the control inputs of the second and third prohibition elements and the third input of the OR element () -th analysis cell of this row, the outputs of the third prohibition element of all analysis cells and the inverse output of the trigger of the i-row are connected to the inputs of the i -th element OR of the inhibit i- The first number, the output of which is connected to the control input of the first prohibition element of the first analysis cell, i and the line, the control inputs of the second and third prohibition elements of the first column analysis cells of all rows are connected to the device zero bus.
Изобретение относитс к вычислительной технике и может быть исполь зовано дл сортировки массива двоич ных чисел в пор дке убывани (возрастани ) их величины, а также дл выбора и упор дочени чисел в определенном интервале. Известно устройство дл сравнени т-п-разр дных двоичных чисел, содержащее m элементов равнозначно ти, VnD-триггеров , элементы И, ИЛИ Недостатком данного, устройства вл етс низкое быстродействие, а именно дл определени очередного в заданном интервале требуетс ti тактов работы. Наиболее близким к изобретению по технической сущности вл етс устрой ство дл сортировки двои ных чисел, содержащее матр1-щу чеек, кажда из которых содержит элемент И, элемент ИЛИ и элемент запрета. Кроме того, устройство содержит элемент задержки и в, каждой строке - элемент НЕ, элемент запрета,элемент ИЛИ и триггер, а в каждом столбце - многовходовый элемент ИЛИ и элемент И съема числа, причем первый вход элемента И каждой чейки соединен с первым входом чейки, второй вход - с вторым входом чейки, а выход - с первым входом элемента ИЛИ этой чейки , второй вход которого соединен с управл ющим входом элемента запрета этой же чейки и с третьим входом чейки, а выход - с первым выходом чейки и с третьим входом последующей чейки данной строки, вторые входы чеек соединены с шиной съема соотвстствующего разр да, котора подключена к первому входу соответствующего элемента И съема числа, к вторым входам которых подключена тактова шина, четвертый вход чейки соединен с сигнальным входом элемента запрета, выход которого подключен к второму выходу чейки, второй выход каждой чейки каждого столбца соединен с соответствующим входом многовходового элемента ИЛИ, выход которого соединен с шиной съема соответствутадего разр да, третий вход первой чейки каждой строки соединен с единичным выходом триггера той же строки, а первый выход последней чейки каждой строки через элемент НЕ соединен с первым сигнальным входом элемента запрета и первым входом элемента ИЛИ той же строки, выход элемента -ИЛИ каждой строки соединен с вторым входом элемента ИЛИ и управл ющим входом элемента запрета последующей строки, вторые сигнальные входы элементов за прета каждой строки соединены с выходом элемента задержки , к входу которого подключена тактова шина, а выход элемента запрета каждой строки подключен к единичному входу триггера той же строки 2The invention relates to computing and can be used to sort an array of binary numbers in order of decreasing (increasing) their value, as well as to select and order numbers in a certain interval. A device for comparing pn-bit binary numbers containing m elements equivalently, VnD-flip-flops, AND, OR elements is known. The disadvantage of this device is low speed, namely, ti clock cycles are required to determine the next one in a given interval. The closest to the invention in its technical essence is a device for sorting binary numbers, containing a matrix of cells, each of which contains the AND element, the OR element, and the prohibition element. In addition, the device contains a delay element and, in each row, a NOT element, a prohibition element, an OR element and a trigger, and in each column a multi-input OR element and a number element, with the first input of the AND element of each cell connected to the first input of the cell , the second input is with the second input of the cell, and the output is with the first input of the OR element of this cell, the second input of which is connected to the control input of the prohibition element of the same cell and with the third input of the cell, and the output with the first output of the cell and with the third input subsequent cell given with the second inputs of the cells are connected to the removal bar of the corresponding bit, which is connected to the first input of the corresponding element and the number is removed, the second inputs of which are connected to the clock bus, the fourth input of the cell is connected to the signal input of the prohibition element, the output of which is connected to the second output of the cell, the second output of each cell of each column is connected to the corresponding input of the multi-input element OR, the output of which is connected to the removal bus corresponding to the bit, the third input of the first cell of each row is Inen with a single trigger output of the same line, and the first output of the last cell of each line is NOT connected to the first signal input of the prohibition element and the first input of the OR element of the same line, the output of the OR element of each line is connected to the second input of the OR element and the control the input of the next-line inhibit element, the second signal inputs of the elements for the preta of each line are connected to the output of the delay element to the input of which the clock bus is connected, and the output of the prohibition element of each line is connected to the unit at the trigger input of the same line 2
Недостатком известного устройства вл ютс ограниченные функциональные возможности: не позвол ет, выбирать числа в пор дке убывани (возрастани ) в заданном интервале. A disadvantage of the known device is its limited functionality: it does not allow to select numbers in order of decreasing (increasing) in a given interval.
Цель изобретени - расширение области применени устройства за счет обеспечени вьщачи упор доченной последовательности чисел в заданном интервале без потерь информации при одинаковых числах.The purpose of the invention is to expand the field of application of the device by providing an ordered sequence of numbers in a given interval without loss of information with the same numbers.
Поставленна цель достигаетс тем, что в устройство дл сортировки двоичных чисел, содержащее матрицу п. П1 чеек анализа, где п - количество чисел и число строк, гп - число разр дов чисел и число столбцов, кажда чейка анализа включает элемент И, элемент ИЛИ и элемент запрета , причем в каждой чейке анализа управл ющий вход элемента запрета соединен с первым входом элемента ИЛИ данной чейки, к второму входу которого подключен выход элемента И этой чейки, шина пр мого кода j -го разр дам -го числа устройства, гдеi 1,2, ..., п , j 1 ,2 ,.. ., tn , подключен к инфдрманионному входу элемента запрета 1J -II чейки анализа, шина инверсного кода J -го разр да i -го числа устройства подключена к первому входу элемента И)-и чейки анализа, кроме тоге, устройство дополнительно содержит элемент задержки, в первой ип-и строках - элемент НЕ, элемент запрета и триггер, в строках с второй по (п-1)-ю - элемент НЕ, элемент запрета, триггер, элемент ИЛИ а в каждом столбце - многовходовый элемент ИЛИ и элемент И съема j -го разр да числа, информационный вход которого соединен с выходом j -го многовходового элемента И.ГГИ и вторыми входами элементов И i -х чеек анализа всех строк, выход элемента И съема j -го разр да числа вл етс выходом j -го разр да числа устройства , входы J -го МЕЮГОВХОДОВОГО элемента ИЛИ соединены с выходами элементов запрета j -х чеек анализа всех строк, выход элемента ИЛИ .-и чейки анализа i -и строки, где k 1,2,.. (m-1), соединен с управл ющим входом элемента запрета. (1;-1)-й чейки анализа -и строки, а выход элемента ИЛИ i-й чейки анализа 1 -и строки через элемент НЕ { -и строки с первым информационным входом элемента запрета соответствующей строки, выход которого подключен к входу установки в нулевое состо ние тригге„ у „ ра ( -и строки, в каждой-t -н cTpoKejThe goal is achieved by the fact that a device for sorting binary numbers containing a matrix of n. P1 analysis cells, where n is the number of numbers and the number of rows, gn is the number of digit digits and the number of columns, each analysis cell includes the AND element, the OR element and a prohibition element, and in each cell of the analysis the control input of the prohibition element is connected to the first input of the OR element of this cell, to the second input of which the output of the AND element of this cell is connected, the direct code bus of the j-th bit of the device, where i 1, 2, ..., n, j 1, 2, ..., tn, podkl Yuchen to the input element of the prohibition element 1J-II analysis cells, the inverse code bus of the J-th bit of the i-th number of the device is connected to the first input of the element I) and the analysis cell, in addition to the toga, the device additionally contains a delay element and lines - the element is NOT, the element of the ban and the trigger, in the lines from the second to (n-1) -th - the element is NOT, the element of the ban, the trigger, the element OR, and in each column - the multi-input element OR and the element AND the removal of the j-th bit yes numbers whose information input is connected to the output of the jth multi-input element AND GGI and the second inputs of the elements AND of the i -th analysis cells of all rows, the output of the element AND the removal of the j-th digit of the number is the output of the j-th digit of the device number, the inputs of the J-th MEUGH input element OR are connected to the outputs of the inhibit j-elements x analysis cells of all rows, the output of the OR element. and analysis cells of the i –and lines, where k 1,2, .. (m-1), is connected to the control input of the prohibition element. (1; -1) -th analysis cell is the line, and the output of the OR element of the i-th analysis cell of the 1st line is through the NOT element and the first information input of the prohibition element of the corresponding line whose output is connected to the installation input in zero state of trigger "y" pa (-and lines, in each-t -n cTpoKej
где 2 2,3,..., (п-1), выход элемента И.ПИ п -и чейки анализа через элемент НЕ I -и строки соединен с первым входом элемента И.Ш- Р -и строк выход которого подключен к второму входу элемента ИЛИ и управл ющему входу элемента запрета (( + 1)-й строк выход элемента ИЛИ П -li чейки анализа первой строки через элемент НЕ первой строки соединен с вторым входом элемента ИЛИ и управл ющим входом элемента запрета второй строки, вторые информационные входы элементов запрета всех строк подключены к выходу элемента задержки, а входы установки в единичное состо ние триггеров всех строк - к шине начальной установки устройства, введены регистры максимального и минимального чисел , блок сравнени и элемент И управлени выдачей числа, в каждую строку - элемент ИЛИ запрета вьщачи -i-го числа, а в каждую чейку анализа - два элемента запрета и второй элемент ИЛИ, причем пр мой выход j -г $11 разр да регистра максимального числа соединен с первыми информационнымн , входами вторых элементов запрети 4 -X чеек анализа всех строк, а Инверсный выход j -го разр да максимального числа - с первыми информационными входами третьих элементов запрета J -х чеек анализа всех стро выходы разр дов регистра минимального числа подключены к соответствующим входам первой, группы блока сравнени , соответствующие входы второй группы которого соединены с выходами J-X многовходовых элементов ИЛИ, первый выход блока .сравнени подключен к первому входу элемента И управлени вьщачей числа, второй вход которого подключен к шине тактовых импульсов устройства, а выходк управл ющим входам элементов И съема числа всех столбцов и входу элемента задержки, второй выход блока сравнени вл етс выходом конца работы устройства, в каждой чейке анализа выходы второго и третьего элементов запрета соединены с первым и вторш входами второго элемента ИЛ вторые информационные входы второго и третьего элементов запретамч -и чейки анализа соединены соответственно с шинами инверсного и пр мого кода -го разр да i -го. числа устройства , выход второго элемента ИЛИ ( -и чейки анализа i -и строки подключен к управл ющим входам второго и третьего элементов запрета и третье му входу элемента ИЛИ ()-и чейки анализа этой строки, выходы третьих элементов запрета всех чеек анализа и инверсный выход триггера -и строки соединены с входами i -го элемента ИЛИ запрета выдачи i-го числа, выход которого соединен с управл ющим входом первого элемента запрета первой чейки анализа i -и строки, управл ющие входы второго и третьего Элементов-запрета чеек анализа первого столбца всех строк подключены к нулевой шине устройства. На фиг. 1 представлена схема уст .ройства; на фиг. 2 - схема чейки. Устройство содержит чейки 1, об разующие матрицу Ц. гп , где т раз р дность числа, ad- количество чи сел, регистр максимального числа, состо щий из триггеров iZ, регистр минимального числа, состо щий из триггеров 3, схему 4 сравнени , эле менты И.ПИ 5-7, элементы И 8 и 9,элементь НЕ 10, элементы 11 запрета, триггеры 12, элемент 13 задержки, тактовую шину 14, шину 15 сброса, выходы 16 разр дов числа, выход 17 устройства , на котором по вл етс сигнал окончани работы устройства. Кроме этого, кажда чейка 1 (фиг. 2) содержит триггер 18 разр да числа, элементы 19-21 запрета, элемент И 22, элементы ИЛИ 23 и 24, входы 25-29, выходы 30-33. Устройство работает следующим образом. В исходном состо нии в регистрах, образованных триггерами 18 чеек 1, записаны сортируемые числа. В регистры максимального, образованного триггерами 2, и минимального, образованного триггерами 3, чисел записываютс числа равные соответственно верхней и нижней границам интервала. В каждом также из массива ti двоичных чисел вьщел етс экстремальное, например максимальное число на выходах элемента ИЛИ 6, не превыщаюп1ее верхней границы интервала. Если выделенное число больше нижней границы интервала, то оно при поступлении импульса на вход передаетс через элементы ИЗ на выходные шины устройства. После выдачи максимального числа указ аннь1м способом оно исключаетс из рассматриваемого массива, а среди оставшихс чисел производитс выбор очередного максимального числа и, если оно больше нижней границы интервала, передача его на выходные щины устройства. Если очередное вьщеленное число меньше нижней граНИЩ11 интервала, то на выходную шину 17 поступает сигнал конца анализа. Таким образом, производитс передача всех чисел, наход щихс в заданном интервале, на выход устройства в пор дке убывани их значений. Рассмотрим раздельно процесс запрета выдачи чисел, превьш1ающих верхнюю границу интервала, процесс вьщелени максимального числа из чисел, наход щихс в заданном интервале, и процесс формировани убывающей последовательности этих чисел. При процессе запрета выдачи чисел, превьщ1ающих верхнюю границу интервала , выполн етс , начина со старшего разр да, последовательный поразр д7110 ный анализ максимального и сортируемых чисел. Пусть в старшем разр де максималь ного числа 1, тогда на первый вход элемента 20 запрета каждой чейки первого столбца поступает единичный сигнал, При этом,если в старшем разр де -го числа ( 1 1,2,..., И ) имеетс О, то единичный сигнал с инверсного выхода триггера 18 поступает на второй вход элемента 20 запрета i -и чейки 1 первого столбца, и, следовательно, на его выходе имеетс единичный сигнал, который поступает через элемент ИЛИ 24 на выход 32 чейки и далее на вход 28 следующей чейки, запретив тем самым анализ последующих разр дов j -го чис ла, так как оно меньше максимального Если в старшем разр де -го числа имеетс 1, то единичный сигнал с в IXOдa триггера 18 поступает на вход элемента 21 запрета i-и чейки niepBoro столбца. Таким образом, элементы . 20 и 21 запрета открыты только по одному входу и на их выходах, а следовательно, и на вьгходе 32 чейки не имеетс единичного сигнала т.е. нет запрета на анализ следующего разр да. Пусть в старшем разр де максималь , ного числа О, тогда на первьй вход элемента 21 запрета каждой чейки первого столбца поступает единичный сигнал. При этом, если в старшем разр де i -го числа О, то единичный сигнал с выхода триггера 18 поступает на вход элемента 20 запрета i -и чейки 1 первого столбца. Таким образом , элементы 20 и 21 запрета открыты только по одному входу и на их выходах, а следовательно, и на выходе 32 чейки не имеетс единичного сигнала, т.е. нет запрета на анализ следующего разр да i -го числа. Если в старшем разр де -го числа 1, то единичный сигнал с выхода триггера 18 поступает на второй вход элё:Мента 21 запрета -и чейки 1 столбца и, следовательно, на его выходе имеетс единичный сигнал, которьй Поступает на выход 33 чейки и через элемент ИЛИ 24 на выход 32 чейки и далее на вход 28 следук цей чейки, запреща тем самым анализ последующих разр дов t го числа. С выхода 33 сигнал поступает через элемент ИЛИ 5 на вход 25 первой чейки V-го числа, далее зломент ИЛИ 23 чейки на вход 25 следуклдей чейки i -го числа, и т.д., запреща тем самым выдачу i -го числа , так как оно больше максимального. Дл тех чисел, при анализе старших разр дов которых, нет запрета на анализ следующего разр да, осуществл етс аналогичным образом анализ следующего разр да и т.д. В результате после анализа всех разр дов сортируемых чисел на входах 25 чеек 1 чисел, значени которьк превьпиают значение максимального числа, имеетс единичный сигнал, поступивший через элемент ИЛИ 5 и запрещающий выдачу этих чисел. Одновременно с процессом запрета вьщачи чисел, превьш1ающих верхнюю границу интервала, осутцествл етс процесс выделени максимального числа из чисел, наход щихс в заданном интервале. Этот процесс также осу- . ществл етс путем последовательного поразр дного анализа сортируемых чисел, начина со старшего разр да. При этом, если в старших разр дах сортируемых чисел, исключа числа запрещенные к выдаче, О, то на выходе 30 чеек старшю: разр дов, а также на в псоде элемента ИЛИ 6 тоже О. Если в старших разр дах сортируемых чисел, исключа числа запрещенные к выдаче, 1, то на входах элементов 19 запрета чеек 1 старших разр дов чисел .1 и, следовательно , на выходе 30 эт1тх чеек, а также на выходе элемента ШШ 6 тоже 1. Если в старших разр дах сортируемых чисел, исключа число запрещенных к вьщаче, неравенство, т.е. в данном разр де этих чисел имеетс как О, так и 1, происходит формирование на выходе элемента ИШ 6 1 и исключение из процесса анализа всех более младших разр дов тех чисел , у которых в данном разр де имеетс О, следующим образом. Так как имеетс хот бы одно число, у которого в старшем разр де 1, то на входах элемента 19 запрета чейки старшего разр да этого числа 1, и, следовательно,на вьгходе 30 этой чейки, у которых в стлршсх разр дах О, по вл ютс единичные сигналы на входах элемента И 22 и, следоательно , на вьгходе 31 чейки. Единичный сигнал с вькода 31 чейки стартого разр да этих чисел закрывает по управл ющеиу входу элементы 19 запрета всех последунлцих чеек данных чисел, исключив тем самым из дальнейшего анализа все более младшие разр ды этих чисел. Аналогично проводитс анализ последукхцих разр дов оставшихс чисел, по окончании которого на выходах элементов ИЛИ 6 и первой группы входов схемы 4 сравнени сформируетс код. максимального числа из чисел, не превышающих значение числа, записанного в регистре максимального числа. Процесс формировани убывающей посwhere 2 2,3, ..., (p-1), the output of the element I.PI p - and the analysis cell through the element NOT I - and the lines are connected to the first input of the element I.Sh - P - and the lines of which output is connected to the second input of the OR element and the control input of the prohibition element ((+ 1) st lines the output of the element OR P -li of the first row analysis cell through the element NOT of the first line is connected to the second input of the OR element and the control input of the prohibition element of the second line, the second information the inputs of the prohibition of all lines are connected to the output of the delay element, and the inputs of the installation in the unit state the triggering of all lines to the device's initial installation bus, the registers of the maximum and minimum numbers, the comparison block and the number output control AND element are entered, the OR OR prohibition of the i-th number is entered into each line, and two prohibition elements are entered into each cell of the analysis and the second element OR, and the direct output j of the 11th digit register of the maximum number is connected to the first information, the inputs of the second element prohibit 4 -X analysis cells of all rows, and the Inverse output of the jth digit of the maximum number - with the first information The signals of the third prohibition elements of the J-th analysis cells of all the rows of the bits of the register of the minimum number are connected to the corresponding inputs of the first group of the comparison unit, the corresponding inputs of the second group of which are connected to the outputs JX of the multiple input elements OR, the first output of the comparison module is connected to the first input of the element And control the number, the second input of which is connected to the device clock bus, and the control inputs of the elements AND remove the number of all columns and the input of the delay element, the second output the comparison unit is the output of the device operation, in each analysis cell, the outputs of the second and third prohibition elements are connected to the first and second inputs of the second IL element, the second information inputs of the second and third prohibitory elements and the analysis cells are connected respectively to inverse and direct code buses - th bit yes i-th. device numbers, output of the second element OR (-and analysis cells of the i -th line are connected to the control inputs of the second and third prohibition elements and the third input of the OR element () -and analysis cells of this line, outputs of the third prohibition elements of all analysis cells and inverse the trigger output and lines are connected to the inputs of the i-th element OR prohibit the issuance of the i-th number, the output of which is connected to the control input of the first prohibition element of the first analysis cell i and the lines controlling the inputs of the second and third Elements of the first analysis cellthe column of all rows is connected to the zero bus of the device Fig. 1 shows the device diagram; Fig. 2 shows the cell diagram. The device contains cells 1 forming the matrix C.gp, where the number is the number, ad is the number of the village, the maximum number register consisting of iZ triggers, the minimum number register consisting of triggers 3, comparison scheme 4, I.PI elements 5-7, elements 8 and 9, HE element 10, prohibition elements 11, triggers 12, the delay element 13, the clock bus 14, the reset bus 15, the outputs of the 16 bits of the number, the output 17 of the device on which the Signal termination of the device. In addition, each cell 1 (Fig. 2) contains a trigger 18 bits of the number, the elements 19-21 prohibition, the element And 22, the elements OR 23 and 24, the inputs 25-29, the outputs 30-33. The device works as follows. In the initial state, the registers formed by the 18 cell 1 triggers contain sorted numbers. In the registers of maximum, formed by triggers 2, and minimum, formed by triggers 3, numbers are written numbers equal respectively to the upper and lower limits of the interval. In each of the binary numbers array ti, too, there is an extreme, for example, maximum number at the outputs of the element OR 6, not exceeding the upper limit of the interval. If the selected number is greater than the lower limit of the interval, then when a pulse arrives at the input, it is transmitted through the OF elements to the device output buses. After issuing the maximum number, the decree is eliminated from the array in question, and among the remaining numbers, the next maximum number is selected and, if it is greater than the lower limit of the interval, transferred to the output device. If the next split number is less than the lower limit of the interval, then the output bus 17 receives the end of analysis signal. Thus, all the numbers in a given interval are transferred to the output of the device in decreasing order of their values. Let us consider separately the process of prohibiting the issuance of numbers that exceed the upper limit of the interval, the process of extracting the maximum number from the numbers within a given interval, and the process of forming a decreasing sequence of these numbers. In the process of prohibiting the issuance of numbers that exceed the upper limit of the interval, the highest and sortable numbers, beginning with the highest bit, are analyzed, beginning with the highest bit,. Let in the high order of the maximum number 1, then the first input of the element 20 of the prohibition of each cell of the first column receives a single signal, Moreover, if in the high bit of the de th number (1 1,2, ..., I) there is O , then the single signal from the inverse output of the trigger 18 is fed to the second input of the prohibition element 20 of the i-cell 1 of the first column, and, therefore, at its output there is a single signal that is fed through the element OR 24 to the output of the 32-cell and then to the input 28 next cell, thereby prohibiting the analysis of subsequent bits of the jth number, so as it is less than the maximum. If there is 1 in the highest bit, then a single signal from the IXO of the trigger 18 is fed to the input of the prohibition element 21 of the i-and niepBoro cell of the column. So the elements. 20 and 21 prohibitions are open only by one input and at their outputs, and consequently, at the start of the 32 cells there is no single signal i.e. There is no ban on the analysis of the next bit. Suppose that in the highest order the maximum of a number O, then the first input of the prohibition element 21 of each cell of the first column receives a single signal. At the same time, if in the higher order of the i-th number O, then a single signal from the output of the trigger 18 is fed to the input of the element 20 of the prohibition of the i-th and cell 1 of the first column. Thus, prohibition elements 20 and 21 are open only by one input and at their outputs, and consequently, at the output of 32 cells, there is no single signal, i.e. There is no ban on the analysis of the next bit of the i-th number. If in the high-order bit of de-number 1, then a single signal from the output of flip-flop 18 is fed to the second input of the El: Ment 21 of the prohibition - and 1-column cell and, therefore, there is a single signal at its output that goes to the output of 33 cells and the OR 24 element at the output of 32 cells and then at the input 28 follows the cell, thereby prohibiting the analysis of subsequent bits of the tth number. From the output 33, the signal goes through the element OR 5 to the input 25 of the first cell of the Vth number, then the malicious OR 23 cells to the input of the 25th next cell of the ith number, etc., thereby prohibiting the output of the ith number, so as it is more than the maximum. For those numbers, in the analysis of the higher bits of which there is no prohibition on the analysis of the next bit, the analysis of the next bit is carried out in a similar way, etc. As a result, after analyzing all the bits of the sorted numbers, at the inputs of 25 cells of 1 numbers, the values of which exceed the value of the maximum number, there is a single signal received through the element OR 5 and prohibiting the output of these numbers. Simultaneously with the process of prohibiting numbers that exceed the upper limit of the interval, the process of extracting the maximum number from the numbers within the specified interval is investigated. This process is also about-. It exists by sequential bit-by-bit analysis of the sorted numbers, starting with the highest bit. At the same time, if in the higher bits of the sorted numbers, excluding the numbers forbidden to issue, O, then at the output 30 cells are older: bits, and also in the element OR 6 are also O. If in the higher bits of the sorted numbers, excluding the numbers forbidden to issue, 1, then at the inputs of the elements 19 of the prohibition of the cells 1, the higher bits of the numbers .1 and, therefore, at the output of 30 et1th cells, as well as at the output of the element ШШ 6 are also 1. If in the higher bits of the sorted numbers, excluding the number inequality, i.e. In this category of these numbers there is both O and 1, the formation of the output of the HS 6 1 element occurs and the exclusion from the process of analysis of all the lower bits of those numbers that have this O in the category are as follows. Since there is at least one number in which there is 1 in the highest bit, then at the inputs of prohibition element 19, the most significant bit of this number is 1, and, consequently, on the input 30 of this cell, in which Single signals at the inputs of element And 22 and, consequently, at the start of 31 cells. A single signal from the code 31 of the start cell of these numbers closes the control elements 19 of the prohibition of all subsequent cells of these numbers by controlling the input, thereby excluding the younger bits of these numbers from further analysis. Similarly, the analysis of the subsequent bits of the remaining numbers is carried out, after which at the outputs of the elements of OR 6 and the first group of inputs of the comparison circuit 4 a code is formed. the maximum number of numbers not exceeding the value of the number written in the maximum number register. Process of forming a decreasing pos
ледовательности этих чисел осуществл етс следующим образом. Если сформированный код максимального числа не меньшеj чем записанный в регистре минимального числа, то с первого выхода , схемы 4 сравнени поступает сигнал на первьй вход элемента И 9, на второй вход которого поступает тактовый импульс. При по влении тактового импульса на выходе элемента И 9 возникает сигнал, который разрешает поступление кода максимального числа на выходные шины 16 устройства. Этот же сигнал, задержанный на элемен- те 13 задержки, поступает на все эле-30 The sequence of these numbers is carried out as follows. If the generated code of the maximum number is not less than j recorded in the register of the minimum number, then from the first output of the comparison circuit 4 a signal is sent to the first input of the AND 9 element, to the second input of which a clock pulse is received. When a clock pulse appears at the output of the And 9 element, a signal arises that permits the receipt of the maximum number code on the output buses of the device 16. The same signal, delayed by the delay element 13, arrives at all the elec-
менты 11 запрета, соединенные по первым сигнальным входам с инвертированными на элементах НЕ 10 выходами 31 чеек последнего столбца. При совпадении задержанного сигнала с сигналом тех шин, которые соответствуют максимальным дл рассматриваемого момента числам, .на выходе первого по пор дку элемента 11 -запрета возникает импульс, который устанавливает триггер 12 в нулевое состо ние. С выхода триггера 12 сигнал поступает через элемент ИЛИ 5 на вход 25 чейки старшего разр да числа, исключив тем самым из дальнейшего анализа данное число, т.е. запреща его прохождение через элементы 19 запрета.Copies 11 of the ban, connected by the first signal inputs with inverted on the elements of NOT 10 outputs of 31 cells of the last column. When the delayed signal coincides with the signal of those buses that correspond to the maximum numbers for the moment in question, a pulse arises at the exit of the first in order element 11-ban, which sets trigger 12 to the zero state. From the output of trigger 12, the signal enters through the element OR 5 at the input of the 25th cell of the most significant digit of the number, thereby excluding from the further analysis this number, i.e. prohibiting its passage through the elements of prohibition 19.
Дл возможности считьшани всех одинаковых чисел сигнал с выхода элемента НЕ 10 первого максимального числа поступает на упра л кицие 110To be able to match all the same numbers, the signal from the output of the element NOT 10 of the first maximum number is fed to the control 110.
состо ние подачей на них импульса сброса по шине 15.the state of applying to them a pulse pulse on the bus 15.
Если требуетс выдать возрастающую последовательность чисел, то устройство должно обеспечить выделение минимального числа из имеющегос массива чисел. Дл этого необходимо каждое число записать в инверсном коде и записать, в регистр максималь- .If it is required to produce an increasing sequence of numbers, the device must ensure the selection of the minimum number from the existing array of numbers. To do this, you need to write each number in the inverse code and write it into the register max.
ного числа - минимальное число в ин- версном коде, а в регистр минимального числа - максимальное число в инверсном коде. Тогда в каждый момент времени на выходах элементов ИЛИ 6Number is the minimum number in the inverse code, and in the register of the minimum number is the maximum number in the inverse code. Then at each moment of time at the outputs of the elements OR 6
имеющегос массива чисел в заданном интервале, представленное в инверсном коде. existing array of numbers in a given interval, represented in the inverse code.
Технико-экономический эффект предлагаемого устройства заключаетс в расширении функциональных возможностей . Устройство позвол ет выдавать убывающую (возрастающую) последовательность чисел в заданном интервале определ ть число ближайшее к заданному из массива чисел. В св зи с этим расшир етс область применени предлагаемого устройства, например дл построени гистограмм. Кроме того, предлагаемое устройство обладает болшим быстродействием, которое определ етс : только задержками на элементах схемы, и позвол ет без потерь информации сортировать произвольные массивы, включающие, например, р д одинаковых чисел. 410 входы элементов 11 запрета всех последующих чисел (дл второго непосред ственно, а дл остальных через элементы ИЛИ 7), запреща прохождение сигналов через элементы 11 запрета на входы триггеров 12. Таким образом, при наличии нескольких одинаковых чисел они последовательно опрашиваютс и вьщаютс . После выдачи всех чисел одного значени происходит выбор описанным способом следующего наибольшего числа и выдача его. После вьщачи всех чисел в заданном интервале триггеры 12 устанавливаютс в исходное единичное присутствует минимальное число изThe technical and economic effect of the proposed device is to expand the functionality. The device allows to issue a decreasing (increasing) sequence of numbers in a given interval to determine the number closest to the specified one from the array of numbers. In this connection, the field of application of the proposed device is expanded, for example for the construction of histograms. In addition, the proposed device has a high speed, which is determined: only by the delays on the circuit elements, and without loss of information, it is possible to sort arbitrary arrays, including, for example, a number of identical numbers. 410 inputs of the prohibition elements 11 of all subsequent numbers (for the second directly, and for the rest through the elements OR 7), prohibiting the passage of signals through the prohibition elements 11 to the inputs of the flip-flops 12. Thus, if there are several identical numbers, they are sequentially polled and entered. After issuing all the numbers of one value, the next highest number is selected by the described method and issued. After all the numbers in a given interval, the triggers 12 are set to the initial one, the minimum number from
Claims (1)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
SU833576571A SU1104504A1 (en) | 1983-04-08 | 1983-04-08 | Device for sorting binary numbers |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
SU833576571A SU1104504A1 (en) | 1983-04-08 | 1983-04-08 | Device for sorting binary numbers |
Publications (1)
Publication Number | Publication Date |
---|---|
SU1104504A1 true SU1104504A1 (en) | 1984-07-23 |
Family
ID=21058135
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
SU833576571A SU1104504A1 (en) | 1983-04-08 | 1983-04-08 | Device for sorting binary numbers |
Country Status (1)
Country | Link |
---|---|
SU (1) | SU1104504A1 (en) |
-
1983
- 1983-04-08 SU SU833576571A patent/SU1104504A1/en active
Non-Patent Citations (1)
Title |
---|
1. Авторское свидетельство СССР № 746502, кл. G 06 F 7/04, 1978. 2. Авторское свидетельство СССР If 526888, кл. G 06 F 7/06, 1974 (прототип) . * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US4628483A (en) | One level sorting network | |
SU1104504A1 (en) | Device for sorting binary numbers | |
SU526888A1 (en) | Device for sorting binary numbers | |
SU1647562A1 (en) | Device for binary numbers sorting | |
SU1509934A1 (en) | Optimum filter | |
SU1734097A1 (en) | Concurrent address driver | |
SU1059565A1 (en) | Device for sampling ordered data sequence | |
SU1092494A2 (en) | Device for sorting numbers | |
SU1388863A1 (en) | Multichannel device for connecting subscribers to a common highway | |
SU1762304A1 (en) | Device for extreme number determination | |
SU1124306A1 (en) | Device for servicing requests | |
SU987616A1 (en) | Device for serial discriminating unities from n-digit binary code | |
SU1322285A1 (en) | Multichannel device for connecting the using equipment with common bus | |
SU1683005A1 (en) | Device to separate five-number sequence median | |
SU1495781A1 (en) | Device for detection of maximum number | |
SU1764053A1 (en) | Multichannel device for current claim servicing control | |
SU1381483A1 (en) | Device for extracting a maximum number | |
SU1372322A1 (en) | Homogeneous structure cell | |
SU1310820A1 (en) | Device for supervising central node of computer network | |
SU1061132A1 (en) | Device for sorting numbers | |
SU1403059A1 (en) | Number array sorting device | |
SU409290A1 (en) | DEVICE FOR STORING AND DISTRIBUTING GROUPS OF PULSES | |
SU1068930A1 (en) | Device for minimization of logic functions | |
SU860059A1 (en) | Device for binary number comparison | |
SU1439576A1 (en) | Device for sorting numbers |