SU1429107A1 - Device for sorting an array of numbers - Google Patents

Device for sorting an array of numbers Download PDF

Info

Publication number
SU1429107A1
SU1429107A1 SU864116921A SU4116921A SU1429107A1 SU 1429107 A1 SU1429107 A1 SU 1429107A1 SU 864116921 A SU864116921 A SU 864116921A SU 4116921 A SU4116921 A SU 4116921A SU 1429107 A1 SU1429107 A1 SU 1429107A1
Authority
SU
USSR - Soviet Union
Prior art keywords
inputs
input
output
outputs
information
Prior art date
Application number
SU864116921A
Other languages
Russian (ru)
Inventor
Виталий Петрович Боюн
Александр Павлович Кичаев
Александр Алексеевич Столяров
Original Assignee
Институт кибернетики им.В.М.Глушкова
Предприятие П/Я А-3202
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 Институт кибернетики им.В.М.Глушкова, Предприятие П/Я А-3202 filed Critical Институт кибернетики им.В.М.Глушкова
Priority to SU864116921A priority Critical patent/SU1429107A1/en
Application granted granted Critical
Publication of SU1429107A1 publication Critical patent/SU1429107A1/en

Links

Landscapes

  • Complex Calculations (AREA)

Abstract

Изобретение относитс  к вьтчис- лительнон технике и может использоватьс  при построении систем сбора и обработки информации. Цель изобретени  - расширение ее функциональных возможностей за счет отбора отсортированных чисел по заданному признаку. Устройство содержит коммутатор 6, реThe invention relates to computing technology and can be used in building information collection and processing systems. The purpose of the invention is to expand its functionality by selecting sorted numbers for a given attribute. The device contains a switch 6, re

Description

(Л С(Ls

- ... П-1- ... P-1

- 3-г- 3g

14291429

версивпый счетчик 9, блок пам ти 8, группу из N элементов И 11, элемент I И 12, блок ограничений 10 и элемент i задержки 7. При упор дочивании мас- сива чисел осуществл етс  запись в блок пам ти одноразр дных признаков наличи  числа по адресу, задаваемому значением числа. Считывание информа- jJ,Tfli производитс  счетчиком с линей- 1 ным нарастанием или убыванием всех I возможных значений числа. ФункцииVersive counter 9, memory block 8, group of N elements And 11, element I And 12, block of constraints 10, and element i of delay 7. When ordering the array of numbers, one-digit signs of the presence of the address given by the value of the number. The reading of the information jJ, Tfli is performed by a counter with a linear increase or decrease of all I possible values of the number. Functions

1one

Изобретение относитс  к вычислительной технике и может использоватьс  при построении систем сбора и обработки информации.The invention relates to computing and can be used in the construction of systems for collecting and processing information.

Целью изобретени   вл етс  расширение функциональных возможностей за счет отбора отсортированных чисел по заданным признакам.The aim of the invention is to expand the functionality by selecting sorted numbers for given characteristics.

На фиг. 1 приведена схема предла- гаемого устройства дл  сортировки массива чисел; на фиг. 2 и 3 - варианты построени  блока ограничени .FIG. 1 shows a diagram of the proposed device for sorting an array of numbers; in fig. 2 and 3 are options for constructing a restriction block.

Устройство дл  сортировки массива чисел (фиг. 1) содержит управл ю- щий вход 1 Ввод-вывод массиваJ входы 2-2, 2-3 задани  признаков, вход 3 Перезапись, информационные входы 4-1 - 4-N, управл ющий вход 5 Возрастание-убывание, коммутатор 6, элемент 7 задержки, блок 8 пам ти реверсивный счетчик 9, блок )0 ограничени , группу из N элементов И 11-1 - , элемент И 12, информационные выходы 13-1 - 13-N, синхрони- зирующий выход 14.A device for sorting an array of numbers (Fig. 1) contains control input 1 Input / output of array J inputs 2-2, 2-3 assignments of signs, input 3 Overwrite, information inputs 4-1 to 4-N, control input 5 Increment-decrease, switch 6, delay element 7, memory block 8, reversible counter 9, block) 0 constraints, group of N elements 11-1-1, element 12, information outputs 13-1-13-N, synchronous output output 14.

Блок 10 ограничени  (первый вариант фиг. 2) содержит управл юшрий вход 15 Запись, информационные входы 15 и 16, управл ющий вход 17 Запись, вход 18- Запись, регистры 19, схемы 20 сравнени , первый 21-1 второй 21-2 мультиплексоры, элемент И 22, элемент И-НЕ 23, элемент ИЛИ 24, элемент ИЛИ-НЕ 25, выходной мультиплексор 26 и управл ющий выход 27.Restriction unit 10 (the first version of Fig. 2) contains control input 15 Record, information inputs 15 and 16, control input 17 Record, input 18- Record, registers 19, comparison circuits 20, first 21-1 second 21-2 multiplexers , AND 22 element, AND-NO 23 element, OR element 24, OR-NOT 25 element, output multiplexer 26 and control output 27.

Блок 10 ограничени  (второй вариант , фиг. 3) содержит информационные входы 28 и 29, управл ющие входы 30 и 31 Запись, регистры 32, схемуRestriction unit 10 (second variant, Fig. 3) contains information inputs 28 and 29, control inputs 30 and 31 Record, registers 32, circuit

0707

обработки задаютс  кодами, записываемыми в блок ограничени . Блок ограничени  (два варианта) позвол ет осуществл ть вывод группы чисел, принадлежащих заданному интервалу, вывод группы чисел, не принадлежащих заданному интервалу, исключение произвольных чисел из упор доченного массива и определение принадлежности произвольных чисел упор доченному массиву. 2 з.п. ф-лы, 3 ил., 6 табл.The treatments are defined by codes written to the constraint block. A restriction block (two options) allows a group of numbers belonging to a given interval to be output, a group of numbers not belonging to a given interval to be output, the exclusion of arbitrary numbers from an ordered array, and the determination of the belonging of arbitrary numbers to an ordered array. 2 hp f-ly, 3 ill., 6 tablets.

