RU194455U1 - BIN NUMBER COMPARATOR - Google Patents

BIN NUMBER COMPARATOR Download PDF

Info

Publication number
RU194455U1
RU194455U1 RU2019116181U RU2019116181U RU194455U1 RU 194455 U1 RU194455 U1 RU 194455U1 RU 2019116181 U RU2019116181 U RU 2019116181U RU 2019116181 U RU2019116181 U RU 2019116181U RU 194455 U1 RU194455 U1 RU 194455U1
Authority
RU
Russia
Prior art keywords
inputs
block
outputs
numbers
blocks
Prior art date
Application number
RU2019116181U
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 RU2019116181U priority Critical patent/RU194455U1/en
Application granted granted Critical
Publication of RU194455U1 publication Critical patent/RU194455U1/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

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer 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К+4 каскада, где К равно округленному до ближайшего большего целого значению логарифма по основанию два от разрядности сравниваемых чисел N, то естьв каждый входной блок 1-0,…1-6 сравнения разрядов введен третий логический элемент 6 2И-НЕ. На схеме устройства также обозначены блоки 2-0,…2-5 объединения результатов частичных сравнений, выходной блок 3 и остальные логические элементы 4, 5 и 7,…14 2И-НЕ. Устройство формирует сигналы трех признаков сравнения двух чисел А и В с разрядами а, a, … aи b, b, … bпо следующим логическим формулам:1 ил.The utility model relates to electronics and is intended for use in counting and control devices. Its technical result, which consists in simplifying the device and increasing speed, is achieved through the use of logical elements of only one type - 2I-NOT and combining them into a tree chain, the critical paths of which from inputs to outputs contain no more than 2K + 4 stages, where K equal to the base logarithm rounded to the nearest larger integer, two from the digit capacity of the compared numbers N, that is, a third logic element 6 2 AND is NOT entered into each input block 1-0, ... 1-6 of the bit comparison. The device diagram also indicates the blocks 2-0, ... 2-5 combining the results of partial comparisons, the output block 3 and the remaining logic elements 4, 5 and 7, ... 14 2I-NOT. The device generates signals of three signs of comparing two numbers A and B with bits a, a, ... a and b, b, ... b according to the following logical formulas: 1 il.

Description

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

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

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

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

Figure 00000001
Figure 00000001

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

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

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

Figure 00000002
которые сложно реализуются в КМОП и ТТЛ схемотехнических базисах, а элементы ЗАПРЕТ представлены не во всех сериях логических микросхем.The disadvantage of the binary number comparator is also the difficulty of its implementation on CMOS and TTL type microcircuits and on elements of microcircuits of a small degree of integration. It uses logic elements 2 OR and FORBID
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 to increase performance by reducing the number of cascades of logic elements in the signal propagation circuits from inputs to outputs of the device.

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

