SU1167603A1 - Device for comparing binary numbers - Google Patents

Device for comparing binary numbers Download PDF

Info

Publication number
SU1167603A1
SU1167603A1 SU843700985A SU3700985A SU1167603A1 SU 1167603 A1 SU1167603 A1 SU 1167603A1 SU 843700985 A SU843700985 A SU 843700985A SU 3700985 A SU3700985 A SU 3700985A SU 1167603 A1 SU1167603 A1 SU 1167603A1
Authority
SU
USSR - Soviet Union
Prior art keywords
elements
input
inputs
group
outputs
Prior art date
Application number
SU843700985A
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 SU843700985A priority Critical patent/SU1167603A1/en
Application granted granted Critical
Publication of SU1167603A1 publication Critical patent/SU1167603A1/en

Links

Abstract

УСТРОЙСТВО ДЛЯ СРАВНЕНИЯ ДВОИЧНЫХ ЧИСЕЛ, содержащее элементы И, ИЛИ, триггеры, первый и второй кольцевые сдвигающие регистры, выходы старших разр дов которых соединены с первыми входами первого и второго элементов И соответственно, вторые входы которых соединены с инверсными выходами старших разр дов соответственно второго и первого кольцевых сдвигающих регистров, выходы первого и второго элементов И подключены к первым входам третьего и четвертого, п того и шестого элементов И соответственно, вторые входы третьего и п того элементов И соединены с ивнерсными вькодами первого и второго триггеров соответственно , пр мые входы которых подключены к вторым входам соответственно четвертого и шестого элементов И,, выходы третьего и п того элементов И подключены к входам установки в единичное состо ние соответственно второго и первого триггеров и к входам первого э-лемента ИЛИ, выходы четвертого и шестого триггеров соединены с входами второго элемента ИЛИ, входы сдвига регистров подключены к входу тактовых сигналов устройства. отличающеес  тем, что, с целью расширени  области применени  за счет получени  разности сравниваемых чисел дл  любых комбинаций сравниваемых чисел, в устройство введены элемент НЕ, счетчик, дешифратор , две группы входных элементов И по п элементов в каждой, группа П элементов задержки, группа п элементов ИЛИ, группа п триггеров и rpjrnna (  - 1) элементов И переноса, где П - число разр дов сравниваемых чисел, причем вход тактовых сигналов устройства подключен к первым входам входных элементов И первой и второй групп и счетному входу счетчика, выходы разр дов которого подключены к (Л входам дешифратора, выходы которого с соединены с вторыми входами соответствующих входных элементов И первой и второй групп, третьи входы входных элементов И первой группы соединены , через элементы НЕ с выходом первого элемента ИЛИ, выход второго элемента ИЛИ подключен к третьим входам входных элементов И второй группы, 05 выход i-го входного элемента И пер вой группы, где i 1, 2, ..., ц , 05 соединен с первым входом i-го элеО мента ИЛИ группы, второй вход котооо рого подключен через элемент задержки к выходу 1 -го входного элемента И второй группы, а выход соединен со счетным входом t-го триггера группы, выход (j + 1)-го триггера группы, где j 1, 2, ..., п- 1, соединен с первым входом j -го элемента И переноса группы, второй вход которого соединен с выходом (j + 1)-го элемента ИЛИ группы, а выход подключен к третьему входуA DEVICE FOR COMPARISON OF BINARY NUMBERS containing AND, OR elements, triggers, first and second ring shift registers, the outputs of the higher bits of which are connected to the first inputs of the first and second elements AND, respectively, the second inputs of which are connected to the inverse outputs of the high bits of the second and second the first annular shift registers, the outputs of the first and second elements And are connected to the first inputs of the third and fourth, fifth and sixth elements And, respectively, the second inputs of the third and fifth el And are connected to the initial codes of the first and second triggers, respectively, the direct inputs of which are connected to the second inputs of the fourth and sixth elements, respectively, And, the outputs of the third and fifth elements, and are connected to the inputs of the installation in the unit state, respectively, of the second and first triggers and to the inputs of the first e-element OR, the outputs of the fourth and sixth flip-flops are connected to the inputs of the second element OR, the shift inputs of the registers are connected to the input of the clock signals of the device. characterized in that, in order to expand the scope of application by obtaining the difference of compared numbers for any combinations of compared numbers, an element NOT, a counter, a decoder, two groups of input elements are entered into the device; the OR elements, the group of n triggers and rpjrnna (- 1) AND transfer elements, where P is the number of bits of the numbers being compared, the input of the device clock signals connected to the first inputs of the input elements of the first and second groups and the counting input ka, the outputs of which bits are connected to (L inputs of the decoder, the outputs of which are connected to the second inputs of the corresponding input elements AND of the first and second groups, the third inputs of the input elements AND of the first group are connected, through the elements NOT to the output of the first element OR, the output of the second element OR is connected to the third inputs of the input elements AND the second group, 05 output of the i-th input element AND the first group, where i 1, 2, ..., C, 05 is connected to the first input of the i-th element OR group, the second input which is connected through the delay element ki to the output of the 1st input element And the second group, and the output is connected to the counting input of the t-th group trigger, the output of the (j + 1) -th group trigger, where j 1, 2, ..., n-1, is connected with the first input of the j-th element AND the transfer group, the second input of which is connected to the output of the (j + 1) -th element of the OR group, and the output is connected to the third input

Description

-го элемента ИЛИ группы, выходы триггеров  вл ютс  инверсные , разности сравниваемых чисел устройвыходами 1167603 element of the OR group, the outputs of the triggers are inverse, the differences of the compared numbers of the device outputs 1167603

Изобретение относитс  в автомати ке и вычислительной технике и может быть использована при реализации технических средств дискретной авто матики и ЭВМ. Целью изобретени   вл етс  расши рение области применени  за счет получени  разности сравниваемых чисел дл  любых комбинаций сравниваемых чисел за счет использовани  нового алгоритма формировани  разности сра ниваемых чисел, реализуемого дополнительными элементам. На чертеже схематически показано предлагаемое устройство. Устройство содержит кольцевые сдвигающие регистры 1 и 2, элементы И 3 и 4, триггеры 5 и 6,.элементы 7-10, элементы ИЛИ 11 и 12, элемент НЕ 13, счетчик 14, дешифратор 15, группу входных элементов И 16, группу элементов задержки 17, группу элементов ИЛИ 18, группу триггеров 19, группу элементов И переноса 20. , Устройство работает следующим образом. Старшие разр ды сравниваемых чисел поступают на элементы И 3 и 4. При равенстве старших разр дов на рыходах элементов И 3 и 4 сигнал ра вен ОЧ Если старший разр д числа, наход щегос  в регистре 1 больше, чем старший разр д числа в регистре 2, то срабатывает элемент И 3. Единичный сигнал с этого элемента, проход  через элемент И 7, ввиду того, что триггер 5 находитс  в сос то нии О, поступает на вход S триггера 6 и переводит его в единич ное состо ние. Б дальнейшем, при сравнении последующих разр дов чисе состо ние триггеров 5 и 6 не мен ет с . Если же сказываетс  большим ста ший разр д числа, наход щегос  в регистре 2, то срабатывает элемент И 4, что, в свою очередь, приводит к установлению в единичное состо ни триггера 5. Поэтому состо ние триггеров несет информацию о том, какое число больше. Если триггер 6 находитс  в единичном состо нии, то больше число, наход щеес  в регистре 1,. если триггер 5 находитс  в единичном состо нии, то больше число, наход щеес  в регистре 2, Триггеры 5 и 6 совместно с элементами И 7-10 осуществл ют коммутацию результата сравнени  чисел таким образом, что на вход элемента ИЛИ 11 поступает единичный сигнал, если соответствующий разр д большего числа больше, чем тот же разр д меньшего числа, а на вход элемента ИЛИ 12 поступает единичный сигнал, если соответствующий разр д меньшего числа больше, чем тот же разр д большего числа. Сигналы с выходов элементов ИЛИ 11 и 12, с элемента ИЛИ 11 через инвертор 13, соответственно через элементы И 16-1 и И 16-2 поступают на общий вход триггера 19-1, состо ние инверсного выхода которого отражает значение старшего разр да разности сравниваемых чисел Д . При этом сигнал с выхода элемента И 16-2 поступает на вход триггера через элемент задержки 17-1, с временем задержки на длительность импульса сдвига. Объединение сигналов на входе триггера 19-1 осуществл етс  элементом ИЛИ 18-1. После поступлени  1-го импульса сдвига присутствует сигнал на 2-м выходе дешифратора 15, сигнал с выходов элементов ИЛИ 11 и 12, с элемента ИЛИ 11 через инвертор 13, поступают через соответствующие логические элементы 16-3 и 16-4, 17-2, 18-2 на общий вход триггера 19-2, состо ние инверсного выхода которого отрал ает значение следующего разр да разности сравниваемых чисел. После поступлени  2-го импульса сдвига сигнал по вл етс  на 3-м выходе дешифратора, что при3 водит к поступлению сигналов с выхо дов элементов ИЛИ 11 и 12, с элемен та ИЛИ 11 через инвертор 13, на общий вход триггера 19-3 и т.д. В про цессе формировани  очередного знака разр да разности, если с обоих элементов ИЛИ 11 и 12, с элемента ИЛИ через инвертор 13, на общий вход соответствующего триггера поступают .единичные сигналы, происходит перенос 1 в старший разр д, через соответствующий злемент И группы 20. Дл  осуществлени  этой операции триггер должен срабатывать по заднему фронту импульса. Результат разности сравниваемых чисел формируетс  на инверсных выходах триггеров группы 19 после поступлени  (h -1)го импульса сдвига, где гг -разр дность сравниваемых двоичных чисел. Применение данного устройства позвол ет получить результат сравнени  двоичных чисел с фиксацией как качественного результата сравнени  . ( , , ), так и количественного результата в виде модул  разности 4 дл  всевозможных комбинатдий сравниваемых чисел. Цель изобретени  достигаетс  за счет введени  дополнительных элементов 13-15, группы элементов И 16, группы элементов задержки 17, группы элементов ИЛИ 18, группы триггеров 19 и группы элементов И 20. Эти элементы реализуют новый алгоритм получени  разности сравниваемых чисел из сигналов, присутствующих на выходах 034 элементов ИЛИ 11 и 12. Алгоритм заключаетс  в следующем: сигнал с выхода элемента ИЛИ 11 инвертируетс  и суммируетс  с сигналом, поступающим с элемента ИЛИ 12, результат разности сравниваемых чисел получаетс  равным обратному коду, который получаетс  в результате суммировани . Пример сравнени  двоичных чисел: Af2j 101110 и 011011. В этом случае на выходе элемента ИЛИ 11 -присутствует следующа  двоична  последовательность F. 100100, а на выходе элемента ИЛИ 12 - следующа  Е,2 010001. Б соответствии с предлагаемым алгоритмом получаем: двоична  последовательность на выходе инвертора 13 F.,3 011011, результат cyм шpoвaни  двоичных последовательностей дает результат 011011 010001 101100 обратный код результат сравнени 010011 , что соответствует правильному результату. Действительно (А - В)j равно 101110 011011 010011The invention relates to automation and computer technology and can be used in the implementation of discrete automatics and computer hardware. The aim of the invention is to expand the field of application by obtaining the difference of the compared numbers for any combinations of the compared numbers by using the new algorithm for forming the difference of the scored numbers realized by the additional elements. The drawing schematically shows the proposed device. The device contains an annular shift registers 1 and 2, elements And 3 and 4, triggers 5 and 6, elements 7-10, elements OR 11 and 12, element NOT 13, counter 14, decoder 15, group of input elements AND 16, group of elements delay 17, a group of elements OR 18, a group of triggers 19, a group of elements AND transfer 20. The device works as follows. The highest bits of the numbers being compared are received at the elements 3 and 4. If the high bits on the outputs of the elements 3 and 4 are equal, the signal is equal to black if the highest bit of the number in register 1 is greater than the highest bit in register 2 , then element 3 is triggered. A single signal from this element, the passage through element 7, in view of the fact that trigger 5 is in the O state, enters input S of trigger 6 and translates it into a single state. Further, when comparing subsequent bits, the state of triggers 5 and 6 does not change with. If, on the other hand, the large digit of the number in register 2 is affected, then element 4 is triggered, which in turn leads to the establishment of trigger one in one state. Therefore, the state of triggers carries information about which number is greater than . If trigger 6 is in a single state, then the number in register 1 is greater. if trigger 5 is in the single state, then the number in register 2 is greater, Triggers 5 and 6, together with elements 7–10, switch the result of the comparison of numbers in such a way that the input signal OR 11 receives a single signal if the corresponding bit of the larger number is greater than the same bit of the smaller number, and a single signal is received at the input of the element OR 12 if the corresponding bit of the smaller number is greater than the same bit of the larger number. The signals from the outputs of the elements OR 11 and 12, from the element OR 11 through the inverter 13, respectively, through the elements AND 16-1 and AND 16-2 arrive at the common input of the trigger 19-1, the state of the inverse output of which reflects the value of the higher bit difference compared numbers d. The signal from the output of the element And 16-2 is fed to the trigger input through the delay element 17-1, with a delay time for the duration of the shift pulse. The combination of the signals at the input of the trigger 19-1 is performed by the element OR 18-1. After the arrival of the 1st shift pulse, there is a signal at the 2nd output of the decoder 15, the signal from the outputs of the elements OR 11 and 12, from the element OR 11 through the inverter 13, is received through the corresponding logic elements 16-3 and 16-4, 17-2 , 18-2 to the common input of the trigger 19-2, the state of the inverse output of which corresponds to the value of the next bit of the difference of the compared numbers. After the arrival of the 2nd shift pulse, a signal appears at the 3rd output of the decoder, which at 3 leads to the arrival of signals from the outputs of the OR 11 and 12 elements, from the OR 11 element through the inverter 13, to the common trigger input 19-3 and etc. In the process of forming the next digit of the difference of the difference, if both elements OR 11 and 12, from the OR element through the inverter 13, single signals are sent to the common input of the corresponding trigger, 1 is transferred to the senior bit, through the corresponding element AND of group 20 To perform this operation, the trigger must trigger on the falling edge of the pulse. The result of the difference of the compared numbers is formed on the inverse outputs of the flip-flops of group 19 after the arrival of the (h -1) th shift pulse, where yy is the size of the binary numbers being compared. The use of this device allows to obtain the result of comparing binary numbers with fixation as a qualitative result of comparison. (,,), and quantitative result in the form of a modulus of the difference of 4 for all sorts of combines of compared numbers. The purpose of the invention is achieved by the introduction of additional elements 13-15, the group of elements AND 16, the group of delay elements 17, the group of elements OR 18, the group of flip-flops 19 and the group of elements AND 20. These elements implement a new algorithm for obtaining the difference of compared numbers from the signals present in outputs 034 of the elements OR 11 and 12. The algorithm is as follows: the signal from the output of the element OR 11 is inverted and summed with the signal from the element OR 12, the result of the difference of the compared numbers is equal to the reverse code, ing is obtained as a result of summing. An example of comparing binary numbers: Af2j 101110 and 011011. In this case, the output of the OR 11 element is the following binary sequence F. 100100, and the output of the OR 12 element is the next E, 2 010001. According to the proposed algorithm, we get: the binary sequence on the output of the inverter is 13 F., 3 011011, the result of the combination of binary sequences gives the result 011011 010001 101100 the reverse code is the result of comparison 010011, which corresponds to the correct result. Indeed (A - B) j equals 101110 011011 010011

Claims (1)

УСТРОЙСТВО ДЛЯ СРАВНЕНИЯ ДВОИЧНЫХ ЧИСЕЛ, содержащее элементы И, ИЛИ, триггеры, первый и второй кольцевые сдвигающие регистры, выходы старших разрядов которых соединены с первыми входами первого и второго элементов И соответственно, вторые входы которых соединены с инверсными выходами старших разрядов соответственно второго и первого кольцевых сдвигающих регистров, выходы первого и второго элементов И подключены к первым входам третьего и четвертого, пятого и шестого элементе® И соответственно, вторые входы третьего и пятого элементов И соединены с ивмереными выходами первого и второго триггеров соответственно, прямые входы которых подключены к вторым входам соответственно четвертого и шестого элементов И,, выходы третьего и пятого элементов И подключены к входам установки в единичное состояние соответственно второго и первого триггеров и к входам первого элемента ИЛИ, выходы четвертого и шестого триггеров соединены с входами второго элемента ИЛИ, входы сдвига регистров подключены к входу тактовых сигналов устройства, отличающееся тем, что, с целью расширения области применения за счет получения разности сравниваемых чисел для любых комбинаций сравниваемых чисел, в устройство введены элемент НЕ, счетчик, дешифратор, две группы входных элементов И по η элементов в каждой, группа П элементов задержки, группа л элементов ИЛИ, группа η триггеров и группа (η - 1) элементов И переноса, где И - число разрядов сравниваемых чисел, причем вход тактовых сигналов устройства подключен к первым входам входных элементов И первой и второй групп и счетному входу счетЧика, выхо—2 ды разрядов которого подключены к входам дешифратора, выходы которого соединены с вторыми входами соответствующих входных элементов И первой и второй групп, третьи входы входных элементов И первой группы соединены , через элементы НЕ с выходом первого элемента ИЛИ, выход второго элемента ИЛИ подключен к третьим входам входных элементов И второй группы, выход 1 -го входного элемента И первой группы, где ΐ = 1, 2, ..., η , соединен с первым входом <-го элемента ИЛИ группы, второй вход которого подключен через элемент задержки к выходу i-го входного элемента И второй группы, а выход соединен со счетным входом 1-го триггера группы, выход (j + 1)-го триггера группы, где j = 1, 2, ..., и - 1, соединен с первым входом j -го элемента И переноса группы, второй вход которого соединен с выходом (] + 1)-го элемента ИЛИ группы, а выход подключен к третьему входу ^-го элемента ИЛИ группы, инверсные , разности сравниваемых чисел устройвыходы триггеров являются выходами ства.DEVICE FOR COMPARISON OF BINARY NUMBERS, containing AND, OR, triggers, first and second ring shift registers, the high-order outputs of which are connected to the first inputs of the first and second elements And, respectively, the second inputs of which are connected to the inverse outputs of the high-order bits of the second and first ring shift registers, the outputs of the first and second elements AND are connected to the first inputs of the third and fourth, fifth and sixth elements® And, respectively, the second inputs of the third and fifth elements And connected to the measured outputs of the first and second triggers, respectively, the direct inputs of which are connected to the second inputs of the fourth and sixth elements, respectively, the outputs of the third and fifth elements of And are connected to the unit inputs of the second and first triggers, respectively, and to the inputs of the first element OR , the outputs of the fourth and sixth triggers are connected to the inputs of the second OR element, the register shift inputs are connected to the device clock input, characterized in that, in order to expand the region and applications by obtaining the difference of the compared numbers for any combinations of the numbers to be compared, the element HE is added, a counter, a decoder, two groups of input elements AND with η elements in each, a group of delay elements П, a group of OR elements, a group of η triggers and a group (η - 1) elements AND transfer, where AND is the number of bits of the numbers to be compared, and the input of the device’s clock signals is connected to the first inputs of the input elements of the first and second groups and the counting input of the counter, the outputs — 2 of which bits are connected to the inputs a decoder, the outputs of which are connected to the second inputs of the corresponding input elements AND of the first and second groups, the third inputs of the input elements of the first group are connected, through the elements NOT to the output of the first OR element, the output of the second OR element is connected to the third inputs of the input elements AND the second group, the output Of the 1st input element AND of the first group, where ΐ = 1, 2, ..., η, is connected to the first input of the <th element of the OR group, the second input of which is connected through the delay element to the output of the i-th input element AND of the second group and the output is connected to about the counting input of the 1st group trigger, the output of the (j + 1) -th group trigger, where j = 1, 2, ..., and - 1, is connected to the first input of the j-th group transfer element AND, the second input of which is connected to the output of the (] + 1) th element of the OR group, and the output is connected to the third input of the ^ th element of the OR group, inverse, the differences of the compared numbers of the device outputs of the triggers are outputs of the device.
SU843700985A 1984-02-15 1984-02-15 Device for comparing binary numbers SU1167603A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
SU843700985A SU1167603A1 (en) 1984-02-15 1984-02-15 Device for comparing binary numbers

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
SU843700985A SU1167603A1 (en) 1984-02-15 1984-02-15 Device for comparing binary numbers