33 сравнени , мультиплексор 34, элемент ИСКЛЮЧАЮЩЕЕ ИЛИ 35 и управл ющий выход 36.33 comparisons, multiplexer 34, EXCLUSIVE OR element 35 and control output 36.

Устройство дл  сортировки массива чисел работает следующим образом.A device for sorting an array of numbers works as follows.

Перед каждым вводам чисел упор дочиваемого информационного массива производитс  очистка блока В пам ти (табл. 1, п. 1), осуществл ема  подачей нулевого кода на входы 2-1+2-3 устройства (колонки 3-5) и одного импульса на вход 3 (колонка 15). При этом коммутатор 6 переходит в режим передачи сигнала с входа Р на выход А (колонка 7) и затем на вход 17 (фиг. 2) блока 8 (фиг. 1).Before each input of the numbers of the ordered information array, the memory block B is cleared (Table 1, p. 1) by feeding the zero code to the inputs 2-1 + 2-3 devices (columns 3-5) and one pulse to the input 3 (column 15). In this case, the switch 6 enters the signal transmission mode from input P to output A (column 7) and then to input 17 (Fig. 2) of block 8 (Fig. 1).

При выполнении указанной операции состо ние входов 1, 2, 4 и 5 устройства , а также состо ние счетчика 9 и регистра 19 может быть любым..When performing this operation, the state of the inputs 1, 2, 4 and 5 of the device, as well as the state of the counter 9 and the register 19 can be any ..

Ввод чисел упор дочиваемого массива осуществл етс  после установки единичного потенциала на входе I, перевод щего блок 8 в режим записи, и входе 2-3 устройства (табл. 1, п. 2), разрешающего прохождение импульсов со входа 3 устройства на выход 8 коммутатора 6 (колонка 8), которые затем подаютс  на вход Запись счетчика 9 и через элемент 7 задержки - на вход Запись блока 8. Импульс на вход 3 устройства в этом случае должен подаватьс  синхронно с подачей очередного числа упор дочиваемого массива, что обеспечивает вначале запись этого числа в счетчик 9, а затем благодар  элементу 7 задержки - запись логической единицы в один из триггеров блока В, соответствующийThe numbers of the ordered array are entered after setting a single potential at input I, which transforms unit 8 into recording mode, and input 2-3 devices (Table 1, p. 2) allowing the passage of pulses from input 3 of the device to output 8 of the switch 6 (column 8), which are then fed to the input Record counter 9 and through delay element 7 to the input Record of block 8. The impulse to input 3 of the device in this case must be supplied synchronously with the feed of the next number of the array to be ordered, which first records this the numbers in counter 9, and then, thanks to delay element 7, the writing of a logical unit to one of the triggers of block B, corresponding to

31А29131A291

адресу, заданному выходным кодом счетчика 9. В этом случае счетчик 9 служит в качестве буферного регистра.address given by the output code of the counter 9. In this case, the counter 9 serves as a buffer register.

Предлагаемое устройство осуществл ет одну из семи функций- при выводе упор доченной информации в пор дке возрастани  (логическа  единица на входе 5) или убывани  (логический нуль на входе 5) чисел (табл. 2 и 1 - табл, 2, п. 7). Установка необхо- Ю димого варианта режима вывода осуществл етс  записью кодов, указанных в колонках 5-7 (табл. 2), в регистры 19 (фиг. 3) и установкой начального состо ни  счетчика 9 (фиг. ), при- J5 веденного в табл. 2, колонка 8. Запись необходимых значений кодов в регистры 19 производитс  путем установки требуемого кода на входах 4-1 4-N устройства и подачей импульса записи 20 на тактовые входы 15, 17 и 18 регистров 19. Коммутацию импульса Перезапись с входа 3 устройства на входы Запись 15, 17 и 18 осуществл ет коммутатор 6 в соответствии с табл.1 25 и 3.1 - 3.3.The proposed device performs one of seven functions — when outputting the ordered information in order of increasing (logical unit at input 5) or decreasing (logical zero at input 5) of numbers (Table 2 and 1 - Table 2, p. 7) . The installation of the required output mode option is carried out by writing the codes indicated in columns 5-7 (Table 2) into registers 19 (Fig. 3) and setting the initial state of counter 9 (Fig.), Entered into J5 tab. 2, column 8. The required code values are written to the registers 19 by setting the required code on the inputs 4-1 4-N of the device and applying a write pulse 20 to the clock inputs 15, 17 and 18 of the registers 19. Switching the pulse Overwriting from the device 3 input to inputs Records 15, 17 and 18 are performed by switch 6 in accordance with Table 1 25 and 3.1 - 3.3.

Установка режимов работы устройства сортировки приведена в табл. 1. Этот же коммутатор 6 аналогично обеспечивает возможность установки про- 30 извольного начального состо ни  счетчика 9 по шинам Установка в ноль (табл. 1, п. 3, 4), Запись (табл.1, п. 2) и подачу тактовых импульсов на него (табл. I, п. 3, 5). 5Setting the operation modes of the sorting device is given in Table. 1. The same switch 6 likewise provides the ability to set a random initial state of the counter 9 on the buses. Set to zero (Table 1, p. 3, 4), Record (Table 1, p. 2) and supply clock pulses on it (pl. i, p. 3, 5). five

Установка вариантов режима вывода представлена в табл. 2.Installation options output mode is presented in Table. 2

Схемы 20-1, 20-2 сравнени  блока 10 Ограничени  (фиг. 2) работают в соответствии с табл. 3.40Schemes 20-1, 20-2 of comparison block 10 Limitations (Fig. 2) operate in accordance with Table. 3.40

Мультиплексоры 21-1, 21-2 обеспечивают передачу информации с входов А на выход В в зависимости от состо ни  управл ющих сигналов W 1, W 2, представленных в табл. 4.Multiplexers 21-1, 21-2 provide information transfer from inputs A to output B, depending on the state of the control signals W 1, W 2 presented in Table. four.

