SU1136149A1 - Device for determining difference of two numbers - Google Patents

Device for determining difference of two numbers Download PDF

Info

Publication number
SU1136149A1
SU1136149A1 SU833594633A SU3594633A SU1136149A1 SU 1136149 A1 SU1136149 A1 SU 1136149A1 SU 833594633 A SU833594633 A SU 833594633A SU 3594633 A SU3594633 A SU 3594633A SU 1136149 A1 SU1136149 A1 SU 1136149A1
Authority
SU
USSR - Soviet Union
Prior art keywords
output
input
elements
inputs
counter
Prior art date
Application number
SU833594633A
Other languages
Russian (ru)
Inventor
Валерий Михайлович Кирьянов
Александр Владимирович Копылов
Сергей Александрович Щербаков
Original Assignee
Предприятие П/Я А-1001
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 Предприятие П/Я А-1001 filed Critical Предприятие П/Я А-1001
Priority to SU833594633A priority Critical patent/SU1136149A1/en
Application granted granted Critical
Publication of SU1136149A1 publication Critical patent/SU1136149A1/en

Links

Landscapes

  • Manipulation Of Pulses (AREA)

Abstract

УСТРОЙСТВО ДЛЯ ОПРЕДЕЛЕНИЯ РАЗНОСТИ ДВУХ ЧИСЕЛ, содержащее первый и второй счетчики, первый и второй триггеры, генератор импульсов, элементы И с первого по третий и первый элемент ИЛИ, причем выход генератора импульсов соединен с первым входом первого элемента И, второй вход которого подключен к нулевому выходу первого триггера, выход первого элемента И соединен со счетными входами первого и второго счетчиков , нулевые входы первого и второго триггеров соединены с установочным входом устройства, выход п-го разр да, где п- разр дность вычитаемых чисел, второго счетчика соединен с первым входом второго элемента И, отличающеес  тем, что, с целью повышени  быстродействи  и расширени  области применени  путем осуществлени  выдачи результата в параллельном коде, оно дополнительно содержит первзпо и вторую группы по п элементов И, элементы И с четвертого по дев тый, элемен-ты ЮШ с второго по шестой, схему сравнени  и элемент НЕ, причем выходы разр дов первого счетчика соединены с первыми входами соответствующих элементов И первой группы, выходы которых соединены с разр дами первого информационного выхода устройства , выходы разр дов второго счетчика соединены с первыми входами соответствующих элементов И второй группы, выходы которых соединены с разр дами второго информационного выхода устройства, выходы п-х разр дов первого и второго счетчиков соединены с соответству1рщими входами схемы сравнени , выход которой соединен с первым входом четвертого элемента И, с первыми входами второго и третьего элементов ИЛИ и через элемент НЕ - с вторым входом второго элемента И, с первым входом третьего (Л элемента И, с первыми входами п того , шестого и седьмого элементов И, вторые входы элементов И первой группы соединены с первым входом первого элемента ИЛИ, с вторыми входами четвертого, шестого и седьмого элементов И, с первым входом восьмого элемента И и с выходом (м-1)-го оо разр да .второго счетчика, второй О5 вход первого элемента ИЛИ соединен с вторыми входами элементов И втоJ рой группы, с третьими входами четсс вертого и седьмого элементов И, с вторым входом п того элемента И, с первым входом дев того элемента И и с выходом (n-l)-ro разр да первого счетчика, выход первого эле мента ШШ подключен к счетному входу второго триггера, единичный выход . которого соединен с первыми входами четвертого и п того элементов ШШ, выход второго элемента И соединен с вторым входом второго; элемента ИЛИ, второй вход третьего элемента И соеA DEVICE FOR DETERMINING A DIFFERENCE OF TWO NUMBERS containing the first and second counters, the first and second triggers, the pulse generator, AND elements from the first to the third and the first element OR, the output of the pulse generator is connected to the first input of the first element AND, the second input of which is connected to zero the output of the first trigger, the output of the first element I is connected to the counting inputs of the first and second counters, the zero inputs of the first and second triggers are connected to the installation input of the device, the output of the nth digit, where n is the discharge Subtractable numbers, the second counter is connected to the first input of the second element AND, characterized in that, in order to increase speed and expand the scope of application by effecting the output of the result in a parallel code, it additionally contains the first and second groups of n elements And elements with fourth to ninth, the second to sixth elements of the second, sixth, the comparison circuit and the element are NOT, and the bits of the first counter are connected to the first inputs of the corresponding elements AND of the first group whose outputs are connected the bits of the first information output of the device, the outputs of the bits of the second counter are connected to the first inputs of the corresponding elements of the second group, the outputs of which are connected to the bits of the second information output of the device, the outputs of the n bits of the first and second counters are connected to the corresponding inputs of the comparison circuit, the output of which is connected to the first input of the fourth element AND, to the first inputs of the second and third elements OR, and through the element NOT to the second input of the second element AND, to the first input the third go (L of the element And, with the first inputs of the fifth, sixth and seventh elements And, the second inputs of the elements of the first group are connected to the first input of the first element OR, to the second inputs of the fourth, sixth and seventh elements And, to the first input of the eighth element And with the output (m-1) of the oo digit of the second counter, the second O5 input of the first element OR is connected to the second inputs of the elements AND of the second group, with the third inputs of the fourth and the seventh elements And, with the first input of the nineth element And with the output ( n-l) -ro bit of the first counter, the output of the first element SH is connected to the counting input of the second trigger, the single output. which is connected to the first inputs of the fourth and fifth elements of the SHS, the output of the second element And is connected to the second input of the second; element OR, the second input of the third element AND soy

Description

дннен с третьим входом шестого элемента И и подключен к выходу h-ro разр да первого счетчика, выход третьего элемента И соединен с вторым входом третьего элемента ИЛИ, выход которого подключен к второму входу восьмого элемента И, выход которого соединен с выходом признака положительной разности устройства, выход второго элемента ИЛИ подключен к второму входу дев того элемента И выход которого соединен с выходом признака отрицательной разности устройства, выход четвертого элемента И подключен к первому входу шесто го элемента ИЛИ и к выходу признака равенства чисел устройства, третий вход п того элемента И соединен с первым входом второго элемента И, а выход соединен с вторым входом п того элемента ИЛИ, третий вход которого подключен к выходу шестого элемента И, выход седьмого элемента И соединен с вторым входом четвертого элемента ИЛИ, выход которого соединен с третьими входами п-х элементов И первой и второй групп, четвертйе входы которых подключены к выходу элемента НЕ, выход п того элемента ИЛИ соединен с третьими входами восьмого и дев того элементов И, с вторым входом шестого элемента ИЛИ и с третьими входами элементов И с первого по(п- 1)-й первой и второй групп, выход шестого элемента ИЛИ подключен к счетному входу первого триггера.is connected to the third input of the sixth And element and connected to the output of the h-ro bit of the first counter, the output of the third element And is connected to the second input of the third OR element, the output of which is connected to the second input of the eighth And element, the output of which is connected to the output of the positive difference sign of the device , the output of the second element OR is connected to the second input of the ninth element AND the output of which is connected to the output of the sign of a negative device difference, the output of the fourth element AND is connected to the first input of the sixth element OR and to you One sign of equality of device numbers, the third input of the fifth element AND is connected to the first input of the second element AND, and the output is connected to the second input of the fifth OR element, the third input of which is connected to the output of the sixth element And, the output of the seventh element And is connected to the second input of the fourth the OR element, the output of which is connected to the third inputs of the x elements of the first and second groups, the fourth inputs of which are connected to the output of the element NOT, the output of the fifth element OR is connected to the third inputs of the eighth and ninth elements AND, from the second input of the sixth OR gate and to the third inputs of AND gates of the first to (n-1) -th first and second groups, the yield of the sixth OR gate is connected to the counting input of the first flip-flop.

Изобретение относитс  к вычислительной технике и может быть использовано в устройствах обработки цифровой информации, в устройствах контрол  и измерительных устройствах. The invention relates to computing and can be used in digital information processing devices, control devices and measuring devices.

Известно устройство дл  определени  разности двух чисел, содержащее генератор импульсов,, первьй и второй счетчики, элементы И, ИЛИ и триггеры 1 ,A device for determining the difference of two numbers is known, comprising a pulse generator, first and second counters, AND, OR, and triggers 1,

Однако устройство обладает невысоким быстродействием, так как в нем используетс  метод полного заполнени  счетчиков тактовой частотой без использовани  алгоритма ускоренного заполнени ,However, the device has a low speed, because it uses the method of completely filling the counters with a clock frequency without using the accelerated filling algorithm,

Наиболее близким к изобретению по технической сущности  вл етс  устройство дл  определени  разности двух чисел, содержащее первый и второй счетчики, первый и второй триггеры , генератор импульсов, элементы И с первого по третий и первый элемент ИЛИ, причем выход генератора импульсов соединен с первым входом первого элемента И, второй вход которого подключен к нулевому входу первого триггера, выход первого элемента И соединен со счетным входом первого и второго счетчиков, нулевые входы первого и второго триггеров соединены с установочным входом устройства , выход h-го разр да, где п- разность вычитаемых чисел, второго счетчика соединен с первым входом второго элемента И, содержит также третий триггер и дополнительный счетчик 2j.The closest to the invention to the technical essence is a device for determining the difference of two numbers, containing the first and second counters, the first and second triggers, the pulse generator, the elements from the first to the third and the first element OR, and the output of the pulse generator is connected to the first input of the first element I, the second input of which is connected to the zero input of the first trigger, the output of the first element I is connected to the counting input of the first and second counters, zero inputs of the first and second triggers are connected to the set the input of the device, the output of the hth digit, where n is the difference of the subtracted numbers, the second counter is connected to the first input of the second element I, also contains the third trigger and the additional counter 2j.

Недостатками известного устройства  вл ютс  невысокое быстродействие объ сн емое необходимостью заполнени  всех разр дов счетчиков при выполнении вычитани , а также узка  область применени  из-за того, что устройство не обеспечивает выдачи результата в параллельном коде.The disadvantages of the known device are low speed due to the need to fill all the bits of the counters when performing subtraction, as well as the narrow scope due to the fact that the device does not provide the output of the result in parallel code.

Цель изобретени  - повьш1ение быстродействи  устройства дл  определени  разности двух чисел и расширение области применени  путем осуществлени  выдачи результата в параллельном коде.The purpose of the invention is to increase the speed of the device for determining the difference of two numbers and expanding the scope by implementing the output of the result in a parallel code.

Поставленна  цель достигаетс  тем что устройство дл  определени  разности двух чисел, содержащее первый и второй счетчики, первый и второй триггеры, генератор импульсов, элементы И с первого по третий и первый элемент ИЛИ, причем.выход генератора импульсов соединен с первым входом первого элемента И, второй вход которого подключен к нулевому выходу первого триггера, выход первого элемента И соединен со счетным 3 входом первого и второго счетчиков, рулевые входы первого и второго триггеров соединены с установочным входом устройства, выход п-го разр да , где п - разр дность вычитаемьгх чисел, второго счетчика соеди нен с первым входом :.второго элемента И, дополнительно содержит первую и вторую группы по h элементов И, элементы И с четвертого по дев тый, элементы ИЛИ с второго по шестой, схему сравнени  и элемент НЕ, причем выходы разр дов первого счетчика соединены с первыми входами соответствующих элементов И первой группы, выходы которых соединены с разр дами первого информационного выхода устройства, выходы разр дов второго счетчика соединены с первыми входами соответствующих элементов И второй группы, выходы которых соединены с разр дами второго информационного выхода устройства, выходы ,п-х разр дов первого и второго счетчиков сое динены с соответствующими входами схемы сравнени , выход которой соеди нен с первым входом четвертого элемента И, с первыми входами второго и третьего элементов ИЛИ и через эле мент НЕ - с вторым входом второго элемента И, с первым входом третьег элемента И, с первыми входами п того шестого и седьмого элементов И, вторые входы элементов И первой груп пы соединены с первым входом первог . элемента ИЛИ, с вторыми входами чет вертого, шестого и седьмого элементов И, с первым входом восьмого элемента И и с выходом (п-1)-го разр да второго счетчика, второй вход первого элемента ИЛИ соединен с вторыми входами элементов И второй группы, с третьими входами четвертого и седьмого элементов И, с вторым входом п того элемента И, с первым входом дев того элемента И и с выходом ()-го разр да первого счетчика, выход первого элемента ИЛИ подключен к счетному входу второго триггера, единичный выход которого соединен с первыми входами четверто го и питого элементов ИЛИ, выход .второго элемента И соединен с вторым входом второго элемента ИЛИ, аторой вход третьего элемента И соединен с третьим входом шестого элемента И и подключен к выходу h-го разр да первого счетчика, выход третьего А9 4 элемента И соединен с вторым входом третьего элемента ИЛИ, выход которого подключен к второму входу восьмого элемента И, выход которого соединен с выходом признака положительной разности устройства, выход BToporo элемента ИЛИ-пoдкJШчeн к второму входу дев того элемента И, выход которого соединен с выходом признака отрицательной разности устройства , выход четвертого элемента И подключен к первому входу шестого элемента ИЛИ и к выходу признака равенства чисел устройства, третий вход п того элемента И соединен с первым входом второго элемента И, а выход соединен с вторым входом п того элемента ИЛИ, третий вход которого подключен к выходу шестого эле- мента И, выход седьмого элемента И соединен с вторым входом четвертого элемента ИЛИ, выход которого соединен с третьими входами ri -х элементов И первой и второй групп, четвертые входы которых подключены к выходу элемента НЕ, выход п того элемента ИЛИ соединен с .третьими входами восьмого и дев того элементов И, с вторым входом шестого элемента ИЛИ и с третьими входами элементов И с первого по (п-1)-й первой и второй групп, выход шестого элемента ИЛИ подключен к счетноьту входу первого триггера. На чертеже представлена структурна  схема устройства дл  определени  разности двух чисел. Устройство содержит счетчики 1 и 2, генератор 3 импульсов, элемент И 4, элемент ИЛИ 5, триггеры 6 и 7, группы элементов И 8 и 9, элементы И 10 - 17, элементы ИЛИ 18 - . 22, схему 23 сравнени , элемент НЕ 2А, установочный вход 25, первый и второй информационные выходы 26 и 27, выход 28 признака равенства чисел, выход 29 признака отрицательной разности и выход 30 признака положительной разности. Первый разр д счетчиков 1 и 2 считаетс  младшим, а Г1-Й - старшим. Устройство работает следующим образом. В первый счетчик 1 записываетс  число А (уменьшаемое), а во второй счетчик 2 число В (вычитаемое).На установочньй вход 25 устройства подаетс  импульс, устанавливающий первый 6 и второй 7 триггеры в нулевое состо ние. Сигнал с нулевого выхода триггера 6 поступает на вход элeмeн та 4 и разрешает прохождение импульсов с генератора 3 на счетные входы счетчиков 1 и 2. Исходное состо ние первого триггера 6 преп тствует прохождению импульсов с генератора 3 через элемент И 4, Импульсы генератора 3 заполн ют первый 1 и второй 2 счетчики, начина  с младших (первых)The goal is achieved by the fact that a device for determining the difference of two numbers, containing the first and second counters, the first and second triggers, the pulse generator, the first to third elements and the first OR element, and the output of the pulse generator is connected to the first input of the first And element, the second input of which is connected to the zero output of the first trigger, the output of the first element I is connected to the counting 3 input of the first and second counters, the steering inputs of the first and second triggers are connected to the installation input of the device, you one n-th bit, where n is the width of the subtracting numbers, the second counter is connected to the first input: the second element AND, additionally contains the first and second groups of h elements AND, the elements AND from the fourth to the ninth, the elements OR with second to sixth, the comparison circuit and the element is NOT, the outputs of the bits of the first counter are connected to the first inputs of the corresponding elements AND of the first group, the outputs of which are connected to the bits of the first information output of the device, the outputs of the bits of the second counter are connected to the first inputs of And the second group of outputs, the outputs of which are connected to the bits of the second information output of the device, the outputs, the nth bits of the first and second counters are connected to the corresponding inputs of the comparison circuit, the output of which is connected to the first input of the fourth element I, to the first inputs the second and third OR elements and through the NOT element - with the second input of the second element AND, with the first input of the third element AND, with the first inputs of the fifth sixth and seventh elements AND, the second inputs of the elements AND of the first group are connected with the first m entrance first. the OR element, with the second inputs of the fourth, sixth and seventh And elements, with the first input of the eighth And element and with the output of the (n-1) -th bit of the second counter, the second input of the first OR element, is connected to the second inputs of the AND elements of the second group, with the third inputs of the fourth and seventh elements And, with the second input of the fifth element And, with the first input of the ninth element And and with the output of the first counter of the first counter, the output of the first element OR is connected to the counting input of the second trigger, whose single output connected to the first entrances quarter of the second element AND connected to the second input of the second element OR, the input of the third element AND is connected to the third input of the sixth element AND and connected to the output of the h-th digit of the first counter, the output of the third A9 4 element And connected with the second input of the third element OR, the output of which is connected to the second input of the eighth element AND, the output of which is connected to the output of the sign of a positive difference of the device, the output BToporo of the element OR junction to the second input of the ninth element AND whose output is connected to the output of the sign of a negative device difference, the output of the fourth element AND is connected to the first input of the sixth element OR and the output of the sign of equality of the device numbers, the third input of the fifth element AND is connected to the first input of the second element AND, and the output is connected to the second input of the fifth element OR, the third input of which is connected to the output of the sixth element AND, the output of the seventh element AND is connected to the second input of the fourth element OR, the output of which is connected to the third inputs of ri –x elements AND of the first and second groups, the fourth inputs to which are connected to the output of the element NOT, the output of the fifth element OR is connected to the third inputs of the eighth and ninth elements AND, with the second input of the sixth element OR and with the third inputs of the elements AND from the first through (n-1) -th first and second groups , the output of the sixth element OR is connected to the counting input of the first trigger. The drawing shows a block diagram of a device for determining the difference of two numbers. The device contains counters 1 and 2, a generator of 3 pulses, element AND 4, element OR 5, triggers 6 and 7, groups of elements AND 8 and 9, elements AND 10 - 17, elements OR 18 -. 22, the comparison circuit 23, the HE element 2A, the installation input 25, the first and second information outputs 26 and 27, the output 28 of the sign of equality of numbers, the output 29 of the negative difference and the output 30 of the sign of the positive difference. The first bit of counters 1 and 2 is considered to be younger, and G1-Y is considered to be older. The device works as follows. The first counter 1 records the number A (decreasing), and the second counter 2 numbers the number B (subtracted). A pulse is applied to the device installation input 25, setting the first 6 and second 7 triggers to zero. The signal from the zero output of trigger 6 is fed to the input of element 4 and permits the passage of pulses from the generator 3 to the counting inputs of counters 1 and 2. The initial state of the first trigger 6 prevents the passage of pulses from the generator 3 through the AND 4 element. The pulses of the generator 3 fill the first 1 and second 2 counters, starting with the younger (first)

разр дов до («-1)-х разр дов включительно (г1-й старший разр д не заполн етс ) . Переполнение счетчиковbits to (“-1) bits of inclusive (g1 th highest bit is not filled). Counter overflow

снимаетс  с выходов переноса СЬ-1)-хremoved from the outputs of the transfer of CB-1) -x

