RU1835543C - Appliance for sorting of numbers - Google Patents

Appliance for sorting of numbers

Info

Publication number
RU1835543C
RU1835543C SU904860073A SU4860073A RU1835543C RU 1835543 C RU1835543 C RU 1835543C SU 904860073 A SU904860073 A SU 904860073A SU 4860073 A SU4860073 A SU 4860073A RU 1835543 C RU1835543 C RU 1835543C
Authority
RU
Russia
Prior art keywords
input
block
inputs
output
outputs
Prior art date
Application number
SU904860073A
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 SU904860073A priority Critical patent/RU1835543C/en
Application granted granted Critical
Publication of RU1835543C publication Critical patent/RU1835543C/en

Links

Landscapes

  • Complex Calculations (AREA)

Abstract

Изобретение относитс  к автоматике и вычислительной технике и может быть использовано дл  формировани  упор доченного массива чисел. Цель изобретени  - расширение функциональных возможностей за счет возможности сортировки чисел в едином массиве из исходных массивов. Устройство содержит блок 1 пам ти входных массивов, коммутатор 2, два блока пам ти 3 и 7, дешифратор 4, блок 5 подсчета массива из исходных массивов неравных объемов, элементы И 6,9 и 14, блок сравнени , блок элементов ИЛИ, буферный блок 11 пам ти, выходной блок 12 пам ти и группы 10 и 13 элементов И. 2 ил.The invention relates to automation and computer engineering and can be used to form an ordered array of numbers. The purpose of the invention is the expansion of functionality due to the ability to sort numbers in a single array from the source arrays. The device comprises an input array memory unit 1, a switch 2, two memory units 3 and 7, a decoder 4, an array counting unit 5 from the original arrays of unequal volumes, AND elements 6.9 and 14, a comparison unit, an OR unit, a buffer unit 11 memory, output block 12 of memory and groups of 10 and 13 elements I. 2 ill.

Description

II

Фиг.FIG.

Изобретение относитс  к автоматике и вычислительной технике и может быть использовано дл  формировани  упор доченного массива чисел из п исходных упор доченных массивов неравных объемов .The invention relates to automation and computer technology and can be used to form an ordered array of numbers from n initial ordered arrays of unequal volumes.

Цель изобретени  - расширение функциональных возможностей устройства за счет возможности сортировки чисел в едином массиве из исходных массивов неравных объемов.The purpose of the invention is to expand the functionality of the device due to the ability to sort numbers in a single array from the original arrays of unequal volumes.

На фиг.1 представлена электрическа  структурна  схема устройства дл  сортировки чисел; на фиг.2 - схема блока подсчета массивов.Fig. 1 is an electrical block diagram of a device for sorting numbers; figure 2 - block diagram of the calculation of arrays.

Устройство дл  сортировки чисел (фиг.1) содержит блок 1 пам ти входных массивов, коммутатор 2. второй блок 3 пам ти, дешифратор 4, блок 5 подсчета массивов, первый элемент И 6, первый блок 7 пам ти, блок 8 сравнени , вторую группу 9 элементов И, группу 10 элементов ИЛИ, буферный блок 11 пам ти, выходной блок 12 пам ти, первую группу 13 элементов И, второй элемент И 14.The device for sorting numbers (Fig. 1) contains an input array memory unit 1, a switch 2. a second memory unit 3, a decoder 4, an array counting unit 5, a first AND element 6, a first memory unit 7, a comparison unit 8, and a second a group of 9 AND elements, a group of 10 OR elements, a buffer memory block 11, an output memory block 12, a first group of 13 And elements, a second And element 14.

Блок 5 подсчета массивов (фиг.2) содержит элемент ИЛИ 15, одновибратор 16, счетчик 17, блок 18 сравнени /регистр 19 и генератор 20 тактовых импульсов (ГТИ).Array counting unit 5 (Fig. 2) comprises an OR element 15, a single vibrator 16, a counter 17, a comparison unit 18 / register 19 and a clock generator 20 (GTI).

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

Предварительно опишем решаемую задачу .Let us first describe the problem being solved.

Пусть имеетс  N исходных массивов, в каждом из которых находитс  щ (, N) упор доченных чисел. Необходимо из элементов этих исходных массивов составитьSuppose there are N source arrays, each of which contains u (, N) ordered numbers. It is necessary to compose from the elements of these source arrays

N N

