SU1315968A1 - Device for sorting numbers - Google Patents

Device for sorting numbers Download PDF

Info

Publication number
SU1315968A1
SU1315968A1 SU864011138A SU4011138A SU1315968A1 SU 1315968 A1 SU1315968 A1 SU 1315968A1 SU 864011138 A SU864011138 A SU 864011138A SU 4011138 A SU4011138 A SU 4011138A SU 1315968 A1 SU1315968 A1 SU 1315968A1
Authority
SU
USSR - Soviet Union
Prior art keywords
elements
inputs
output
input
group
Prior art date
Application number
SU864011138A
Other languages
Russian (ru)
Inventor
Вячеслав Григорьевич Попов
Олег Владимирович Михайлов
Александр Юрьевич Дубров
Original Assignee
Пушкинское высшее училище радиоэлектроники противовоздушной обороны
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 Пушкинское высшее училище радиоэлектроники противовоздушной обороны filed Critical Пушкинское высшее училище радиоэлектроники противовоздушной обороны
Priority to SU864011138A priority Critical patent/SU1315968A1/en
Application granted granted Critical
Publication of SU1315968A1 publication Critical patent/SU1315968A1/en

Links

Landscapes

  • Complex Calculations (AREA)

Abstract

Изобретение относитс  к автоматике и вычислительной технике и может быть использовано при реализации систем обработки данных и автоматизированных систем управлени . Устройство содержит регистры, СХЕМЫ сравнени , группы элементов И, регистр результата , счетчик, сумматор, два блока элементов И, группу схем запрета. Новым в устройстве  вл етс  использование регистров верхней и нижней границ диапазона, групп элементов И, элементов ИЖ, двух регистров, дополнительной схемы сравнени , элемента И-НЕ, трех элементов задержки, счетчика размера массива, трех элементов И, блока элементов И, триггера и их св зей, что обеспечивает достижение цели изобретени . Целью изобретени   вл етс  расширение области применени  за счет упор дочени  чисел в заданном диапазоне. Сортировка чисел может выполн тьс  как в пределах всего исходного массива, так и в заданном диапазоне. Режим сортировки устанавливаетс  варьированием чисел в регистрах нижней и верхней границ диапазона. Работа устройства состоит из двух этапов. На первом этапе определ етс  ограничительный массив, подлежащий упор дочению , путем поочередного сравнени  заданной нижней границы с каждым из чисел исходного массива. На втором этапе по импульсам опроса производитс  формирование адреса пам ти дл  размещени  анализируемого числа по сигналам со схем сравнени  группы Меньше и Равно. При вьздаче из устройства число сравниваетс  с верхней границей. Если оно превышает установленное значение, то одно- f временно с адресом производитс  выдача нулевого числа дл  записи. Работа устройства завершаетс  по окон- чании просмотра всех чисел массива, ограниченного на первом этапе. 1 ил., 1 табл. i 00 01 CD О 00The invention relates to automation and computing and can be used in the implementation of data processing systems and automated control systems. The device contains registers, comparison schemes, groups of elements AND, result register, counter, adder, two blocks of elements AND, a group of prohibition schemes. New in the device is the use of upper and lower boundaries of the range, groups of AND elements, IL elements, two registers, an additional comparison circuit, the NAND element, three delay elements, an array size counter, three AND elements, a block of AND elements, a trigger and their connections, which ensures the achievement of the objectives of the invention. The aim of the invention is to expand the scope by ordering numbers in a given range. Sorting numbers can be performed both within the entire source array, and in a given range. The sort mode is set by varying the numbers in the lower and upper range registers. The operation of the device consists of two stages. At the first stage, the bounding array to be ordered is determined by alternately comparing the given lower bound with each of the numbers in the original array. At the second stage, the polling pulses generate a memory address for placing the analyzed number from the signals from the comparison circuits of the Less and Equal groups. When retrieving from the device, the number is compared with the upper limit. If it exceeds the set value, then simultaneously with the address a zero number is output for the record. The operation of the device is completed upon completion of viewing all the numbers of the array, limited in the first stage. 1 ill., 1 tab. i 00 01 CD O 00

Description

Изобретение относитс  к автоматике и вычислительной технике и может быть использовано при реализации систем обработки данных и автоматизированных систем управлени .The invention relates to automation and computing and can be used in the implementation of data processing systems and automated control systems.

Цель изобретени  расширение области применени  за счет возможности сортировки чисел в заданном диапазоне .The purpose of the invention is the expansion of the field of application due to the possibility of sorting numbers in a given range.

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

