Search for a tool
Boolean Expressions Calculator

Tool/Calculator to simplify or minify Boolean expressions (Boolean algebra) containing logical expressions with AND, OR, NOT, XOR.

Results

Boolean Expressions Calculator -

Tag(s) : Symbolic Computation, Electronics

Share
Share
dCode and more

dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!


Please, check our dCode Discord community for help requests!
NB: for encrypted messages, test our automatic cipher identifier!


Feedback and suggestions are welcome so that dCode offers the best 'Boolean Expressions Calculator' tool for free! Thank you!

Boolean Expressions Calculator

Boolean Expressions Simplifier












Answers to Questions (FAQ)

What is a boolean expression? (Definition)

A Boolean expression (or Logical expression) is a mathematical expression using Boolean algebra and which uses Boolean values (0 or 1, true or false) as variables and which has Boolean values as result/simplification. The expression can contain operators such as conjunction (AND), disjunction (OR) and negation (NOT).

How to simplify / minify a boolean expression?

The simplification of Boolean Equations can use different methods: besides the classical development via associativity, commutativity, distributivity, etc., Truth tables or Venn diagrams provide a good overview of the expressions.

Example: Original expression (LaTeX) $$ \overline{a \land b \land (c \lor \bar{d})} \lor \bar{b} $$

dCode allows several syntaxes:

Algebraic notation

Example: !(ab(c+!d))+!b with implicit multiplication ab = a AND b and ! (exclamation) for the bar: logical NOT.

Logic/Computer notation

Example: !(a&&b&&(c||!d))||!b with double character & (ampersand) for AND and the double character | (pipe, vertical bar) for logical OR.

Literal notation

Example: NOT (a AND b AND (c OR NOT d)) OR NOT b

There may be several minimal representations for the same expression, dCode provides a solution and outputs an algebraic notation.

Some notations are ambiguous, avoid the functional notation 'XOR(a,b)' to write a XOR b, also avoid the suffixed prime/apostrophe to `a' and prefer !a.

What are boolean algebra simplifications methods?

Boolean algebra has many properties (boolean laws):

1 - Identity element: $ 0 $ is neutral for logical OR while $ 1 $ is neutral for logical AND

$$ a + 0 = a \\ a.1 = a $$

2 - Absorption: $ 1 $ is absorbing for logical OR while $ 0 $ is absorbing for logical AND

$$ a + 1 = 1 \\ a.0 = 0 $$

3 - Idempotence: applying multiple times the same operation does not change the value

$$ a + a = a + a + \cdots + a = a \\ a . a = a . a . \cdots . a = a $$

4 - Involution or double complement: the opposite of the opposite of $ a $ est $ a $

$$ a = \overline{\overline{a}} = !(!a) $$

5 - Complementarity by Contradiction: $ a $ AND $ \text{not}(a) $ is impossible, so is false and is $ 0 $

$$ a . \overline{a} = 0 $$

6 - Complementarity by excluded third: $ a $ OR $ \text{not}(a) $ is always true, so is $ 1 $

$$ a + \overline{a} = 1 $$

7 - Associativity law: parenthesis are useless between same operators

$$ a.(b.c) = (a.b).c = a.b.c \\ a+(b+c) = (a+b)+c = a+b+c $$

8 - Commutativity law: the order does not matter

$$ a.b = b.a \\ a+b = b+a $$

9 - Distributivity law: AND is distributed over OR but also OR is distributed over AND

$$ a.(b+c) = a.b + a.c \\ a+(b.c) = (a+b).(a+c) $$

10 - De Morgan laws (see below for more details)

$$ \overline{a+b} = \overline{a}.\overline{b} \\ \overline{a.b} = \overline{a}+\overline{b} $$

11 - Other simplifications by combinations of the above ones

$$ a.(a+b) = a \\ a+(a.b) = a \\ (a.b) + (a.!b) = a \\ (a+b).(a+!b) = a \\ a + (!a.b) = a + b \\ a.(!a + b) = a.b \\ a.b + \overline{a}.c = a.b + \overline{a}.c + b.c $$

How to show/demonstrate that 2 boolean expressions are equal?

Method 1: simplify them until you get the same writing in boolean algebra.

Method 2: by calculating their truth table which should be identical.

What is De Morgan's law?

De Morgan's laws are often used to rewrite logical expressions. They are generally stated: not (a and b) = (not a) or (not b) and not (a or b) = (not a) and (not b). Here are the equivalent logical entries:

$$ \overline{(a \land b)} \leftrightarrow (\overline{a}) \lor (\overline{b}) \iff \overline{AB} = \overline{a} + \overline{b} $$

$$ \overline{(a \lor b)} \leftrightarrow (\overline{a}) \land (\overline{b}) \iff \overline{a+b} = \overline{a} . \overline{b} $$

What is Disjunctive or Conjunctive Normal Form?

In logic, it is possible to use different formats to ensure better readability or usability.

The normal disjunctive form (DNF) uses a sum of products (SOP):

Example: (a&&c)||b

The normal conjunctive form (CNF) or clausal form uses a product of sums (POS):

Example: (a+b).(b+c)

How to show step by step calculations?

The calculation steps, such as a human can imagine them, do not exist for the solver.

The operations performed are binary bit-by-bit and do not correspond to those performed during a resolution with a pencil and paper.

Part of the results come from a database containing all 2^26 combinations of the 26 letters of the alphabet for each binary value 0 or 1.

Source code

dCode retains ownership of the "Boolean Expressions Calculator" source code. Except explicit open source licence (indicated Creative Commons / free), the "Boolean Expressions Calculator" algorithm, the applet or snippet (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or the "Boolean Expressions Calculator" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) and all data download, script, or API access for "Boolean Expressions Calculator" are not public, same for offline use on PC, mobile, tablet, iPhone or Android app!
Reminder : dCode is free to use.

Cite dCode

The copy-paste of the page "Boolean Expressions Calculator" or any of its results, is allowed (even for commercial purposes) as long as you credit dCode!
Exporting results as a .csv or .txt file is free by clicking on the export icon
Cite as source (bibliography):
Boolean Expressions Calculator on dCode.fr [online website], retrieved on 2024-11-18, https://www.dcode.fr/boolean-expressions-calculator

Need Help ?

Please, check our dCode Discord community for help requests!
NB: for encrypted messages, test our automatic cipher identifier!

Questions / Comments

Feedback and suggestions are welcome so that dCode offers the best 'Boolean Expressions Calculator' tool for free! Thank you!


https://www.dcode.fr/boolean-expressions-calculator
© 2024 dCode — The ultimate 'toolkit' to solve every games / riddles / geocaching / CTF.
 
Feedback