единый массив, содержащий п 2 (ni)single array containing n 2 (ni)

1 1eleven

упор доченных чисел. Рассматриваемые массивы представл ют собой, в нашем понимании , наборы чисел, записанных в форме двоичных кодов, последним элементом в каждом из которых  вл етс  признак конца массивау, т.е. некоторый специфичный код. выход щий за рамки представлени  чисел.emphasis on numbers. The arrays under consideration are, in our understanding, sets of numbers written in the form of binary codes, the last element in each of which is a sign of the end of the array, i.e. some specific code. beyond the scope of numbers.

Перед началом работы устройства на вход регистра 19 блока 5 подаетс  число N упор доченных массивов. Первый массив подаетс  на информационный вход первого блока 7 пам ти, а остальные N-1 массивов занос тс  в блок 1 пам ти входных массивов . Кроме того, обнул етс  содержимое. первого блика 7 пам ти, второго блока 3 пам ти и буферного блока 11 пам ти,Before the device starts operation, the number N of ordered arrays is supplied to the input of the register 19 of block 5. The first array is fed to the information input of the first memory block 7, and the remaining N-1 arrays are entered into the memory block 1 of the input arrays. In addition, the contents are cleared. the first flare 7 of the memory, the second block 3 of the memory and the buffer block 11 of the memory,

При включении блока 5 на его выходе последовательно формируютс  адреса регистров 1-1 блока 1 пам ти входных массивов , которые поступают на управл ющийWhen block 5 is turned on, the addresses of registers 1-1 of block 1 of the memory of input arrays that are sent to the control unit are sequentially generated at its output

вход коммутатора 2. В результате этого первый массив из блока 1 через коммутатор 2 поступает на информационный вход второго блока 3 пам ти.the input of switch 2. As a result, the first array from block 1 through the switch 2 enters the information input of the second memory block 3.

На четвертом выходе блока 5 по вл етс  импульс, при поступлении которого на первый управл ющий вход первого блока 7 пам ти в него записываетс  первый массив чисел, а при поступлении этого импульса на 0 второй управл ющий вход второго блока 3 пам ти происходит запись массива с выхода коммутатора 2 во второй блок 3 пам ти. Первое число из первого блока 7 пам ти и первое число из второго блока 3 пам тиAt the fourth output of block 5, a pulse appears, upon receipt of which the first array of numbers is written to the first control input of the first memory block 7, and when this pulse arrives at 0, the second control input of the second memory block 3 records the array with the output of the switch 2 to the second memory unit 3. The first number from the first memory block 7 and the first number from the second memory block 3

5 поступают на первый и второй входы блока5 enter the first and second inputs of the block

8сравнени , первый и второй входы дешифратора 4, а также на информационные входы первой 13 и второй 9 групп элементов И соответственно.8, the first and second inputs of the decoder 4, as well as the information inputs of the first 13 and second 9 groups of AND elements, respectively.

0 Если число, поступающее на первый вход блока 8 сравнени ,меньше или равно числу, поступающему на его второй вход, то на втором выходе блока 8 по вл етс  единичный потенциал, который поступает на0 If the number supplied to the first input of the comparison unit 8 is less than or equal to the number supplied to its second input, then the unit potential appears at the second output of the unit 8, which arrives at

5 второй вход первой группы 13 элементов И ,и открывает их. В результате этого число с информационного входа и первой группы 13 элементов И поступает на первый вход группы 10 элементов ИЛ И. Так как втора  группа5 the second entrance of the first group of 13 elements And, and opens them. As a result of this, the number from the information input and the first group of 13 AND elements goes to the first input of the group of 10 IL elements. Since the second group

0 элементов И в этот момент закрыта, то число через группу Ю элементов ИЛИ поступает в буферный блок 11 пам ти. Кроме того, единичный потенциал со второго выхода блока 8 сравнени  поступает на второй вход0 elements And at this moment it is closed, then the number through the group of Yu elements OR comes to the buffer block 11 of the memory. In addition, the unit potential from the second output of block 8 of the comparison goes to the second input

5 первого элемента -И 6. В результате управл ющий импульс с третьего выхода блока 5 через первый элемент И 6 поступает на второй управл ющий вход первого блока 7 пам ти . При этом содержимое первого блока5 of the first element - AND 6. As a result, the control pulse from the third output of block 5 through the first element And 6 enters the second control input of the first memory block 7. The contents of the first block