Figure 00000003
целого значению логарифма по основанию два от N, то есть
Figure 00000004
, у блоков объединения результатов частичных сравнений, составляющих первый каскад, первые, вторые и третьи, четвертые входы соответственно подключены к первым, вторым выходам блоков сравнения разрядов четных и нечетных номеров, следующих в порядке возрастания от 0 до N-1, если N-четно, или до N-2, если N-нечетно, в каждом следующем каскаде первые, вторые и третьи, четвертые входы блоков объединения результатов частичных сравнений подключены к первым, вторым выходам аналогичных блоков предыдущего каскада в порядке возрастания номеров соответствующих им разрядов сравниваемых чисел, если в предыдущих каскадах отсутствуют связи блока сравнения разрядов и блока объединения результатов частичных сравнений или пары блоков объединения результатов частичных сравнений с четными номерами, первые, вторые выходы этих блоков в порядке возрастания номеров соответствующих разрядов сравниваемых чисел подключены к первому, второму и третьему, четвертому входам последнего по порядку в данном каскаде блока объединения частичных результатов сравнения, первый и второй выходы блока объединения результатов частичных сравнений последнего K-го каскада соответственно подключены к первому и второму входам выходного блока, в который дополнительно введены второй логический элемент 2И-НЕ, выход которого является выходом устройства для сигнала равенства сравниваемых чисел - А=В, а входы соединены с выходом первого элемента, третий и четвертый логические элементы 2И-НЕ, входы которых соединены и соответственно подключены к первому и второму входам блока, а выходы соответственно являются выходами устройства для сигналов превышения второго числа первым - А>В и первого числа вторым - А<В.The technical result is achieved by the fact that in the binary number comparator containing the blocks for comparing the digits in an amount equal to the digit capacity of the numbers N, and each unit for comparing the digits consists of the first and second elements, the first inputs and outputs of which are the first and second inputs and outputs of the block, the first and second inputs of the discharge 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 of order i = 0, 1, ... N-1, blocks of combining the results of partial comparisons, each of which consists of the first the first and second elements, the first inputs of which are the first and second inputs of the block, respectively, 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 - with the fourth and third inputs block, and the outputs, respectively, are its first and second outputs, the output block consists of the first element whose inputs are the first and second inputs of the block, all elements are logical elements 2I-NOT, in each input ok comparison of digits additionally introduced the third logic element 2I-NOT, the first and second inputs of which are connected to the first and second 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 a chain consisting of several cascades, the number of which K is rounded to the nearest
Figure 00000003
the integer value of the base two logarithm of N, i.e.
Figure 00000004
, in the units of combining the results of partial comparisons that make up the first cascade, the first, second, third, fourth inputs are respectively connected to the first, second outputs of the blocks for comparing the digits of even and odd numbers, in ascending order from 0 to N-1, if N is even , or up to N-2, if N is odd, in each subsequent cascade, the first, second and third, fourth inputs of blocks combining the results of partial comparisons are connected to the first, second outputs of similar blocks of the previous cascade in ascending order of numbers, respectively the discharges of the compared numbers if there are no links in the previous stages of the unit for comparing the discharges and the unit for combining the results of partial comparisons or the pair of units for combining the results of partial comparisons with even numbers, the first, second outputs of these blocks are connected in order of increasing numbers of the corresponding digits of the compared numbers the second and third, fourth inputs of the last in order in this cascade block combining partial results of comparison, the first and second outputs of the block are combined The results of partial comparisons of the last Kth cascade are respectively connected to the first and second inputs of the output block, into which the second logic element 2I-NOT is additionally inserted, the output of which is the output of the device for the signal of equality of the compared numbers - A = B, and the inputs are connected to the output the first element, the third and fourth logical elements 2I-NOT, the inputs of which are connected and respectively connected to the first and second inputs of the block, and the outputs, respectively, are the outputs of the device for signals exceeding of the first number - A> B and the first of the second - A <B.

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

Figure 00000004
.The specified implementation of the device allows you to use it only logic elements of type 2I-NOT and reduce their number in the critical circuit of the propagation of signals from inputs to outputs to 2K + 4, where
Figure 00000004
.

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

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

