Comparator - mbits-mirafra/digitalDesignCourse GitHub Wiki

What?

Comparators are digital circuits that compare two input values and produce an output signal based on the relationship between the two inputs.

Types:

  1. A>B: The A>B output is a logical high (or "1") when input A is greater than input B. In other words, if A is a larger value than B, the comparator will output a logical high.

  2. A<B: The A<B output is a logical high (or "1") when input A is less than input B. In other words, if A is a smaller value than B, the comparator will output a logical high.

  3. A=B: The A=B output is a logical high (or "1") when input A is equal to input B. In other words, if A and B have the same value, the comparator will output a logical high

Where ?

Sorting algorithms involve comparing multiple data elements with each other, rather than comparing two values with each other. The comparison operation used in sorting algorithms is typically a three-way comparison, which compares whether one element is less than, greater than, or equal to another element.

Block Diagram:

Untitled Diagram drawio (7) drawio

2 Bit Comparator:

Block diagram:

Untitled Diagram drawio (7) drawio (1)

Truth Table:

Untitled Diagram drawio (8)

Untitled Diagram drawio (9) drawio

Logical Equation:

Untitled Diagram drawio (10) drawio

Logic circuit:

Untitled Diagram drawio (11) drawio