Prashnikaप्रश्निका
Code
About

Boolean algebra solver

Simplify a Boolean expression the way ISC Computer Science asks for it: the working law by law, the truth table, the K-map with its groups, the minimal SOP and POS forms, and the logic circuit - also with NAND or NOR gates only. Free, with nothing to sign up for.

How to use it

  1. 1Type a Boolean expression such as A'B + AB', or give minterms like F(A,B,C) = Σ(1,3,5).
  2. 2Press Solve, or tap an example to see how it is written.
  3. 3Read the working: the laws used, the truth table, the K-map groups, the minimal SOP and POS, and the circuits.
Check that it equals another expression

Write NOT as A' (or ~A), AND as AB or A.B, OR as A + B; ⊕, => and <=> work too, and so do the words AND, OR, NOT, XOR, NAND, NOR and XNOR. Up to 6 variables. Or give minterms: F(A,B,C) = Σ(1,3,5) + d(7), or maxterms with π.

Answer

Minimal SOP
F = XZ + Y
Minimal POS
F = (X + Y)(Y + Z)
Minterms
F(X, Y, Z) = Σ(2, 3, 5, 6, 7)
Maxterms
F(X, Y, Z) = π(0, 1, 4)

Read as (X + Z)(XY + YZ) + XZ + Y. It is a contingency (sometimes 1, sometimes 0).

Steps, law by law

F = (X + Z)(XY + YZ) + XZ + Y

  1. = X(XY + YZ) + Z(XY + YZ) + XZ + YDistributive law A(B + C) = AB + AC
  2. = XXY + XYZ + Z(XY + YZ) + XZ + YDistributive law A(B + C) = AB + AC
  3. = XY + XYZ + Z(XY + YZ) + XZ + YIdempotent law A.A = A
  4. = XY + Z(XY + YZ) + XZ + YAbsorption law A + AB = A
  5. = Z(XY + YZ) + XZ + YAbsorption law A + AB = A
  6. = ZXY + ZYZ + XZ + YDistributive law A(B + C) = AB + AC
  7. = ZXY + ZY + XZ + YIdempotent law A.A = A
  8. = ZY + XZ + YAbsorption law A + AB = A
  9. = XZ + YAbsorption law A + AB = A
Convert to POS, step by step

Work out F' as a sum of products, then F = (F')' by De Morgan's law.

  1. F' = (XZ + Y)'Complement F' = (F)'
  2. F' = (XZ)'Y'De Morgan's law (A + B)' = A'B'
  3. F' = (X' + Z')Y'De Morgan's law (AB)' = A' + B'
  4. F' = X'Y' + Z'Y'Distributive law A(B + C) = AB + AC
  5. F = (X'Y' + Z'Y')'Complement again F = (F')'
  6. F = (X'Y')'(Z'Y')'De Morgan's law (A + B)' = A'B'
  7. F = ((X')' + (Y')')(Z'Y')'De Morgan's law (AB)' = A' + B'
  8. F = (X + (Y')')(Z'Y')'Involution law (A')' = A
  9. F = (X + Y)(Z'Y')'Involution law (A')' = A
  10. F = (X + Y)((Z')' + (Y')')De Morgan's law (AB)' = A' + B'
  11. F = (X + Y)(Z + (Y')')Involution law (A')' = A
  12. F = (X + Y)(Z + Y)Involution law (A')' = A

Truth table

XYZX + ZXYYZXY + YZ(X + Z)(XY + YZ)XZ(X + Z)(XY + YZ) + XZ(X + Z)(XY + YZ) + XZ + Y
00000000000
00110000000
01000000001
01110111011
10010000000
10110000111
11011011011
11111111111

K-map

Grouping the 1s (SOP)
YZX00011110010131214517161
  • XZ pair: cells 5, 7
  • Y quad: cells 2, 3, 6, 7
Grouping the 0s (POS)
YZX000111100100103240576
  • (X + Y) pair: cells 0, 1
  • (Y + Z) pair: cells 0, 4

Canonical forms

SOP (sum of minterms)

F = X'YZ' + X'YZ + XY'Z + XYZ' + XYZ

POS (product of maxterms)

F = (X + Y + Z)(X + Y + Z')(X' + Y + Z)

Logic circuit

Your expression as written Gate for gate as typed; A' is taken as an input line.
Logic circuit: Your expression as written
Minimal SOP AND, OR and NOT gates.
Logic circuit: Minimal SOP
Minimal POS OR, AND and NOT gates.
Logic circuit: Minimal POS
NAND gates only From the minimal SOP; a NOT is a NAND with its inputs joined.
Logic circuit: NAND gates only
NOR gates only From the minimal POS; a NOT is a NOR with its inputs joined.
Logic circuit: NOR gates only
Start again

About the Boolean algebra solver

What it does

Boolean algebra questions in ISC Computer Science ask you to simplify an expression, prove that two expressions are equal, draw a truth table, group a K-map or draw the logic circuit. This solver does all of them from one input and names the law used at every step, so you can compare it with your own working.

How the answer is worked

  1. The expression is read and its truth table is built (up to 6 variables).
  2. It is simplified one step at a time with the Boolean laws: commutative, distributive, absorption, De Morgan’s and the rest, each named.
  3. The K-map is filled in and the biggest groups of 1s (pairs, quads, octets) give the minimal SOP; groups of 0s give the minimal POS.
  4. The circuit is drawn with AND, OR and NOT gates, then with NAND gates only and NOR gates only.

How to write the input

NOT is A' (or ~A), AND is AB or A.B, OR is +, XOR is ⊕ (the words AND, OR, NOT, XOR, NAND and NOR work too). For a function given by its minterms write F(A,B,C) = Σ(1,3,5) + d(7), or use π for maxterms. The buttons under the box type the symbols for you.

Common questions

What is the difference between SOP and POS?

SOP (sum of products) is an OR of AND terms, read from the 1s of the truth table or K-map. POS (product of sums) is an AND of OR terms, read from the 0s. Both describe the same function.

How do I check that two expressions are equal?

Type one in the first box, open “Check that it equals another expression” and type the second. The solver compares them and tells you whether they are equal.

Why do NAND and NOR gates matter?

Each is a universal gate: any circuit can be built from NAND gates alone, or from NOR gates alone. Questions often ask for exactly that, so the solver draws both versions.

What does d(…) mean in F(A,B,C,D) = Σ(…) + d(…)?

The numbers in d(…) are don’t-care conditions: cells you may treat as 1 or as 0, whichever makes the K-map groups bigger.

Practise on real ISC questions

More Computer Science tools

All study tools →