0 у пам ти продвигаетс  на одну  чейку и на его выходе по вл етс  второе число упор дочиваемого массива. После этого процесс сравнени  двух чисел повтор етс .0, the memory advances one cell and the second number of the ordered array appears on its output. After that, the process of comparing the two numbers is repeated.

Если число, поступающее на первыйIf the number arriving at the first

5 вход блока 8 сравнени , больше числа по- ступающего на его второй вход, то на первом выходе блока 8 сравнени  по вл етс  единичный потенциал, который, поступа  на первый вход второй группы элементов И5, the input of the comparison unit 8 is greater than the number arriving at its second input, then at the first output of the comparison unit 8 a unit potential appears, which, entering the first input of the second group of elements

0 9, открывает его, поэтому число с информационного входа второй группы элементов И0 9, opens it, so the number from the information input of the second group of elements AND

9поступает на второй вход группы 10 элементов ИЛИ. Так как перва  группа элементов И 13 в этот момент закрыта, то число9 arrives at the second input of the group of 10 OR elements. Since the first group of elements And 13 is closed at this moment, the number

5 через группу 10 элементов ИЛИ поступает в буферный блок 11 пам ти. Кроме того, единичный потенциал с первого выхода блока 8 сравнени  поступает на первый вход второго элемента И 14 и управл ющий импульс с третьего выхода блока 5 через второй элемент И 14 поступает на первый управл ющий вход второго блока 3 пам ти. При этом содержимое второго блока 3 пам ти сдвигаетс  на одну  чейку и на его выходе по вл етс  второе число упор дочиваемого массива. После этого процесс сравнени  двух чисел повтор етс .5 through a group of 10 elements, OR enters the buffer unit 11 of the memory. In addition, the unit potential from the first output of the comparison unit 8 is supplied to the first input of the second element And 14 and the control pulse from the third output of the unit 5 through the second element And 14 is supplied to the first control input of the second memory unit 3. In this case, the contents of the second memory block 3 are shifted by one cell and the second number of the ordered array appears at its output. After that, the process of comparing the two numbers is repeated.

При по влении на выходе первого блокаWhen the first block appears

7или второго блока 3 признака конца массива происходит запись в буферный блок 11 пам ти числа,-по вившегос  на выходе другого блока пам ти, поскольку блок 8 сравнени  интерпретирует признак конца массива как очень большое число.7 or the second block 3 of the sign of the end of the array, a number is written to the buffer block 11, which appeared at the output of another block of memory, because the comparison block 8 interprets the sign of the end of the array as a very large number.

Описанный выше процесс сравнени  двух чисел заканчиваетс  в тот момент, когда на выходах первого 7 и второго 3 блоков устанавливаютс  признаки конца массива.The process of comparing two numbers described above ends when the signs of the end of the array are set at the outputs of the first 7 and second 3 blocks.

8результате поступлени  двух признаков конца массива на входы блока 8 сравнени  один из них записываетс  в буферный блок 11 пам ти и становитс  признаком конца упор доченного массива, сформированного из элементов первого и второго массивов. Кроме того, оба признака поступают на входы дешифратора 4, который при этом формирует на выходе единичный потенциал, поступающий на вход блока,5, который измен ет адрес на своем первом выходе и формирует на своем четвертом выходе управл ющий импульс, который поступает на первый управл ющий вход первого блока 7 пам ти, второй управл ющий вход второго блока 3 пам ти и второй управл ющий вход буферного блока 11 пам ти.As a result of the arrival of two signs of the end of the array to the inputs of the comparison unit 8, one of them is written to the buffer block 11 of the memory and becomes a sign of the end of the ordered array formed from the elements of the first and second arrays. In addition, both signs are fed to the inputs of the decoder 4, which at the same time forms the unit potential at the output of the unit, 5, which changes the address at its first output and generates a control pulse at its fourth output, which is fed to the first control the input input of the first memory unit 7, the second control input of the second memory unit 3 and the second control input of the buffer memory unit 11.

При этом его содержимое записываетс  в первый блок 7 пам ти, а во второй блок 3 пам ти через коммутатор 2 записываетс  следующий упор дочиваемый массив из блока 1 пам ти входных массивов, адрес которого поступает на вход коммутатора 2 с первого выхода блока 5..In this case, its contents are recorded in the first memory block 7, and in the second memory block 3, through the switch 2, the next ordered array from the memory block 1 of the input arrays is written, the address of which arrives at the input of the switch 2 from the first output of block 5 ..