Устройство, содержит регистр 1, схемы 2 сравнени , группу элементов ИЗ, регистр 4 результата, счетчик 5, сумматор 6, группу элементов И 7, группу элементов И 8, группу элементов И 9, регистр to, п элементов ИЛР 11, регистр 12, элемент И-НЕ 13,группу элементов И 14, группу элементов 15 запрета, группу выходных элементов И 16, группу выходных элементов И 17, элементы И 18 и 19, элементы 20 и 21 задержки, регистр 22 верхней границы диапазона, дополнительную схему 23 сравнени , элемент 24 задержки, регистр .25 нижней границы диапазона, группу элементов И 26, элемент И 27, триггер 28, счетчик 29 размера массива, входы 30 верхней границы диапазона устройства, выходы 31 нижней границы диапазона устройства, вход 32 запуска устройства , входы 33 начального адреса устройства , вход 34 опроса устройства, выходы 35. отсортированного числа устройства , .выходы 36 адреса числа устройства , выходы 37 размера массива устройства, выход 38.разрешени  считывани  устройства.The device contains a register 1, a comparison circuit 2, a group of IZ elements, a result register 4, a counter 5, an adder 6, a group of elements I 7, a group of elements I 8, a group of elements I 9, a register to, n elements of ILR 11, a register 12, AND-NE 13 element, AND 14 group of elements, prohibition element group 15, AND 16 output element group, AND 17 group of output elements, AND elements 18 and 19, delay elements 20 and 21, upper limit register 22, additional comparison circuit 23 , delay element 24, register .25 lower bound of the range, group of elements And 26, element And 27, trig ger 28, array size counter 29, device range upper limit inputs 30, device range lower limit outputs 31, device start input 32, device start address inputs 33, device polling input 34, output devices 35. sorted device number, number address outputs 36 devices, outputs 37 of the size of the device array, output 38. read resolution of the device.

Рассмотрим принцип построени  и работу устройства.Consider the principle of construction and operation of the device.

Исходное состо ние устройства характеризуетс  тем, что триггер ч28, регистры 10 И 12 и счетчик 29 установлены в состо ние О (не показано ) .The initial state of the device is characterized by the fact that the trigger 28, the registers 10 and 12 and the counter 29 are set to the state O (not shown).

Устройство может использоватьс  в двух режимах сортировки чисел. Б первом из них. сортируютс  числа в пределах всего исходного массива, прин того в регистры 1, а во втором - в заданном диапазоне. Режим сортировки устанавливаетс  по содержимому регистра 25 нижней границы диапазона и регистра 22 верхней границы диапазона. При этом дл  задани  первого режима все разр ды регистра 25 устанавливаютс  в состо The device can be used in two number sorting modes. B the first of them. the numbers are sorted within the entire source array, received in registers 1, and in the second, in a given range. The sorting mode is set according to the contents of the lower limit register register 25 and the upper limit register register 22. In this case, to set the first mode, all bits of the register 25 are set to

ние О, а регистры 22 - в состо ние 1, перекрыва  тем самым весь диапазон сортируемых чисел.O, and registers 22 are in state 1, thereby overlapping the entire range of sorted numbers.

Дл  задани  второго режима сортировки чисел в регистр 25 принимаетс  двоичный код числа нижней границы диапаз она, а в регистр 22 - двоичньш код числа верхней границы диапазона. Варьиру  значени ми границ диапазона, можно задавать либо сортировку чисел, меньших наперед заданного путем установки в состо ние О регистра 25, а в регистре 22 - двоичного кода верхней границы, :пибо сортировку чисел, больших наперед заданного, путем установки границы в регистре 25, а разр ды регистра 22 - в состо ние 1. Пусть необходимо выполнить сортировку чисел в заданном диапазоне,Дл  этого в регистрах 1 размещаетс  массив исходных чисел, в регистре 25 - граница нижнего допуска (число ), а в регистре 22 - граница верхнегоFor setting the second mode of sorting numbers, the binary code of the lower limit of the range is accepted into the register 25, and the binary code of the upper limit of the range of the binary is entered into the register 22. Varying the values of the boundaries of the range, you can set or sort the numbers smaller than the pre-set by setting the state of register 25 to O, and in register 22 the binary code of the upper limit, either by sorting numbers larger than the set-preset, by setting the border in register 25, and the bits of register 22 are in state 1. Let it be necessary to sort the numbers in a given range, To do this, register 1 holds an array of source numbers, in register 25 the limit of the lower tolerance (number), and in register 22 the border of the upper numbers

диапазона (agr)Работа устройства раздел етс  на два этапа. Первый этап начинаетс  по сигналу запуска, поступающему по входу 32. Так как триггер 28 установлен в состо ние О, то единичным сигналом с его нулевого выхода открыты элементы границы И 26. При этом на вторые входы всех схем 2 сравнени  подаетс  двоичный код регистра 25. На первые входы схемы сравнени  поступает двоичньй код из соответствующего регистра 1 , Схемы 2. сравнени , на первых входах которых код числа массива больше заданногоrange (agr) The operation of the device is divided into two stages. The first stage starts at the trigger signal inputted at input 32. Since trigger 28 is set to state O, the I 26 border elements are opened with a single signal from its zero output. In this case, the second inputs of all comparison circuits 2 are supplied with a binary register code 25. The first inputs of the comparison circuit receive a binary code from the corresponding register 1, Scheme 2. comparison, on the first inputs of which the code of the array number is greater than the specified one.

00

5five

, формируют на выходах Больше единичные сигналы, поступающие на первые входы соответствующих элементов И 9. При наличии сигнала запуска происходит установка в состо ние 1 одноименных разр дов регистров 10 и 12 через открытые соответствующие элементы И 9. Таким образом, с помощью регистра 10 в дальнейшем разрешаетс  участие в сортировке чисел,, they form at the outputs more single signals arriving at the first inputs of the corresponding elements of AND 9. When a start signal is present, the state 1 of the same name of the registers 10 and 12 is set through the open corresponding elements of AND 9. Thus, using the register 10 later participation in sorting numbers is allowed,

