RU2757832C1 - Binary number comparator - Google Patents
Binary number comparator Download PDFInfo
- Publication number
- RU2757832C1 RU2757832C1 RU2020135549A RU2020135549A RU2757832C1 RU 2757832 C1 RU2757832 C1 RU 2757832C1 RU 2020135549 A RU2020135549 A RU 2020135549A RU 2020135549 A RU2020135549 A RU 2020135549A RU 2757832 C1 RU2757832 C1 RU 2757832C1
- Authority
- RU
- Russia
- Prior art keywords
- elements
- input
- output
- comparator
- inputs
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F7/00—Methods or arrangements for processing data by operating upon the order or content of the data handled
- G06F7/02—Comparing 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
Description
Изобретение относится к вычислительной технике и может быть использовано для построения средств автоматики, функциональных узлов систем управления и др.The invention relates to computer technology and can be used to build automation tools, functional units of control systems, etc.
Известны компараторы двоичных чисел (см., например, рис. 6-19а на стр. 286 в книге Поспелов Д.А. Логические методы анализа и синтеза схем. М.: Энергия, 1974 г.), которые выполняют распознавание отношений х1=х2, x1≠x2, где x1=x1(n-1)…x10, x2=x2(n-1)…x20 - n-разрядные двоичные числа, задаваемые двоичными сигналами x10, …, x1(n-1), x20, …, x2(n-1)∈{0,1}, причем числа x1, х2 подаются на упомянутые компараторы поразрядно.Known comparators of binary numbers (see, for example, Fig. 6-19a on page 286 in the book Pospelov DA Logical methods of analysis and synthesis of circuits. M .: Energiya, 1974), which perform the recognition of relations x 1 = x 2 , x 1 ≠ x 2 , where x 1 = x 1 (n-1) … x 10 , x 2 = x 2 (n-1) … x 20 - n-bit binary numbers specified by binary signals x 10 , …, X 1 (n-1) , x 20 ,…, x 2 (n-1) ∈ {0,1}, and the numbers x 1 , x 2 are fed to the mentioned comparators bit by bit.
К причине, препятствующей достижению указанного ниже технического результата при использовании известных компараторов двоичных чисел, относятся ограниченные функциональные возможности, обусловленные тем, что не выполняется распознавание отношений х1>х2, х1<х2.The reason that prevents the achievement of the technical result indicated below when using the known binary number comparators is limited functionality due to the fact that the recognition of the relations x 1 > x 2 , x 1 <x 2 is not performed.
Наиболее близким устройством того же назначения к заявленному изобретению по совокупности признаков является принятый за прототип компаратор двоичных чисел (патент РФ 2649296, кл. G06F 7/02, 2018 г.), который содержит элементы задержки, логические элементы и выполняет распознавание отношений x1=х2, х1>х2, х1<х2, где x1=x1(n-1)…x10, x2=x2(n-1)…x20 n-разрядные двоичные числа, задаваемые двоичными сигналами x10, …, x1(n-1), x20, …, x2(n-1)∈{0.1}, причем числа х1, x2 подаются на первый, второй входы прототипа поразрядно.The closest device for the same purpose to the claimed invention in terms of a set of features is a binary number comparator adopted as a prototype (RF patent 2649296, class G06F 7/02, 2018), which contains delay elements, logic elements and performs recognition of relations x 1 = x 2 , x 1 > x 2 , x 1 <x 2 , where x 1 = x 1 (n-1) ... x 10 , x 2 = x 2 (n-1) ... x 20 n-bit binary numbers specified binary signals x 10 , ..., x 1 (n-1) , x 20 ,…, x 2 (n-1) ∈ {0.1}, and the numbers x 1 , x 2 are fed to the first, second inputs of the prototype bit by bit.
К причине, препятствующей достижению указанного ниже технического результата при использовании прототипа, относятся большие аппаратурные затраты.The reason that prevents the achievement of the technical result indicated below when using the prototype includes high hardware costs.
Техническим результатом изобретения является уменьшение аппаратурных затрат при сохранении функциональных возможностей прототипа. Указанный технический результат при осуществлении изобретения достигается тем, что в компараторе двоичных чисел, содержащем элемент НЕ, элемент И, элемент ИЛИ, два элемента задержки и два мажоритарных элемента, i-й выход компаратора двоичных чисел соединен с выходом i-го мажоритарного элемента и входом i-го элемента задержки, подключенного выходом к первому входу i-го мажоритарного элемента, особенность заключается в том, что выходы элементов ИЛИ, И соединены соответственно с вторым, третьим входами i-го мажоритарного элемента, а выход и вход элемента НЕ подключены соответственно к вторым входам элементов И, ИЛИ и второму входу компаратора двоичных чисел, первый вход которого соединен с первыми входами элементов И, ИЛИ.The technical result of the invention is to reduce hardware costs while maintaining the functionality of the prototype. The specified technical result in the implementation of the invention is achieved by the fact that in a binary number comparator containing an element NOT, an AND element, an OR element, two delay elements and two majority elements, the i-th the output of the binary number comparator is connected to the output of the i-th majority element and the input of the i-th delay element connected by the output to the first input of the i-th majority element, the peculiarity is that the outputs of the OR, AND elements are connected respectively to the second, third inputs i -th majority element, and the output and input of the element are NOT connected respectively to the second inputs of the AND, OR elements and the second input of the binary numbers comparator, the first input of which is connected to the first inputs of the AND, OR elements.
На чертеже представлена схема предлагаемого компаратора двоичных чисел.The drawing shows a diagram of the proposed binary number comparator.
Компаратор двоичных чисел содержит два элемента задержки 11,12, элемент И 2, элемент ИЛИ 3, элемент НЕ 4 и два мажоритарных элемента 51, 52, причем выходы элементов 1i , 3, 2 соединены соответственно с первым, вторым, третьим входами элемента 5i, а выход и вход элемента 4 подключены соответственно к вторым входам элементов 2, 3 и второму входу компаратора двоичных чисел, первый вход и i-й выход которого соединены соответственно с первыми входами элементов 2, 3 и входом элемента 1i, выходом элемента 5i.The binary comparator contains two
Работа предлагаемого компаратора двоичных чисел осуществляется следующим образом. На его первый и второй входы в j-й момент времени подаются соответственно двоичные сигналы x1(j-1)∈{0,1} и x2(j-1)∈{0,1}, которые задают значения (j-1)-ых разрядов подлежащих сравнению n-разрядных двоичных чисел x1=x1(n-1)…x10 и x2=x2(n-1)…x20. Здесь сигналы xi(n-1) и xi0 определяют значения соответственно старшего и младшего разрядов числа xi. Сигнал на выходе элемента задержки 1i в j-й момент времени равен сигналу, который действовал на его входе в (j-1)-й момент времени, а у10=1, у20=0 (в качестве элемента задержки может быть использован D-триггер). Тогда сигнал на i-ом выходе предлагаемого компаратора будет определяться выражениемThe work of the proposed comparator of binary numbers is carried out as follows. At its first and second entrances to the j-th moment of time, respectively, binary signals x 1 (j-1) ∈ {0,1} and x 2 (j-1) ∈ {0,1} are supplied, which set the values of the (j-1) -th digits of the n-bit binary numbers x 1 = x 1 (n-1) … x 10 and x 2 = x 2 (n-1) … x 20 . Here signals x i (n-1) and x i0 determine the values, respectively, of the most significant and least significant digits of the number x i . The signal at the output of the
где у10=1, у20=0; ∨, ⋅, -, # есть символы операций ИЛИ, И, НЕ, Maj, причем a 1#а 2#а 3=a 1⋅а 2∨a 1⋅а 3∨а 2⋅а 3. В представленной ниже таблице приведены значения реализуемой выражением (1) функции на всех возможных наборах значений ее аргументов.where y 10 = 1, y 20 = 0; ∨, ⋅, - , # are symbols of operations OR, AND, NOT, Maj, and a 1 # a 2 # a 3 = a 1 ⋅ a 2 ∨ a 1 ⋅ a 3 ∨ a 2 ⋅ a 3 . The table below shows the values of the function implemented by expression (1) on all possible sets of values of its arguments.
Анализ данных, приведенных в таблице, позволяет заключить, что: 1) если x1(j-1)<x2(j-1) или x1(j-1)=x2(j-1) и yi(j-1)=0, то yij=0; 2) если x1(j-1)>x2(j-1) или x1(j-1)=x2(j-1) и yi(j-1)=1, то yij=1. Таким образом, когда х1=х2 либо x1>х2 либо x1<х2 соответственно получим y1n=1, у2n=0 либо у1n=y2n=1 либо y1n=у2n=0. При этом предлагаемый компаратор содержит семь элементов. Отметим, что в состав прототипа входят восемь элементов.Analysis of the data given in the table allows us to conclude that: 1) if x 1 (j-1) <x 2 (j-1) or x 1 (j-1) = x 2 (j-1) and y i ( j-1) = 0, then y ij = 0; 2) if x 1 (j-1) > x 2 (j-1) or x 1 (j-1) = x 2 (j-1) and y i (j-1) = 1, then y ij = 1 ... Thus, when x 1 = x 2 or x 1 > x 2 or x 1 <x 2, respectively, we obtain y 1n = 1, y 2n = 0, or y 1n = y 2n = 1 or y 1n = y 2n = 0. In this case, the proposed comparator contains seven elements. Note that the prototype includes eight elements.
Вышеизложенные сведения позволяют сделать вывод, что предлагаемый компаратор двоичных чисел обладает меньшими по сравнению с прототипом аппаратурными затратами и выполняет распознавание отношений х1=х2, x1>х2, x1<х2, где x1=x1(n-1)…x10, x2=x2(n-1)…x20 - n-разрядные двоичные числа, задаваемые двоичными сигналами x10, …, x1(n-1), x20, …, x2(n-1)∈{0.1}, причем числа x1, х2 подаются на первый, второй входы предлагаемого компаратора поразрядно.The above information allows us to conclude that the proposed comparator of binary numbers has less hardware costs compared to the prototype and performs recognition of relations x 1 = x 2 , x 1 > x 2 , x 1 <x 2 , where x 1 = x 1 (n- 1) … x 10 , x 2 = x 2 (n-1) … x 20 - n-bit binary numbers specified by binary signals x 10 ,…, x 1 (n-1) , x 20 ,…, x 2 ( n-1) ∈ {0.1}, and the numbers x 1 , x 2 are fed to the first, second inputs of the proposed comparator bit by bit.
Claims (1)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
RU2020135549A RU2757832C1 (en) | 2020-10-28 | 2020-10-28 | Binary number comparator |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
RU2020135549A RU2757832C1 (en) | 2020-10-28 | 2020-10-28 | Binary number comparator |
Publications (1)
Publication Number | Publication Date |
---|---|
RU2757832C1 true RU2757832C1 (en) | 2021-10-21 |
Family
ID=78289606
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
RU2020135549A RU2757832C1 (en) | 2020-10-28 | 2020-10-28 | Binary number comparator |
Country Status (1)
Country | Link |
---|---|
RU (1) | RU2757832C1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
RU2787333C1 (en) * | 2022-03-18 | 2023-01-09 | федеральное государственное бюджетное образовательное учреждение высшего образования "Ульяновский государственный технический университет" | Binary number comparator |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7103624B2 (en) * | 2002-08-26 | 2006-09-05 | Samsung Electronics Ltd., Co. | Comparator circuit and method |
RU2300131C1 (en) * | 2006-01-10 | 2007-05-27 | Государственное образовательное учреждение высшего профессионального образования "Ульяновский государственный технический университет" | Binary number comparator |
RU2361266C1 (en) * | 2008-01-22 | 2009-07-10 | Государственное образовательное учреждение высшего профессионального образования "Ульяновский государственный технический университет" | Binary number comparator |
RU2626329C1 (en) * | 2016-03-23 | 2017-07-26 | Олег Александрович Козелков | Comparator of binary numbers |
RU2649296C1 (en) * | 2017-04-04 | 2018-03-30 | федеральное государственное бюджетное образовательное учреждение высшего образования "Ульяновский государственный технический университет" | Comparator of binary numbers |
RU189024U1 (en) * | 2019-03-22 | 2019-05-06 | Акционерное общество "Научно-исследовательский институт молекулярной электроники" | BINARY COMPARATOR |
-
2020
- 2020-10-28 RU RU2020135549A patent/RU2757832C1/en active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7103624B2 (en) * | 2002-08-26 | 2006-09-05 | Samsung Electronics Ltd., Co. | Comparator circuit and method |
RU2300131C1 (en) * | 2006-01-10 | 2007-05-27 | Государственное образовательное учреждение высшего профессионального образования "Ульяновский государственный технический университет" | Binary number comparator |
RU2361266C1 (en) * | 2008-01-22 | 2009-07-10 | Государственное образовательное учреждение высшего профессионального образования "Ульяновский государственный технический университет" | Binary number comparator |
RU2626329C1 (en) * | 2016-03-23 | 2017-07-26 | Олег Александрович Козелков | Comparator of binary numbers |
RU2649296C1 (en) * | 2017-04-04 | 2018-03-30 | федеральное государственное бюджетное образовательное учреждение высшего образования "Ульяновский государственный технический университет" | Comparator of binary numbers |
RU189024U1 (en) * | 2019-03-22 | 2019-05-06 | Акционерное общество "Научно-исследовательский институт молекулярной электроники" | BINARY COMPARATOR |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
RU2787333C1 (en) * | 2022-03-18 | 2023-01-09 | федеральное государственное бюджетное образовательное учреждение высшего образования "Ульяновский государственный технический университет" | Binary number comparator |
RU2787334C1 (en) * | 2022-03-18 | 2023-01-09 | федеральное государственное бюджетное образовательное учреждение высшего образования "Ульяновский государственный технический университет" | Binary number comparator |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
RU2649296C1 (en) | Comparator of binary numbers | |
RU2363037C1 (en) | Device for comparing binary numbers | |
RU2757832C1 (en) | Binary number comparator | |
RU2629451C1 (en) | Logic converter | |
RU2393526C2 (en) | Comparator of binary numbers | |
RU2677371C1 (en) | Binary numbers comparison device | |
RU2704735C1 (en) | Threshold module | |
RU2300137C1 (en) | Majority module | |
RU2762621C1 (en) | Binary number comparison device | |
RU2718209C1 (en) | Logic module | |
RU2420789C1 (en) | Device for comparing binary numbers | |
RU2757829C1 (en) | Binary number comparing apparatus | |
RU2361266C1 (en) | Binary number comparator | |
RU2787333C1 (en) | Binary number comparator | |
RU2710866C1 (en) | Rank filter | |
RU2703352C1 (en) | Device for selecting binary numbers | |
RU2790010C1 (en) | Device for selecting the smaller of binary numbers | |
RU2676888C1 (en) | Logical module | |
RU2778678C1 (en) | Logic module | |
RU2606311C2 (en) | Selector of binary numbers | |
RU2803639C1 (en) | Binary number comparison device | |
RU2675301C1 (en) | Binary numbers selection device | |
RU2791460C1 (en) | Device for selection of the bigger of binary numbers | |
RU2809211C1 (en) | Binary number comparator | |
RU2300130C1 (en) | Device for selecting the lesser one of two binary numbers |