Компаратор двоичных чисел содержит блоки 1-0,…1-6 сравнения разрядов в количестве, равном разрядности чисел N=7, блоки 2-0,…2-5 объединения результатов частичных сравнений в количестве N-1=6 и выходной блок 3. Каждый блок 1-0,…1-6 сравнения разрядов состоит из первого, второго и третьего логических элементов 4, 5 и 6 2И-НЕ, первые входы и выходы элементов 4 и 5 соответственно являются первыми и вторыми входами X, Y и выходами X≤Y, X≥Y блока, у элемента 6 первый и второй входы подключены ко входам X и Y блока, а выход соединен со вторыми входами элементов 4 и 5, первый и второй входы X, Y блоков сравнения разрядов подключены к парам входов ai и bi разрядов первого и второго чисел А и В в порядке возрастания номеров i=0, 1,…6. Каждый блок 2-0,…2-5 объединения результатов частичных сравнений состоит из первого и второго логических элементов 7 и 8 2И-НЕ, первые входы которых соответственно являются первым и вторым входами Х0 и Y0 блока, а вторые входы - его третьим и четвертым входами X1 и Y1, третьего и четвертого логических элементов 9 и 10 2И-НЕ, первые входы которых соответственно соединены с выходами элементов 7 и 8, вторые - с четвертым и третьим входами Y1 и X1 блока, а выходы соответственно являются его первым и вторым выходами Х1X0≤Y1Y0 и Х1Х0≥Y1Y0. Выходной блок 3 состоит из первого логического элемента 11 2И-НЕ, входы которого являются первым и вторым входами блока, второго логического элемента 12 2И-НЕ, выход которого является выходом устройства для сигнала равенства сравниваемых чисел - А=В, а входы соединены с выходом элемента 11, третьего логического элемента 13 2И-НЕ, входы которого соединены с первым входом блока, а выход является выходом устройства для сигнала превышения второго числа первым - А>В, четвертого логического элемента 14 2И-НЕ, входы которого соединены со вторым входом блока, а выход является выходом устройства для сигнала превышения первого числа вторым - А<В. Блоки 2-0,…2-5 объединения результатов частичных сравнений образуют древовидную цепь, состоящую из трех каскадов, у блоков 2-0, 2-1 и 2-2, составляющих первый каскад, первые, вторые и третьи, четвертые входы Х0, Y0 и Y1, Y1 соответственно подключены к первым, вторым выходам X<Y, X≥Y блоков 1-0 и 1-1, 1-2 и 1-3, 1-4 и 1-5 сравнения разрядов четных и нечетных номеров (a0, b0 и а1 b1), (а2, b2 и а3, b3), (а4, b4 и а5, b5). Во втором каскаде первые, вторые и третьи, четвертые входы Х0, Y0 и X1, Y1 блока 2-3 подключены к первым, вторым выходам Х1Х0≤Y1Y0, Х1X0>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 и X1, Y1 соответственно соединены с первыми, вторыми выходами X1X0≤Y1Y0, X1X0≥Y1Y0 блоков 2-3 и 2-4, а его первый и второй выходы соответственно подключены к первому и второму входам выходного блока 3,The binary number comparator contains blocks 1-0, ... 1-6 comparing the digits in an amount equal to the digit capacity of numbers N = 7, blocks 2-0, ... 2-5 combining the results of partial comparisons in the amount of N-1 = 6 and the output block 3. Each block 1-0, ... 1-6 comparison of digits consists of the first, second and third logical elements 4, 5 and 6 2I-NOT, the first inputs and outputs of elements 4 and 5, respectively, are the first and second inputs X, Y and outputs X ≤Y, X≥Y of the block, for element 6, the first and second inputs are connected to the inputs X and Y of the block, and the output is connected to the second inputs of elements 4 and 5, the first the second and second inputs X, Y of the blocks comparing the bits are connected to pairs of inputs a i and b i of the bits of the first and second numbers A and B in increasing 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 logic elements 7 and 8 2I-NOT, the first inputs of which are respectively the first and second inputs X 0 and Y 0 of the block, and the second inputs are its third and the fourth inputs X 1 and Y 1 , the third and fourth logical elements 9 and 10 2I-NOT, the first inputs of which are respectively connected to the outputs of the elements 7 and 8, 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 . The output unit 3 consists of the first logic element 11 2I-NOT, the inputs of which are the first and second inputs of the block, the second logic element 12 2I-NOT, the output of which is the output of the device for the signal of equality of the compared numbers - A = B, and the inputs are connected to the output element 11, the third logical element 13 2AND, the inputs of which are connected to the first input of the block, and the output is the output of the device for the signal exceeding the second number by the first - A> B, the fourth logical element 14 2AND NOT, the inputs of which are connected to the second input of the block a, and the output is the output of the device for the signal exceeding the first number by the second - A <B. Blocks 2-0, ... 2-5 combining the results of partial comparisons form a tree-like chain consisting of three cascades, for blocks 2-0, 2-1 and 2-2, making up the first cascade, the first, second and third, fourth inputs X 0 , Y 0 and Y 1 , Y 1 are respectively connected to the first, second outputs X <Y, X≥Y of blocks 1-0 and 1-1, 1-2 and 1-3, 1-4 and 1-5 of comparison of even digits 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 stage, the first, second and third, fourth inputs X 0 , Y 0 and X 1 , Y 1 of block 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 the inputs X 0 , Y 0 and X 1 , Y 1 of block 2-4 are respectively connected to the first, second outputs of block 2-2 and to the first, second outputs of block 1-6, so - as with N = 7, the odd number of blocks 1-0, ... 1-6 comparing the bits and blocks 2-0, ... 2-2 combining the results of partial comparisons in the first cascade. In the third stage at block 2-5, the first, second and third, fourth inputs X 0 , Y 0 and X 1 , Y 1 are respectively connected to 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 are respectively connected to the first and second inputs of the output block 3,

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

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

