SU1304015A1 - Device for sorting numbers - Google Patents
Device for sorting numbers Download PDFInfo
- Publication number
- SU1304015A1 SU1304015A1 SU853889399A SU3889399A SU1304015A1 SU 1304015 A1 SU1304015 A1 SU 1304015A1 SU 853889399 A SU853889399 A SU 853889399A SU 3889399 A SU3889399 A SU 3889399A SU 1304015 A1 SU1304015 A1 SU 1304015A1
- Authority
- SU
- USSR - Soviet Union
- Prior art keywords
- register
- input
- control unit
- address
- outputs
- Prior art date
Links
Landscapes
- Complex Calculations (AREA)
Abstract
Изобретение относитс к вычислительной технике. Цель изобретени - расширение функциональных возможностей за счет обеспечени возможности подсчета количества чисел, удовлетвор ющих критерию равно, больше, меньше не больше и не меньше. Устройство содержит блоки пам ти (БП) , регистр,арифметико-логический блок (АЛБ) и блок управлени (БУ),который обеспечивает микропрограммное управление блоками устройства.В каждой чейке первого БП накапливаетс количество чисел в массиве, равных адресу этой чейки, дл чего при поступлении очередного 1-го числа а,- из БП считываетс записанное по адресу а число, к нему прибавл етс единица и затем оно записьшаетс по тому же адресу. Дл сортировки чисел по критерию больше (меньше) или не больше (не меньше) подсчитываетс сумма чисел, наход щихс в чейках с адресами от заданных А до включительно . Сложение выполн етс АЛБ, результат записываетс в БП. 1 з.п. ф-лы, 2 ил. с $ (Л 00 о 4The invention relates to computing. The purpose of the invention is to expand the functionality by providing the ability to count the number of numbers that satisfy the criteria of equal, more, less, no more and no less. The device contains memory blocks (PSUs), a register, an arithmetic logic unit (ALB) and a control unit (CU), which provides firmware control of the device blocks. In each cell of the first PSU, the number of numbers in the array is equal to the address of this cell, for which upon receipt of the next 1 st day a, - the number recorded at the address a is read from the power supply unit, a unit is added to it and then it is written to the same address. To sort the numbers by the criterion more (less) or not more (not less), the sum of the numbers in the cells with addresses from the specified A to inclusive is calculated. Addition is performed by the ALB, the result is recorded in the PSU. 1 hp f-ly, 2 ill. with $ (L 00 about 4
Description
Изобретение относитс к вычислительной технике и может быть использовано в специализированных вычислительных машинах, устройствах обработки данных и устройствах сортировки информации.The invention relates to computing and can be used in specialized computers, data processing devices and information sorting devices.
Цель изобретени - расширение функциональных возможностей за счет обеспечени возможности подсчета количества чисел, удовлетвор ющих критерию равно, больше, меньше.The purpose of the invention is to expand the functionality by providing the ability to count the number of numbers that satisfy the criterion equal, more, less.
не больше и не меньше.no more and no less.
На фиг. 1 представлена схема предлагаемого устройства; на фиг. 2 - схема блока управлени .FIG. 1 shows the scheme of the proposed device; in fig. 2 is a control block diagram.
Устройство дл сортировки чисел содержит блоки пам ти 1, 2, регистр 3, арифметико-логический блок 4, бло.к 5 управлени , шину 6 входа-выхода , тактовый вход 7.The device for sorting numbers contains memory blocks 1, 2, register 3, arithmetic logic unit 4, control unit 5, bus 6 input-output, clock input 7.
Блок управлени содержит счетчик 8 длины массива, регистр 9 состо ний , мультиплектор 10, регистр 11 адреса микрокоманды, ПЗУ 12, регистр 13 микрокоманд, формирователь 14 им- пульсов, информационный вход 15, тактовый вход 16, вход Ошибка 17, выходы 18-21 управлени регистром, первым , вторым блоком пам ти и арифметико-логическим блоком соответственно. 30 торых выполн етс усл овие А i а ,The control unit contains an array length counter 8, a state register 9, a multiplexer 10, a microcommand address register 11, a ROM 12, a microcommand register 13, a pulse driver 14, an information input 15, a clock input 16, an input 17, outputs 18-21 controlling the register, the first, the second memory block and the arithmetic logic unit, respectively. On the 30th, condition A i a,
поступают числа, сопровождаемые тактовыми сигналами по входу 7. Те же тактовые сигналы через формирователь 14 импульсов обеспечивают выборкуnumbers follow the clock signals on input 7. The same clock signals through the driver of 14 pulses provide sampling
очередной микрокоманды из ПЗУ 12. . Каждое вновь поступающее i-e число а- поступает на адресные входы блока пам ти 2. Код, считанньй по адресу, складываетс арифметико-логическим regular microcommands from ROM 12.. Each newly arriving i-e number a- arrives at the address inputs of memory block 2. The code read at the address is added arithmetic-logic
Ш блоком 4 с числом 1 или любым другим числом, назьгеаемым коэффициентом масштабировани , хран щимс в одной из чеек блока пам ти 1, и вновь записываетс в блок пам ти 2 по томуA block 4 with the number 1 or any other number, called a scaling factor, stored in one of the cells of the memory block 1, is again written into the memory block 2 through the volume.
t5 же адресу а j,t5 same address a j,
Таким образом, после приема всего массива (что фиксируетс по влением нул в счетчике 8 длины массива, содержимое которого уменьшаетс с каж20 дым приходом нового числа), по адресу а, (а 1,2 ... М, где М - емкость блока пам ти 1) будет находитьс количество в массиве чисел, равных а . На этом подсчет и сортировка чисел по критерию равно заканчиваетс .Thus, after receiving the entire array (which is recorded by the appearance of a zero in the counter 8 of the array length, the content of which decreases with each arrival of a new number), at address a, (and 1.2 ... M, where M is the capacity of ti 1) there will be a number in the array of numbers equal to a. This is where the counting and sorting of numbers according to the criterion equally ends.
Дл подсчета количества чисел, удовлетвор ющих критерию не большеTo count the number of numbers that satisfy the criterion of not more than
или не меньше, т.е. таких, дл ко- или а- Аor not less, i.e. such for ko- or a-a
макс.Max.
необходимо выполнитьneed to perform
Устройство дл сортировки чисел позвол ет производить подсчет количества чисел, равных заданному, меньше .(больше) заданного и не меньших (не больших) заданного. Управление работой устройства выполн етс микропрограммно: очередна микрокоманда выбираетс из ПЗУ 12 по адресу, определ емому содержимым регистра 11 адреса микрокоманды, и помещаетс в регистр 13 микрокоманды. Содержимое определенных разр дов регистра 13 поступает на адресные входы блока пам ти 1 и входы управлени блоком пам ти 2, регистра 3 и арифметико- логического блока 4.The device for sorting numbers allows counting the number of numbers equal to a given one, less than (more) than specified and not smaller (not larger) than given. The operation of the device is controlled by the firmware: the next micro-command is selected from the ROM 12 at the address determined by the contents of the micro-command address register 11, and placed in the micro-command register 13. The contents of certain bits of the register 13 are fed to the address inputs of memory block 1 and the control inputs of memory block 2, register 3, and arithmetic unit 4.
Режим сортировки задаетс по двунаправленной шкале ввода-вывода 6 заданием начального адреса микропрограмм выборки чисел по критерию рав- 50 ваетс в счетчик 8. После этого но, больше, меньше, не больше, происходит сложение содержимого че- не меньше. Этот адрес поступает ек блока пам ти 2, начина с адресаThe sorting mode is set on a bidirectional I / O scale 6 by specifying the starting address of the firmware for sampling numbers according to the criterion is 50 in counter 8. After that, but more, less, not more, the content is added to less than less. This address comes in memory block 2, starting at
мич ° адреса А включительно (всего сложение). Резульсуммирование содержимого всех чеек блока пай ти 2, начина с А и старше, и результат записать в чей- ку А„„, . Последовательно выполнив эту Mitch ° A addresses inclusive (total addition). Resume the contents of all cells of unit 2, starting with A and older, and write the result into cell A, „„,. Do this one by one.
JJ rflflHJj rflflH
операцию дл всех чеек с адресами, не большими, чем А., можно полу-, чить массив, отсортированный по данному критерию.operation for all cells with addresses not larger than A. You can get an array sorted by this criterion.
40 Дл этого определ етс количество циклов этого этапа, дл чего из блока пам ти 1 считываетс код А (например , максимальньш адрес блока пам ти 2, или любой другой, больший,40 To do this, determine the number of cycles of this stage, for which code A is read from memory 1 (for example, the maximum address of memory 2, or any other larger
45 чем А), который поступает без изменений через арифметико-логический блок 4 и в регистр 3, затем из него вычитаетс считанна из блока пам ти 1 величина А.„. , результат записымин45 than A), which arrives unchanged through the arithmetic logic unit 4 and into register 3, then the value A. is read out from it of memory 1, A. ". , the result is recorded
через мультиплексор 10 в регистр 11 адреса микрокоманды. Далее выполн етс прием длины сортируемого массива 55 записываетс по адресу А . в счетчик 8 длины массива, а в чей- Сортировка чисел по критерию ки блока пам ти 1 - рабочих констант, больше и меньше происходит анавеличины которых завис т от режима сортировки. После этого по шине 6through the multiplexer 10 into the register 11 addresses of the microinstruction. The next step is to receive the length of the sorted array 55, written to address A. in the counter 8 are the lengths of the array, and in whose numbers, the sorting by the criterion of the memory block 1, the working constants, more and less of which, the anavelies of which depend on the sort mode. After that on the bus 6
торых выполн етс усл овие А i а ,condition A i a,
поступают числа, сопровождаемые тактовыми сигналами по входу 7. Те же тактовые сигналы через формирователь 14 импульсов обеспечивают выборкуnumbers follow the clock signals on input 7. The same clock signals through the driver of 14 pulses provide sampling
очередной микрокоманды из ПЗУ 12. Каждое вновь поступающее i-e число а- поступает на адресные входы блока пам ти 2. Код, считанньй по адресу, складываетс арифметико-логическимthe next microcommand from the ROM 12. Each newly arriving i-e number a- arrives at the address inputs of the memory block 2. The code read at the address is added arithmetic-logic
блоком 4 с числом 1 или любым другим числом, назьгеаемым коэффициентом масштабировани , хран щимс в одной из чеек блока пам ти 1, и вновь записываетс в блок пам ти 2 по томуa block 4 with the number 1 or any other number called by the scaling factor stored in one of the cells of the memory block 1, and again written into the memory block 2 through the volume
же адресу а j,same address a j,
Таким образом, после приема всего массива (что фиксируетс по влением нул в счетчике 8 длины массива, содержимое которого уменьшаетс с каждым приходом нового числа), по адресу а, (а 1,2 ... М, где М - емкость блока пам ти 1) будет находитьс количество в массиве чисел, равных а . На этом подсчет и сортировка чисел по критерию равно заканчиваетс .Thus, after receiving the entire array (which is recorded by the appearance of zero in the counter 8 of the array length, the content of which decreases with each arrival of the new number), at address a, (and 1.2 ... M, where M is the capacity of the memory block 1) there will be a number in the array of numbers equal to a. This is where the counting and sorting of numbers according to the criterion equally ends.
Дл подсчета количества чисел, удовлетвор ющих критерию не большеTo count the number of numbers that satisfy the criterion of not more than
торых выполн етс усл овие А i а ,condition A i a,
или не меньше, т.е. таких, дл ко 30 торых выполн етс усл овие А i а ,or not less, i.e. those for which condition A i a is fulfilled,
- или а- А- or a- A
макс.Max.
необходимо выполнитьneed to perform
50 ваетс в счетчик 8. После этого происходит сложение содержимого че- ек блока пам ти 2, начина с адреса50 into counter 8. After this, the contents of the memory block 2 are added, starting with the address
суммирование содержимого всех чеек блока пай ти 2, начина с А и старше, и результат записать в чей- ку А„„, . Последовательно выполнив этsummation of the contents of all cells of unit 2, starting with A and older, and writing the result into cell A, „„,. Consistently doing this
JJ rflflHJj rflflH
операцию дл всех чеек с адресами, не большими, чем А., можно полу-, чить массив, отсортированный по данному критерию.operation for all cells with addresses not larger than A. You can get an array sorted by this criterion.
40 Дл этого определ етс количество циклов этого этапа, дл чего из блока пам ти 1 считываетс код А (например , максимальньш адрес блока пам ти 2, или любой другой, больший,40 To do this, determine the number of cycles of this stage, for which code A is read from memory 1 (for example, the maximum address of memory 2, or any other larger
45 чем А), который поступает без изменений через арифметико-логический блок 4 и в регистр 3, затем из него вычитаетс считанна из блока пам ти 1 величина А.„. , результат записымин45 than A), which arrives unchanged through the arithmetic logic unit 4 and into register 3, then the value A. is read out from it of memory 1, A. ". , the result is recorded
логично, однако количество сложений в счетчике 8 задаетс равным (Аlogically, however, the number of additions in the counter 8 is set to (A
-А ) и подсчет выполн етс , нами«-A) and the calculation is performed by us "
доbefore
чина с чейки с адресом от А., А. дл режима больше и чейки с адресом от А до А- дл режима меньше. Результат- записываетс в чейку А |.the rank from a cell with an address from A., A. for a mode is larger and the cell with an address from A to A is for a mode less. The result is written in cell A |.
Claims (2)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
SU853889399A SU1304015A1 (en) | 1985-04-23 | 1985-04-23 | Device for sorting numbers |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
SU853889399A SU1304015A1 (en) | 1985-04-23 | 1985-04-23 | Device for sorting numbers |
Publications (1)
Publication Number | Publication Date |
---|---|
SU1304015A1 true SU1304015A1 (en) | 1987-04-15 |
Family
ID=21174985
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
SU853889399A SU1304015A1 (en) | 1985-04-23 | 1985-04-23 | Device for sorting numbers |
Country Status (1)
Country | Link |
---|---|
SU (1) | SU1304015A1 (en) |
-
1985
- 1985-04-23 SU SU853889399A patent/SU1304015A1/en active
Non-Patent Citations (1)
Title |
---|
Авторское свидетельство СССР . № 1183956, кл. G 06 F 7/06, 1984. Авторское свидетельство СССР №1183957, кл. G 06 F 7/06, 1984. * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US4490786A (en) | Vector processing unit | |
US4733346A (en) | Data processor with multiple register blocks | |
EP0286356A2 (en) | Stack with unary encoded stack pointer | |
US3166715A (en) | Asynchronous self controlled shift register | |
US5019969A (en) | Computer system for directly transferring vactor elements from register to register using a single instruction | |
SU1304015A1 (en) | Device for sorting numbers | |
US3214736A (en) | Magnetic tape scan with field selection | |
EP0012242B1 (en) | Digital data processor for word and character oriented processing | |
US5001629A (en) | Central processing unit with improved stack register operation | |
SU1026164A1 (en) | Push-down storage | |
JPH05113929A (en) | Microcomputer | |
US4764895A (en) | Data processor for changing the sequential format of inputted records | |
SU911506A1 (en) | Device for ordering data | |
SU1290296A1 (en) | Device for sorting numbers | |
SU978196A1 (en) | Associative memory device | |
JPS575153A (en) | Information processor | |
SU943731A1 (en) | Device for code sequence analysis | |
SU1339653A1 (en) | Memory | |
SU1531160A1 (en) | Memory unit | |
SU1594521A1 (en) | Number sorting device | |
SU1472909A1 (en) | Dynamic addressing memory | |
SU788173A1 (en) | Working storage | |
SU1026163A1 (en) | Information writing/readout control device | |
SU1163358A1 (en) | Buffer storage | |
SU881863A1 (en) | Stack-type storage |