SU1304015A1 - Device for sorting numbers - Google Patents

Device for sorting numbers Download PDF

Info

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
Application number
SU853889399A
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 SU853889399A priority Critical patent/SU1304015A1/en
Application granted granted Critical
Publication of SU1304015A1 publication Critical patent/SU1304015A1/en

Links

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)

1. Устройство дл  сортировки чи- сел, содержащее два блока пам ти, регистр и блок управлени , причем выходы управлени  первым -блоком пам ти блока управлени  соединены с адрес- ньми входами и входами управлени  ре жимом первого блока пам ти, отличающеес  тем, что, с целью расширени  функциональных возможностей за счет обеспечени - возможности подсчета количества чисел, удовлет- вор ющих критерию равно, больше, меньше, не больше, не меньше, в него введен арифметико-логический блок, причем информационна  шина вво да-вьшода устройства подключена к выходу арифметико-логического блока, входу адреса и данных второго блока пам ти, информационным входаг регистра , первого блока пам ти и блока управлени , тактовый вход которого  в- л етс  тактовым входом устройства, выходы управлени  регистром, вторым блоком пам ти и арифметико-логически блоком блока управлени  соединены соответственно с входами разрешени  записи регистра, входом выбора режима второго блока пам ти и входом задани  операции арифметико-логического блока, первый информационный вход которого подключен к выходу первого блька пам ти, а одноименные выходы второго блока пам ти и регистра объединены и подключены к второму информационному входу арифметико-логического блока, выход переполнени  1. A device for sorting the numbers, comprising two memory blocks, a register and a control unit, wherein the control outputs of the first memory block of the control unit are connected to the address inputs and control inputs of the mode of the first memory block, characterized in that in order to expand the functionality by providing the possibility of counting the number of numbers that satisfy the criterion is equal to, more, less, not more, not less, an arithmetic logic unit is entered into it, and the information bus of the device connected The output of the arithmetic logic unit, the address and data input of the second memory block, the information input of the register, the first memory block and the control unit, the clock input of which is the clock input of the device, the outputs of the register control, the second memory block and the arithmetic - logically, the control unit block is connected respectively to the register recording resolution inputs, the mode selection input of the second memory block and the input of the operation task of the arithmetic logic unit, the first information input of which is connected to the output n the first- blka memory and outputs the same name of the second block memory and registers are combined and connected to the second data input of the arithmetic logic unit, the overflow outlet ,  , 10 )5 20 - 25 30 .j 40 4510) 5 20 - 25 30 .j 40 45 которого соединен с входом Ошибка блока управлени .which is connected to the input Error of the control unit. 2. Устройство ПОП.1, отличающеес  тем, что блок управлени  содержит счетчик длины массива , регистр состо ний, мультиплексор , регистр адреса микрокоманды, посто нное запоминающее устройство, регистр микрокоманды и формирователь синхроимпульсов, причем информацион- ньй вход блока управлени  соединен с первым информационным входом мультиплексора и информационным входом счетчика длины массива, выходы разр дов которого соединены с группой информационных входов регистра состо ний , выходы которого соединены с вторым информационным входом мульти- алексора, выход которого соединен с информационным входом регистра адреса микрокомандь:, выход которого соединен с адресным входом посто нного запоминающего устройства, перва  и втора  группы выходов которого соединены соответственно с третьим информационным входом мультиплексора и с информационным входом регистра микрокоманд , выходы соответ.ствукщих разр дов которого  вл ютс  соответственно выходами управлени  регистром, первого и второго блоков пам ти и ари(|ме- тико-логического блока управлени , а также «Соединены с входами управлени  формирователем синхроимпульсов, мультиплексора , счетчика длины массива и регистра состо ний, информационный вход которого  вл етс  входом Ошибка блока управлени , выход формировател  синхроимпульсов соединен с входами синхронизации регистра адреса микрокоманды и регистра микрокоманд, тактовый вход блока управлени  соединен с тактовым входом формировател  синхроимпульсов. 2. Device POP.1, characterized in that the control unit contains an array length counter, a status register, a multiplexer, a microcommand address register, a persistent storage, a microcommand register and a sync pulse generator, the information input of the control unit being connected to the first information the multiplexer input and information input of the array length counter, the bit outputs of which are connected to the group of information inputs of the status register, the outputs of which are connected to the second information input m multi-alexor, the output of which is connected to the information input of the address register of the micro-command: whose output is connected to the address input of the permanent storage device, the first and second groups of outputs of which are connected respectively to the third information input of the micro-commands, the outputs respectively. the leading bits of which are, respectively, the outputs of the control register, the first and second blocks of memory and ari (| the logic control unit, as well as the "connected to the control inputs of the sync pulse generator, multiplexer, array length counter and status register, whose information input is the input of the control unit error, the output of the sync pulse generator is connected to the synchronization inputs of the micro-address register and the micro-register register, the clock input of the control unit is connected to the clock input of the sync pulse generator. Составитель В. Горохов Редактор М. Бандура Техред М.Ходанич Корректор А. ЗимокосовCompiled by V. Gorokhov Editor M. Bandura Tehred M. Khodanich Proofreader A. Zimokosov Заказ 1312/49 Тираж 673ПодписноеOrder 1312/49 Circulation 673 Subscription ВНИИПИ Государственного комитета СССРVNIIPI USSR State Committee по делам изобретений и открытий 113035, Москва, Ж-35, Раушска  наб., д. 4/5for inventions and discoveries 113035, Moscow, Zh-35, Raushsk nab., 4/5 Производственно-полиграфическое предпри тие, г. Ужгород, ул. Проектна , 4Production and printing company, Uzhgorod, st. Project, 4
SU853889399A 1985-04-23 1985-04-23 Device for sorting numbers SU1304015A1 (en)

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)

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
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
US4888741A (en) Memory with cache register interface structure
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
EP0012242B1 (en) Digital data processor for word and character oriented processing
US3214736A (en) Magnetic tape scan with field selection
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
SU943731A1 (en) Device for code sequence analysis
SU1339653A1 (en) Memory
SU1531160A1 (en) Memory unit
SU1594521A1 (en) Number sorting device
SU1339562A1 (en) Data associative loading device
SU1472909A1 (en) Dynamic addressing memory
SU788173A1 (en) Working storage
SU1026163A1 (en) Information writing/readout control device
SU881863A1 (en) Stack-type storage
SU896623A1 (en) Device for control of conveyer computing device