Описанный процесс упор дочивани  повтор етс  до тех пор, пока не будут отработаны все массивы из блока 1 пам ти входных массивов. После этого на втором выходе блока 5 по вл етс  единичный импульс , который поступает на управл ющий вход выходного блока 12 пам ти, и в выходной блок 12 пам ти из буферного блока 11 пам ти.записываетс  результирующий упор доченный массив.The described sequencing process is repeated until all arrays from block 1 of the input arrays memory are processed. After that, a single pulse appears at the second output of block 5, which is fed to the control input of the output memory block 12, and to the output memory block 12 from the buffer memory block 11. The resulting ordered array is written.

Claims (2)

1. Устройство дл  сортировки чисел, содержащее первый блок пам ти блок сравнени , коммутатор и первый элемент И, причем выходы первого блока пам ти соединены с входами первой группы блока сравнени , выход Меньше которого подключен к первому входу первого элемента1. A device for sorting numbers containing the first memory unit, the comparison unit, the switch and the first element And, and the outputs of the first memory unit are connected to the inputs of the first group of the comparison unit, the Less of which is connected to the first input of the first element И, отличающеес  тем. что. с целью расширени  функциональных возможностей за счет возможности сортировки чисел в едином массиве из исходных массивов не 5 равных объемов, в него введены второй блок пам ти, буферный блок пам ти, выходной блок пам ти, блок подсчета массивов, две группы элементов И, группа элементов ИЛИ, второй элемент И. дешифратор и блокAnd, different in that. what. in order to expand the functionality due to the possibility of sorting numbers in a single array from the source arrays of not 5 equal volumes, a second memory block, a buffer memory block, an output memory block, an array counting block, two groups of AND elements, a group of elements are introduced into it OR, second element I. decoder and block 10 пам ти входных массивов, выходы которого соединены с информационными входами коммутатора, адресные входы которого соединены с информационными выходами блока подсчета массивов, а выходы соединены10 memory of input arrays, the outputs of which are connected to the information inputs of the switch, the address inputs of which are connected to the information outputs of the block of counting arrays, and the outputs are connected 15 с информационными входами второго блока пам ти, выходы которого соединены с входами второй группы блока сравнени , входы первой и второй групп блока сравнени  объединены с соответствующими15 with information inputs of the second memory block, the outputs of which are connected to the inputs of the second group of the comparison block, the inputs of the first and second groups of the comparison block are combined with the corresponding 0 входами первой и второй групп дешифратора и с информационными входами элементов И соответственно первой и второй групп, управл ющие входы которых соединены соответственно с выходами Мень5 ше и больше блока сравнени , а выходы соединены с соответствующими первыми и вторыми.входами элементов ИЛИ группы , выходы которых соединены с информа- ционными входами буферного блока0 inputs of the first and second groups of the decoder and with the information inputs of the elements AND, respectively, of the first and second groups, the control inputs of which are connected respectively to the outputs of Less than 5 and more of the comparison unit, and the outputs are connected to the corresponding first and second inputs of the elements OR groups, the outputs of which connected to the information inputs of the buffer block 0 пам ти, выходы которого соединены с информационными входами первого блока пам ти и выходного блока пам ти,.вход записи которого соединен с выходом результата блока подсчета массивов, информационные0 memory, the outputs of which are connected to the information inputs of the first memory block and the output memory block, the recording input of which is connected to the output of the result of the block of counting arrays, information 5 входы которого  вл ютс  входами числа массивов устройства, § вход запуска - входом запуска устройства, выход Больше блока сравнени  соединен с первым входом второго элемента И, второй вход которого5 inputs of which are inputs of the number of arrays of the device, § start input - input of the device start, output More than the comparison unit is connected to the first input of the second element And, the second input of which 0 соединён с тактовым выходом блока подсчета массивов, входом записи буферного блока пам ти и вторым входом первого элемента И. выходы первого и второго элементов И соединены с входами сдвига соот5 ветственно первого и второго блоков пам ти, входы записи которых и вход считывани  буферного блока пам ти соединены с выходом разрешени  записи блока подсчета массивов, вход приращени  адреса кото0 рого соединен с выходом дешифратора.0 is connected to the clock output of the block for counting arrays, the recording input of the buffer memory block, and the second input of the first element I. The outputs of the first and second elements And are connected to the shift inputs, respectively, of the first and second memory blocks, the recording inputs of which and the read input of the buffer memory block These are connected to the write enable output of the array counting unit, the address increment input of which is connected to the output of the decoder. 2. Устройство по п. 1.отличающее2. The device according to p. 1. distinguishing с   тем. что блок подсчета массивов содер жит генератор тактовых импульсов, регистр,with that. that the block of counting arrays contains a clock generator, a register, одновибратор. схему сравнени , счетчик,single vibrator. comparison circuit, counter, 5 ; элементы ИЛИ и задержки, причем вход запуска блока соединен с входом запуска генератора тактовых импульсов, входом сброса счетчика, записи регистра и первым входом элемента ИЛИ, второй вход которого  вл етс  входом приращени  адреса блока . а выход соединен с входом одновибра- тора, выход которого  вл етс  выходом разрешени  записи блока и подключен к счетному входу счетчика и через элемент задержки к входу разрешени  счета счетчике , выходы разр дов которого  вл ютс  информационными выходами блока и входами первой группы схемы сравнени , входы второй группы которого соединены с выходами регистра, информационные входы которого  вл ютс  информационными входами блока , выход схемы сравнени   вл етс  выходом результата блока и подключен к входу останова генератора тактовых импульсов, выход которого  вл етс  тактовым выходом блока.5 ; OR elements and delays, wherein the start input of the block is connected to the start input of the clock, the counter reset input, a register entry and the first input of the OR element, the second input of which is the increment input of the block address. and the output is connected to the input of the one-shot, the output of which is the output of the block recording enable and connected to the counter input of the counter and through the delay element to the counter resolution input of the counter, the bit outputs of which are the information outputs of the block and the inputs of the first group of the comparison circuit, the inputs the second group of which is connected to the outputs of the register, the information inputs of which are the information inputs of the block, the output of the comparison circuit is the output of the result of the block and is connected to the stop input of the clock generator x pulses, the output of which is the output of the clock. Фиг,. 2Fig. 2
SU904860073A 1990-08-14 1990-08-14 Appliance for sorting of numbers RU1835543C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
SU904860073A RU1835543C (en) 1990-08-14 1990-08-14 Appliance for sorting of numbers

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
SU904860073A RU1835543C (en) 1990-08-14 1990-08-14 Appliance for sorting of numbers