„ больших величин а,,г i 0„Large values a ,, g i 0

Регистр 12 предназначен дл  поочередного анализа содержимого регистра 1, номера которых однозначно соответствуют номерам разр дов регистра 12, установленных в состо ние 1.Register 12 is intended for sequential analysis of the contents of register 1, whose numbers unambiguously correspond to the numbers of register bits 12 set to state 1.

Через некоторое врем  задержки, определ емое переходными процессами в элементах И 9, через элемент 24 задержки триггер 28 устанавливаетс After some time delay determined by transients in the AND elements 9, through the delay element 24 the trigger 28 is set

3, 3,

в состр иие Г .При этом нулевым сигналом с нулевого выхода триггера 28 блокируетс  подача двоичного кода а HV на схемы 2 сравнени , чем исключаетс  его воздействие на дальнейшую работу устройства. На этом первый этап работы устройства завершаетс .In addition, the zero signal from the zero output of the trigger 28 blocks the supply of a binary code and HV to the comparison circuit 2, thus eliminating its effect on the further operation of the device. This completes the first stage of operation of the device.

Второй этап устройства начинаетс  при наличии нулевого сигнала на выходе 39, разрешающего подачу импульсов опроса по входу 34. На этом этапе по каждому импульсу опроса в устройстве формируетс  адрес  чейки пам ти и код числа, подлежащий записи.The second stage of the device begins with the presence of a zero signal at output 39, which enables the injection of polling pulses at input 34. At this stage, the address of the memory cell and the code of the number to be recorded are formed for each polling pulse in the device.

Адрес  чейки формируетс  в сумматоре 6 по следующему выражению:The cell address is formed in adder 6 by the following expression:

A,. (,2,.,,,s),A ,. (, 2,. ,,, s),

где А. - адрес пам ти в i-м циклеwhere A. is the memory address in the i-th cycle

работы устройства, N. - количество чисел, меньших анализируемого числа в i-м цикле, К. - количество чисел, равныхdevice operation, N. is the number of numbers less than the analyzed number in the i-th cycle, K. is the number of numbers equal to

анализируемому числу в i-м цикле,the analyzed number in the i-th cycle

S - количество чисел, большихS - the number of numbers large

нгПри этом значение АН подаетс  в сумматор 6 по входам 33, а суммаN;+ +K. формируетс  счетчиком 5.At that, the value of AH is fed to adder 6 through inputs 33, and the sumN; + + K. formed by counter 5.

159684159684

Количество импульсов опроса определ етс  количеством чисел, больших-. , о чем свидетельствует число разр дов регистров 10 и 12, установлен- 5 ных в состо ние 1 на первом этапе. По окончании каждого цикла опроса производитс  установка в О соответствующего разр да регистра 12 и увеличение на единицу содержимого счетчика 29 при вьщаче ненулевой информации на выходы 35.The number of polling pulses is determined by the number of large numbers. as evidenced by the number of bits of registers 10 and 12 set to 5 in state 1 in the first stage. At the end of each polling cycle, the corresponding register bit 12 is set in О and the contents of counter 29 are increased by one unit with more nonzero information at outputs 35.

Момент окончани  работы устройства определ етс  нулевым состо нием регистра 12. При этом в счетчик 29 ,,The end of the operation of the device is determined by the zero state of the register 12. In this case, the counter 29,

10ten

1515

2020

2525

30thirty

фиксируетс  количество отсортированных чисел, а триггер 28 устанавливаетс  в состо ние О. Единичный сигнал с нулевого выхода триггера, поступающий на выход 39 устройства, используетс  в качестве сигнала конца сортировки массива чисел.the number of sorted numbers is fixed, and the trigger 28 is set to the state O. A single signal from the zero output of the trigger, which arrives at the output 39 of the device, is used as a signal to end the sorting of the array of numbers.

Рассмотрим работу устройства при и следующих числах, прин тых в регистры 1:Consider the operation of the device with the following numbers and received in registers 1:

, , , , , .,,,,

Пусть необходимо получить упор доченный массив чисел при , а.9, разместив его в области пам ти , начина  с адреса .Let it be necessary to obtain an ordered array of numbers as, a.9, placing it in the memory area, starting with an address.

При этих услови х раббта устройства отражена в таблице, в которой стрелками показано напр жение запи- си чисел из регистров 1 в пам ть.Under these conditions, the device's operation is shown in the table, in which the arrows indicate the voltage to write numbers from registers 1 to the memory.

1 2 3 4 .5 6 7 81 2 3 4 .5 6 7 8

99

7 3 3 2 1 3 47 3 3 2 1 3 4

2 3 3 3 4 7 О2 3 3 3 4 7 О

5151

После приведени  устройства в исходное состо ние в регистры 1, 22 и 25 примен ютс  двоичные коды указанных соответствующих чисел.After the device has been reset to registers 1, 22 and 25, the binary codes of the respective numbers are applied.

