Cs · Computer Science

How Do Brackets Work in Boolean Algebra’s Distributive Laws?

Published By the 9to5Science editorial team

At a glance

  1. 1. Read the operators

    Treat + as OR and juxtaposition as AND; parentheses group the expression they contain.

  2. 2. Distribute across a sum

    Multiply an outside term into each term inside parentheses: A(B + C) = AB + AC.

  3. 3. Use the dual law

    An OR outside a product can be distributed as A + BC = (A + B)(A + C).

  4. 4. Simplify carefully

    Apply Boolean identities such as AA = A and A + AB = A after expanding.

Try it: Boolean simplifier calculator

In Boolean algebra, brackets (parentheses) show which operations belong together. The distributive laws tell you when you can remove or introduce brackets without changing the expression’s value. The main thing to watch is that Boolean algebra has two distributive laws, one for each operator.

Here, ++ means OR, and writing variables next to each other means AND. For example, ABAB means AA AND BB. Variables take values 0 or 1.

The two distributive laws

AND distributes over OR in the familiar way:

A(B+C)=AB+AC.A(B+C)=AB+AC.

Read the left side as “AA AND (BB OR CC).” The right side says “(AA AND BB) OR (AA AND CC).”

Boolean algebra also has the dual distributive law:

A+BC=(A+B)(A+C).A+BC=(A+B)(A+C).

This is often less familiar from ordinary arithmetic, but it is valid for Boolean values. Together, the laws can be written as:

Form before distributingEquivalent form
A(B+C)A(B+C)AB+ACAB+AC
A+BCA+BC(A+B)(A+C)(A+B)(A+C)

You can also use each equality in reverse to factor an expression and add brackets. For example, AB+ACAB+AC can be written as A(B+C)A(B+C).

How to distribute with brackets

Use this method when expanding an expression:

  1. Identify the operator outside the parentheses.
  2. Apply the matching distributive law to every term inside.
  3. Keep the original operators in the correct places.
  4. Simplify using Boolean identities, if needed.

For instance, in X(Y+Z)X(Y+Z), the outside operation is AND, so multiply XX into both terms: XY+XZXY+XZ. In X+YZX+YZ, the outside operation is OR, so use the dual law: (X+Y)(X+Z)(X+Y)(X+Z).

Parentheses are particularly important when an expression has several operations. Under the usual precedence convention, AND is evaluated before OR, so A+BCA+BC means A+(BC)A+(BC). The brackets make that grouping explicit. If you mean “OR first, then AND,” write (A+B)C(A+B)C.

Worked example: simplify a bracketed expression

Simplify (A+B)(A+C)(A+B)(A+C). Distribute each term in the first bracket across the second:

(A+B)(A+C)=AA+AC+AB+BC=A+AC+AB+BC=A+BC.\begin{aligned} (A+B)(A+C) &= AA+AC+AB+BC \\ &= A+AC+AB+BC \\ &= A+BC. \end{aligned}

The second line uses the idempotent law AA=AAA=A. In the last line, A+AC=AA+AC=A and A+AB=AA+AB=A, which follow from the absorption law A+AX=AA+AX=A. Thus, the expression with two brackets has the same value as A+BCA+BC.

You can check the result by considering AA. If A=1A=1, both expressions equal 1. If A=0A=0, the left side becomes BCBC, and so does the right side. This confirms the identity for both possible values of AA.

Common mistakes

  • Using the arithmetic rule for every case. The law A(B+C)=AB+ACA(B+C)=AB+AC resembles ordinary multiplication over addition. But Boolean algebra also has A+BC=(A+B)(A+C)A+BC=(A+B)(A+C); it is not a mistake that this rule looks different from ordinary arithmetic.
  • Dropping a term while distributing. In A(B+C)A(B+C), the AA must multiply both BB and CC. The result is AB+ACAB+AC, not AB+CAB+C.
  • Changing the grouping. A+BCA+BC and (A+B)C(A+B)C are generally different. For A=1A=1, B=0B=0, and C=0C=0, the first equals 1 while the second equals 0.
  • Treating Boolean addition like ordinary addition. In Boolean algebra, 1+1=11+1=1 because ++ is OR. Also, A+A=AA+A=A and AA=AAA=A.
  • Stopping before simplification. Expanding is only one step. Identities such as A+AB=AA+AB=A and A(A+B)=AA(A+B)=A can make the final expression much shorter.

When unsure whether a bracket manipulation is valid, substitute 0 and 1 for the variables or compare truth tables. Every valid Boolean identity must give the same output for every input combination.

References

  1. Digital Design: With an Introduction to the Verilog HDL, VHDL, and SystemVerilog, M. Morris Mano and Michael D. Ciletti

Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.