SU1444749A1 - Device for sorting numbers - Google Patents
Device for sorting numbers Download PDFInfo
- Publication number
- SU1444749A1 SU1444749A1 SU874229297A SU4229297A SU1444749A1 SU 1444749 A1 SU1444749 A1 SU 1444749A1 SU 874229297 A SU874229297 A SU 874229297A SU 4229297 A SU4229297 A SU 4229297A SU 1444749 A1 SU1444749 A1 SU 1444749A1
- Authority
- SU
- USSR - Soviet Union
- Prior art keywords
- inputs
- elements
- group
- output
- outputs
- Prior art date
Links
Landscapes
- Multi Processors (AREA)
Abstract
Изобретение относитс к автоматике и вычислительной технике и может найти применение в специализированных вычислительных машинах и устройствах обработки данных. Целью rr, ts, ,7. изобретени вл етс расширение области применени устройства за счет возможности сортировки нулевых и равных чисел. Устройство содержит п регистров 1, п триггеров 2, группы элементов И 4, 10, 15, 16, дешифраторы 3 элементы ИЛИ 5, группы элементов 6, 9 запрета, шифратор 7, п схем 8 сравнени , регистр 12 результата, элемент Ш1И-НЕ 11, сумматор 13.Устройство сортирует массив чисел по возрастанию и вьщает его дл занесени в ЭВМ, начина с заданного адреса без потери нулевых и равных чисел. 1 табл., 1 ил. .W с (Л fUr tSnThe invention relates to automation and computing and can be used in specialized computers and data processing devices. The purpose of rr, ts,, 7. invention is the expansion of the field of application of the device due to the possibility of sorting zero and equal numbers. The device contains n registers 1, n triggers 2, groups of elements AND 4, 10, 15, 16, decoders 3 elements OR 5, groups of elements 6, 9 prohibition, encoder 7, n comparison schemes 8, result register 12, element ШИИИ-НЕ 11, the adder 13. The device sorts an array of numbers in ascending order and enters it into a computer, starting with a given address without losing zero and equal numbers. 1 tab., 1 Il. .W with (L fUr tSn
Description
1-14447491-1444749
Изобретение относитс к автоматиThis invention relates to automation.
ке и вычислительной технике и может найти применение в специализированных вычислительных машинах и устройствах обработки данных.ke and computing technology and can find application in specialized computers and data processing devices.
Цель изобретени - расширение области применени устройства за счет возможности сортировки равных и нулевых чисел.The purpose of the invention is to expand the field of application of the device due to the possibility of sorting equal and zero numbers.
На чертеже изображено предлагаемое устройство.The drawing shows the proposed device.
Устройство содержит п регистров 1, п триггеров 2, п дешифраторов 3, п элементов И 4 первой группы, (т+1) элементов ИЛИ 5, m элементов 6 запрета первой группы, шифратор 7, п схем 8 сравнени ,(п-1) элементов 9 запрета второй группы, п элементов И 10 второй группы, элемент ИЛИ-НЕ 11, регистр 1.2 результата, сумматор 13, элемент 14 задержки, группы выходных элементов И 15 и 16, входы 1 7 сортируемых чисел устройства, входь 18 сопровождени числа, входы 19 начального адреса устройства, выход 20 конца сортировки, выходы 21 отсортированного числа, тактовьй вход 22 и ВЫ35РД 23 адреса устройства.The device contains n registers 1, n triggers 2, n decoders 3, n elements AND 4 of the first group, (t + 1) elements OR 5, m elements 6 of the prohibition of the first group, an encoder 7, n comparison schemes 8, (n-1) prohibiting elements 9 of the second group, n elements AND 10 of the second group, element OR NOT 11, result register 1.2, adder 13, delay element 14, groups of output elements 15 and 16, inputs 1 7 of the device numbers to be sorted, input number 18, inputs 19 of the initial address of the device, output 20 of the sorting end, outputs 21 of the sorted number, clock input 22 and VY35RD 23 hell ENA unit.
Устройство работает следующим образом .The device works as follows.
Исходное состо ние устройства характеризуетс тем, что в регистры 1 по входам 17 принимаетс массив исходных чисел, а в сумматор 13 - код адреса пам ти, начина с которого необходимо разместить отсортированный массив. По входам 18, соответствующим входам 17, по которым поступили исходные числа, подаютс сигналы, перевод щие соответствующие триггеры 2 в единичное состо ние, которое вл етс признаком наличи числа в регистре 1. The initial state of the device is characterized by the fact that in registers 1, inputs 17 accept an array of initial numbers, and in adder 13, the code of the memory address, beginning with which it is necessary to place the sorted array. The inputs 18, the corresponding inputs 17, on which the initial numbers are received, are given signals that translate the corresponding triggers 2 to a single state, which is a sign of the presence of a number in register 1.
Исходные числа, в том числе и равные О, преобразуютс дешифраторами 3, выходные сигналы с одноименных выходо которых, кроме нулевого,.объедин ютс соответствующими элементами ИЛИ 5, сигналы с нулевых вьрсодов дешифратора 3 выдел ютс элементами И 4 и на вход элемента ИЛИ 5 поступают сигналы толь ко с тех элементов И 4, которые соответствуют регистрам 1, прин вшим нулевые числа. Сигналы с триггеров 2 позвол ют отличить исходное состо ние регистров 1 от наличи в них нулевых чисел.The initial numbers, including those equal to O, are converted by decoders 3, the output signals from the same output of which, except for zero, are combined by the corresponding elements OR 5, the signals from the zero signals of the decoder 3 are separated by AND 4 elements and input to the element OR 5 are received signals are only from those elements And 4, which correspond to registers 1, which receive zero numbers. The signals from triggers 2 allow us to distinguish the initial state of registers 1 from the presence of zero numbers in them.
Пусть массив исходных чисел имеет следующий вид:Let the array of source numbers has the following form:
а,з;a, h;
5.five.
, ,- , ,,,,,
При этих исходных данных работа дешифраторов 3 и элементов ИЛИ 5 пот сн етс таблицей.With these initial data, the operation of decoders 3 and the elements of OR 5 pot is shown in the table.
Из таблиць: видно, что номер выходов дешифраторов 3 и номер элемента ИЛИ 5 однозначно соответствуют значению числа, а выходные единичные сигналы элементов ИЛИ 5 размещены в Пор дке возрастани значени чисел. При равных двоичных кодах в массиве чисел () единичный сигнал формируетс соответствующим элементом ИЛИ 5 (ИЛИ 5ц).From the table: it can be seen that the number of outputs of the decoders 3 and the number of the element OR 5 uniquely correspond to the value of the number, and the output single signals of the elements of OR 5 are placed in the order of increasing numbers. With equal binary codes in the array of numbers (), a single signal is formed by the corresponding element OR 5 (OR 5 c).
Упор доченный массив должен иметь вид:An ordered array should look like:
Ь, Ь,1; , b,5,B, b, 1; , b, 5,
причем эти числа необходимо разместить в выделенной области пам ти , код начального адреса А Анач которой прин т в cjT iMaTop 13.moreover, these numbers need to be placed in a dedicated memory area, the code of the starting address A, whose start code is taken in cjT iMaTop 13.
00
0 5 0 5
5five
5five
Позиционный код 11011 выходных сигналов элементов ИЛИ 5 подаетс на элементы 6 запрета, включенные по приоритетной схеме. Единичный сигнал с выхода элемента ИЛИ 5о закрывает по инверсным входам все последующие элементы 6,-65- запрета. При этом на входе шифратора 7 формируетс позиционныйкод 100000 и в регистр 12 результата принимаетс двоичный код 000. Помимо этого, в схеме 8 сравнени происходит совпадение кодов , единичный сигна л с выхода схемы 8 сравнени поступает на первый вход элемента И 10, мину элементы 9 запрета . На выходе элемента ШШ-НЕ 1 1 отсутствует единичный сигнал, поэтому из ЭВМ по входу 22 поступает тактовый импульс. По этому импульсу адрес из сумматора 13 через группу элементов И 16 поступает на выходы 23, а двоичный код первого числа из регистра 12 результата через группу элементов И 15 выдаетс на выходы 21. Через некоторое врем , определ емое задержкой в элементе 14 задержки , в сумматоре 13 формируетс очередной адрес и устанав- 0 регистр 1Positional code 11011 of the output signals of the OR 5 elements is applied to the inhibition elements 6 which are included in the priority scheme. A single signal from the output of the element OR 5o closes all the subsequent elements 6, -65- of the ban on the inverse inputs. In this case, position code 100000 is formed at the input of the encoder 7 and the binary code 000 is received in the result register 12. In addition, in the comparison circuit 8, the codes coincide, a single signal from the output of the comparison circuit 8 enters the first input of the And 10 element, the prohibition element 9 . At the output of the element ШШ-НЕ 1 1 there is no single signal, therefore a clock pulse is received from the computer at the input 22. According to this pulse, the address from the adder 13 through the group of elements And 16 enters the outputs 23, and the binary code of the first number from the register 12 of the result through the group of elements And 15 is output to the outputs 21. After some time, determined by the delay in the delay element 14, in the adder 13 the next address is formed and the setting is 0 register 1
ливаетс вpouring into
и триггер 2 , чем исключаетс из рассмотрени число а. Врем задержки выбираетс исход из необходимого вре- мени приема в ЭВМ адреса и значени числа с выходов 21 и 23.and trigger 2, which excludes from the number a. The delay time is selected based on the required reception time in the computer of the address and the value of the number from the outputs 21 and 23.
чh
то вthen in
После установки в О регистра и триггера 2 на выходах элемен- ИЛИ 5 формируетс очередной позиционный код 010111, а на входе шифратора 7 - код 010000. При этом в регистр 12 результата принимаетс двоичный код 001, а в схемах 83 и 8 J сравнени формируетс единичный сигнал.After setting in register and trigger 2, the next position code 010111 is formed at the outputs of the element OR 5, and the code 010000 is input at the input of the encoder 7. In this case, binary code 001 is received in result register 12, and in circuits 83 and 8 J comparison, a single signal.
Элемент 9 запрета пропускает сигнал с выхода схемы З сравнени на вход элемента И Юз этот же сигнал закрывает по 1нверсным входам все последующие элементы завыпрета , тем самым неElement 9 of the prohibition passes the signal from the output of the comparison circuit to the input of the element. And using the same signal, the same signal closes all subsequent elements on the 1-hole inputs, thereby not
. 3 5. 3 5
пропуска сpasses with
U44749U44749
ответствовать ных чисел.corresponding numbers.
последовательность равДвоичныйis equal to binary
код ЧИСЛсNUMBER code
Номер выхода дешифраторов 3 ,... 3 (номер элемен та ИЛИ 5)The output number of the decoders 3, ... 3 (the number of the element OR 5)
.Ш}.Ш}
1515
хода схемы 85 сравнени .the course of the comparison circuit 85.
По очередному тактовому импульсу с входа 22 значение числа 001 и код адреса А поступают в ЭВМ, в результате чего в устройстве регистр Ь и О,On the next clock pulse from the input 22, the value of the number 001 and the code of the address A enter the computer, as a result of which the register B and O are in the device,
триггер 2j устанавливаютс вtrigger 2j set to
а сумматоре 13 формируетс очередной адрес . При этом на выходах элементов ИЛИ 5 формируетс код 010111, а на входе шифратора 7 - код 010000.Adder 13 forms the next address. In this case, at the outputs of the elements OR 5, the code 010111 is generated, and at the input of the encoder 7 - the code 010000.
По очередному тактовому импульсу i по.входу 22 значение числа 001 и кодOn the next clock pulse i on the input 22 the value of the number 001 and code
А чегоAnd what
адреса Aj поступают в ЭВМ, в результате чего в регистр ij и триггер /j устанавливаютс в состо ние О, при этом в сумматоре 13 формируетс адрес очередного числа . По следующему тактовому импульсу происходит запись числа 011 по адресу А в результате чего , в .устройстве регистр 1g и триггер 2 устанавливаютс в О.the addresses Aj enter the computer, as a result of which the register ij and the trigger j are set to the state O, and the address of the next number is formed in the adder 13. On the next clock pulse, the number 011 is written at address A, with the result that, in the device, register 1g and trigger 2 are set to O.
ilo очередным тактовым импульсам происходит последовательна запись чисел 100 и 101 по и 1ilo to the next clock pulses the numbers 100 and 101 and 1 are written sequentially
адресам addresses
соответственно и регистры и 1, и триггеры 2 и 2 устанавЧ Ч ливаютс в respectively, both registers and 1, and triggers 2 and 2 are installed in the
новки триггера 2 в ОTrigger 2 in O
О . При этом после уста- в О все триггерыABOUT . At the same time, after installation, all the triggers
оказываютс в состо нии О, в результате чего на выходе элемента ИЛИ-НЕ 11 формируетс единичный сигнал , поступающий в ЭВМ в качестве сигнала конца сортировки.are in the state O, as a result of which at the output of the element OR-NOT 11 a single signal is generated, which enters the computer as a signal of the end of sorting.
Таким образом, в результате работы устройства массив исходных чисел будет отсортирован по возрастанию и отсортированна последовательность будет занесена в пам ть ЭВМ, начина с заданного начального адреса , причем, если в массиве есть равные числа, то на выходе им будет со20Thus, as a result of the device operation, the array of source numbers will be sorted in ascending order and the sorted sequence will be stored in the computer memory, starting with the specified starting address, and if there are equal numbers in the array, then they will be output
2525
00
5five
00
5five
00
5five
Claims (1)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
SU874229297A SU1444749A1 (en) | 1987-04-13 | 1987-04-13 | Device for sorting numbers |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
SU874229297A SU1444749A1 (en) | 1987-04-13 | 1987-04-13 | Device for sorting numbers |
Publications (1)
Publication Number | Publication Date |
---|---|
SU1444749A1 true SU1444749A1 (en) | 1988-12-15 |
Family
ID=21298099
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
SU874229297A SU1444749A1 (en) | 1987-04-13 | 1987-04-13 | Device for sorting numbers |
Country Status (1)
Country | Link |
---|---|
SU (1) | SU1444749A1 (en) |
-
1987
- 1987-04-13 SU SU874229297A patent/SU1444749A1/en active
Non-Patent Citations (1)
Title |
---|
Авторское свидетельство СССР № 1168927, кл. G 06 F 7/06, 1984. Авторское свидетельство СССР №1211718, кл. G 06 F 7/06, 1984. * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
SU1444749A1 (en) | Device for sorting numbers | |
SU1211718A1 (en) | Device for sorting numbers | |
SU1278977A1 (en) | Content-addressable storage | |
RU2001451C1 (en) | Associative storage device | |
SU1254467A1 (en) | Device for sorting numbers | |
SU1612300A2 (en) | Device for forming addresses | |
US3500340A (en) | Sequential content addressable memory | |
SU1709293A2 (en) | Device for information input | |
SU1242949A1 (en) | Priority device for servicing interrogations in arrival order | |
SU1336205A1 (en) | Adaptive digital filter | |
SU1583934A1 (en) | Device for sorting numbers | |
SU1434501A1 (en) | Associative memory | |
SU1236551A1 (en) | Internal storage | |
SU1361722A1 (en) | Code converter | |
SU1275427A1 (en) | Device for calculating minimum cover | |
SU1259264A1 (en) | Device for loading files | |
SU1658391A1 (en) | Serial-to-parallel code converter | |
SU1388949A1 (en) | Associative storage device | |
SU1397936A2 (en) | Device for combination searching | |
JP2692345B2 (en) | Symbol string matching device | |
SU1251077A1 (en) | Device for loading groups of uniform data | |
SU1644137A1 (en) | Device for random repmutation searching | |
SU1444748A1 (en) | Device for comparing numbers | |
SU1649533A1 (en) | Numbers sorting device | |
SU1176346A1 (en) | Device for determining intersection of sets |