Так как триггер 28 находитс  в нулевом состо нии-, то единичным сигналом с его нулевого выхода открыты элементы И 26, и число сравниваетс  в схемах 2,...,2д сравнени  с содержимым соответствующих регистров 1. При этом на выходах Больше всех схем сравнени , кроме 2, формируютс  единичные сигналы, поступающие на первые ВХОДЫ элементов И 9. На первом входе элемента И 9 присутствует нулевой сигнал с выхода Больше схемы 2 сравнени .Since the trigger 28 is in the zero state, the single signal from its zero output opens And 26 elements, and the number is compared in circuits 2, ..., 2d compared to the contents of the corresponding registers 1. At the same time, the outputs , except for 2, single signals are generated that arrive at the first INPUTS of elements AND 9. At the first input of element AND 9, there is a zero signal from the output of the More circuit 2 of the comparison.

По импульсу запуска через открытые элементы И 9 устанавливаютс  в 1 соответствующие разр ды регистров 10 и 12.- Элементы Ш1И 11 обеспечивают парафазный способ установки в 1 разр дов регистра 12 дл  более быстрого переключени  состо ни  триггеров. Таким образом на выходах регистров 10 и 12 устанавливаетс  следующий код: 1.1111011.The trigger pulse through open elements AND 9 is set to 1 the corresponding bits of registers 10 and 12. Elements 11 11 provide a paraphase method of setting 1 bits to register 12 for faster switching of the trigger state. Thus, at the outputs of registers 10 and 12, the following code is set: 1.1111011.

Одновременно с установкой в 1 триггеров регистров 10 и 12 задержанным сигналом запуска элементомSimultaneously with the installation of registers 10 and 12 in 1 trigger by a delayed start signal element

24задержки устанавливаетс  в 1 триггер 28, блокиру  тем воздействие выходных сигналов регистраA 24 delay is set to 1 trigger 28, thereby blocking the effect of the register output signals

25через элементы И 26 на все схемы 2 сравнени .25 through the elements of AND 26 for all circuits 2 comparisons.

Нулевым сигналом с нулевого вько- да триггера 12 закрываютс  элементы 15,..., 15, запрета, на выходах которых устанавливаютс  нулевые сигналы . Поэтому открыты только элементы И 3 единичным сигналом с единичного выхода триггера 12.,. Двоичный код числа 9 из регистра 1j передаютс  в регистр 4 и на вторые входы схе 22,...,2g сравнени , которые формируют единичные сигналы на выходах Менше .. Так как на вторых входах схемы 2 сравнени  нулева  информаци , то на выходе Больше - единична . Таким образом, на первых входах элементов И 7 сформирован код 01111111 выходными сигналами с выходов МеньшеZero signal from zero zero trigger 12 closes the elements 15, ..., 15, prohibition, the outputs of which are set to zero signals. Therefore, only elements AND 3 are opened with a single signal from a single trigger output 12.,. The binary code of the number 9 from register 1j is transmitted to register 4 and to the second inputs of circuit 22, ..., 2g comparisons, which form single signals at the Menshe outputs. Since the second inputs of the comparison circuit 2 are zero, the output is More - single. Thus, at the first inputs of the And 7 elements, a code 01111111 is generated by the output signals from the outputs Smaller

схем 2,...,2g сравнени , аschemes 2, ..., 2g, and

наon

вторых - код 11111011 с выходов регистра 10. При этом значение N., равно 6. Так как на выходах Равно всех схем 2 сравнени  сигналы отсутствуют , то значение К-)0. Поэтому сумма5968the second is code 11111011 from the outputs of register 10. At the same time, the value of N. is 6. Since there are no signals at the outputs of Equal to all 2 comparison circuits, the value of K-) 0. Therefore, the amount of 5968

5five

00

5five

00

5five

00

5five

00

тором формируетс  адрес  чейки пам тиthe torus forms the address of the memory cell

А 1+6+0 7.A 1 + 6 + 0 7.

После завершени  переходных процессов в сумматоре 6 по нулевому сигналу с выхода 39 устройства в ЭВМ разрешаетс  подача импульсов опроса на вход 34 устройства.After completion of the transient processes in the adder 6, the zero signal from the output 39 of the device to the computer is allowed to feed the polling pulses to the input 34 of the device.

Так как на входы элемента И 13 подаютс  сигналы с нулевых выходов регистра 12, то на его выходе формируетс  единичный сигнал, открывающий элемент И 18 по третьему входу . Единичным сигналом с единичного выхода триггера 28 открыты по первым входам элементы И 18 и И 19. Так как в регистре 4 находитс  код числа 9, а в регистре 22 такой же код, то на выходе Меньше схемы 23 сравнени  формируетс  нулевой сигнал, закрывающий элемент И 18.Since the inputs of the element And 13 are supplied with signals from the zero outputs of the register 12, a single signal is formed at its output, the opening element And 18 through the third input. The single signal from the single output of the trigger 28 opens the first inputs of elements 18 and 19. Since register 4 contains the code of the number 9, and register 22 has the same code, the output of the Less comparison circuit 23 produces the zero signal, the closing element AND 18.

Поэтому первый импульс опроса поступает только через открытый элемент И 19. Этим сигналом через элемент И 16 на выходы 36 передаетс  двоичный код адреса А., , сопровождаемый управл ю1цим сигналом с выхода 38. По сигналу с выхода 3S устройства в ЭВМ адресна  информаци  с выходов 36 и числова  информаци  с выходов 35 принимаетс  дл  записи в пам ть . Так как элемент И 18 закрыт, то по адресу в пам ть будет записана нулева  информаци .Therefore, the first polling pulse comes only through the open element AND 19. This signal through the element 16 and the outputs 36 transmits the binary code of address A., followed by control of the signal from output 38. By the signal from the output 3S of the device, the address information from the outputs 36 and numerical information from outputs 35 is received for writing to the memory. Since AND 18 is closed, zero information will be written to the address in the memory.

