Skip to content
ECE 2022 materials live · More branches coming soon2022 + 2025 official documents
2022 SCHEME / ELECTRONICS & COMMUNICATION

Two bits. Three possible relationships.

BEC302 · Semester 3 · Original worked note · v0.1 · 3 November 2026

Academic review pending. This independently written note explains unsigned comparison. It is not an official VTU answer or a complete module resource.

1. State the job precisely

Let A = A₁A₀ and B = B₁B₀ be unsigned two-bit values, each ranging from 0 to 3. A₁ and B₁ are the most significant bits. Create three outputs: G for A > B, E for A = B and L for A < B. For binary inputs, exactly one output must be 1.

2. Compare the most significant bits first

If A₁ = 1 and B₁ = 0, A is greater regardless of the lower bits. If A₁ = 0 and B₁ = 1, A is smaller. Only when the upper bits match do A₀ and B₀ decide the result.

Define X₁ as A₁ XNOR B₁ and X₀ as A₀ XNOR B₀. An XNOR output is 1 when its inputs are equal.

G = (A₁ AND NOT B₁) OR (X₁ AND A₀ AND NOT B₀)
E = X₁ AND X₀
L = (NOT A₁ AND B₁) OR (X₁ AND NOT A₀ AND B₀)

The second term in G and L is gated by X₁: lower bits matter only when the upper bits are equal.

3. Verify all input pairs

Two-bit unsigned comparator truth table
A₁A₀B₁B₀GEL
0000010
0001001
0010001
0011001
0100100
0101010
0110001
0111001
1000100
1001100
1010010
1011001
1100100
1101100
1110100
1111010

4. Work through a case

For A = 10 and B = 01, the upper bits differ: A₁ = 1 and B₁ = 0. Therefore G = 1, E = 0 and L = 0. For A = 10 and B = 11, the upper bits match, but A₀ = 0 and B₀ = 1. Therefore L = 1.

5. Draw the circuit from the equations

Use XNOR gates to obtain X₁ and X₀. Build the equality output with an AND gate. Build each greater/less output with two AND terms feeding an OR gate, adding the required input inversions. Label the bit order and output meanings; gate symbols alone do not explain the design.

Check yourself

  • Can you explain why comparing the lower bits first gives a wrong answer for A = 10, B = 01?
  • When A = B, do both G and L evaluate to 0?
  • Have you stated that the inputs are unsigned? Signed two-bit values have a different ordering.

Source relationship

The official BEC302 Model I includes a comparator design task at Q3(a), Module 2. This note is our own explanation of that topic; it does not establish an actual exam appearance or prediction.

See the model-paper topic
Practise Module 2

Author: VTU Prep · Academic reviewer: not yet assigned · Source checked 3 November 2026. Report corrections through About & contact.