liminfo

Boolean Algebra Solver

Free web tool: Boolean Algebra Solver

Operators: AND, OR, NOT, XOR. Variables: single letters (A-Z)

Simplified: A AND B OR NOT C

Truth Table

ABCResult
0001
0010
0101
0110
1001
1010
1101
1111

Karnaugh Map

A\BC00011110
01001
11011

About Boolean Algebra Solver

The Boolean Algebra Solver is a digital logic tool that evaluates Boolean expressions, generates truth tables, simplifies expressions, and renders Karnaugh maps. Enter any expression using AND, OR, NOT, and XOR operators with single-letter variables (A–Z). The solver parses the expression, extracts all variables, and enumerates every possible combination of 0s and 1s to build a complete truth table. For expressions with 2 to 4 variables, it also renders a Karnaugh map (K-map) using Gray code ordering for visual grouping analysis.

Digital electronics engineers, computer science students, and logic circuit designers use Boolean algebra daily to design and optimize combinational logic circuits. A truth table shows the output of a Boolean function for every possible input combination — essential for verifying gate-level logic. Karnaugh maps provide a visual method for minimizing Boolean expressions by identifying groups of adjacent 1s (prime implicants) that can be combined into simpler product terms. The expression simplifier applies algebraic identities such as double negation elimination, idempotent laws (A AND A = A), complementary laws (A AND NOT A = 0), and identity laws (A AND 1 = A).

This tool supports expressions with up to 6 variables for truth tables (64 rows maximum) and up to 4 variables for Karnaugh maps. Variables are single uppercase letters A through Z (excluding V to avoid conflicts). Operators are written as words: AND, OR, NOT, XOR. Parentheses are supported for grouping. The simplified expression panel shows algebraically reduced forms. All processing is done locally in the browser — no expression or variable data is sent to any server.

Key Features

  • Evaluates any Boolean expression with AND, OR, NOT, XOR operators and up to 6 variables
  • Generates a complete truth table with all input combinations and computed output
  • Renders Karnaugh maps (K-maps) for expressions with 2, 3, or 4 variables using Gray code ordering
  • Applies Boolean algebraic simplification rules to produce a reduced expression
  • Supports parentheses for explicit operator precedence grouping
  • Color-coded truth table: green for output 1, red for output 0
  • Color-highlighted K-map cells: green for 1 cells to visualize prime implicant groups
  • 100% client-side evaluation — expressions never leave your browser

Frequently Asked Questions

What operators does the Boolean Algebra Solver support?

The solver supports AND, OR, NOT, and XOR as keyword operators. Write them as words in your expression: "A AND B", "A OR NOT B", "A XOR C". Parentheses are supported for grouping, e.g., "(A OR B) AND NOT C". NAND and NOR can be constructed by combining NOT with AND/OR.

How do I write a Boolean expression for this tool?

Use single uppercase letters as variables (A, B, C, etc.) and write operators as words: AND, OR, NOT, XOR. Example: "A AND B OR NOT C" evaluates as (A AND B) OR (NOT C). Use parentheses to control precedence: "(A OR B) AND (C OR D)" for explicit grouping.

What is a truth table?

A truth table is a complete enumeration of all possible input combinations for a Boolean expression and the resulting output. For n variables, there are 2ⁿ rows. Truth tables are fundamental for verifying logic functions, designing digital circuits, and proving logical equivalences.

What is a Karnaugh map and when is it useful?

A Karnaugh map (K-map) is a visual grid for minimizing Boolean expressions. Variables are arranged in Gray code order so that adjacent cells differ by exactly one variable. Groups of adjacent 1s represent terms that can be combined into simpler expressions. K-maps are most practical for 2–4 variable expressions.

What does the expression simplifier do?

The simplifier applies pattern-matching rules based on Boolean algebraic identities: double negation (NOT NOT A → A), idempotent law (A AND A → A), complement law (A AND NOT A → 0), identity laws (A AND 1 → A, A OR 0 → A), and annihilator laws (A AND 0 → 0, A OR 1 → 1). It performs single-pass reduction on the text expression.

How many variables can the truth table handle?

The truth table works for 1 to 6 variables, producing up to 64 rows (2⁶). For 7 or more variables, the tool displays an error because the table would have 128 or more rows, which becomes impractical to display and analyze. The Karnaugh map is limited to 2–4 variables.

What is the difference between XOR and OR in Boolean algebra?

OR (inclusive OR) outputs 1 if at least one input is 1, including when both are 1. XOR (exclusive OR) outputs 1 only when exactly one input is 1 — it outputs 0 when both inputs are the same (both 0 or both 1). XOR is used in parity circuits, adder circuits, and cryptographic applications.

Can I use this tool for digital circuit design homework?

Yes. This tool is well-suited for logic design coursework: verify your truth table for a given function, check K-map groupings for expression minimization, and confirm simplified Boolean expressions. Enter the function derived from your logic diagram and compare the truth table output to your hand-written work.