Через некоторое врем  задержки, определ емое временем дл  надежного приема информации с выходов 36 и 35 в ЭВМ, сигналом опроса -через элемент 20 задержки, открытый элемент И 14., и элемент ИЛИ 11 устанавливает- с  в О триггер 12 . При этом еди- ничнь м сигналом с его нулевого выхо- да открываютс : элементы И 15., и 15 по соответствующим входам, а нулевым сигналом с нулевого выхода триггера 122 закрываютс  элементы И 15,, . . ., И 15. На выходах регистра 12 устанавливаетс  следующий код: 01111011.After some time delay determined by the time for reliable reception of information from outputs 36 and 35 in the computer, by a polling signal - through delay element 20, the open element is AND 14., and the OR 11 element is set to O by trigger 12. In this case, with a single signal from its zero output, the elements E15 are opened, and 15 through the corresponding inputs, and with a zero signal from the zero output of the trigger 122, the elements 15 And 15 ,, are closed. . ., And 15. At the outputs of register 12, the following code is set: 01111011.

Так как на выходах элементов И 15 сформирован код 1000000, то единичным сигналом с выхода элемента И 15 открыты элементы ИЗ,, и код числа 7 с выходов регистра 1 сравниваетс  во всех схемах сравнени , кроме 2. 5 с содержимым соответствующих, регистров . При этом в сумматоре 6 аналогично , рассмотренному формируетс  адрес АSince the code 1000000 is formed at the outputs of the AND 15 elements, the single signal from the output of the AND 15 element opens the elements OF, and the code of the number 7 from the outputs of register 1 is compared in all comparison circuits except 2. 5 with the contents of the corresponding registers. In addition, in the adder 6, the address A is formed similarly to that considered.

А2 И-5+0 6.A2 I-5 + 0 6.

Так как в регистре 22- находитс  код числа 9, а в регистре 4 код числа 7, то на выходе Меньше схемы 23 сравнени  устанавливаетс  единичный сигнал, которым по второму входу открываетс  элемент И 18. Поэтому по очередному импульсу опроса, поступающему по входу 34, через открытые элементы И 18 и 19 на выходы 36 через элементы И 16 передаетс  в ЭВМSince the code of number 9 is in register 22- and the code of number 7 is in register 4, a smaller signal is established at the output of the comparison circuit 23, and an element 18 is opened at the second input. Therefore, at the next interrogation pulse arriving at the input 34, through the open elements And 18 and 19 to the outputs 36 through the elements And 16 is transmitted to the computer

код адреса А2, а на выходы 35 через элементы И 17 - код числа 7 из региЬтра 4. Одновременно сигналом с выхода элемента И 19, поступающим на выход 38 устройства, аналогично рассмотренному , об еспечиваетс  прием адресной и числовой информации в ЭВМ.the address code is A2, and the outputs 35 through AND 17 elements are the code of 7 from register 4. At the same time, the signal from the output of element AND 19, arriving at the output 38 of the device, similarly to that considered, provides for receiving address and numeric information in the computer.

Сигналом с выхода элемента 20 задержки через открытый элемент И 14 и элемент ИЛИ 11 устанавливаетс  в О триггер 12 , При этом на выходе регистра 12 формируетс  код 00111011 а на выходах элементов И 15 - код 0100000, На выходе элемента И-НЕ 13 удерживаетс  единичный сигнал, ко- торым поддерживаетс  в открытом соето нии элемент И 18 по третьему входу , а закрытом состо нии - элемент И 27 по инверсному входу.The output signal of the delay element 20 through the open element And 14 and the element OR 11 is set to O flip-flop 12, the code 00111011 is generated at the output of the register 12 and the output of the elements of the 15 and 15 is the code 0100000. which keeps the AND element 18 in the open socket at the third input, and the closed state - the AND element 27 at the inverse input.

Единичным сигналом с выхода элемента И 1 Sj. открыты элементы И Зд , и двоичный код числа 3 сравниваетс  в схемах сравнени , кроме 2, с ко-. дами соответствующих регистров 1.При этом на выходах Меньше схем 25 и 2 сравнени  и на выходах Равно схем 24 и 2 сравнени  фор шруютс  единичные сигналы.A single signal from the output element And 1 Sj. the elements are open and the rear, and the binary code of the number 3 is compared in comparison circuits, except 2, with ko-. With the respective registers 1. At the same time, at the outputs, Fewer comparison circuits 25 and 2 and at the outputs Equal to comparison circuits 24 and 2, single signals are formed.

Так как на вторых входах элементов И 8 присутствует код 11111011, то элемент И 7 закрыт, поэтому Nj 1 Since code 11111011 is present at the second inputs of And 8 elements, And And 7 is closed, so Nj 1

Так как на вторых входах элементо И 8 присутствует код 00111011, то элементы И 84. и 8-j открыты, поэтому ., . Since code 00111011 is present at the second inputs of the And 8 element, the And 84. and 8-j elements are open, therefore.,.

Исход  из этого в сумматоре 6 фор мируетс  двоичный код AjOn this basis, binary code Aj is formed in adder 6.

