encyclopegia.org

digital comparator

A digital comparator or magnitude comparator is a hardware electronic device that takes two numbers as input in binary form and determines whether one number is greater than, less than or equal to the other number.[src] Comparators are used in central processing units (CPUs) and microcontrollers (MCUs).[src] Examples of digital comparator include the CMOS 4063 and 4585 and the TTL 7485 and 74682.[src] An XNOR gate is a basic comparator, because its output is "1" only if its two input bits are equal.[src] The analog equivalent of digital comparator is the voltage comparator.[src] Many microcontrollers have analog comparators on some of their inputs that can be read or trigger an interrupt.[src]

A digital comparator or magnitude comparator is a hardware electronic device that takes two numbers as input in binary form and determines whether one number is greater than, less than or equal to the other number.[src] Comparators are used in central processing units (CPUs) and microcontrollers (MCUs).[src] Examples of digital comparator include the CMOS 4063 and 4585 and the TTL 7485 and 74682.[src] An XNOR gate is a basic comparator, because its output is "1" only if its two input bits are equal.[src] The analog equivalent of digital comparator is the voltage comparator.[src] Many microcontrollers have analog comparators on some of their inputs that can be read or trigger an interrupt.[src] ==Implementation== Consider two 4-bit binary numbers A and B so A=A_3A_2A_1A_0 B=B_3B_2B_1B_0 Here each subscript represents one of the digits in the numbers.[src] Equality The binary numbers A and B will be equal if all the pairs of significant digits of both numbers are equal, i.e., A_3=B_3 , A_2=B_2 , A_1=B_1 and A_0=B_0 Since the numbers are binary, the digits are either 0 or 1 and the boolean function for equality of any two digits A_i and B_i can be expressed as x_i= A_i \cdot B_i + \overline{A_i} \cdot \overline{B_i} we can also replace it by XNOR gate in digital electronics.[src] x_i is 1 only if A_i and B_i are equal.[src] For the equality of A and B, all x_i variables (for i=0,1,2,3) must be 1.[src] So the equality condition of A and B can be implemented using the AND operation as (A=B) = x_3 \cdot x_2 \cdot x_1 \cdot x_0 The binary variable (A=B) is 1 only if all pairs of digits of the two numbers are equal.[src] Inequality In order to manually determine the greater of two binary numbers, we inspect the relative magnitudes of pairs of significant digits, starting from the most significant bit, gradually proceeding towards lower significant bits until an inequality is found.[src] When an inequality is found, if the corresponding bit of A is 1 and that of B is 0 then we conclude that A>B.[src] This sequential comparison can be expressed logically as: (A>B)=A_3 \cdot \overline{B_3} + x_3 \cdot A_2 \cdot \overline{B_2} + x_3 \cdot x_2 \cdot A_1 \cdot \overline{B_1} + x_3 \cdot x_2 \cdot x_1 \cdot A_0 \cdot \overline{B_0} (A (A > B) and (A B or A < B respectively.[src]

20 sentences · 20 cited inline · 0 references stored

References

No reference rows published for this article.

Cite this article

MLA

"digital comparator." encyclopegia.org, 2026, https://encyclopegia.org/wiki/digital-comparator. Accessed 02 December 2026.

Chicago

"digital comparator." encyclopegia.org. Accessed December 2, 2026. https://encyclopegia.org/wiki/digital-comparator.

APA

encyclopegia.org. (2026). digital comparator. Retrieved December 2, 2026, from https://encyclopegia.org/wiki/digital-comparator

Accessed December 2, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

Digital Object Identifier

article · references available

Matte World Digital

stub · references available

Plesiochronous digital hierarchy

stub · references available

Digital Living Network Alliance

stub · references available

digital signal processor

stub · references available

digital rights

stub · references available

Adobe Digital Editions

stub · references available

digital photography

stub · references available
CC BY-SA 4.0 · tier1-factual · https://en.wikipedia.org/w/index.php?oldid=1363265594 · 0.55 · snapshot digital-comparator-208926-2b8cf6afa00b3597 · QID Q1780800

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools
  • Careers — open roles: frontier engineers and sales partners
  • Index — every corpus, paper and record
  • Estate guide — what a public data estate is
  • Founder — Lois-Kleinner Alpasan
  • Records — DOIs and external deposits
  • Documents — one-pagers, PDFs and QR codes
  • Brand kit — logos and share images
  • Papers — plain-language briefs with citations
  • Browser — search engine, PWA and bookmarklet
  • Anticloud — the operator and its projects

As seen in Business Insider · 336 outlets · evidence DOIs · plain-language papers

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.