Publications (1)

Publication Number Publication Date
RU1835543C true RU1835543C (en) 1993-08-23

Family

ID=21532607

Family Applications (1)

Application Number Title Priority Date Filing Date
SU904860073A RU1835543C (en) 1990-08-14 1990-08-14 Appliance for sorting of numbers

Country Status (1)

Country Link
RU (1) RU1835543C (en)

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Авторское свидетельство СССР № 538358, кл. G 06 F 7/04. 1976. Авторское свидетельство СССР № 881735, кл. G 06 F 7/06, 1979. *

Similar Documents

Publication Publication Date Title
KR880000967A (en) Dual port semiconductor memory
RU1835543C (en) Appliance for sorting of numbers
SU1030797A1 (en) Device for sorting mn-digit numbers
SU1732347A1 (en) Test data generator
SU1339562A1 (en) Data associative loading device
SU1425704A1 (en) Device for compressing vectors
RU2022353C1 (en) Device for determining complement of a set
SU1659998A1 (en) Number sorting device
SU1223222A1 (en) Device for sorting numbers
SU1488802A1 (en) Device for associative loading of data vector of variable format
SU911506A1 (en) Device for ordering data
SU1288705A1 (en) Device for allocating memory resources in computer complex
SU1363184A1 (en) Number grading device
SU1092494A2 (en) Device for sorting numbers
SU1324024A1 (en) Device for information sorting
SU1269128A1 (en) Device for random generation of permutations
SU1649533A1 (en) Numbers sorting device
SU1583934A1 (en) Device for sorting numbers
SU1716536A1 (en) Device for multiplying matrices
RU1795471C (en) Fast transform processor
SU1606972A1 (en) Device for sorting data
SU1161944A1 (en) Device for modifying memory area address when debugging programs
SU1596335A1 (en) Device for shaping control code by modulo two
SU798810A1 (en) Device for comparing code weights
SU1656567A1 (en) Pattern recognition device