Пусть, например, в регистре 19-3 записан нулевой код, разрешающий прохождение сигналов с входов А мультилексоров 20-1, 20-2, 26 на. выход В (табл. 4, п. 1). Так как входы А1 50 мультиплексоров 20-1, 20-2 соединены с шиной Логическа  единица, на их выходах В, а следовательно, и на выходе элемента И 22 будет установлен единичный потенциал, который переда- етс  мультиплексором 26 на выход 27 блока 10 ограничени . Таким образом, при любом состо нии кодов на информационных входах 16-1 - 16-N и 15-1 074Let, for example, in the register 19-3 the zero code is written, allowing the passage of signals from the inputs A of the multiplexers 20-1, 20-2, 26 to. output B (tab. 4, p. 1). Since the inputs A1 50 of the multiplexers 20-1, 20-2 are connected to the bus Logical unit, a unit potential will be installed at their outputs B and, therefore, at the output of the element And 22, which is transmitted by the multiplexer 26 to the output 27 of the limiting unit 10 . Thus, in any condition, the codes at the information inputs 16-1 - 16-N and 15-1 074

- 5-N блока 10 ограничени  обеспечиваетс  наличие сигнала логической единицы на первых входах элементов И 11-1 - 11-N, И 12, что позвол ет осуществить вывод всего упор доченного массива (табл. 2, п. 1). Пусть например, ранее было установлено начальное состо ние счетчика 9, а на управл ющем входе 5 - единичный потенциал , обеспечивающий работу счетчика 9 в режиме суммировани . С подачей каждого тактового импульса на вход 3 Перезапись устройства, которьй благодар  установке кода ПО (табл-( 1, п. 3, 5) на его управл ющих входах 2-1 - 2-3 выдел етс  на. выходе G KONtMyTaTopa 6 и поступает на TaKTOBbrfi вход счетчика 9 и на третий вход элемента И 12, значение выходного кода счетчика 9 возрастает на единицу. Поскольку ранее в блок 8 были записаны единичные признаки присутстви  чисел во входном массиве , при установке нулевого потенциала на входе 1 устройства (фиг. 1) происходит чтение признака по адресу соответствующему коду на выходе счетчика 9. - 5-N block 10 of the restriction provides the presence of a signal of a logical unit at the first inputs of the elements 11-1-1 11-N and 12, which allows for the output of the entire ordered array (Table 2, p. 1). Suppose, for example, that the initial state of the counter 9 was previously established, and at the control input 5 there was a unit potential ensuring the operation of the counter 9 in the summation mode. With the delivery of each clock pulse to the input 3, the overwriting of the device, which due to the installation of the software code (table- (1, p. 3, 5) on its control inputs 2-1 to 2-3, is allocated at the output G of the KONtMyTaTopa 6 and enters on TaKTOBbrfi the input of the counter 9 and on the third input of the element 12, the output code of the counter 9 increases by 1. Since unit 1 signs of the presence of numbers in the input array were previously recorded in block 8, when a zero potential is installed at the input 1 of the device (Fig. 1) A sign is read at the address of the corresponding counter output code ka 9.

Если при обработке массива число на выходе счетчика 9 присутствовало в потоке данных, то блок 8 пам ти выдает единичный потенциал, который, при поступлении на первые входы элементов И 11-1 - I1-N, И 12 открывает их и код с выходов счетчика 9 поступает на выходы 13-1 - 13-N, 14 устройства . Если такого числа нет, то блок 8 выдает нулевой потенциал и запрещает выдачу кода с выхода счетчика 9 на выход устройства.If during the processing of the array, the number at the output of counter 9 was present in the data stream, then the memory block 8 outputs a single potential, which, when it arrives at the first inputs of And 11-1 elements - I1-N, And 12, opens them and the code from the counter 9 outputs enters the outputs 13-1 - 13-N, 14 devices. If there is no such number, then block 8 outputs a zero potential and prohibits the output of a code from the output of counter 9 to the output of the device.

Линейное нарастание кода счетчика 9 позвол ет осуществить упор доченный вывод зафиксированного в блок 8 массива в пор дке возрастани  (табл. 2, п. 1, верхн   строка).A linear increase in the counter code 9 allows an ordered output of the array fixed in block 8 in order of increasing (Table 2, item 1, upper line).

Аналогично можно рассматривать работу устройства при выводе в пор дке убывани  чисел,- т.е. при нулевом потенциале на входе 5 устройства и максимальном значении счетчика (табл. 2, п. I, нижн   строка).Similarly, we can consider the operation of the device when outputting in order of decreasing numbers, i.e. at zero potential at the input 5 of the device and the maximum value of the counter (Table 2, p. I, bottom line).

Пусть в регистре 19-3 (фиг. 2) записан код 001110 (младший разр д крайний правый), разрешающий передачу информации: мультиплексору 21-1 с входа А2 на выход 8, мультиплексору 21-2 с входа А4 на выход 8, мультиплексору 26 с входа А1 на выход В.Let in the register 19-3 (Fig. 2) the code 001110 (the least significant bit is rightmost) is recorded, allowing the transfer of information: multiplexer 21-1 from input A2 to output 8, multiplexer 21-2 from input A4 to output 8, multiplexer 26 from entrance A1 to exit B.

8регистрах 19-1, 19-2 записаны ми8register 19-1, 19-2 recorded mi

5five

нимальное и максимальное числа некоторого интервала. В соответствии с табл. 3 блок 10 огран1гчени  в таком случае обеспечивает нулевой потенциал на выходе 27, если число, по- даваемое на информационные входы 15-1 - 15-N, лежит за пределами интервала , заданного его минимальным и максимальным числами. Если число лежит в пределах заданного интервала , то на .выходе 27 (фиг. 2) блока 10 ограничени  присутствует единичный потенциал. Это обеспечиваетс  подключением выхода схемы 20-1 сравнени  через мультиплексор 21-1 к первому входу элемента .И 22, и выхода схемы 20-2 сравнени  через мультиплексор 21-2 к второму входу элемента И 22, а также выхода элемента И 22 через вход А1 мультиплексора 26 на выход В и далее на выход 27 блока 10 ограничени .minimum and maximum numbers of some interval. In accordance with the table. 3, the block 10 of the limit in this case provides a zero potential at the output 27, if the number supplied to the information inputs 15-1 to 15-N lies outside the interval specified by its minimum and maximum numbers. If the number lies within the specified interval, then on output 27 (Fig. 2) of the limiting unit 10 there is a single potential. This is provided by connecting the output of the comparison circuit 20-1 through multiplexer 21-1 to the first input of the element. AND 22, and the output of the comparison circuit 20-2 through multiplexer 21-2 to the second input of the And 22 element, as well as the output of the And 22 element via input A1 multiplexer 26 to output B and then to output 27 of block 10 of limitation.

В этом случае и при нарастании (табл. 2, п. 2, перва  строка) и при убывании (табл. 2, п. 2, треть  строка) кода счетчика 9 при соответствующих кодах (табл. 2, п. 2) в регистрах и 19-2, начальных состо ни х счетчика 9 и состо ни х сигнал на входе б осуществл етс  выдача сиг нала разрешени  с выхода блока 10 на третьи входы элементов И I1- - - 11-N, И 12, что позвол ет произвести вывод чисел упор доченного массива , принадлежащих заданному интервалу .In this case, and when increasing (table. 2, p. 2, first row) and decreasing (table. 2, p. 2, third row) counter code 9 with corresponding codes (table. 2, p. 2) in registers and 19-2, the initial states of the counter 9 and the states of the signal at the input b are used to issue a resolution signal from the output of the block 10 to the third inputs of the elements I I1 - - - 11-N, And 12, which allows output numbers of an ordered array belonging to a given interval.

Аналогично можно рассматривать работу устройства при выводе упор доченных чисел, принадлежащих заданному интервалу в других вариантах установки этого режима, отмеченных в табл. 2, п. 2, втора  и четверта  строки.Similarly, we can consider the operation of the device in the derivation of ordered numbers belonging to a given interval in other versions of the installation of this mode, noted in Table. 2, p. 2, second and fourth lines.

Следующий (табл. 2, п. 3, перва  : строка) вариант режимов работы уст- |ройства при выводе информации отли- чаетс  от предыдущего тем, что мультиплексор 26 осуществл ет коммутацию на выход 27 сигнала с входа А2, который соединен с выходом элемента И-НЕ 23, входы которого подключены к выходам мультиплексоров 21-1, 21-2. Мультиплексоры осуществл ют коммутацию тех же сигналов, что и в предыдущем случае. Это обеспечиваетс  установкой кодов в регистрах 19-1 - 19и счетчике 9 (табл. 2, п. 3, колонки 5-7) и позвол ет получить единичный потенциал на выходе блока 10 в слуThe next (tab. 2, p. 3, first: line) mode of operation of the device when outputting information differs from the previous one in that multiplexer 26 switches to the output 27 of the signal from input A2, which is connected to the output of the element AND-NOT 23, the inputs of which are connected to the outputs of the multiplexers 21-1, 21-2. The multiplexers switch the same signals as in the previous case. This is ensured by setting the codes in registers 19-1 to 19 and counter 9 (Table 2, item 3, columns 5-7) and allows to obtain a single potential at the output of unit 10 in the case of

5five

00

5five

9191

0 0

5five

00

5five

00

5five

076076

чае, если число на входах Л (фиг. ) блока 10 лежит за пределами заданного интервала. Работу всего устройства в этом случае можно рассмотреть по аналогии с предыдущим случаем.In addition, if the number at the inputs L (FIG.) of block 10 is outside the specified interval. The operation of the entire device in this case can be considered by analogy with the previous case.

Возможна реализаци  режима вывода чисел массива больших или меньших заданного числа при записи в регистры 19-1 и 19-2 нулевого или единичного кодов.It is possible to implement the mode of outputting the numbers of an array larger or smaller than a given number when writing zero or one codes to registers 19-1 and 19-2.

Вариант режима вывода (табл. 2, п. 4) устанавливаетс  записью в регистр 19-3 кода 011010 (мл. разр д справа), которьй обеспечивает подключение выходов схем 20-1, 20-2 сравнени  через ьгультиплексоры 21-1, 21-2 к входам элементов И-НЕ 23 и его выхода через мультиплексор 26 (вход А2) к выходу 27 блока 10 ограничени . В этом случае как в регистр 19-1, так и в регистр 19-2 записываетс  число, которое должно быть исключено при выводе из упор доченного массива.A variant of the output mode (Table 2, p. 4) is set by writing to the register 19-3 a code 011010 (ml. Bit to the right), which provides connection of the outputs of the comparison circuits 20-1, 20-2 through the multiplexers 21-1, 21- 2 to the inputs of the AND-HAND elements 23 and its output through the multiplexer 26 (input A2) to the output 27 of the limiting unit 10. In this case, both the register 19-1 and the register 19-2 record the number that must be excluded from the output from the ordered array.

Таким образом, как только на выходах счетчика 9 установитс  записанное в регистры 19-1, 19-2 число, сигналь; уровн  логической единицы с выхода схем 20-1, 20-2 сравнени  через мультиплексоры 21-1, 21-2 поступают на входы элемента И-НЕ 23, устанавлива  его в нулевое состо ние . Через мультиплексор 26 этот нулевой уровень поступает на выход 27 блока 10 ограничени .Thus, as soon as the outputs of the counter 9 is set recorded in the registers 19-1, 19-2 number, the signal; The level of the logical unit from the output of the comparison circuits 20-1, 20-2, through multiplexers 21-1, 21-2, goes to the inputs of the NAND element 23, setting it to the zero state. Through multiplexer 26, this zero level enters the output 27 of block 10 of limitation.

Это приводит к тому, что как и в случае табл. 2, п. 1 числа массива могут выводитьс  в пор дке возрастани  и убывани , но по шине с выхода 27 (фиг. 2) блока 10 ограничени  осуществл етс  запрет происхождени  числа, а именно записанного в регистры 19-1, 19-2 через элементы И - - 11-N, и синхронизирующего импульса через элемент И 12.This leads to the fact that as in the case of table. 2, p. 1, the numbers of the array can be output in the order of increase and decrease, but the bus from output 27 (Fig. 2) of restriction unit 10 prohibits the origin of the number, namely, recorded in registers 19-1, 19-2 through elements And - - 11-N, and the synchronizing pulse through the element And 12.

Вариант режима вывода (табл. 2, п. 5) отличаетс  тем, что сигналы с выходов схем 20-1, 20-2 сравнени  подаютс  на входы элемента ИЛИ-НЕ 25 И через мультиплексоры 21-1, 21-2 и его выход через мультиплексор 26 подключаетс  к выходу 27 блока 10 ограничени . При этом сигнал Запрет запрещает прохождение чисел с выхода счетчика через элемент И 12 - на синхро шзирующий выход устройства.The output mode option (Table 2, p. 5) is characterized in that the signals from the outputs of the comparison circuits 20-1, 20-2 are fed to the inputs of the OR-NOT 25 AND element through multiplexers 21-1, 21-2 and its output through multiplexer 26 is connected to output 27 of limiter 10. In this case, the prohibition signal prohibits the passage of numbers from the counter output through the element 12 to the sync output of the device.

Проверка принадте :ности числа упор доченном массиву (табл. 2,Verify that the number of the ordered array (Table 2,

7171

п. 6) осуществл етс  установкой в регистре кода 011010, обеспечивающего подключение в соответствии с табл. А выходов схем 20-1, 20сравнени  к входам элемента И 22 че- рез мультиплексоры 21-1, 21-2 и его выхода через мультиплексор 16 к выходу блока 10 ограничени . При этом число, проверка принадлежности которого упор доченному массиву осущест- вл етс , должно быть записано в регистры 19-1, 18, а счетчик устанавливаетс  в нулевое состо ние (на входе 5 - единичный потенциал) при проверк возрастани  чисел и в единичное (на входе 5 - логический ноль) при проверке в пор дке убывани  чисел. Указанные действи  привод т к тому, что при развертывании выходных кодов счетчика 9, например, от нулевого до максимального элементы , И-12 будут закрыты нулевым потенциалом с выхода элемента 22, которьй устанавливаетс  за счет нулевых потенциалов на входах схем 20-1, 20-2 срав- нени  до тех пор, пока число на выходе счетчика 9 не сравн етс  с числом , записанным в регистры 19-1, 19-2. При этом на выходах схем 20-1, 20-2 сравнени , на входах элемента И 22, на его выходе и на выходе блока 10 устанавливаетс  единичньм потенциал , и если это число в упор доченном массиве присутствует, т.е. по адресу, задаваемому счетчиком 9, в блоке 8 записана логическа  единица, элементы И 11 и 12 открываютс  единичным потенциалом с выхода блока 8 и выходы счетчика через открытые элементы И 11-1 - И 11-N подключаютс  к 13-1 - 13-N устройства, выдел   указанное число и подтвержда  его принадлежность упор доченному массиву наличием выходного кода и импульса синхронизации на выходе 14 устройства. Ее- ли такого числа нет, то на выходе блока 8 присутствует уровень логического нул  и элементы И П-1 - - И 11-N, И-12 будут закрыты дп  пе редачи информации на выход устрой- ства.6) is carried out by setting in the register the code 011010, which provides the connection in accordance with the table. And the outputs of the circuits 20-1, 20 in comparison to the inputs of the element AND 22 through multiplexers 21-1, 21-2 and its output through the multiplexer 16 to the output of the limiting unit 10. In this case, the number, the verification of which belonging to the ordered array is carried out, must be written to registers 19-1, 18, and the counter is set to the zero state (input 5 - the unit potential) when checking the increase in numbers and to the unit one (on input 5 is a logical zero) when checked in order of decreasing numbers. These actions lead to the fact that when deploying the output codes of counter 9, for example, from zero to maximum elements, I-12 will be closed by zero potential from the output of element 22, which is set by zero potentials at the inputs of circuits 20-1, 20- 2 comparisons until the number at the output of counter 9 compares with the number written in registers 19-1, 19-2. At the same time, a single potential is established at the outputs of the comparison circuits 20-1, 20-2, at the inputs of the element 22, at its output and at the output of the block 10, and if this number is present in the ordered array, i.e. at the address specified by the counter 9, in block 8 a logical unit is written, elements 11 and 12 are opened by a single potential from the output of block 8 and the outputs of the counter are opened through open elements 11 11 - and 11-N to 13-1 - 13-n device, allocate the specified number and confirm that it belongs to the ordered array by the presence of the output code and synchronization pulse at the output 14 of the device. If there is no such number, then at the output of block 8 there is a level of logical zero and the elements AND P-1 - - AND 11-N, I-12 will be closed for transferring information to the output of the device.

Последний вариант режима работы устройства (табл. 2, п. 7) отличаетс  от предыдущего тем, что в регист- ры 19-1, 19-2 занос тс  два провер емых числа, мультиплексоры 21-1, 21обеспечивают подключение выходов схем 20-1, 20-2 сравнени  к входамThe last mode of operation of the device (Table 2, clause 7) differs from the previous one in that the registers 19-1, 19-2 add two checked numbers, multiplexers 21-1, 21 provide the connection of the outputs of circuits 20-1 , 20-2 versus inputs

078078

элемента 1-ШИ 24, а его выход через гyльтиплeкcop 26 подключаетс  к выходу 27 блока 10 ограничени . Такое подключение приводит к тому, что еди Н1ГЧНЫЙ потенциал на выходе 27 блока 10 ограничени  по вл етс  как при достижении кода счетчика одного, так и другого числа . Начальные этапы рабо- ты устройства д.п  сортировки массива чисел с блоком 10 ограничени  (фиг.З могут быть рассмотрены аналогично. После очистки блока 8, ввода чисел упор дочиваемого Maccirea и переключени  устройства в режим вывода осуществл етс  установка необходимого варианта режима вывода. При этом счетчик 3 служит дл  записи минимального или максимального числа интервала при выводе чисел, принадлежащих или лежащих за пределами .заданного интервала и проверки принадлежности или исключени  одного числа иэ упор до- ченного массива. Регистр 32-1 исполь зуетс  дл  записи второго числа интервала , регистр 32-2 необходим дл  запоминани  выбранного режима работы схема 33 сравнени  осуществл ет сравнение чисел на вькоде счетчика 9 и дописаь ного в регистр 32-1 , мультиплексор 34 производит коммутацию выходов схемы 33 сравнени  на выход устройства, элемент ИСКЛЮЧАЮЩЕЕ ИЛИ 35 используетс  как управл емый инвертор (табл. 5).element 1-SHI 24, and its output through a helicopter kop 26 is connected to the output 27 of the unit 10 restrictions. Such a connection leads to the fact that the unity of the Potential at the output 27 of the block 10 of the restriction appears as when the counter code of one or another number is reached. The initial stages of the device operation are to sort the array of numbers with restriction block 10 (Fig. 3 can be considered in the same way. After clearing block 8, inputting numbers of the Maccirea being ordered and switching the device to output mode, the required output mode is set. For In this case, counter 3 is used to record the minimum or maximum number of intervals when deriving numbers belonging to or lying outside the specified interval and checking membership or excluding one number and the emphasis of the finished array. page 32-1 is used to record the second interval number, register 32-2 is required to store the selected operating mode. Comparison circuit 33 compares the numbers on the code of counter 9 and added to register 32-1, multiplexer 34 switches the outputs of comparison circuit 33 at the output of the device, the EXCLUSIVE OR 35 element is used as a controlled inverter (Table 5).

В табл, 6 приведены варианты установки режимов вывода чисел.Table 6 shows the installation options for the output numbers.

. Первый вариант (табл. 6, п. 1) режима вывода обеспечиваетс  установкой соответствующих (табл. 6, колонка 7) состо ний счетчика и состо ни  сигнала на выходе 5 устройства (табл. 6, колонка 4). Состо ние регистра 32-2 (табл. 6, колонка 4) управл ет работой мультиплексора ЗА, обеспечива  подключение логической единицы с входа А1 мультиплексора 34 к выходу 3, и пр мую передачу сигнала с его выхода через управл емый инвертор 35 на выход блока 10 ограничени  (фиг. 3).. The first option (Table 6, p. 1) of the output mode is provided by setting the corresponding (Table 6, column 7) states of the counter and the state of the signal at the output 5 of the device (Table 6, column 4). Register 32-2 (tab. 6, column 4) controls the operation of the multiplexer FOR, connecting the logical unit from input A1 of multiplexer 34 to output 3, and direct signal transmission from its output through controlled inverter 35 to unit 10 restrictions (Fig. 3).

образом, блок ограничени  практически отключен и разрешает вывод всех чисел массива, так как на его выходе устанавливаетс  единичный потенциалнезависимо от состо ни  сигналов на входах 28 и 29. Далее работа устройства при выводе всех чисел упор доченного массива аналогична рассмотренному вьше. Thus, the limiting unit is practically disabled and permits the output of all the numbers in the array, since a single potential is established at its output regardless of the state of the signals at inputs 28 and 29. Next, the device operation when outputting all the numbers of the ordered array is similar to the one discussed above.

1 one

Второй вариант (табл. 6, п. 2) устанавливаетс  записью максимального и минимального чисел интервала либо b счетчик 9, либо в регистр 32-1 |(табл. 6, колонка 5, табл. 6, колон- а 7) и подключением выходов или и к выходу блока 10 ограниче 1ИЯ .The second option (Table 6, p. 2) is set by recording the maximum and minimum interval numbers, either b counter 9, or in register 32-1 | (table 6, column 5, table 6, column 7) and connecting the outputs or, and to the output of block 10, restriction 1IA.

Работа устройства в этом случае отличаетс  от рассмотренной тем, что счетчик 9 начинает свою работу не с нулевого или единичного кодов, а с минимального или максимального числа, начина  сразу же вьшод чисел заданного интервала. При этом по сравнению |с рассмотренным вьшге аналоп-гчным случаем повышаетс  быстродействие при выводе чисел заданного интервала. i Третий и четвертый варианты Ктабл. 6, п. 3, табл. 6, п. 4) обес- |печиваютс  записью в регистре RG, 32-1, соответствующей установки начального кода счетчика 9 (табл. 6, колонки 4, 7) и входа 5 устройстваThe operation of the device in this case differs from that considered in that the counter 9 begins its operation not from the zero or single codes, but from the minimum or maximum number, starting immediately from the numbers of the given interval. At the same time, in comparison with the above described analogous case, the response speed is increased in deriving the numbers of a given interval. i The third and fourth options Kabbl. 6, p. 3, tab. 6, p. 4) are provided by recording in register RG, 32-1, corresponding to the setting of the initial code of the counter 9 (Table 6, columns 4, 7) and input 5 of the device

;и подключением выходов или ; and connecting the outputs or

схемы 33 сравнени  через мультиплексор 34 и схему ИСКЛЮЧАЮЩЕЕ ИЛИ к выходу блока 10 ограничени , что производитс  установкой соответствующего (табл. 6, колонка 6) состо ни  регистра 32-2. При этом схема сравнени  в зависимости от состо ни  сигналов на входах 28 и 29 либо разрешает либо запрещает вьшод чисел массива.comparison circuits 33 through multiplexer 34 and an EXCLUSIVE OR circuit to the output of the limiting unit 10, which is done by installing the corresponding state of register 32-2 (Table 6, column 6). In this case, the comparison circuit, depending on the state of the signals at inputs 28 and 29, either permits or prohibits the output of array numbers.

Установка последующих двух вариан тов работы устройства обеспечиваетс  подключением выхода схемы 33 к выходу 36 блока 10 ограничени , либо через инвертор, либо напр мую, что осуществл етс  установкой кодов соот ветствутощих табл. 6, колонки 4-7, п. 5, 6. .The installation of the following two variants of the device operation is provided by connecting the output of the circuit 33 to the output 36 of the limiting unit 10, either through an inverter or directly, which is done by setting the codes of the corresponding tab. 6, columns 4-7, p. 5, 6..

При этом в случае .(табл. 6, п. 5) управл емый инвертор 35 работает в режиме инвертировани , запреща  про- хождение кода с выхода счетчика 9 через элементы И 11-1 - 11-N на выходы 13 устройства.In this case, in the case of (tab. 6, p. 5), the controlled inverter 35 operates in the inversion mode, prohibiting the passage of the code from the output of the counter 9 through the elements 11-1 - 11-N to the outputs 13 of the device.

Claims (3)

1. Устройство дл  сортировки массива чисел, содержащее коммутатор,1. A device for sorting an array of numbers containing a switch, 5 0 50 5five 0 0 0 0 5 five 0 5 0 5 1071010710 реверсивный счетчик, блок пам ти, группу из N элементов И, (N - разр дность сортируемых двоичных чисел), элемент И, причем информационные входы устройства соединены с информа- ifliOHHMMH входами реверсивного счетчика , управл ющий вход Ввод-вывод устройства соединен с входом выбора режима блока пам ти, выходы разр дов реверсивного счетчика соединены с адресными входами блока пам ти и первыми входами соответствующих элементов И группы, вторые входы которых соединены с выходом блока пам ти и подключены к первом входу элемента И выход которого  вл етс  синхронизирующим вьтходом устройства, выходы элементов И группы  вл ютс  информационными выходами устройства, отличающеес  тем, что, с целью расширени  функциональных возможностей за счет отбора отсортированных чисел по заданным признакам, введены блок ограничений и элемент задержки, причем входы задани  признаков устройства соединены с информационными входами коммутатора, управл ющий вход которого соединен с входом Перепись устройства, вход Возрастание-убьгеание устройства соединен с входом выбора режима реверсивного счетчика, информационные входы которого объединены с соответствующими входами первой группи информационных входов блока ограничени , информационные входы второй группы которого соединены с соответствующими выходами разр дов реверсивного счетчика, первый выход коммутатора соединен с входом установки в О блока пам ти, второй выход коммутатора соединен с Запись реверсивного счетчика и через элемент задержки - с входом Запись блока пам ти, третий, четвертый и п тьй выходы коммутатора соединены соответственно с первым, вторым и третьим управл ющими входами блока ограничени , щестой выход коммутатора соединен с входом установки в О реверсивного счетчика, а седьмой выход - с тактовым входом реверсивного счетчика и вторым входом элемента И, третий вход которого соединен с выходом блока ограничени  и с объединенными третьими входами элементов И группы.reversible counter, memory block, group of N elements AND, (N is the size of the binary numbers being sorted), element AND, the information inputs of the device are connected to information ifliOHOHMMH inputs of the reversible counter, the control input device I / O is connected to the selection input the mode of the memory block, the outputs of the bits of the reversible counter are connected to the address inputs of the memory block and the first inputs of the corresponding elements AND groups, the second inputs of which are connected to the output of the memory block and connected to the first input of the element AND whose output is a synchronization device input, the outputs of elements AND groups are information outputs of the device, characterized in that, in order to expand the functionality by selecting sorted numbers according to given characteristics, a restriction block and a delay element are introduced, and the inputs for specifying the device characteristics are connected to information the inputs of the switch, the control input of which is connected to the input Record of the device, the input Increment-Slamming of the device is connected to the input of the selection of the reversing mode About the counter whose information inputs are combined with the corresponding inputs of the first group and information inputs of the limiting unit, the information inputs of the second group of which are connected to the corresponding outputs of the bits of the reversible counter, the first output of the switch is connected to the installation input in O of the memory unit, the second output of the switch is connected to Record reversible counter and through the delay element - with the input Record of the memory block, the third, fourth and fifth outputs of the switch are connected respectively to the first, second and third The control inputs of the limiting unit, the switch output are connected to the installation input of the reversible counter in O, and the seventh output to the clock input of the reversible counter and the second input of the And element, the third input of which is connected to the output of the restriction unit and . 2. Устройство по п. 1, о т л и чающеес  тем, что блок огр.эи12. The device according to claim 1, about tl and which is so that the block limit ei1 ннчений содержит пегтый, второй и третий регистры, первую и вторую схе 4JI сравнени , первьй, второй и трети ьтультиштексоры, элемент И, элемент И-НЕ и элемент ШШ-НЕ, причем перва  группа информационных входов блока ограничений соединена с соответствующими объединенными i-входами (i 1.,.N) первого, второго регистров и k-входами (k I ., .6) третьего ре- гистра, втора  группа информационных входов блока ограничени  соединена с входами первых групп первой и второй схем сравнени , группы входов которых соединены с выходами соответ ствующих разр дов первого и второго регистров, первый, второй и третий управл ющие входы блока ограничений соединены соответственно с входами Запись первого, второго и третьего регистров, выходы первой и второй схем сравнени  соединены соответственно с первыми, вторыми и третьими информационными входами первого и второго мультиплексоров, четвертые входы которых соединены с входом логической единицы устройства, первый и второй, третий и четвертый, п тый и шестой выходы третьего регистра соединены соответственно с управл ю- щими входами первого, второго и третьего мультиплексоров, выходы первого и второго мультиплексоров соединены с соответствующими объединенными первыми и вторыми входами элементов И, элемента ИЛИ и элемента ИЛИ-НЕ, выходы которых соединены с соответст07 .12The instructions contain pinned, second and third registers, the first and second 4JI comparison circuit, the first, second and third multiplexers, the AND element, the AND-NOT element and the SH-NOT element, the first group of information inputs of the restriction block is connected to the corresponding combined i-inputs (i 1.,. N) of the first, second registers and k-inputs (k I.,. 6) of the third register, the second group of information inputs of the limiting unit is connected to the inputs of the first groups of the first and second comparison circuits, the groups of inputs of which are connected with outputs of the corresponding ne bits The first and second registers, the first, second and third control inputs of the restriction block are connected respectively to the inputs of the first, second and third registers; the outputs of the first and second comparison circuits are connected respectively to the first, second and third information inputs of the first and second multiplexers; the fourth inputs which are connected to the input of a logical unit of the device, the first and second, third and fourth, fifth and sixth outputs of the third register are connected respectively to the control inputs of the first, second and the third multiplexers, the outputs of the first and second multiplexers are connected to the corresponding combined first and second inputs of the AND elements, the OR element and the OR-NOT element, the outputs of which are connected to the corresponding 07 .12 пукмиими цJIфopмauиoнкы п входами третьего мультиплексора, выход которого  вл етс  выходом блока ограничени ,Pukimyi JI phocons and p inputs of the third multiplexer, the output of which is the output of the limiting unit, 3. Устройство по п. 1, отличающеес  тем, что блок ограничений содержит первый и второй регистры , схему сравнени , ьгультиплек- сор, элемент ИСКЛЮЧАЮЩЕЕ ИЛИ, причем перва  группа информационных входов блока ограничени  соединена с соответствующими i-ми входами первого регистра (i 1,2...N) и 1-ми входами (1 1,2,3) второго регистра, первый и второй управл ющие входы блока ог- ранргчений соединены соответственно с входами записи первого и второго регистров, втора  группа информационных входов блока ограничени  подключена соответственно к первой группе входов схемы сравнени , втора  группа входов которого подключена соответственно к выходам разр дов первого регистра, выходы схемы сравнени  подключены к первому, второму и тре- TbeNfy информационным входам мультиплексора , вход логической единицы устройства подключен к четвертому информационному входу мультиплексора первый и второй выходы второго регистра соединены с первым и вторым управл ющими входами мультиплексора, выход которого соединен с первым входом элемента ИСКЛЮЧАЮЩЕЕ ИЛИ, второй вход которого подключен к третьему выходу второго регистра, выход элемента ИСКЛЮЧАЮЩЕЕ ИЛИ  вл етс  выходом блока ограничени .3. The device according to claim 1, characterized in that the restriction block contains the first and second registers, the comparison circuit, the multiplexer, the EXCLUSIVE OR element, the first group of information inputs of the restriction block is connected to the corresponding i-th inputs of the first register (i 1 , 2 ... N) and 1 inputs (1 1,2,3) of the second register, the first and second control inputs of the control unit are connected respectively to the recording inputs of the first and second registers, the second group of information inputs of the restriction unit are connected respectively to the first group The input of the comparison circuit, the second group of inputs of which are connected respectively to the outputs of the first register bits, the outputs of the comparison circuit are connected to the first, second and three TbeNfy information inputs of the multiplexer, the input of the logical unit of the device is connected to the fourth information input of the multiplexer first and second outputs of the second register connected to the first and second control inputs of the multiplexer, the output of which is connected to the first input of the EXCLUSIVE OR element, the second input of which is connected to the third you during the second register, the output of the EXCLUSIVE OR element is the output of the limiting unit. 4O tи4O ti u оu o aa «7"7 иand exex ьs кto иand XX соwith о о 1about about 1 оabout о оoh oh ТаВлипа 2TaVlipa 2 «гг.З“Yr.
SU864116921A 1986-09-10 1986-09-10 Device for sorting an array of numbers SU1429107A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
SU864116921A SU1429107A1 (en) 1986-09-10 1986-09-10 Device for sorting an array of numbers

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
SU864116921A SU1429107A1 (en) 1986-09-10 1986-09-10 Device for sorting an array of numbers

Publications (1)

Publication Number Publication Date
SU1429107A1 true SU1429107A1 (en) 1988-10-07

Family

ID=21256346

Family Applications (1)

Application Number Title Priority Date Filing Date
SU864116921A SU1429107A1 (en) 1986-09-10 1986-09-10 Device for sorting an array of numbers

Country Status (1)

Country Link
SU (1) SU1429107A1 (en)

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Авторское свидетельство СССР № 1183956, кл. G 06 F 7/06, 1985. Авторское свидетельство СССР 1383336, кл. G 06 F 7/06, 24.06.86. *

Similar Documents

Publication Publication Date Title
CA1233259A (en) High performance memory utilizing pipelining techniques
GB1568379A (en) Video store
KR930017025A (en) Multiserial Access Memory
JPH0738170B2 (en) Random access memory device
SU1429107A1 (en) Device for sorting an array of numbers
US3199082A (en) Memory system
US5691956A (en) Memory with fast decoding
SU1378038A1 (en) Spatial-temporal digital switching system
SU1764053A1 (en) Multichannel device for current claim servicing control
SU1714612A1 (en) Data exchange device
SU1737464A1 (en) Digital filter
SU1725237A1 (en) Device for selecting object attributes
SU922744A1 (en) Device for servicing requests in coming order
SU1277124A1 (en) Interface for linking electronic computer with using equipment
SU1481739A1 (en) Device for processing numeric numbers
RU1795471C (en) Fast transform processor
RU1783536C (en) Device for connection of subscribers to common trunk line
RU1805501C (en) Asynchronous serial register
SU991413A1 (en) Device for determination of a maximal number out of a group of numbers
RU1817114C (en) Device for identifying images
SU1396158A1 (en) Buffer storage
EP0117347B1 (en) Magnetic bubble memory systems
SU771726A1 (en) Storage
US6191993B1 (en) First in first out memory circuit
SU911506A1 (en) Device for ordering data