Publications (1)

Publication Number Publication Date
SU1167603A1 true SU1167603A1 (en) 1985-07-15

Family

ID=21103641

Family Applications (1)

Application Number Title Priority Date Filing Date
SU843700985A SU1167603A1 (en) 1984-02-15 1984-02-15 Device for comparing binary numbers

Country Status (1)

Country Link
SU (1) SU1167603A1 (en)

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Авторское свидетельство СССР № 830375, кл. G 06 F 7/04, 1978. Авторское свидетел ство СССР № 541166, кл. G 06 F 7/04, 1975. *

Similar Documents

Publication Publication Date Title
SU1167603A1 (en) Device for comparing binary numbers
EP0064590B1 (en) High speed binary counter
EP0661820B1 (en) Parallel-to-serial data conversion circuit
SU705689A1 (en) Counter
SU762195A1 (en) Pulse repetition rate dividing apparatus
SU1418701A1 (en) Counter-type adder
SU799148A1 (en) Counter with series shift
SU1277387A2 (en) Pulse repetition frequency divider
SU1397933A1 (en) Device for permutation searching
SU1348822A2 (en) Arithmetic device for performing operations on several numbers
SU1183967A1 (en) Device for distributing jobs to processors
SU1043636A1 (en) Device for number rounding
SU1444782A1 (en) Device for shaping tests
SU1667259A1 (en) Binary-to-binary-coded-decimal converter
SU492873A1 (en) Binary subtraction device
SU494744A1 (en) Binary decimal to binary converter
SU1345350A1 (en) Device for varying binary code sequence
SU450153A1 (en) Code rate converter
SU1304169A1 (en) Digital matched filter
SU1242933A1 (en) Device for comparing binary numbers
SU1056180A1 (en) Device for comparing parallel codes of numbers
SU822178A1 (en) Binary number comparator
SU1290295A1 (en) Device for calculating ordinal statistics of sequence of binary numbers
SU1315997A1 (en) Device for generating coordinates of net area
SU1397936A2 (en) Device for combination searching