разр дов первого 1 и второго 2 счетчиков .bits of the first 1 and second 2 counters.

Рассмотрим работу устройства при возможных соотношени х между числами А и В.Consider the operation of the device at possible ratios between the numbers A and B.

А-а В-Ъ при а 1, Ъ 0, где азначение старшего разр да числа А; Ъ - значение старшего разр да чиса В,A-a B-b with a 1, b 0, where the value of the highest bit of the number A; B is the value of the most significant digit of number B,

После записи в первый счетчик 1 числа А и во второй счетчик 2 числа В с выхода м-го разр да первого счетчика 1 единичный сигнал поступает на вход элемента И 11 и на входы элемента И 13 и схемы 23 сравнени  а с выхода п-го разр да второго счетчика 2 нулевой сигнал поступает на вход элемента И 12, на вход элемента И 14 и на второй вход схемы 23 сравнени . Так как о( Ь, то на выходе схемы 23 сравнени  формируетс  нулевой сигнал, который поступает на элемент НЕ 24, с выхода которого единичный сигнал поступает на входы элементов 8 и 9 первой и второй групп элементов И и на входы элементов И 1Q - 14. После начала операции вычитани  импульс переполнени  с выхода переноса (n-l)-ro разр да счетчика 1 по вл етс  раньше, чем с выхода переноса (nr-l)-ro разр да счетчика 2. Этот импульс поступает на вход элемента ИЛИ 5, с выхода которого импульс поступает на счетньй вход триггера 7 и устанавливает его в единичное состо ние, но на выходе триггера 7 импульс отсутствует. Через соответствующее количество тактов по вл етс  импульс переполнени  с выхода переноса (ц-1)-го разр да счетчика 2. Этот импульс поступает на входы второй группы элементов И 8 и вход элемента ИЛИ 5, с выхода котоAfter recording in the first counter 1 the number A and in the second counter 2 the number B from the output of the m-th digit of the first counter 1, a single signal is fed to the input of the element 11 and to the inputs of the element 13 and the comparison circuit 23 from the output of the n-th bit Yes, the second counter 2 has a zero signal at the input of the element 12, the input of the element 14 and the second input of the comparison circuit 23. Since o (b, then, at the output of the comparison circuit 23, a zero signal is generated, which is fed to the element NOT 24, from the output of which a single signal is fed to the inputs of elements 8 and 9 of the first and second groups of elements And and to the inputs of elements And 1Q - 14. After the start of the subtraction operation, an overflow pulse from the transfer output (nl) -ro discharge counter 1 appears earlier than from the transfer output (nr-l) -ro counter discharge 2. This pulse enters the input of the element OR 5, from the output of which the impulse arrives at the trigger input 7 and sets it to the unit But there is no pulse at the output of trigger 7. After an appropriate number of ticks, an overflow pulse appears from the transfer output (c-1) of the second counter of counter 2. This impulse goes to the inputs of the second group of elements AND 8 and the input of the element OR 5 from the exit koto

рого он поступает на счетный вход триггера 7 и устанавливает его в нулевое состо ние, при этом на выходе переноса триггера 7 формируетс  импульс, который поступает на входы элементов ИЛИ 19 и 20. С выхода элемента ИЛИ 19 импульс поступает на вхрд элемента 8 первой группы элементов И 8, разреша  выдачу результата операции вычитани  с выхода п-го разр да первого счетчика 1 на выход 26г, устройства.It enters the counting input of the trigger 7 and sets it to the zero state, while a pulse 7 is generated at the transfer output of the trigger 7, which enters the inputs of the OR 19 and 20 elements. From the output of the OR 19 element, the pulse arrives on the internal element 8 of the first group of elements And 8, allowing the output of the result of the subtraction operation from the output of the nth digit of the first counter 1 to the output 26g, the device.

С выхода элемента ИЛИ 20 импуЛьс поступает на вход элемента 17 И иFrom the output of the element OR 20, the impulse enters the input of the element 17 AND and

5 разрешает выдачу на выход 30 устройства признака положительной разности . В то же врем  этот импульс поступает на входы элементов 8 8 группы элементов-И 8, разреша 5 permits the delivery of a sign of a positive difference to the device output 30. At the same time, this impulse arrives at the inputs of elements 8 8 of the group of elements AND 8, allowing

0 вьщачу значени  результата операции вычитани  с 1-го по (п-1)-й разр ды счетчика 1 на выходе 26 - 26„. устройства, и на вход второго элемента ИЛИ 18, с выхода которого0 is the result of the operation of the subtraction from the 1st to the (n-1) th digit of the counter 1 at the output 26-26. device, and the input of the second element OR 18, from the output of which

5 поступает на вход триггера 6, устанавлива  его в единичное состо ние, тем самым запреща  прохождение импульсов от генератора через первый элемент И 4 на счетные входы счетчиков.5 is fed to the input of the trigger 6, setting it to one state, thereby prohibiting the passage of pulses from the generator through the first element 4 to the counting inputs of the counters.

Таким образом, на первом счетчике 1 Формируетс  результат операции вычитани , который выдаетс  на выходы 26 устройства, а признак положительной разности формируемс  на выводе 30.Thus, on the first counter 1, the result of the subtraction operation is generated, which is output to the device outputs 26, and a sign of a positive difference is formed at the output 30.

А-а -Ь при а 1, .Aa-b with a 1,.

В этом случае на выходе схемы 23 . сравнени  формируетс  нулевой сигнал,In this case, the output circuit 23. A zero signal is generated,

а на выходе элемента И 13 - единичный сигнал. Импульс переполнени  с выхода переноса (ri-l)-ro разр да счетчика 2 по вл етс  раньше, чем с выхода переноса (п-1)-го разр да and the output element And 13 - a single signal. An overflow pulse from the transfer output (ri-l) -ro of counter 2 appears earlier than from the transfer output of (n-1) -th bit

счетчика 1. Этот импульс проходит . через элемент И 11, элемент ИЛИ 20, элемент И 17 на выход 30 устройства, т.е. формируетс  признак положительной разности. Этот же импульс counter 1. This impulse passes. through the element And 11, the element OR 20, the element And 17 on the output 30 of the device, i.e. a sign of a positive difference is formed. Same momentum

0 проходит через элемент ИЛИ 18 на счетный вход триггера 6 и устанавливает его в единичное состо ние, запреща  прохождение импульсов с генератора 3 через элемент И 40 passes through the element OR 18 to the counting input of the trigger 6 and sets it to one state, prohibiting the passage of pulses from the generator 3 through the element 4

5 на счетные входы счетчиков. Одновременно импульс с выхода элемента ИЛИ 20 поступает на входы элементов 8-1 - 8,,.. группы элементов И 8, разреша  выдачу результата операции вычитани  на выходы 26 устройства . А-а В- b при q 0,t 1. В этом случае на выходе схемы 23 сравнени  формируетс  нулевой сигнал , а на выходе элемента И 14 единичный сигнал, который через эле мент ИЛИ 21 поступает на вход элемента И 16, Импульс переполнени  с выхода переноса (n-l)-ro разр да счетчика по вл етс  раньше, чем с выхопа пер носа ()-ro разр да счетчика 1. Этот импульс проходит через элементы И 12 и ИЛИ 20, ИЛИ 18 на вход триггера 6, который устанавливаетс  в единичное состо ние и запрещает прохождение импульсов с генератора 3 на счетные входы счетчиков. Одновременно импульс с выхода элемента ИЛИ 20 поступает на входы эле ментов 9 - 9 группы элементов И разреша  выдачу результата операции вычитани  на выходы 27 - 27, устройства , а также через элемент И 16 на выход 29 устройства. А- ct В-Ъ при , Ъ 1 . В этом случае на выходе схемы 23 сравнени  формируетс  нулевой сигнал,зо 5 on the counting inputs counters. At the same time, the pulse from the output of the element OR 20 is fed to the inputs of elements 8-1 to 8 ,, .. a group of elements AND 8, allowing the output of the result of the subtraction operation to the outputs 26 of the device. A-a B-b at q 0, t 1. In this case, the output of the comparison circuit 23 produces a zero signal, and the output of the AND 14 element is a single signal, which through the OR 21 element enters the input of the AND 16 element, an overflow pulse with the transfer output (nl) -ro of the counter discharge appears earlier than from the pen-and-drop () -ro discharge of counter 1. This pulse passes through the elements AND 12 and OR 20, OR 18 to the input of trigger 6, which is set to unit state and prohibits the passage of pulses from generator 3 to the counting inputs of the counters. At the same time, the pulse from the output of the element OR 20 is fed to the inputs of elements 9 to 9 of the group of elements AND allowing the output of the result of the subtraction operation to the outputs 27 to 27, the device, and also through the element 16 to the output 29 of the device. A-ct B-b with, b 1. In this case, at the output of the comparison circuit 23, a zero signal is generated,

а на выходе элемента И 14 -единичный сигнал. Импульс переполнени  с выхода переноса .(ti-1)-го разр да счетчика 2 по вл етс  раньше, чем с выхода переноса (п-1)-го разр да счетчика 1. ,, После по влени импульса на выходеand the output element And 14-unit signal. An overflow pulse from the transfer output. The (ti-1) -th bit of counter 2 appears earlier than from the transfer output of the (n-1) -th bit of counter 1. 1. After the output pulse appears

триггера 7 на выходе 29 устройства формируетс  признак отрицательной разности, а результат операции вычитани  снимаетс  с выходов 27 уст-дд ройства.the trigger 7 at the output 29 of the device forms a sign of a negative difference, and the result of the subtraction operation is removed from the outputs 27 of the device.

(В-Ь при , .(B-b at,.

В этом случае на выходе схемы 23 сравнени  формируетс  нулевой сигнал, а на выходе элемента И 13 единичный 45 сигнал. Импульсы переполнени  с выходов переноса счетчиков по вл ютс  одновременно. Эти импульсы поступают на первый и второй входы элемента И 10. Импульс выхода элемен- 50 та И 10 проходит через элемент ИЛИ 19 и поступает на вход элемента 8„ группы элементов И 8, разреша  вьщачу результата операции вычитани  с выхода старшего разр да счетчика 1 55 на выход 26р устройства.In this case, a zero signal is generated at the output of the comparison circuit 23, and a single 45 signal at the output of the And 13 element. Overflow pulses from the meter transfer outputs appear simultaneously. These pulses go to the first and second inputs of the element AND 10. The pulse of the output of the element 50 and 10 passes through the element OR 19 and enters the input of the element 8 "group of elements AND 8, allowing the result of the subtraction operation from the output of the high bit of the counter 1 55 to exit 26p device.

В то же врем  импульс переполнени  с выхода переноса (ri-l)-ro разр даAt the same time, the overflow pulse from the transfer output (ri-l) -ro discharge

цательной разности, а результат операции вычитани  снимаетс  с выходов 27 27 устройства.. А- а В-Ъ при . В этом случае на выходе схемы 23 сравнени  формируетс  единичный сиг-. .нал, который поступает на вход элемента И 15 и через элементы ИЖ 21 и 22 на входы элементов И 16 и 17. Импульс переполнени  с выхода переноса (n-l)-ro разр да счетчика 1 по вл етс  раньше, чем с выхода переноса (ri-l)-ro разр да счетчика 2. Эти импульсы переполнени  поочередно про ход т через элемент ИЛИ 1 на счетный вход триггера 7.a significant difference, and the result of the subtraction operation is removed from the outputs 27 27 of the device .. A-a B-b with. In this case, a single signal is generated at the output of the comparison circuit 23. The current that enters the input of the AND 15 element and through the IL 21 and 22 elements to the inputs of the AND elements 16 and 17. An overflow pulse from the transfer output (nl) -ro the discharge of counter 1 appears earlier than from the transfer output (ri -l) -ro counter 2 counter. These overflow pulses alternately pass through the element OR 1 to the counting input of the trigger 7.

После по влени  импульса на выходе триггера 7 операци  вычитани  прекращаетс . На выходе 30 устройства формируетс  признак положительной разности, а результат снимаетс  с выходов 26 - 26. устройства. А-о« В-Ъ при с( Ь. After the appearance of a pulse at the output of trigger 7, the subtraction operation is terminated. At the output 30 of the device, a positive difference is formed, and the result is taken from the outputs 26-26 of the device. A-o "B-b with c (b.

Устройство работает также, как и в предыдущем случае, только призна отрицательной разности формируетс  на выходе 29 устройства, а резульсчетчика 2 поступает через элемент И П на вход элемента ИЛИ20. После по влени  импульса на выходе элемента ИЛИ 20 на выходе 30 устройства формируетс  признак положительной разности, а результат операции вычитани  снимаетс  с выходов 26 устройства . А- сг В-Ъ при а 0, b 1 . В этсж случае на вькоде схемы 23,. сравнени  формируетс  нулевой сигнал, а на выходе элемента И 14 единичный сигнал. Импульсы переполнени  с выходов переноса (n-l)-ro разр дов счетчиков 1 и 2 по вл ютс  одновременно . Эти импульсы поступают на первый и второй входы элемента И 10. Импульс с выхода элемента И 10 проходит через элемент ИЛИ 19 и поступает на вход элемента 9 группы элементов И 9, разреша  выдачу результата операции с выхода старшего разр да счетчика 2 на выход 27 устройства. В то же врем  импульс переполнени  с выхода переноса (n-l)-ro разр да счетчика 1 поступает через элемент И 12 на вход элемента ИЛИ 20. После по влени  импульса на выходе элемента ИЛИ 20 на выходе 29 устройства форьшруетс  признак отритаТ снимаетс  с выходов 27 - 27 устройства.The device also works, as in the previous case, only the recognition of a negative difference is formed at the output 29 of the device, and the result of the meter 2 is fed through the AND element to the input of the OR20 element. After the pulse at the output of the element OR 20 appears at the output 30 of the device, a sign of a positive difference is formed, and the result of the subtraction operation is removed from the outputs 26 of the device. A-cr B-b at a 0, b 1. In the case of the circuit diagram 23 ,. A zero signal is generated, and a single signal at the output of the AND 14 element. Overflow pulses from the transfer outputs of the (n-l) -ro bits of counters 1 and 2 appear simultaneously. These pulses go to the first and second inputs of the element AND 10. The pulse from the output of the element AND 10 passes through the element OR 19 and enters the input of the element 9 of the group of elements AND 9, allowing the output of the operation result from the output of the high bit of counter 2 to the output 27 of the device. At the same time, the overflow pulse from the transfer output (nl) -ro of counter 1 is fed through an element AND 12 to the input of an element OR 20. After a pulse appears at the output of an element OR 20 at an output 29 of the device, the sign of T is removed from the outputs 27 - 27 devices.

....

В isTOM случае на выходе схемы 23 сравнени  формируетс  единичный сигнал . После одновременного по влени  импульсов переполнени  с выходов переноса (h-l)-x разр дов счетчиков на выходе элемента И 15 формируетс  импулвс, т.е. на выходе 28 устройстна формируетс  признак равенства чисел. Этот же импульс проходит чере элемент ИЛИ 18, устанавливает триггер 6 в единичное состо ние и операци  вычитани  прекращаетс . In the isTOM case, a single signal is generated at the output of the comparison circuit 23. After the simultaneous occurrence of overflow pulses from the transfer outputs (h-l) -x bits of the counters, an impulse is formed at the output of the element 15, i.e. At output 28, a sign of equality of numbers is formed. The same pulse passes through the element OR 18, sets the trigger 6 to one state and the subtraction operation is terminated.

Использование предлагаемого технического решени  позвол ет сократит врем  выполнени  операции вычитани . Соответствующа  схемна  реализаци  устройства обеспечивает, алгоритм работы , при котором дл  получени  результата операции вычитани  заполнение счетчиков импyльca ш от генератора производитс  только до (n-l)-ro разр да, а h-й (старший) разр д в процессе заполнени  не участвует. Информаци  о результате операции сохран етс  на одном из счетчиков. В известном устройстве счетчики заполн ютс  до п-го разр даThe use of the proposed technical solution allows shortening the time for performing the subtraction operation. The corresponding circuit realization of the device provides an operation algorithm in which, in order to obtain the result of the subtraction operation, the filling of counters from the generator is performed only up to (n-l) -ro discharge, and the h-th (senior) discharge is not involved in the filling process. Information about the result of the operation is stored on one of the counters. In a known device, the counters are filled before the n-th bit.

Таким образом, по сравнению с известным устройством предлагаемое устройство позвол ет сократить максимальное врем  выполнени  вычитани  в два раза, вьщает результат операции в виде параллельного двоичного кода, осуществл ет хранение результата , который можно использовать в последующей операции вычитани .Thus, in comparison with the known device, the proposed device allows to reduce the maximum execution time by two times, results in a parallel binary code, stores the result, which can be used in a subsequent subtraction operation.

Si Kn-tSi Kn-t

1one

Д п„.,-Пп aD p „., - Pn a

It 19It 19

Claims (1)

УСТРОЙСТВО ДЛЯ ОПРЕДЕЛЕНИЯ РАЗНОСТИ ДВУХ ЧИСЕЛ, содержащее первый и второй счетчики, первый и второй триггеры, генератор импульсов, элементы И с первого по третий и первый элемент ИЛИ, причем выход генератора импульсов соединен с первым входом первого элемента И, второй вход которого подключен к нулевому’ выходу первого триггера, выход первого элемента И соединен со счетными входами первого и второго счетчиков, нулевые входы первого и второго триггеров соединены с установочным входом устройства, выход п-го разряда, где и- разрядность вычитаемых чисел, второго счетчика соединен с первым входом второго элемента И, отличающееся тем, что, с целью повышения быстродействия и расширения области применения путем осуществления выдачи результата в параллельном коде, оно дополнительно содержит первую и вторую группы по η элементов И, элементы И с четвертого по девятый, элементы ИЛИ с второго по шестой, схему сравнения и элемент НЕ, причем выходы разрядов первого счетчика соединены с первыми входами соответствующих элементов И первой группы, выходы которых соединены с разрядами первого информационного выхода устройства, выходы разрядов второго счетчика соединены с первыми входами соответствующих элементов И второй группы, выходы которых соединены с разрядами второго информационного выхода устройства, выходы η-x разрядов первого и второго счетчиков соединены с соответствующими входами схемы сравнения, выход которой соединен с первым входом четвертого элемента И, с первыми входами второго и третьего элементов ИЛИ и через элемент НЕ - с вторым входом второго О элемента И, с первым входом третьего элемента И, с первыми входами пятого, шестого и седьмого элементов И, вторые входы элементов И первой группы соединены с первым входом первого элемента ИЛИ, с вторыми входами четвертого, шестого и седьмого элементов И, с первым входом восьмого элемента И и с выходом (ь-1)-го разряда .второго счетчика, второй вход первого элемента ИЛИ соединен с вторыми входами элементов И второй группы,· с третьими входами четвертого и седьмого элементов И, с вторым входом пятого элемента И, с первым входом девятого элемента И и с выходом (н-1)-го разряда первого счетчика, выход первого элемента ИЛИ подключен к счетному входу второго триггера, единичный выход . которого соединен с первыми входами четвертого и пятого элементов ИЛИ, выход второго элемента И соединен с вторым входом второго;<элемента ИЛИ, второй вход третьего элемента И сое динен с третьим входом шестого элемента И и подключен к выходу h-ro разряда первого счетчика, выход третьего элемента И соединен с вторым входом третьего элемента ИЛИ, выход которого подключен к второму входу восьмого элемента И, выход которого соединен с выходом признака положительной разности устройства, выход второго элемента ИЛИ подключен к второму входу девятого элемента И, выход которого соединен с выходом признака отрицательной разности устройства, выход четвертого элемента И подключен к первому входу шестого элемента ИЛИ и к выходу признака равенства чисел устройства, третий вход пятого элемента И соединен с первым входом второго элемента И, а выход соединен с вторым' входом пятого элемента ИЛИ, третий вход которого подключен к выходу шестого элемента И, выход седьмого элемента И соединен с вторым входом четвертого элемента ИЛИ, выход которого соединен с третьими входами η-х элементов И первой и второй групп, четвертые входы которых подключены к выходу элемента НЕ, выход пятого элемента ИЛИ соединен с третьими входами восьмого и девятого элементов И, с вторым входом шестого элемента ИЛИ и с третьими входами элементов И с первого по(ц-1)-й первой и второй групп, выход шестого элемента ИЛИ подключен к счетному входу первого триггера.A device for determining the difference of two numbers, containing the first and second counters, first and second triggers, a pulse generator, AND elements from the first to third and first OR elements, and the output of the pulse generator is connected to the first input of the first AND element, the second input of which is connected to zero 'the output of the first trigger, the output of the first element AND is connected to the counting inputs of the first and second counters, the zero inputs of the first and second triggers are connected to the installation input of the device, the output of the nth discharge, where number of numbers, the second counter is connected to the first input of the second AND element, characterized in that, in order to improve performance and expand the scope by issuing a result in parallel code, it additionally contains the first and second groups of η AND elements, AND elements from the fourth in the ninth, OR elements from the second to the sixth, the comparison circuit and the element are NOT, and the outputs of the bits of the first counter are connected to the first inputs of the corresponding elements of the first group, the outputs of which are connected to the bits of the of the information output of the device, the outputs of the bits of the second counter are connected to the first inputs of the corresponding elements of the second group, the outputs of which are connected to the bits of the second information output of the device, the outputs η-x of the bits of the first and second counters are connected to the corresponding inputs of the comparison circuit, the output of which is connected to the first the input of the fourth element AND, with the first inputs of the second and third elements OR and through the element NOT - with the second input of the second O element And, with the first input of the third element And, with the first and the inputs of the fifth, sixth and seventh AND elements, the second inputs of the AND elements of the first group are connected to the first input of the first OR element, with the second inputs of the fourth, sixth and seventh AND elements, with the first input of the eighth AND element and with the output (b-1) - of the second discharge. of the second counter, the second input of the first element OR is connected to the second inputs of the elements AND of the second group, · with the third inputs of the fourth and seventh elements And, with the second input of the fifth element And, with the first input of the ninth element And and with the output (n-1 ) -th discharge of the first counter, output per th OR gate is connected to the counting input of the second flip-flop, the output unit. which is connected to the first inputs of the fourth and fifth OR elements, the output of the second AND element is connected to the second input of the second; <the OR element, the second input of the third AND element is connected to the third input of the sixth AND element and connected to the h-ro discharge of the first counter, output the third AND element is connected to the second input of the third OR element, the output of which is connected to the second input of the eighth AND element, the output of which is connected to the output of the sign of a positive difference of the device, the output of the second OR element is connected to the second input nine of the And element, the output of which is connected to the output of the sign of the negative difference of the device, the output of the fourth And element is connected to the first input of the sixth OR element and to the output of the sign of equality of numbers of the device, the third input of the fifth And element is connected to the first input of the second And element, and the output is connected to the second input of the fifth OR element, the third input of which is connected to the output of the sixth element AND, the output of the seventh element And is connected to the second input of the fourth OR element, the output of which is connected to the third inputs of η-x elements And p the first and second groups, the fourth inputs of which are connected to the output of the NOT element, the output of the fifth OR element is connected to the third inputs of the eighth and ninth AND elements, with the second input of the sixth OR element and with the third inputs of AND elements from the first to (q-1) of the first and second groups, the output of the sixth OR element is connected to the counting input of the first trigger.
SU833594633A 1983-05-23 1983-05-23 Device for determining difference of two numbers SU1136149A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
SU833594633A SU1136149A1 (en) 1983-05-23 1983-05-23 Device for determining difference of two numbers

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
SU833594633A SU1136149A1 (en) 1983-05-23 1983-05-23 Device for determining difference of two numbers

Publications (1)

Publication Number Publication Date
SU1136149A1 true SU1136149A1 (en) 1985-01-23

Family

ID=21064642

Family Applications (1)

Application Number Title Priority Date Filing Date
SU833594633A SU1136149A1 (en) 1983-05-23 1983-05-23 Device for determining difference of two numbers

Country Status (1)

Country Link
SU (1) SU1136149A1 (en)

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
1. Авторское свидетельство СССР № 450166, кл. G 06 F 7/50, 1972. . Авторское свидетельство СССР № 686029, кл. G 06 F 7/50, 1977. *

Similar Documents

Publication Publication Date Title
SU1136149A1 (en) Device for determining difference of two numbers
US4149258A (en) Digital filter system having filters synchronized by the same clock signal
SU1406790A1 (en) Variable-countdown frequency divider
SU1126949A1 (en) Device for searching data
SU1116426A1 (en) Device for searching numbers in given range
SU1249510A1 (en) Device for determining absolute value and argument of vector
SU892697A1 (en) Pulse duration discriminator
SU1111154A1 (en) Multiplying device
SU1619396A1 (en) Pulse recurrence rate divider
SU1594690A2 (en) Follow-up a-d converter
SU1218396A1 (en) Device for calculating fourier-galois transform
SU1272329A1 (en) Calculating device
SU439805A1 (en) Square root extractor
SU375783A1 (en) DISCRETE MULTIPLE OF FREQUENCY
SU1315973A2 (en) Time interval-to-binary code converter
SU894844A1 (en) Pulse train shaping device
SU1322269A1 (en) Device for extracting root of sum of squares of three numbers
SU1254479A1 (en) Pulse number multiplier
SU970706A1 (en) Counting device
SU1259283A1 (en) Device for determining number of combinations
SU1509878A1 (en) Device for computing polynominals
SU1252792A1 (en) Device for solving sets of linear differential equations
SU1569823A1 (en) Multiplying device
SU1019638A1 (en) Number-frequency multiplier
SU1241231A1 (en) Device for calculating inverse value