All Labs

Boolean Algebra & Logic Gates Lab

Build and analyze Boolean expressions with interactive truth tables and circuit diagrams. Explore logic gates, verify Boolean algebra laws, and convert between Sum of Products and Product of Sums canonical forms.

Guided Experiment: De Morgan's Theorem Verification

De Morgan's theorem states that NOT(A AND B) = NOT(A) OR NOT(B), and NOT(A OR B) = NOT(A) AND NOT(B). How can you verify these identities using truth tables?

Write your hypothesis in the Lab Report panel, then click Next.

Circuit Diagram

ABANDQ
ANDORNOTXORNANDNORXNOR

Controls

· or & AND+ or | OR or ! NOT or ^ XORVariables: A B C D

Results

Parsed Expression
A · B
Truth Table
ABOut
000
010
100
111
Minterms
Σm(3)
Maxterms
ΠM(0, 1, 2)
Gate Count
1
Variables
A, B
Sum of Products (SOP)
AB
Product of Sums (POS)
(A + B)(A + B′)(A′ + B)
Simplified Expression
AB

Data Table

(0 rows)
#ExpressionVariablesMintermsGate CountSimplified
0 / 500
0 / 500
0 / 500

Reference Guide

Basic Logic Gates

Logic gates are the building blocks of digital circuits. Each gate performs a specific Boolean operation on one or more binary inputs.

Gate Symbol Output = 1 when
ANDA · BBoth inputs are 1
ORA + BAt least one input is 1
NOTA′Input is 0
NAND(A · B)′Not both inputs are 1
NOR(A + B)′Both inputs are 0
XORA ⊕ BInputs differ
XNOR(A ⊕ B)′Inputs are the same

NAND and NOR are called universal gates because any other gate can be built from them alone.

Boolean Algebra Laws

Boolean algebra follows a set of laws that let you simplify and transform expressions while preserving their truth tables.

IdentityA + 0 = AA · 1 = A
NullA + 1 = 1A · 0 = 0
IdempotentA + A = AA · A = A
ComplementA + A′ = 1A · A′ = 0
CommutativeA + B = B + AA · B = B · A
DistributiveA · (B + C) = AB + AC
AbsorptionA + AB = A

De Morgan's Theorems

De Morgan's theorems describe how NOT distributes over AND and OR. They are essential for converting between gate types and simplifying circuits.

Theorem 1
(A · B)′ = A′ + B′
NOT of AND equals OR of NOTs
Theorem 2
(A + B)′ = A′ · B′
NOT of OR equals AND of NOTs

Use the Laws Explorer tab to verify these theorems with side-by-side truth tables.

SOP and POS Forms

Every Boolean function can be represented in two standard canonical forms.

Sum of Products (SOP)

OR of AND terms (minterms). Each product term includes every variable, either complemented or uncomplemented.

F = A′B′ + A′B + AB′ = Σm(0,1,2)
Product of Sums (POS)

AND of OR terms (maxterms). Each sum term includes every variable.

F = (A + B) = ΠM(3)

SOP is preferred when there are fewer 1s in the output. POS is preferred when there are fewer 0s.