АЗ 1+1+2 4.AZ 1 + 1 + 2 4.

По очередному импульсу опроса в ЭВМ выдаетс  код Aj и код числа 3, триггер 12j устанавливаетс  в О, а в счетчике 29 формируетс  код числа 2.On the next polling pulse, the code Aj and the code of number 3 are issued in the computer, the trigger 12j is set to O, and the code of number 2 is generated in the counter 29.

В дальнейшем работа устройства производитс  аналогично, что отражено в таблице.In the future, the operation of the device is carried out similarly, as reflected in the table.

Поочередна  установка в О триггеров регистра 12 последовательно исключает при формировани  величины К сигналы с выходов Равно схем 2 сравнени .Alternately, the installation in O of the triggers of the register 12 successively excludes when generating the value of K the signals from the outputs are Equal to 2 comparison circuits.

С учётом того, что единичный сигнал с выхода Меньше схемы 2g сравнени  из формировани  адреса исключен , величины кодов адресов имеют вид:Considering that a single signal from the output Less than the 2g comparison circuit from the formation of the address is excluded, the values of the address codes are:

.А4 1+1+1 3,.A4 1 + 1 + 1 3,

Aj 1+0+0 1.Aj 1 + 0 + 0 1.

Так как триггер. 12 на первомSince the trigger. 12 on the first

этапе осталс  в состо нииstage remained in the state

тоthat

00

5five

00

5five

анализ содержимого регистра 2 исключаетс . Поэтому по очередному импульсу опроса фop шpyeтc  А.analysis of the contents of register 2 is excluded. Therefore, according to the next survey impulse fop shpkyts A.

+   +

а затем по следующему импульгу опроса - Agand then on the next survey pulse - Ag

Ag 1+4+0 5.Ag 1 + 4 + 0 5.

По седьмому импульсу опроса в счетчике 29 формируетс  код числа 6, все триггеры регистра 12 оказываютс  в состо нии О. При этом на выходе элемента И-НЕ 13 формируетс  нулевой сигнал, закрывающий элемент И 18 по третьему входу и открывающий элемент И 27 по инверсному входу. По завершении переход- ньк процессов в элементах И 14 и ИЛИ/ 11, регистре 12, элементе И-НЕ 13 задержанным импульсом опроса с выхода элемента 21 задержки через откры- тьй элемент И 27 устанавливаетс  в О триггер 28. Единичный сигнал с нулевого выхода триггера 28 поступает на выход 39 и используетс  в ЭВМ в качестве сигнала завершени  сортировки массива чисел. По этому сигна- шу в ЭВМ может использоватьс  значение двоичного кода количества чисел, записанных в пам ти, с выхода 37,The seventh polling pulse in the counter 29 generates the code of number 6, all the triggers of register 12 are O. At the same time, at the output of the NAND 13 element, a zero signal is formed, the closing element AND 18 at the third input and the opening element AND 27 at the inverse input . Upon completion of the transition processes in the elements of AND 14 and OR / 11, register 12, element AND-NOT 13, the delayed polling pulse from the output of delay element 21 through opening element 27 is set to O trigger 28. Single signal from zero trigger output 28 is output 39 and is used in a computer as a signal to complete the sorting of an array of numbers. By this signal, the computer can use the value of the binary code of the number of numbers written in the memory from output 37,

Дл  сортировки чисел в пределах всего массива в регистре 25 устанавливаетс  нулевой код, а в регистре 22 - максимальное значение кода.При этом на первом этапе все триггеры регистров 10 и 12 устанавливаютс  в - 1 и сортировка чисел производитс  за п импульсов опроса.To sort the numbers within the entire array, register 25 sets the zero code, and register 22 sets the maximum code value. At the first stage, all triggers of registers 10 and 12 are set to -1 and the numbers are sorted after n polling pulses.

913913

Claims (1)

