Build a truth table in Excel: basic concepts and examples

The propositional algebra is an exact science that does not compromise. To solve examples with conjunction, disjunction, implication, etc., you can build a truth table in an Excel application. It is equipped with a set of logical functions that automate and facilitate the process of finding the result.

Mathematical Logic: Basic Concepts

Aristotle is considered the founder of formal logic. In the XVII century. G. Leibniz suggested introducing symbols to define statements. D. Bull consolidated the acquired knowledge and for the first time designated sentences with symbols.

Schematically, β€œTRUE” is replaced by 1, and β€œFALSE” is replaced by 0.

A statement is understood as any narrative sentence that provides any information and is capable of accepting the meaning of truth or falsehood. In algebra, logics are distracted from the semantic load of sentences and consider only logical values.

Denial is understood as a new expression that assumes the meaning of truth in case of its falsity and vice versa.

A conjunction of two variables is a new sentence that assumes the value of truth in the case of the simultaneous notation β€œ1” and falsity in other situations.

By the disjunction of two statements is understood a new expression that assumes the value β€œFALSE” only with the simultaneous presence of β€œ0” and β€œTRUE” in other variations.

build a truth table

The implication of two variables is a new sentence in which:

  • if the premise is true, and the consequence is false, then the expression is "0";
  • the statement equals β€œ1” in other cases.

By the equivalent of two variables is understood a new statement that assumes the value of truth only if the elements are identical. Otherwise, the sentence is "0".

build a truth table

The logical values ​​of the expressions are usually made in a table form. There is another name for this kind of information. They say that for expression it is necessary to build a truth table. It indicates the initial values ​​for all variables, and then calculates the result of the entire expression.

Algorithm for the implementation of calculations in logical operations

To build a truth table, you need to know in what order the actions are performed. In an expression where there are several operands, the calculation is performed in the following order:

  • inversion (negation);
  • conjunction (logical function in Excel β€œAND”);
  • disjunction (Boolean operator in Excel OR);
  • implication (consequence);
  • equivalent.

There are two more operations, but the priority is not defined for them:

  • Scheffer's stroke;
  • arrow pierce.

The calculation algorithm changes if the expression is enclosed in brackets.

The procedure for constructing a tabular form for logical operands in Excel

Before finding the meaning of an expression, you need to study the concept of the formula of the algebra of logic. The definition says that this is a complex expression consisting of simple statements connected by logical operands.

Example 1. Build a truth table for conjunction, disjunction and negation.

build a truth table

Example 2. A formula is given for the algebra of logic. Build a truth table. Examples as a sample are given below.

build a truth table examples

Example 3. How to build a truth table in Excel, if given the formula of the algebra of logic in the verbal description. Saying: β€œIf the triangle is equilateral, then all its edges are equal or all its angles are equal.”

First you need to parse a compound sentence into minimal elements:

  • The first part of the expression: A = "equilateral triangle."
  • Second: B = "all sides of the figure are equal."
  • Third: C = "all angles of the triangle are equal."

After that, the expression is compiled and solved in the Excel software package.

how to build a truth table in excel

When compiling truth tables, it is important to remember the order of operations.

Source: https://habr.com/ru/post/E2246/


All Articles