Figure 00000005
Figure 00000005

Из таблицы видно, что при любой комбинации сигналов 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 is enough to generate only signals identifying inequalities by which an equality signal can be obtained.

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

Figure 00000006
Figure 00000006

Сигналы функций Fa>b и Fa<b системы (1) в инверсном виде формируют блоки 1-0,…1-6 сравнения разрядов на своих первых и вторых выходах X≤Y и X≥Y, используя сигналы ai и bi, поступающие на их первые и вторые входы X и Y.The signals of the functions F a > b and F a < b of system (1) in inverse form form blocks 1-0, ... 1-6 comparing the digits at their first and second outputs X≤Y and X≥Y, using signals a i and b i arriving at 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 comparing the one-bit parts of the numbers to be compared 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 cascade, which form the results of comparing three pairs of 2-bit ones parts made up of digits of compared numbers of the 0th and 1st, 2nd and 3rd, 4th and 5th orders.

Часть первого числа из разрядов Х1Х0 больше аналогичной части второго - Y1Y0, если старший разряд X1 больше, чем Y1, а в случае равенства этих разрядов, если первое число имеет

Figure 00000007
младший разряд Х0. Аналогичным образом определяется превосходство второго числа из разрядов Y1Y0.A part of the first number from the digits X 1 X 0 is greater than a similar part of the second, Y 1 Y 0 if the senior digit X 1 is greater than Y 1 , and if these digits are equal, if the first number has
Figure 00000007
low order X 0 . Similarly, the superiority of the second number of digits Y 1 Y 0 is determined.

Figure 00000008
Figure 00000008

Figure 00000009
Figure 00000009

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

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

Figure 00000012
Figure 00000012

Figure 00000013
Figure 00000013

В конечных виде формулы (4), (5) применимы для объединения любых частичных результатов сравнения, если члены Fi+1а>b, Fi+1а<b и F>b, Fia<b в них рассматривать как признаки сравнения частей, составленных соответственно из более старших и следующих за ними младших разрядов. Инверсии признаков Fi+1a<b и Fi+1a>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 + 1a> b , F i + 1a <b and F ia > b , F ia < b in them are considered as signs of comparison parts, composed respectively of the older and subsequent lower ranks. Inversions of the signs F i + 1a < b and F i + 1a> b in them represent, as a condition for considering the ratio of the younger parts, the equality of the senior parts and the superiority of one of them, which has already entered the form of the signs F i + 1a> b and F i + 1a <b , i.e.

Figure 00000014
Figure 00000014

Во втором каскаде блоки 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 cascade, blocks 2-3 and 2-4 from the results of 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 signs of comparison of parts of the four lower and three most significant bits - 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 united by a block 2-5 from the third, in this case, the last cascade.

Так как признаки сравнения чисел на выходах блока 2-5 получаются с инверсией, в состав выходного блока 3 входят инверторы на элементах 13 и 14 2И-НЕ, формирующие выходные сигналы признаков неравенств А>В и А<В.Since the signs of comparing numbers at the outputs of block 2-5 are obtained with inversion, the output block 3 includes inverters on elements 13 and 14 of 2I-NOT, which form the output signals of the signs of inequalities A> B and A <B.

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

Figure 00000015
инверсий признаков неравенств, так как только при А=В будут одновременно ложными оба утверждения о превосходстве А над В и В над А. Соответствующий этой конъюнкции сигнал признака А=В формируют элемент 11 2И-НЕ и следующий за ним инвертор на элементе 12 2И-НЕ.Equality of numbers A and B is achieved in case of equality of pairs of constituent digits of the same order, but it also corresponds to conjunction
Figure 00000015
inversions of the signs of inequalities, since only at A = B will both statements about the superiority of A over B and B over A be false. The signal of the sign A = B corresponding to this conjunction forms element 11 2I-NOT and the inverter following it on element 12 2I- NOT.

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

