RU189024U1 - BINARY COMPARATOR - Google Patents

BINARY COMPARATOR Download PDF

Info

Publication number
RU189024U1
RU189024U1 RU2019108408U RU2019108408U RU189024U1 RU 189024 U1 RU189024 U1 RU 189024U1 RU 2019108408 U RU2019108408 U RU 2019108408U RU 2019108408 U RU2019108408 U RU 2019108408U RU 189024 U1 RU189024 U1 RU 189024U1
Authority
RU
Russia
Prior art keywords
inputs
outputs
numbers
block
comparison
Prior art date
Application number
RU2019108408U
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 RU2019108408U priority Critical patent/RU189024U1/en
Application granted granted Critical
Publication of RU189024U1 publication Critical patent/RU189024U1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/02Comparing digital values
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B1/00Comparing elements, i.e. elements for effecting comparison directly or indirectly between a desired value and existing or anticipated values
    • G05B1/01Comparing elements, i.e. elements for effecting comparison directly or indirectly between a desired value and existing or anticipated values electric
    • G05B1/03Comparing elements, i.e. elements for effecting comparison directly or indirectly between a desired value and existing or anticipated values electric for comparing digital signals
    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03KPULSE TECHNIQUE
    • H03K5/00Manipulating of pulses not covered by one of the other main groups of this subclass
    • H03K5/22Circuits having more than one input and one output for comparing pulses or pulse trains with each other according to input signal characteristics, e.g. slope, integral

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Nonlinear Science (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Logic Circuits (AREA)

Abstract

Полезная модель относится к электронике и предназначена для использования в счетных и управляющих устройствах. Ее технический результат, заключающийся в упрощении устройства и в повышении быстродействия, достигается за счет использования логических элементов только одного типа - 2ИЛИ-НЕ и объединения их в древовидную цепь, критические пути которой от входов до выходов содержат не более 2К+3 каскада, где К равно округленному до ближайшего большего целого значения логарифма по основанию два от разрядности сравниваемых чисел N, то есть, в каждый входной блок 1-0, … 1-6 сравнения разрядов введен третий логический элемент 5 2ИЛИ-НЕ. На схеме устройства также обозначены блоки 2-0, … 2-5 объединения результатов частичных сравнений и остальные логические элементы 3, 4 и 6, … 10 2ИЛИ-НЕ. Устройство формирует сигналы трех признаков сравнения двух чисел А и В с разрядами а, a, … aи b, b, … bпо следующим логическим формулам:1ил.The invention relates to electronics and is intended for use in counting and control devices. Its technical result, which consists in simplifying the device and improving performance, is achieved through the use of logical elements of only one type - 2IL-NOT and combining them into a tree-like chain, whose critical paths from inputs to outputs contain no more than 2K + 3 stages, where K equal to the rounded to the nearest larger integer value of the logarithm on the base two from the bit width of the compared numbers N, that is, in each input block 1-0, ... 1-6 comparison of bits entered the third logic element 5 2 OR-NOT. The device diagram also denotes blocks 2-0, ... 2-5 combining the results of partial comparisons and the remaining logic elements 3, 4 and 6, ... 10 2OR-NOT. The device generates signals of three signs comparing two numbers A and B with the digits a, a, ... a and b, b, ... b according to the following logical formulas: 1il.

Description

Полезная модель относится к электронике и предназначена для использования в счетных и управляющих устройствах, выполненных на логических элементах 2ИЛИ-НЕ, в частности, из состава серийных микросхем малой степени интеграции.The utility model relates to electronics and is intended for use in counting and control devices made on logic elements 2ИЛИ-НЕ, in particular, from the composition of serial microcircuits of a small degree of integration.

Известны компараторы двоичных чисел определенной разрядности. См., например, патент США №3251035 НПК 340-146.2, опубликованный 10 мая 1966 г. [1]. Подобные устройства имеют ограниченные возможности по обработке многоразрядных чисел.Known comparators of binary numbers of a certain width. See, for example, US Patent No. 3,310,1035 NPC 340-146.2, published May 10, 1966 [1]. Such devices have limited capabilities for processing multi-digit numbers.

Этот недостаток устранен в устройстве, описанном в патенте РФ №2300132 МПК G06F 7/02 и G05B 1/03, опубликованном 27 мая 2007 г. [2]. По своей технической сущности оно наиболее близко заявляемой полезной модели.This disadvantage is eliminated in the device described in the patent of the Russian Federation No. 2300132 IPC G06F 7/02 and G05B 1/03, published on May 27, 2007 [2]. According to its technical essence, it is the closest to the claimed utility model.

Данное устройство содержит входные блоки, выполняющие сравнения пар разрядов чисел одного порядка, блоки объединения результатов частичных сравнений и формирователь сигнала признака равенства чисел. Устройство выполняет функции сравнения двух двоичных чисел А и В произвольной разрядности N: FA>B, FA<B и FA=B, логические выражения которых представляют следующие формулы.This device contains input blocks that perform comparisons of pairs of digits of numbers of the same order, blocks combining the results of partial comparisons, and a signal generator of the sign of equality of numbers. The device performs the function of comparing two binary numbers A and B of arbitrary width N: F A> B , F A <B and F A = B , whose logical expressions are the following formulas.

Figure 00000001
Figure 00000001

где ai и bi - разряды i-го порядка сравниваемых чисел А и В, а взятые в фигурные скобки неравенства представляют логические переменные, принимающие истинные и ложные значения соответственно при выполнении и невыполнении заключенных в скобки неравенств.where a i and b i are the i-th order bits of the compared numbers A and B, and the inequality bracketed represent logical variables that take true and false values, respectively, when executing and not performing the inequalities enclosed in brackets.

Устройство последовательно присоединяет результат сравнения очередной пары разрядов чисел следующего по убыванию порядка к результату сравнения фрагментов чисел, содержащих предыдущие разряды. Это снижает быстродействие, так как критическая цепь распространения сигналов от входов aN-1 и bN-1 старших разрядов чисел до выходов состоит из всех последовательно подключенных функциональных блоков устройства.The device sequentially attaches the result of comparing the next pair of digits of the numbers of the next in descending order to the result of comparing fragments of numbers containing previous digits. This reduces the speed, since the critical distribution circuit of signals from the inputs a N-1 and b N-1 most significant digits of the numbers to the outputs consists of all serially connected functional blocks of the device.

Недостатком компаратора двоичных чисел также является сложность его выполнения на микросхемах КМОП и ТТЛ типов и на элементах микросхем малой степени интеграции. В нем используются логические элементы 2ИЛИ и ЗАПРЕТ

Figure 00000002
которые сложно реализуются в КМОП и ТТЛ схемотехнических базисах, а элементы ЗАПРЕТ представлены не во всех сериях логических микросхем.The disadvantage of a binary number comparator is also the complexity of its implementation on CMOS and TTL types of microcircuits and on elements of microcircuits of a small degree of integration. It uses logical elements 2ILI and BAN
Figure 00000002
which are difficult to implement in CMOS and TTL circuitry bases, and the elements of the prohibition are not presented in all series of logic circuits.

Технический результат полезной модели заключается в упрощении устройства за счет уменьшения числа типов используемых логических элементов до одного и в повышении быстродействия за счет уменьшения количества каскадов логических элементов в цепях распространения сигналов от входов до выходов устройства.The technical result of the utility model is to simplify the device by reducing the number of types of logic elements used to one and improving performance by reducing the number of stages of logic elements in the circuits of propagation of signals from the inputs to the outputs of the device.

Технический результат достигается тем, что в компараторе двоичных чисел, содержащем блоки сравнения разрядов в количестве, равном разрядности чисел N, и каждый блок сравнения разрядов состоит из первого и второго элементов, первые входы и выходы которых соответственно являются первыми и вторыми входами и выходами блока, первый и второй входы блоков сравнения разрядов подключены к парам входов разрядов ai и bi первого и второго чисел А и В порядка i=0, 1, … N-1, блоки объединения результатов частичных сравнений, каждый из которых состоит из первого и второго элементов, первые входы которых соответственно являются первым и вторым входами блока, а вторые входы - его третьим и четвертым входами, третьего и четвертого элементов, первые входы которых соответственно соединены с выходами первого и второго элементов, вторые - с четвертым и третьим входами блока, а выходы соответственно являются его первым и вторым выходами, формирователь сигнала признака равенства чисел на логическом элементе 2ИЛИ-НЕ, выход которого является выходом устройства для сигнала равенства сравниваемых чисел - А=В, все элементы устройства являются логическими элементами 2ИЛИ-НЕ, а в каждый входной блок сравнения разрядов дополнительно введен третий логический элемент 2ИЛИ-НЕ, входы которого подключены ко входам блока, а выход соединен со вторыми входами первого и второго элементов, количество блоков объединения результатов частичных сравнений равно N-1, они образуют древовидную цепь, состоящую из нескольких каскадов, число которых K, равно округленному до ближайшего

Figure 00000003
целого значению логарифма по основанию два от N, то есть
Figure 00000004
у блоков объединения результатов частичных сравнений, составляющих первый каскад, первые, вторые и третьи, четвертые входы соответственно подключены к первым, вторым выходам блоков сравнения разрядов четных и нечетных номеров, следующих в порядке возрастания от 0 до N-1, если N - четно, или до N-2, если N - нечетно, в каждом следующем каскаде первые, вторые и третьи, четвертые входы блоков объединения результатов частичных сравнений подключены к первым, вторым выходам аналогичных блоков предыдущего каскада в порядке возрастания номеров соответствующих им разрядов сравниваемых чисел, если в предыдущих каскадах отсутствуют связи выходов блока сравнения разрядов и блока объединения результатов частичных сравнений или двух блоков объединения результатов частичных сравнений, первые, вторые выходы этих блоков в порядке возрастания номеров соответствующих разрядов сравниваемых чисел подключены к первому, второму и третьему, четвертому входам последнего по порядку блока объединения частичных результатов сравнения данного каскада, первый и второй выходы блока объединения результатов частичных сравнений последнего К-го каскада соответственно являются выходами устройства для сигналов превышения первого числа вторым - А<В и второго числа первым - А>В, а также подключены ко входам логического элемента 2ИЛИ-НЕ формирователя сигнала признака равенства чисел.The technical result is achieved by the fact that in a binary number comparator containing blocks of comparison of bits in an amount equal to the digit capacity of N numbers, and each block of comparison of digits consists of the first and second elements, the first inputs and outputs of which are respectively the first and second inputs and outputs of the block, the first and second inputs of the bit comparison blocks are connected to pairs of inputs of bits a i and b i of the first and second numbers A and B of order i = 0, 1, ... N-1, blocks combining the results of partial comparisons, each of which consists of the first second and second elements, the first inputs of which, respectively, are the first and second inputs of the unit, and the second inputs are its third and fourth inputs, the third and fourth elements, the first inputs of which are respectively connected to the outputs of the first and second elements, the second to the fourth and third inputs block, and the outputs, respectively, are its first and second outputs, the signal generator of the sign of equality of numbers on the logical element 2OR-NOT, the output of which is the output of the device for the equality signal of the compared numbers - A = B, all elements of the device are logical elements 2, OR-NOT, and in each input block of comparison of discharges a third logical element 2 OR-NO is additionally entered, whose inputs are connected to the inputs of the block, and the output is connected to the second inputs of the first and second elements, the number of blocks combining the results of partial comparisons is N-1, they form a tree chain consisting of several cascades, the number of which is K, is equal to rounded to the nearest
Figure 00000003
integer to the logarithm of base two from N, that is,
Figure 00000004
in units of combining the results of partial comparisons constituting the first cascade, the first, second and third, fourth inputs are respectively connected to the first, second outputs of the block of comparison of even digits and odd numbers, following in ascending order from 0 to N-1, if N is even, or up to N-2, if N is odd, in each next stage the first, second and third, fourth inputs of the combination combining results block of partial comparisons are connected to the first, second outputs of the similar blocks of the previous cascade in ascending order of numbers correspondingly compared digits, if in previous cascades there are no links between the outputs of the bits comparison block and the combining block of partial comparison results, or two blocks of combining partial comparison results, the first, second outputs of these blocks are connected to the first, second, and second numbers in increasing order of the corresponding digits of the compared numbers. the third and fourth inputs of the last in order block for combining partial results of a comparison of a given cascade; the first and second outputs of the combining block are The tatts of partial comparisons of the last K-th stage, respectively, are the device outputs for signals exceeding the first number, the second —A <B, and the second number — the first —A> B, and are also connected to the inputs of the logical element 2IL-NOT of the signal generator of the equality of numbers.

Указанное выполнение устройства позволяет использовать в нем только логические элементы типа 2ИЛИ-НЕ и сократить их количество в критических цепях распространения сигналов от входов до выходов до 2К+3, где

Figure 00000005
The specified implementation of the device allows you to use it only logical elements of type 2 OR-NOT and reduce their number in the critical circuits of the signals from the inputs to the outputs to 2K + 3, where
Figure 00000005

Отличительными признаками полезной модели являются тип и наличие дополнительных элементов, электрические связи элементов и блоков устройства.Distinctive features of the utility model are the type and presence of additional elements, electrical connections of the elements and units of the device.

Полезная модель поясняется чертежом электрической схемы компаратора двух 7-разрядных двоичных чисел.The utility model is illustrated by a drawing of the electric circuit of a comparator of two 7-bit binary numbers.

Компаратор двоичных чисел содержит блоки 1-0, … 1-6 сравнения разрядов в количестве, равном разрядности чисел N=7 и блоки 2-0, … 2-5 объединения результатов частичных сравнений в количестве N-1=6. Каждый блок 1-0, … 1-6 сравнения разрядов состоит из первого, второго и третьего логических элементов 3, 4 и 5 2ИЛИ-НЕ. Первые, вторые входы и выходы элементов 3 и 4 соответственно являются первыми, вторыми входами X, Y и выходами X<Y, X>Y блока, у элемента 5 входы подключены ко входам блока X и Y, а выход соединен со вторыми входами элементов 3 и 4. Первый и второй входы X, Y блоков сравнения разрядов подключены к парам входов ai и bi разрядов первого и второго чисел А и В в порядке возрастания номеров i=0, 1, … 6. Каждый блок 2-0, … 2-5 объединения результатов частичных сравнений состоит из первого и второго логических элементов 6 и 7 2ИЛИ-НЕ, первые входы которых соответственно являются первым и вторым входами Х0 и Y0 блока, а вторые входы - его третьим и четвертым входами Х1 и Y1, третьего и четвертого логических элементов 8 и 9 2ИЛИ-НЕ, первые входы которых соответственно соединены с выходами элементов 6 и 7, вторые - с четвертым и третьим входами Y1 и X1 блока, а выходы соответственно являются его первым и вторым выходами Х1Х0<Y1Y0 и Х1Х0>Y1Y0. Блоки 2-0, … 2-5 объединения результатов частичных сравнений образуют трехкаскадную древовидную цепь, у блоков 2-0, 2-1 и 2-2, составляющих первый каскад, первые, вторые и третьи, четвертые входы Х0, Y0 и X1, Y1 соответственно подключены к первым, вторым выходам X<Y, X>Y блоков 1-0 и 1-1, 1-2 и 1-3, 1-4 и 1-5 сравнения разрядов четных и нечетных номеров (а0, b0 и a1, b12, b2 и а3, b3), (а4, b4 и а5, b5). Во втором каскаде первые, вторые и третьи, четвертые входы Х0, Y0 и X1 Y1 блока 2-3 подключены к первым, вторым выходам Х1Х0<Y1Y0, X1X0>Y1Y0 блоков 2-0, 2-1, а входы Х0, Y0 и Х1, Y1 блока 2-4 соответственно подключены к первому, второму выходам блока 2-2 и к первому, второму выходам блока 1-6, так-как при N=7 нечетны количества блоков 1-0, … 1-6 сравнения разрядов и блоков 2-0, … 2-2 объединения результатов частичных сравнений в первом каскаде. В третьем каскаде у блока 2-5 первый, второй и третий, четвертый входы Х0, Y0 и Х1, Y1 соответственно соединены с первыми, вторыми выходами X1X0<Y1Y0, X1X0>Y1Y0 блоков 2-3 и 2-4, а его первый и второй выходы соответственно являются выходами устройства для сигналов превышения первого числа вторым - А<В и второго числа первым - А>В, а также подключены ко входам логического элемента 10 2ИЛИ-НЕ формирователя сигнала признака равенства чисел, выход которого является выходом устройства для сигнала равенства сравниваемых чисел - А=В.The binary number comparator contains blocks 1-0, ... 1-6 comparison of bits in an amount equal to the digit capacity of the numbers N = 7 and blocks 2-0, ... 2-5 combining the results of partial comparisons in the number N-1 = 6. Each block 1-0, ... 1-6 comparison of bits consists of the first, second and third logic elements 3, 4 and 5 2, OR-NOT. The first, second inputs and outputs of elements 3 and 4, respectively, are the first, second inputs X, Y and outputs X <Y, X> Y of the block, at element 5 the inputs are connected to the inputs of the block X and Y, and the output is connected to the second inputs of elements 3 and 4. The first and second inputs X, Y of the bit comparison blocks are connected to the pairs of inputs a i and b i of the bits of the first and second numbers A and B in ascending order of numbers i = 0, 1, ... 6. Each block 2-0, ... 2-5 combining the results of partial comparisons consists of the first and second logical elements 6 and 7 2, OR-NOT, the first inputs of which, respectively, I lyayutsya first and second inputs of X 0 and Y 0 block and second inputs - with third and fourth inputs X 1 and Y 1, the third and fourth AND gates 8 and 9 2or NOR first inputs of which are respectively connected to the outputs of the elements 6 and 7 , the second - with the fourth and third inputs Y 1 and X 1 of the block, and the outputs respectively are its first and second outputs X 1 X 0 <Y 1 Y 0 and X 1 X 0 > Y 1 Y 0 . Blocks 2-0, ... 2-5 combining the results of partial comparisons form a three-cascade tree-like chain; in blocks 2-0, 2-1 and 2-2, which constitute the first cascade, the first, second and third, fourth inputs X 0 , Y 0 and X 1 , Y 1 respectively connected to the first, second outputs X <Y, X> Y blocks 1-0 and 1-1, 1-2 and 1-3, 1-4 and 1-5 comparison of digits of even and odd numbers ( a 0 , b 0 and a 1 , b 1 (a 2 , b 2 and a 3 , b 3 ), (a 4 , b 4 and a 5 , b 5 ). In the second cascade, the first, second and third, fourth inputs X 0 , Y 0 and X 1 Y 1 blocks 2-3 are connected to the first, second outputs X 1 X 0 <Y 1 Y 0 , X 1 X 0 > Y 1 Y 0 blocks 2-0, 2-1, and inputs X 0, Y 0 and X 1, Y 1 b 2-4, respectively, are connected to the first, second outputs of block 2-2 and to the first, second outputs of block 1-6, since for N = 7 the numbers of 1-0, ... 1-6 comparison of bits and blocks 2 are odd 0, ... 2-2 combining the results of partial comparisons in the first cascade. In the third cascade of block 2-5, the first, second and third, fourth inputs X 0 , Y 0 and X 1 , Y 1 are respectively connected with the first, second outputs X 1 X 0 <Y 1 Y 0 , X 1 X 0 > Y 1 Y 0 blocks 2-3 and 2-4, and its first and second outputs, respectively, are outputs of the device for the signals of the first number exceeding the second - A <B and the second number is first - A> B, and also connected to the inputs of the logic element 10 2IL-NOT of a signal generator of the sign of equality of numbers, the output of which is the device output for the equality signal of the compared numbers - A = B.

Устройство работает следующим образом.The device works as follows.

Сравнение пар разрядов ai, и bi одного порядка i чисел А и В поясняет следующая таблица.Comparison of pairs of digits a i and b i of the same order of i of numbers A and B is explained in the following table.

Figure 00000006
Figure 00000006

Из таблицы видно, что при любой комбинации сигналов ai и bi только одному из всех признаков соответствует единичный логический сигнал и достаточно формировать только сигналы, идентифицирующие неравенства, по которым можно получить сигнал равенства.The table shows that for any combination of signals a i and b i, only one of all the signs corresponds to a single logical signal and it suffices to form only signals that identify inequalities by which an equality signal can be obtained.

Отвечающая таблице система логических функций имеет видThe system of logical functions that responds to the table is

Figure 00000007
Figure 00000007

Сигналы функций Fia<b и Fia>b системы (1) формируют блоки 1-0, … 1-6 сравнения разрядов на своих первых и вторых выходах X<Y и X>Y, используя сигналы ai и bi, поступающие на их первые и вторые входы X и Y.The signals of the functions F ia <b and F ia> b of system (1) form blocks 1-0, ... 1-6 comparison of bits on their first and second outputs X <Y and X> Y, using signals a i and b i , arriving on their first and second inputs X and Y.

Результаты сравнения одноразрядных частей сравниваемых чисел далее идут на входы Х0, Y0 и Х1, Y1 блоков 2-0, … 2-2 объединения результатов частичных сравнений, составляющих первый каскад, которые формируют из них сигналы признаков сравнения трех пар 2-разрядных частей, составленных из разрядов сравниваемых чисел 0-го и 1-го, 2-го и 3-го, 4-го и 5-го порядков.The results of the comparison of single-bit parts of the compared numbers then go to the inputs X 0 , Y 0 and X 1 , Y 1 of blocks 2-0, ... 2-2 combining the results of partial comparisons that make up the first stage, which form from them the signals of the signs of comparison of three pairs 2- bit parts composed of digits of the compared numbers of the 0th and 1st, 2nd and 3rd, 4th and 5th orders.

Часть первого числа из разрядов ai+1ai больше аналогичной части второго - bi+1bi, если старший разряд ai+1 больше, чем bi+1, а в случае равенства этих разрядов, если первое число имеет

Figure 00000008
младший разряд ai. Аналогичным образом определяется превосходство второго числа из разрядов bi+1bi.Part of the first number of digits a i + 1 a i is greater than the similar part of the second - b i + 1 b i , if the most significant digit of a i + 1 is greater than b i + 1 , and in the case of equality of these digits, if the first number has
Figure 00000008
low order a i . Similarly, the superiority of the second number of bits b i + 1 b i is determined.

Figure 00000009
Figure 00000009

Figure 00000010
Figure 00000010

Формулы (2) и (3) удается упростить, если ввести в скобки избыточные конъюнкции

Figure 00000011
и склеить с ними содержащиеся там члены по логическим формулам
Figure 00000012
Formulas (2) and (3) can be simplified if the excess conjunctions are entered in the brackets
Figure 00000011
and glue the members there with them using logical formulas
Figure 00000012

Figure 00000013
Figure 00000013

Figure 00000014
Figure 00000014

В конечном виде формулы (4), (5) применимы для объединения любых частичных результатов сравнения, если члены Fi+1 а>b, Fi+1 а<b и Fi а>b, Fi а<b в них рассматривать как признаки сравнения частей, составленных соответственно из более старших и следующих за ними младших разрядов. Инверсии признаков Fi+1 а<b и Fi+1 а>b в них представляют как условие рассмотрения соотношения младших частей одновременно и равенство старших частей, и превосходство одной из них, которое уже вошло в виде признаков Fi+1 а>b и Fi+1 а<b, то естьIn the final form, formulas (4), (5) are applicable for combining any partial comparison results if the terms F i + 1 a> b , F i + 1 a <b and F i a> b , F i a <b in them be considered as signs of comparison of parts made up of higher and lower order ones, respectively. Inversions of the signs F i + 1 a <b and F i + 1 a> b in them are presented as a condition for considering the correlation of the lower parts at the same time and the equality of the older parts, and the superiority of one of them, which has already entered as signs F i + 1 a> b and F i + 1 a <b , i.e.

Figure 00000015
Figure 00000015

Сигналы Fi a<b и Fi a>b признаков сравнения частей из младших разрядов поступают на входы Х0 и Y0, a Fi+1 а<b и Fi+1 a>b для частей из следующих по старшинству - на входы X1 и Y1. Каждый из блоков 2-0, … 2-5 выполняет функцию

Figure 00000016
, соответствующую признаку Х1Х0<Y1Y0 и функцию
Figure 00000017
для признака X1X0>Y1Y0. С учетом формул (6), применяя логический закон поглощения для конъюнкции -х(у+х)=х, замена условных переменных Х0, Y0 и Х1, Y1 на соответствующие признаки сравнения в выражениях функций блоков объединения результатов частичных сравнений приводит эти выражения к виду, эквивалентному формулам (4) и (5):The signals Fi i a <b and Fi i a> b signs of comparing parts of the low-order bits come to the inputs X 0 and Y 0 , and F i + 1 a <b and F i + 1 a> b for the parts of the following by seniority - to the inputs X 1 and Y 1 . Each of blocks 2-0, ... 2-5 performs the function
Figure 00000016
corresponding to the attribute X 1 X 0 <Y 1 Y 0 and the function
Figure 00000017
for the sign X 1 X 0 > Y 1 Y 0 . Taking into account formulas (6), applying the logical law of absorption for the conjunction x (y + x) = x, replacing the conditional variables X 0 , Y 0 and X 1 , Y 1 with the corresponding comparison signs in the expressions of functions of the combining blocks of partial comparisons results these expressions to a form equivalent to formulas (4) and (5):

Figure 00000018
Figure 00000018

Figure 00000019
Figure 00000019

Во втором каскаде блоки 2-3 и 2-4 из результатов сравнений a1a0 с b1b0, а3а2 с b3b2 и а5а4 с b5b4, а6 с b6 соответственно формируют признаки сравнения частей из четырех младших и трех старших разрядов: a3a2a1a0, b3b2b1b0 и а6а5а4, b6b5b4. Их затем объединяет блок 2-5 из третьего, в данном случае последнего каскада, выходы которого служат выходами сигналов признаков неравенств А<В и А>В.In the second stage, blocks 2-3 and 2-4 from the results of the comparisons a 1 a 0 with b 1 b 0 , and 3 a 2 with b 3 b 2 and a 5 a 4 with b 5 b 4 , and 6 with b 6 respectively form the signs of comparing parts of the four low and three high digits: a 3 a 2 a 1 a 0 , b 3 b 2 b 1 b 0 and a 6 a 5 a 4 , b 6 b 5 b 4 . They are then combined by block 2-5 of the third, in this case, the last stage, the outputs of which serve as outputs of the signals of signs of inequalities A <B and A> B.

Равенство чисел А и В достигается в случае равенства пар составляющих их разрядов одинаковых порядков, но оно же соответствует конъюнкции инверсий признаков неравенств, так как только при А=В будут одновременно ложными оба утверждения о превосходстве А над В и В над А. Сигнал признака А=В, соответствующий конъюнкции

Figure 00000020
, формирует элемент 10 2ИЛИ-НЕ.Equality of numbers A and B is achieved in the case of equality of pairs of constituent digits of the same order, but it also corresponds to the conjunction of inversions of signs of inequalities, since only at A = B both statements about superiority of A over B and B over A will be false. Signal signal A = B, corresponding to conjunction
Figure 00000020
, forms the element 10 2ILE-NOT.

Из описания работы устройства должно быть видно, что каждый блок объединения результатов частичных сравнений из двух пар признаков сравнения двух, следующих друг за другом пар частей сравниваемых чисел формирует одну пару признаков для составленных из этих частей фрагментов чисел. На каждом каскаде этих блоков вдвое уменьшается количество сравниваемых частей, из которых можно составить пары, и соответствующих им признаков. Если для одной части пары нет, она передается на ближайший из последующих каскадов, где сможет объединиться с одной оставшейся там без пары частей. Так происходит до полного объединения всех частей.From the description of the operation of the device, it should be seen that each block combining the results of partial comparisons of two pairs of comparison signs of two successive pairs of parts of compared numbers forms one pair of signs for fragments of numbers composed of these parts. On each cascade of these blocks, the number of compared parts, of which pairs can be made, and their corresponding signs, are halved. If for one part there is no pair, it is transmitted to the nearest of the subsequent cascades, where it can unite with one remaining there without a pair of parts. This happens before the complete unification of all parts.

Максимальное количество N разрядов чисел, признаки которых может объединить древовидная цепь блоков, состоящая из К каскадов, равно 2К. А если количество разрядов превысит 2К, но останется меньше 2⋅2К, понадобится К+1 каскад. Следовательно, количество каскадов К равно степени, в которую следует возвести число 2, чтобы получить ближайшее превышающее N целое число, что выражает формула

Figure 00000021
The maximum number N of digits of numbers, signs of which can combine a tree-like chain of blocks consisting of K cascades, is 2 K. And if the number of digits exceeds 2 K , but less than 2⋅2 K remains, K + 1 cascade will be needed. Consequently, the number of cascades K is equal to the degree to which the number 2 should be erected in order to obtain the nearest integer exceeding N, which expresses the formula
Figure 00000021

Выражение для количества блоков объединения результатов частичных сравнений легко получить для случая равенства разрядности N числу 2, в какой-то целой степени, то есть N=2K. Так как в первом каскаде количество блоков равно N/2 и уменьшается вдвое на каждом следующем каскаде, их общее количество будет соответствовать сумме К членов геометрической прогрессии со знаменателем q=0,5. По известному выражению суммы SK через q, первый и последний члены прогрессии p1=2К-1 и рК=1The expression for the number of units combining the results of partial comparisons is easy to obtain for the case of equality of the digit capacity of N to 2, to some extent, that is, N = 2 K. Since in the first cascade the number of blocks is N / 2 and is halved on each next cascade, their total number will correspond to the sum of K terms of the geometric progression with the denominator q = 0.5. According to the well-known expression of the sum S K through q, the first and last members of the progression p 1 = 2 K-1 and p K = 1

Figure 00000022
Figure 00000022

Это количество останется равным N-1 при любом N потому, что каждое увеличение N на один разряд потребует добавить один блок.This number will remain equal to N-1 for any N because each increase in N by one digit will require adding one block.

Таким образом, компаратор двух N-разрядных двоичных чисел выполняет свои функции, имея в своем составе 7N-3 логических элемента 2ИЛИ-НЕ, связанных в древовидную цепь, в которой пути распространения сигналов от входов до выходов содержат не более чем

Figure 00000023
последовательных элементов.Thus, the comparator of two N-bit binary numbers performs its functions, having in its composition 7N-3 logic element 2IL-NOT connected to a tree-like chain in which the propagation paths of signals from inputs to outputs contain no more than
Figure 00000023
consecutive elements.

Claims (1)

Компаратор двоичных чисел, содержащий блоки сравнения разрядов в количестве, равном разрядности чисел N, каждый блок сравнения разрядов состоит из первого и второго элементов, первые входы и выходы которых соответственно являются первыми и вторыми входами и выходами блока, первый и второй входы блоков сравнения разрядов подключены к парам входов разрядов ai и bi первого и второго чисел А и В порядка i=0, 1, … N-1, блоки объединения результатов частичных сравнений, каждый из которых состоит из первого и второго элементов, первые входы которых соответственно являются первым и вторым входами блока, а вторые входы - его третьим и четвертым входами, третьего и четвертого элементов, первые входы которых соответственно соединены с выходами первого и второго элементов, вторые - с четвертым и третьим входами блока, а выходы соответственно являются его первым и вторым выходами, формирователь сигнала признака равенства чисел на логическом элементе 2ИЛИ-НЕ, выход которого является выходом устройства для сигнала равенства сравниваемых чисел - А=В, отличающийся тем, что все элементы устройства являются логическими элементами 2ИЛИ-НЕ, в каждый входной блок сравнения разрядов дополнительно введен третий логический элемент 2ИЛИ-НЕ, входы которого подключены ко входам блока, а выход соединен со вторыми входами первого и второго элементов, количество блоков объединения результатов частичных сравнений равно N-1, они образуют древовидную цепь, состоящую из нескольких каскадов, число которых К равно округленному до ближайшего
Figure 00000024
целого значения логарифма по основанию два от N, то есть
Figure 00000025
у блоков объединения результатов частичных сравнений, составляющих первый каскад, первые, вторые и третьи, четвертые входы соответственно подключены к первым, вторым выходам блоков сравнения разрядов четных и нечетных номеров, следующих в порядке возрастания от 0 до N-1, если N - четно, или до N-2, если N - нечетно, в каждом следующем каскаде первые, вторые и третьи, четвертые входы блоков объединения результатов частичных сравнений подключены к первым, вторым выходам аналогичных блоков предыдущего каскада в порядке возрастания номеров соответствующих им разрядов сравниваемых чисел, если в предыдущих каскадах отсутствуют связи выходов блока сравнения разрядов и блока объединения результатов частичных сравнений или двух блоков объединения результатов частичных сравнений, первые, вторые выходы этих блоков в порядке возрастания номеров соответствующих разрядов сравниваемых чисел подключены к первому, второму и третьему, четвертому входам последнего по порядку блока объединения частичных результатов сравнения данного каскада, первый и второй выходы блока объединения результатов частичных сравнений последнего К-го каскада соответственно являются выходами устройства для сигналов превышения первого числа вторым - А<В и второго числа первым - А>В, а также подключены ко входам логического элемента 2ИЛИ-НЕ формирователя сигнала признака равенства чисел.
A binary number comparator containing blocks of comparison of bits in an amount equal to the digit capacity of N numbers, each block of bits comparison consists of the first and second elements, the first inputs and outputs of which are respectively the first and second inputs and outputs of the block, the first and second inputs of the bits comparison blocks are connected to the pairs of inputs of digits a i and b i of the first and second numbers A and b of the order of i = 0, 1, ... N-1 blocks of the partial combining results of comparisons, each of which consists of first and second elements, first inputs of which with responsibly are the first and second inputs of the block, and the second inputs are its third and fourth inputs, the third and fourth elements, the first inputs of which are respectively connected to the outputs of the first and second elements, the second to the fourth and third inputs of the block, and the outputs respectively are its first and the second outputs, the signal conditioner of the sign of equality of numbers on the logical element 2OR-NOT, the output of which is the output of the device for the equality signal of the compared numbers - A = B, characterized in that all elements of the device a are logical elements 2ILI — NOT; a third logic element 2ILI-NOT is added to each input block of comparison of discharges, whose inputs are connected to the inputs of the block, and the output is connected to the second inputs of the first and second elements, the number of units combining the partial comparison results is N- 1, they form a tree chain consisting of several cascades, the number of which K is equal to rounded to the nearest
Figure 00000024
the integer value of the logarithm of base two from N, i.e.
Figure 00000025
in units of combining the results of partial comparisons constituting the first cascade, the first, second and third, fourth inputs are respectively connected to the first, second outputs of the block of comparison of even digits and odd numbers, following in ascending order from 0 to N-1, if N is even, or up to N-2, if N is odd, in each next stage the first, second and third, fourth inputs of the combination combining results block of partial comparisons are connected to the first, second outputs of the similar blocks of the previous cascade in ascending order of numbers correspondingly compared digits, if in previous cascades there are no links between the outputs of the bits comparison block and the combining block of partial comparison results, or two blocks of combining partial comparison results, the first, second outputs of these blocks are connected to the first, second, and second numbers in increasing order of the corresponding digits of the compared numbers. the third and fourth inputs of the last in order block for combining partial results of a comparison of a given cascade; the first and second outputs of the combining block are The tatts of partial comparisons of the last K-th stage, respectively, are the device outputs for signals exceeding the first number, the second —A <B, and the second number — the first —A> B, and are also connected to the inputs of the logical element 2IL-NOT of the signal generator of the equality of numbers.
RU2019108408U 2019-03-22 2019-03-22 BINARY COMPARATOR RU189024U1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
RU2019108408U RU189024U1 (en) 2019-03-22 2019-03-22 BINARY COMPARATOR

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
RU2019108408U RU189024U1 (en) 2019-03-22 2019-03-22 BINARY COMPARATOR

Publications (1)

Publication Number Publication Date
RU189024U1 true RU189024U1 (en) 2019-05-06

Family

ID=66430912

Family Applications (1)

Application Number Title Priority Date Filing Date
RU2019108408U RU189024U1 (en) 2019-03-22 2019-03-22 BINARY COMPARATOR

Country Status (1)

Country Link
RU (1) RU189024U1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
RU194455U1 (en) * 2019-05-27 2019-12-11 Акционерное общество "Научно-исследовательский институт молекулярной электроники" BIN NUMBER COMPARATOR
RU2757832C1 (en) * 2020-10-28 2021-10-21 федеральное государственное бюджетное образовательное учреждение высшего образования "Ульяновский государственный технический университет" Binary number comparator
RU2762061C1 (en) * 2021-02-19 2021-12-15 Публичное акционерное общество "Микрон" Binary number comparator
RU213104U1 (en) * 2022-03-30 2022-08-25 Акционерное общество "Микрон" (АО "Микрон") COMPARATOR OF BINARY NUMBERS IN SERIAL CODE

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050206408A1 (en) * 2004-03-18 2005-09-22 Pentti Haikonen Circuit elements and parallel computational networks with logically entangled terminals
RU2300132C1 (en) * 2005-12-23 2007-05-27 Государственное образовательное учреждение высшего профессионального образования "Ульяновский государственный технический университет" Binary number comparator
RU2363037C1 (en) * 2008-01-22 2009-07-27 Государственное образовательное учреждение высшего профессионального образования "Ульяновский государственный технический университет" Device for comparing binary numbers
RU2393526C2 (en) * 2008-05-19 2010-06-27 Закрытое акционерное общество "ИВЛА-ОПТ" Comparator of binary numbers
RU2621280C1 (en) * 2015-12-08 2017-06-01 Федеральное государственное бюджетное образовательное учреждение высшего профессионального образования "Ульяновский государственный технический университет" Binary number comparator
RU2649296C1 (en) * 2017-04-04 2018-03-30 федеральное государственное бюджетное образовательное учреждение высшего образования "Ульяновский государственный технический университет" Comparator of binary numbers

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050206408A1 (en) * 2004-03-18 2005-09-22 Pentti Haikonen Circuit elements and parallel computational networks with logically entangled terminals
RU2300132C1 (en) * 2005-12-23 2007-05-27 Государственное образовательное учреждение высшего профессионального образования "Ульяновский государственный технический университет" Binary number comparator
RU2363037C1 (en) * 2008-01-22 2009-07-27 Государственное образовательное учреждение высшего профессионального образования "Ульяновский государственный технический университет" Device for comparing binary numbers
RU2393526C2 (en) * 2008-05-19 2010-06-27 Закрытое акционерное общество "ИВЛА-ОПТ" Comparator of binary numbers
RU2621280C1 (en) * 2015-12-08 2017-06-01 Федеральное государственное бюджетное образовательное учреждение высшего профессионального образования "Ульяновский государственный технический университет" Binary number comparator
RU2649296C1 (en) * 2017-04-04 2018-03-30 федеральное государственное бюджетное образовательное учреждение высшего образования "Ульяновский государственный технический университет" Comparator of binary numbers

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
RU194455U1 (en) * 2019-05-27 2019-12-11 Акционерное общество "Научно-исследовательский институт молекулярной электроники" BIN NUMBER COMPARATOR
RU2757832C1 (en) * 2020-10-28 2021-10-21 федеральное государственное бюджетное образовательное учреждение высшего образования "Ульяновский государственный технический университет" Binary number comparator
RU2762061C1 (en) * 2021-02-19 2021-12-15 Публичное акционерное общество "Микрон" Binary number comparator
RU2791462C1 (en) * 2022-03-18 2023-03-09 федеральное государственное бюджетное образовательное учреждение высшего образования "Ульяновский государственный технический университет" Binary number comparator
RU213104U1 (en) * 2022-03-30 2022-08-25 Акционерное общество "Микрон" (АО "Микрон") COMPARATOR OF BINARY NUMBERS IN SERIAL CODE
RU215289U1 (en) * 2022-08-05 2022-12-07 Акционерное общество "Микрон" (АО "Микрон") ASYNCHRONOUS COMPARATOR OF BINARY NUMBERS IN SERIAL CODE

Similar Documents

Publication Publication Date Title
RU189024U1 (en) BINARY COMPARATOR
US4163211A (en) Tree-type combinatorial logic circuit
KR940008613B1 (en) Carry lookahead adder and carry transfer method
JP7292297B2 (en) probabilistic rounding logic
KR960042416A (en) Max value selection circuit
US20040153490A1 (en) Logic circuit and method for carry and sum generation and method of designing such a logic circuit
RU194455U1 (en) BIN NUMBER COMPARATOR
KR960039642A (en) Synthesis of Logic Circuits Using 2-Minute Decision Graphs Detected Using Layered Correlation between Input Variables
Ayyer et al. Odd partitions in Young's lattice
Szakács Multiplying balancing numbers
Amir et al. Positive speed for high-degree automaton groups
Allouche et al. A variant of Hofstadter’s sequence and finite automata
US6044063A (en) Unsigned integer comparator
EP0242600A2 (en) Carry look-ahead calculating method and circuits therefor
RU215289U1 (en) ASYNCHRONOUS COMPARATOR OF BINARY NUMBERS IN SERIAL CODE
RU213104U1 (en) COMPARATOR OF BINARY NUMBERS IN SERIAL CODE
JP3741280B2 (en) Carry look-ahead circuit and addition circuit using the same
Chen et al. On base 3/2 and its sequences
Efron Optimum evasion versus systematic search
Borodin et al. Chip-Firing and Fractional Bases
KR100248976B1 (en) A circuit for 2&#39;complement operation
Amram et al. De Bruijn Sequences: From Games to Shift-Rules to a Proof of the Fredricksen-Kessler-Maiorana Theorem
SU991409A1 (en) Device for determination of number of ones in a binary number
SU860079A1 (en) Table algorithmic function converter
SU1120408A1 (en) Associative storage