Skip to content
DenseChip
Learn
PracticeCode labInterview

DenseChip

Navigate

Menu

LearnPracticeCode labInterview

Tools

All toolsSV editorCode repoResume
DenseChip

Practice, courses, and chip-design tools in one focused workspace.

LearnPracticeCode labInterviewToolsLearning paths

© 2026 DenseChip

AboutContactPrivacyTerms
Skip to lesson

Course contents

  • RTL Foundations36
    • Digital Logic for RTL Engineers
      • Algebra Before Gates
      • The Identity Toolkit
      • De Morgan Rules
      • Truth Tables as a Debug Anchor
      • K-Map Intuition
      • Implementation Trade-offs
    • Number Systems for RTL Engineers
    • Verilog Fundamentals
    • Verilog Operators and Types
    • SystemVerilog for RTL
    • Simulation and Testbenches
  • Combinational Design25
  • Sequential Design27
  • FSM & Control27
  • Timing & Clocking39
  • Reset & CDC34
  • Memory & Buses57
  • Advanced RTL28
  • Senior & Interview76
  • Glossary and Notation
Loading lesson

‹Digital Logic for RTL Engineers
  1. Topics
  2. RTL Design
  3. RTL Foundations
  4. Digital Logic for RTL Engineers
  5. The Identity Toolkit

Part 1 · Foundations · Beginner

The Identity Toolkit

Simplify expressions with absorption, consensus, and distribution, then prove equivalence exhaustively.

On this page

    Why this matters

    A hand simplification that is one step wrong gives a design that passes most tests and fails one input. Five identities simplify almost everything, and a four-line exhaustive check catches the slips.

    After this lesson you can: simplify a Boolean expression with complement, absorption, distribution and consensus, and prove the result with an exhaustive check.

    A short list that covers most simplifications

    Five tools cover almost every simplification: complement, absorption in both forms, distribution, and consensus.

    Name

    AND form

    OR form

    Identity

    a·1 = a

    a+0 = a

    Null (domination)

    a·0 = 0

    a+1 = 1

    Idempotent

    a·a = a

    a+a = a

    Complement

    a·a′ = 0

    a+a′ = 1

    Involution

    (a′)′ = a

    (a′)′ = a

    Commutative

    a·b = b·a

    a+b = b+a

    Distributive

    a·(b+c) = ab + ac

    a+(b·c) = (a+b)·(a+c)

    Absorption

    a·(a+b) = a

    a + a·b = a

    Absorption (variant)

    a·(a′+b) = a·b

    a + a′·b = a + b

    Consensus

    (a+b)(a′+c)(b+c) = (a+b)(a′+c)

    ab + a′c + bc = ab + a′c

    The second distributive law (a + bc = (a+b)(a+c)) has no analog in ordinary arithmetic. It surprises people the first time.

    It is valid for Boolean values. It converts between product-of-sums and sum-of-products.

    Worked simplification

    Simplify y = ab + ab′ + a′b.

    1. Group the first two terms and factor out a: ab + ab′ = a(b + b′).

    2. Use the complement identity: b + b′ = 1, so the group becomes a.

    3. Now y = a + a′b. Apply the absorption variant a + a′b = a + b.

    4. Result: y = a + b. Three terms with two literals each collapsed into a single OR gate.

    The step a + a′b = a + b is the most useful one-liner in the list. It is worth recognizing on sight.

    Do not trust the algebra blindly. An exhaustive equivalence check on two or three inputs costs nothing and catches slips.

    Read the first testbench

    A testbench is simulation-only code that drives and checks a design. Here logic declares a four-state signal, assign keeps an equation connected to its inputs, and the initial block runs once. Predict the four input pairs before reading the loop.

    Loop i

    i[1:0]

    {a,b}

    Expected a OR b

    0

    00

    a=0, b=0

    0

    1

    01

    a=0, b=1

    1

    2

    10

    a=1, b=0

    1

    3

    11

    a=1, b=1

    1

    {a,b} joins two one-bit signals; assigning i[1:0] drives one pair. #1 advances one simulation time unit so these continuous assignments settle; it is not a gate delay measurement. !== reports different four-state results, including a known-versus-X mismatch. The loop checks only the four known binary pairs, not all X/Z combinations. Its pattern is drive, settle, compare; the testbench lessons explain clocks and scheduling later.

    design.sv
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    module tb_equiv;
      timeunit 1ns;
      timeprecision 1ps;
      logic a, b;
      logic y_orig, y_simpl;
    
      assign y_orig  = (a & b) | (a & ~b) | (~a & b);
      assign y_simpl = a | b;
    
      int errors = 0;
      initial begin
        for (int i = 0; i < 4; i++) begin
          {a, b} = i[1:0];
          #1;
          if (y_orig !== y_simpl) begin
            $display("FAIL: mismatch for a=%b b=%b orig=%b simpl=%b", a, b, y_orig, y_simpl);
            errors++;
          end
        end
        if (errors == 0) $display("PASS: ab + ab' + a'b matches a + b for all 4 input combinations");
        $finish;
      end
    endmodule

    Consensus: the term that is redundant (and sometimes essential)

    The consensus theorem says the term bc in ab + a′c + bc is redundant. Whenever b and c are both 1, either a or a′ is 1, so one of the other two terms is already true.

    A minimizer deletes it. In an asynchronous or glitch-sensitive circuit, that “redundant” term is exactly what prevents a glitch, which is why the implementation trade-offs lesson revisits it.

    Common pitfall

    Do not hand-simplify across clock or reset logic and assume the result is “the same”. Boolean equivalence says nothing about glitches, X-propagation or timing. Equivalence checking tools prove logic equality; they do not promise identical behavior in asynchronous paths.

    Check yourself Simplify y = a + a′b + a′b′.

    a′b + a′b′ = a′(b + b′) = a′, so y = a + a′, which equals 1. The output is constant 1 for every input. A synthesis tool would replace the whole block with a tie-high.

    Remember

    • The one-liner a + a'b = a + b is worth recognising on sight.

    • The consensus term is redundant in steady state but can be the term that stops a glitch.

    • Boolean equivalence says nothing about glitches, X propagation or timing.

    Rule of thumb: never trust the algebra until a loop over every input has agreed with it.

    Keep going

    • Interview: run a mock interview on this topic

    Related topics

    • Algebra before gates

    • De Morgan rules

    • K-map intuition — the same simplifications done visually

    Previous

    2 / 350

    Next: De Morgan Rules

    Up next

    Up nextDe Morgan Rules

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Truth Tables as a Debug Anchor
    • K-Map Intuition
    • Implementation Trade-offs