Максимальное количество N разрядов чисел, признаки которых может объединить древовидная цепь блоков, состоящая из К каскадов, равно 2К. А если количество разрядов превысит 2К, но останется меньше 2⋅2К, понадобится К+1 каскад. Следовательно, количество каскадов К равно степени, в которую следует возвести число 2, чтобы получить ближайшее превышающее N целое число, что выражает формула K=]log2N[.The maximum number of N digits of numbers, the signs of which can be combined by a tree-like chain of blocks consisting of K cascades, is equal to 2 K. And if the number of discharges exceeds 2 K , but remains less than 2⋅2 K , K + 1 cascade is required. Therefore, the number of cascades K is equal to the degree to which the number 2 should be raised in order to obtain the nearest integer greater than N, which is expressed by the formula K =] log 2 N [.

Выражение для количества блоков объединения результатов частичных сравнений легко получить для случая равенства разрядности N числу 2, в какой-то целой степени, то есть N=2К Так как в первом каскаде количество блоков равно N/2 и уменьшается вдвое на каждом следующем каскаде, их общее количество будет соответствовать сумме К членов геометрической прогрессии со знаменателем q=0,5. По известному выражению суммы SK через q, первый и последний члены прогрессии p1=2К-1 и рК=1The expression for the number of blocks combining the results of partial comparisons is easy to obtain for the case of equal bit depth N to number 2, to some extent, that is, N = 2 K. Since in the first cascade the number of blocks is N / 2 and halves at each subsequent cascade, their total number will correspond to the sum K of the members 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 terms of the progression are p 1 = 2 K-1 and p K = 1

Figure 00000016
Figure 00000016

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

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

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

Claims (1)

Компаратор двоичных чисел, содержащий блоки сравнения разрядов в количестве, равном разрядности чисел N, блоки объединения результатов частичных сравнений и выходной блок, каждый блок сравнения разрядов состоит из первого и второго элементов, первые входы и выходы которых соответственно являются первыми и вторыми входами и выходами блока, первый и второй входы блоков сравнения разрядов подключены к парам входов ai и bi разрядов первого и второго чисел А и В порядка i, i=0, 1,…N-1, каждый блок объединения результатов частичных сравнений состоит из первого и второго элементов, первые входы которых соответственно являются первым и вторым входами блока, а вторые входы - его третьим и четвертым входами, третьего и четвертого элементов, первые входы которых соответственно соединены с выходами первого и второго элементов, вторые - с четвертым и третьим входами блока, а выходы соответственно являются его первым и вторым выходами, выходной блок состоит из первого элемента, входы которого являются первым и вторым входами блока, отличающийся тем, что все элементы устройства являются логическими элементами 2И-НЕ, в каждый входной блок сравнения разрядов дополнительно введен третий логический элемент 2И-НЕ, первый и второй входы которого подключены к первому и второму входам блока, а выход соединен со вторыми входами первого и второго элементов, количество блоков объединения результатов частичных сравнений равно N-1, они образуют древовидную цепь, состоящую из нескольких каскадов, число которых К равно округленному до ближайшего
Figure 00000018
целого значению логарифма по основанию два от N, то есть
Figure 00000019
у блоков объединения результатов частичных сравнений, составляющих первый касскад, первые, вторые и третьи, четвертые входы соответственно подключены к первым, вторым выходам блоков сравнения разрядов четных и нечетных номеров, следующих в порядке возрастания от 0 до N-1, если N - четно, или до N-2, если N - нечетно, в каждом следующем каскаде первые, вторые и третьи, четвертые входы блоков объединения результатов частичных сравнений подключены к первым, вторым выходам аналогичных блоков предыдущего каскада в порядке возрастания номеров соответствующих им разрядов сравниваемых чисел, если в предыдущих каскадах отсутствуют связи блока сравнения разрядов и блока объединения результатов частичных сравнений или пары блоков объединения результатов частичных сравнений с четными номерами, первые, вторые выходы этих блоков в порядке возрастания номеров соответствующих разрядов сравниваемых чисел подключены к первому, второму и третьему, четвертому входам последнего по порядку в данном каскаде блока объединения частичных результатов сравнения, первый и второй выходы блока объединения результатов частичных сравнений последнего К-го каскада соответственно подключены к первому и второму входам выходного блока, в который дополнительно введены второй логический элемент 2И-НЕ, выход которого является выходом устройства для сигнала равенства сравниваемых чисел - А=В, а входы соединены с выходом первого элемента, третий и четвертый логические элементы 2И-НЕ, входы которых соединены и соответственно подключены к первому и второму входам блока, а выходы соответственно являются выходами устройства для сигналов превышения второго числа первым - А>В и первого числа вторым - А<В.
A binary number comparator containing blocks comparing the digits in an amount equal to the number of bits of numbers N, blocks combining the results of partial comparisons and an output block, each block comparing the digits consists of the first and second elements, the first inputs and outputs of which are the first and second inputs and outputs of the block first and second inputs of comparison blocks of bits are connected to the pairs of inputs of a i and b i bits of the first and second numbers A and b of order i, i = 0, 1, ... N-1, each block combining partial results of comparisons is consist from the first and second elements, the first inputs of which are respectively 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 - with the fourth and third block inputs, and the outputs, respectively, are its first and second outputs, the output block consists of the first element, the inputs of which are the first and second inputs of the block, characterized in that all elements of the device are logs 2I-NOT elements, in each input block of comparison of digits, a third logical element 2I-NOT is additionally introduced, the first and second inputs of which are connected to the first and second inputs of the block, and the output is connected to the second inputs of the first and second elements, the number of blocks combining partial results comparisons is equal to N-1, they form a tree-like chain consisting of several cascades, the number of which K is rounded to the nearest
Figure 00000018
the integer value of the base two logarithm of N, i.e.
Figure 00000019
in units of combining the results of partial comparisons that make up the first cascade, the first, second, third, fourth inputs, respectively, are connected to the first, second outputs of blocks comparing the digits of even and odd numbers, in ascending order from 0 to N-1, if N is even, or up to N-2, if N is odd, in each subsequent stage the first, second and third, fourth inputs of the blocks for combining the results of partial comparisons are connected to the first, second outputs of similar blocks of the previous cascade in ascending order of numbers, respectively the corresponding digits of the compared numbers, if in the previous stages there are no connections between the unit for comparing the digits and the unit for combining the results of partial comparisons or the pair of units for combining the results of partial comparisons with even numbers, the first, second outputs of these blocks in increasing order of numbers of the corresponding digits of the compared numbers the second and third, fourth inputs of the last in order in this cascade block combining partial results of comparison, the first and second outputs of the block The results of partial comparisons of the last Kth cascade are respectively connected to the first and second inputs of the output block, into which the second logical element 2I-NOT is added, the output of which is the output of the device for the signal of equality of the compared numbers - A = B, and the inputs are connected to the output the first element, the third and fourth logical elements 2I-NOT, the inputs of which are connected and respectively connected to the first and second inputs of the block, and the outputs, respectively, are the outputs of the device for signals exceeding I am the second of the first - A> B and the first of the second - A <B.
RU2019116181U 2019-05-27 2019-05-27 BIN NUMBER COMPARATOR RU194455U1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
RU2019116181U RU194455U1 (en) 2019-05-27 2019-05-27 BIN NUMBER COMPARATOR

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
RU2019116181U RU194455U1 (en) 2019-05-27 2019-05-27 BIN NUMBER COMPARATOR

Publications (1)

Publication Number Publication Date
RU194455U1 true RU194455U1 (en) 2019-12-11

Family

ID=69007206

Family Applications (1)

Application Number Title Priority Date Filing Date
RU2019116181U RU194455U1 (en) 2019-05-27 2019-05-27 BIN NUMBER COMPARATOR

Country Status (1)

Country Link
RU (1) RU194455U1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
RU2762061C1 (en) * 2021-02-19 2021-12-15 Публичное акционерное общество "Микрон" Binary number comparator
RU2791455C1 (en) * 2022-03-18 2023-03-07 федеральное государственное бюджетное образовательное учреждение высшего образования "Ульяновский государственный технический университет" Binary number comparator

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0319421B1 (en) * 1987-12-02 1992-06-17 ETAT FRANCAIS représenté par le Ministre Délégué des Postes et Télécommunications Binary comparator and binary number sorting operator
US6014074A (en) * 1997-12-24 2000-01-11 Lg Semicon Co., Ltd. Binary comparator
US20030023654A1 (en) * 2001-06-22 2003-01-30 Luigi Pascucci Binary-number comparator
RU2389063C1 (en) * 2008-10-28 2010-05-10 Государственное образовательное учреждение высшего профессионального образования "Ульяновский государственный технический университет" Binary number comparator
RU2621280C1 (en) * 2015-12-08 2017-06-01 Федеральное государственное бюджетное образовательное учреждение высшего профессионального образования "Ульяновский государственный технический университет" Binary number comparator
RU189024U1 (en) * 2019-03-22 2019-05-06 Акционерное общество "Научно-исследовательский институт молекулярной электроники" BINARY COMPARATOR

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0319421B1 (en) * 1987-12-02 1992-06-17 ETAT FRANCAIS représenté par le Ministre Délégué des Postes et Télécommunications Binary comparator and binary number sorting operator
US6014074A (en) * 1997-12-24 2000-01-11 Lg Semicon Co., Ltd. Binary comparator
US20030023654A1 (en) * 2001-06-22 2003-01-30 Luigi Pascucci Binary-number comparator
RU2389063C1 (en) * 2008-10-28 2010-05-10 Государственное образовательное учреждение высшего профессионального образования "Ульяновский государственный технический университет" Binary number comparator
RU2621280C1 (en) * 2015-12-08 2017-06-01 Федеральное государственное бюджетное образовательное учреждение высшего профессионального образования "Ульяновский государственный технический университет" Binary number comparator
RU189024U1 (en) * 2019-03-22 2019-05-06 Акционерное общество "Научно-исследовательский институт молекулярной электроники" BINARY COMPARATOR

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
RU2762061C1 (en) * 2021-02-19 2021-12-15 Публичное акционерное общество "Микрон" Binary number comparator
RU2791455C1 (en) * 2022-03-18 2023-03-07 федеральное государственное бюджетное образовательное учреждение высшего образования "Ульяновский государственный технический университет" Binary number comparator
RU2791462C1 (en) * 2022-03-18 2023-03-09 федеральное государственное бюджетное образовательное учреждение высшего образования "Ульяновский государственный технический университет" Binary number comparator
RU219773U1 (en) * 2023-05-12 2023-08-04 Дмитрий Юрьевич Пушкарь Targeted prostate biopsy device

Similar Documents

Publication Publication Date Title
RU189024U1 (en) BINARY COMPARATOR
EP0576595B1 (en) Transmission gate series multiplexer
KR940008613B1 (en) Carry lookahead adder and carry transfer method
CN104038232B (en) Testing data compression and decompression method based on secondary exclusive-or operation
RU194455U1 (en) BIN NUMBER COMPARATOR
US7328396B2 (en) Cyclic redundancy check generating circuit
KR960042416A (en) Max value selection circuit
Jahangir et al. Design of novel quaternary encoders and decoders
JP3833767B2 (en) Coding method, automatic shutter type dynamic shift register and multiplexer
RU2638724C1 (en) Device for order correction when normalizing numbers
Mansfield On the computational complexity of a merge recognition problem
RU213104U1 (en) COMPARATOR OF BINARY NUMBERS IN SERIAL CODE
RU215289U1 (en) ASYNCHRONOUS COMPARATOR OF BINARY NUMBERS IN SERIAL CODE
EP0514061B1 (en) 7 to 3 counter circuit
EP0242600A2 (en) Carry look-ahead calculating method and circuits therefor
US20060267739A1 (en) Device for comparing two words of n bits each
Richman Existence proofs
KR100248976B1 (en) A circuit for 2&#39;complement operation
RU2762061C1 (en) Binary number comparator
Singh et al. Sharing values and normality of meromorphic functions
RU2029431C1 (en) Code converter
SU1042183A1 (en) Multi-threshold logic element
Zhang et al. Simplified entropy and multidimensional search for test points selection
KR100728955B1 (en) Majority voter circuit
Fan Non-low 2-ness and computable Lipschitz reducibility