Формула изобретени Invention Formula Устройство дл  сортировки чисел, содержащее п регистров, (п - число сортируемых чисел), п схем сравнени , п групп элементов И, счетчик, сумматор, две группы выходных элементов И, регистр результата и группу из (п-1) элементов запрета, причем выходы разр дов i-ro регистра (,2,...,п) соединены с первой группой входов i-й схемы сравнени  и с первыми входами элементов И i-й группы, выходы которых соединены с (i-1)-ми группами входов схем сравнени  с первой по (i-1)-го, с i-ми группами входов схем сравнени  с ((i+1)-й по п-ю.и с i-й группой входов регистра результата, выходы разр дов которого соединены с первыми входами выходных элементов И первой группы, выходы которых  вл ютс  выходами отсортированного числа устройства, выходы разр дов счетчика соединены с первой группой входов сумматора, втора  группа входов которого соединена с входами начального адреса устройства, а выходы - с первыми входами выходных элементов И второй группы, выходы которых  вл ютс  выходами адреса отсортированного числа устройства 1-е инверсные входы элементов запрета группы, где ,2,,,.,j, j 1,2,. ,..,n-1 oбьe- динeны, отличающеес  тем, что, с целью -расширени  области применени  за счет возможности сортировки чисел в заданном диапазоне, в него введены регистры верхней и нижней границ диапазона, группа элементов И перезаписи нижней границы диапазона, четыре группы элементов И переписи, два п-разр дных регистра, п элементов ИЛИ, элемент И-НЕ, счетчик размера массива, три элемента И, три мента задержки, триггер, дополнительна , схема сравнени , причем вход запуска устройства соединен с первыми входами элементов И переписи первой группы и через первый элемент задерж ки с входом установки в единичное состо ние триггера, инверснвый выход которого  вл етс  выходом конца сортировки устройства и подключен к пер вым входам элементов И переписи нижней границы диапазона, вторые входы которых соединены с выходами разр дов регистра нижней границы диапазо25A device for sorting numbers containing n registers, (n is the number of sorted numbers), n comparison circuits, n groups of elements I, a counter, adder, two groups of output elements AND, a result register and a group of (n – 1) prohibition elements the outputs of the bits of the i-ro register (, 2, ..., p) are connected with the first group of inputs of the i-th comparison circuit and with the first inputs of the elements of the i-th group, the outputs of which are connected to the (i-1) -th groups inputs of the comparison circuits with the first through (i-1) th, with the i-th groups of inputs of the comparison circuits with ((i + 1) th through p-th. and with the i-th group of inputs of the result register, the bit moves of which are connected to the first inputs of output elements AND of the first group whose outputs are the outputs of a sorted device number, the outputs of the counter bits are connected to the first group of inputs of the adder, the second group of inputs of which are connected to the inputs of the initial address of the device, and the outputs from the first the inputs of the output elements AND of the second group, the outputs of which are the outputs of the address of the sorted number of the device are the 1st inverse inputs of the elements of the prohibition of the group, where, 2 ,,,., j, j 1,2 ,. , .., n-1 are combinable, characterized in that, in order to expand the scope due to the possibility of sorting numbers in a given range, the registers of the upper and lower limits of the range, the group of elements And the rewriting of the lower limit of the range, four Census groups of elements, two n-bit registers, n elements OR, NAND element, an array size counter, three AND elements, three delay elements, a trigger, additional, a comparison circuit, the device start input connected to the first inputs of the AND elements the census of the first group and Erez ki delayed first element to the input of the installation in a single trigger state, inversnvy output of which is the output end of the sorting apparatus and is connected to the lane vym inputs of AND census lower range, the second inputs of which are connected to the outputs of bits lower boundary register diapazo25 596810596810 на, входы которого  вл ютс  входами задани  нижней границы диапазона уст- ройства, выходы элементов И переписи нижней грании;ы диапазона подключеныThe inputs of which are the inputs for setting the lower limit of the range of the device, the outputs of the elements And the census of the lower bound; 5 к дополнительным группам входов всех схем сравнени , выход Больше i-й схемы сравнени  подключен к второму входу- i-ro элемента И переписи первой группы, выход которого соединен5 to the additional groups of inputs of all the comparison schemes, the output of the More i-th comparison scheme is connected to the second input - the i-ro element And the census of the first group, the output of which is connected О с входами установки в единичное состо ние i-ro разр да первого и второго п-разр дных регистров, пр мой выход i-ro разр да первого п-разр дно- го регистра соединен с первым входом О with the installation inputs into the single state of the i-ro bit of the first and second n-bit registers, the direct output of the i-ro bit of the first n-bit of the first register is connected to the first input 5 i-ro элемента И переписи второй группы , второй вход которого подключен к выходу Меньше i-й схемы сравнени , выход Равно которой соединен с первым входом i-ro элемента И переписи 5 i-ro element And census of the second group, the second input of which is connected to the output Less than the i-th comparison circuit, output Equal to which is connected to the first input of the i-ro element And census 20 третьей группы, второй вход которого соединен с пр мым выходом i-ro разр да второго п-разр дного регистра, инверсный выход 1-го разр да которого соединен с Г-м инверсным входом j -го элемента запрета группы и с входом элемента И-НЕ, выход которого соединен с первым входом первого элемента И и первым инверсным входом второго элемента И, выход которого подключен к входу ус- . тановки в О триггера, пр мой выход которого подключен к второму входу первого элемента И и первому входу третьего элемента И, второй вход20 of the third group, the second input of which is connected to the direct output of the i-ro bit of the second n-bit register, the inverse output of the 1st bit of which is connected to the G th inverse input of the j-th group prohibition element and to the input of the I element -NON, the output of which is connected to the first input of the first element AND and the first inverse input of the second element AND, the output of which is connected to the input us-. settings in the On trigger, the direct output of which is connected to the second input of the first element And and the first input of the third element And, the second input 35 которого объединен с третьим входом первого элемента И и  вл етс  входом : опроса устройства, а выход  вл етс  выходом разрешени  считывани  устройства и подключен к вторым входам выходных элементов И второй группы и входу второго элемента задержки, выход которого подключен к первым входам элементов И переписи четвертой группы и через третий элемент, задержки соединен с вторым входом второго элемента И, выходы элементов И переписи второй и третьей групп соединены соответственно с первой и второй группами входов счетчика, инверсный выход i-ro разр да первого п-разр дного регистра соединен с первым входом i-ro элемента ИЛИ, второй вход которого соединен с выходом i-ro. элемента И переписи четвертой группы, а выход подключен к входу установки в О i-ro разр да второго п-разр дного регистра, пр мой вход j-ro элемента запрета группы подключен к пр 3035 which is combined with the third input of the first element And is the input: polling the device, and the output is the output resolution of the device readout and is connected to the second inputs of the output elements AND of the second group and the input of the second delay element whose output is connected to the first inputs of the elements And the census the fourth group and through the third element, the delay is connected with the second input of the second element And the outputs of the elements And the census of the second and third groups are connected respectively with the first and second groups of inputs of the counter, inverse to The output of the i-ro bit of the first n-bit register is connected to the first input of the i-ro element OR, the second input of which is connected to the i-ro output. element And the census of the fourth group, and the output is connected to the input of the installation in the О i-ro bit of the second n-bit register, the direct input j-ro element of the group ban is connected to the right 30 4040 4545 5050 5555 мому вькоду (j+1)-ro разр да второго п-разр дного регистра, пр мой выход первого разр да второго п-разр дного регистра подключен к вторым входам элементов И первой группы и второму входу.первого элемента И переписи четвертой группы, выход j-ro элемента запрета группы соединен с вторыми входами элементов И (з+1)-й группы и вторым входом (j + O-ro элемента И переписи четвертой группы, входы задани  верхней границы диапазона устройства подключены к входам регистmy code (j + 1) -ro bit of the second n-bit register, direct output of the first bit of the second n-bit register connected to the second inputs of the AND elements of the first group and the second input. The first element And the census of the fourth group, output The j-ro element of the prohibition group is connected to the second inputs of the elements of the AND (W + 1) -th group and the second input (j + O-ro of the element AND census of the fourth group, the inputs of the upper limit of the device range are connected to the inputs ра верхней границы диапазона, выходы разр дов которого подключены к первой группе входов дополнительной схемы сравнени , втора  группа входов которой соединена с выходами разр дов регистра результата, а выход подключен к четвертому входу первого элемента И, выход которого соединен с вторьми входами выходных элементов И. первой группы и счетным входом счетчика размера массива , выходы разр дов которого  в- д ютс  выходами размера массива устройства.The upper limit of the range, the bit outputs of which are connected to the first group of inputs of an additional comparison circuit, the second group of inputs of which is connected to the outputs of the bits of the result register, and the output is connected to the fourth input of the first element And whose output is connected to the second inputs of output elements I. the first group and the counting input of the array size counter, the bit outputs of which are included in the device array size outputs. Составитель Е.Иванова Редактор С.Пекарь Техред Л.ОлийныкCompiled by E.Ivanova Editor S.Pekar Tehred L.Oliynyk Заказ 2363/50 Тираж 672ПодписноеOrder 2363/50 Circulation 672 Subscription ВНИИПИ Государственного комитета GCCPVNIIPI State Committee GCCP по делам изобретений и открытий 113035, Москва, Ж-35, Раушска  наб., д, 4/5for inventions and discoveries 113035, Moscow, Zh-35, Raushsk nab., d, 4/5 Производственно-полиграфическое предпри тие, г. Ужгород, ул. Проектна , 4Production and printing company, Uzhgorod, st. Project, 4 Корректор М.ДемчикProofreader M. Demchik
SU864011138A 1986-01-14 1986-01-14 Device for sorting numbers SU1315968A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
SU864011138A SU1315968A1 (en) 1986-01-14 1986-01-14 Device for sorting numbers

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
SU864011138A SU1315968A1 (en) 1986-01-14 1986-01-14 Device for sorting numbers

Publications (1)

Publication Number Publication Date
SU1315968A1 true SU1315968A1 (en) 1987-06-07

Family

ID=21217569

Family Applications (1)

Application Number Title Priority Date Filing Date
SU864011138A SU1315968A1 (en) 1986-01-14 1986-01-14 Device for sorting numbers

Country Status (1)

Country Link
SU (1) SU1315968A1 (en)

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Авторское свидетельство СССР. № 981988, кл. G 06 F 7/06, 1980. Авторское свидетельство СССР № 1092494, кл. G 06 F 7/06, 1983. *

Similar Documents

Publication Publication Date Title
SU1315968A1 (en) Device for sorting numbers
SU1410032A1 (en) Device for group loading of associative data
SU1410019A1 (en) Number sorting device
SU1170458A1 (en) Logical analyser
RU1835543C (en) Appliance for sorting of numbers
SU1267402A1 (en) Device for selecting the given number of repetitions of binary numbers
SU1683005A1 (en) Device to separate five-number sequence median
SU1667080A1 (en) Pulse sequence checking device
SU1012239A1 (en) Number ordering device
SU868749A1 (en) Number sorting device
SU1651244A1 (en) Device to define tentative pulse signal central position
SU1103220A1 (en) Code comparison device
SU1241232A2 (en) Device for counting number of zeroes in binary code
SU1363184A1 (en) Number grading device
SU932487A1 (en) Number ordering device
SU1182510A1 (en) Device for sorting numbers
SU1277089A1 (en) Device for calculating values of boolean derivatives
SU881727A1 (en) Liscrete information collecting device
SU1275436A1 (en) Random number generator
SU1298738A1 (en) Device for sorting n-bit numbers
SU1112362A1 (en) Device for sorting numbers
SU1291959A1 (en) Programmable logic matrix
SU1322371A1 (en) Device for writing information in internal storage
SU1309021A1 (en) Random process generator
SU1606972A1 (en) Device for sorting data