EducationThe science

How to simplify logical expressions: functions, laws and examples

Today, together we will learn to simplify logical expressions, get acquainted with the basic laws and study the truth tables of the functions of logic.

Let's start with why this item is needed. Have you ever noticed how you talk? Please note that our speech and actions are always subject to the laws of logic. In order to know the outcome of an event and not be trapped, study the simple and understandable laws of logic. They will help you not only get a good evaluation in computer science or get more balls on a single state exam, but also act in life situations not at random.

Operations

In order to learn to simplify logical expressions, you need to know:

  • What functions are in Boolean algebra;
  • Laws of reduction and transformation of expressions;
  • The order of execution of operations.

Now we will consider these issues in great detail. Let's start with operations. They are pretty easy to remember.

  1. First of all, we note logical multiplication, in the literature it is called the conjunction operation. If the condition is written in the form of an expression, the operation is indicated by an inverted tick, multiplication or "&".
  2. The next most common function is logical addition or disjunction. It is marked with a tick or a plus sign.
  3. The negation or inversion function is very important. Remember how in Russian you selected a prefix. Graphically, the inversion is indicated by the prefix sign before the expression or the horizontal line above it.
  4. The logical consequence (or implication) is indicated by an arrow from value to effect. If we consider the operation from the point of view of the Russian language, then it corresponds to this kind of construction of the sentence: "if ..., then ...".
  5. Next comes the equivalent, which is indicated by a double-headed arrow. In Russian, the operation has the form: "only then."
  6. The Schaeffer bar divides the two expressions by a vertical bar.
  7. The Pierce arrow, like Shaffer's stroke, shares the expression with a vertical arrow pointing down.

Be sure to remember that operations must be performed in strict sequence: negation, multiplication, addition, consequence, equivalence. For operations "Sheffer's stroke" and "Pierce's arrow" there is no rule of precedence. Therefore, they must be performed in the order in which they stand in a complex expression.

Truth tables

Simplify the logical expression and build a truth table to further solve it without knowing the tables of basic operations. Now we propose to get acquainted with them. Note that the values can take either a true or false value.

For a conjunction, the table looks like this:

Expression number 1

Expression number 2

The result

False

False

False

False

True

False

True

False

False

True

True

True

Table for operation disjunction:

Expression number 1

Expression number 2

The result

-

-

-

-

+

+

+

-

+

+

+

+

Negation:

Input value

The result

The true expression

-

False expression

+

Consequence:

Expression number 1 Expression number 2 The result
- - True
- + True
+ - False
+ + True

Equivalence:

Expression number 1

Expression number 2

The result

False

False

+

False

True

-

True

False

-

True

True

+

Schiffer bar:

Expression number 1

Expression number 2

The result

0

0

True

0

1

True

1

0

True

1

1

False

Arrow Pierce:

Expression number 1

Expression number 2

The result

-

-

+

-

+

-

+

-

-

+

+

-

The laws of simplification

On the question of how to simplify logical expressions in computer science, we will be helped to find answers to simple and understandable laws of logic.

Let's start with the simplest law of contradiction. If we multiply the opposite concepts (A and notA), then we get a lie. In the case of the addition of opposing concepts, we get the truth, this law is called "the law of the excluded third." Often in Boolean algebra there are expressions with double negation (not nonA), in which case we get the answer A. There are also two de Morgan laws:

  • If we have a negative logical addition, then we get multiplication of two expressions with inversion (not (A + B) = notA * notB);
  • The second law acts analogously, if we have a negation of the operation of multiplication, then we obtain the addition of two values with inversion.

Very often duplication occurs, the same value (A or B) is added or multiplied. In such a case, the law of repetition (A * A = A or B + B = B) is valid. There are also laws of absorption:

  • A + (A * B) = A;
  • A * (A + B) = A;
  • A * (notA + B) = A * B.

There are two laws of gluing:

  • (A * B) + (A * B) = A;
  • (A + B) * (A + B) = A.

Simplifying logical expressions is easy if you know the laws of Boolean algebra. All the laws listed in this section can be verified experimentally. To do this, open the brackets according to the laws of mathematics.

Example 1

We have studied all the features of simplification of logical expressions, now it is necessary to consolidate their new knowledge in practice. We suggest that you analyze together three examples from the school curriculum and the uniform state examination tickets.

In the first example, we need to simplify the expression: (C * E) + (C * notE). First of all, we draw our attention to the fact that in the first and second brackets there is one and the same variable C, we suggest that you take it out of brackets. After the manipulation, we get the expression: C * (E + notE). Previously, we considered the law of excluding the third, we apply it with respect to this expression. Following it, we can assert that E + is not E = 1, hence our expression takes the form: C * 1. We can simplify the resulting expression, knowing that C * 1 = C.

Example 2

Our next task will be: what is the simplified logical expression not (C + not) + not (C + E) + C * E?

Note, in this example, there is a denial of complex expressions, it is worth it to get rid of, guided by the laws of de Morgan. Applying them, we get the expression: notC * E + notC * notE + C * E. We again observe a repetition of a variable in two terms, we take it out of brackets: not C * (E + neE) + C * E. Again, we apply the exclusion law: notC * 1 + C * E. We recall that the expression "notC * 1" equals notC: notC + C * E. Next, we suggest applying the distribution law: (notC + C) * (notC + E). We apply the law of elimination of the third: not C + E.

Example 3

You are convinced that it is actually very simple to simplify the logical expression. Example number 3 will be painted in less detail, try to do it yourself.

Simplify the expression: (D + E) * (D + F).

  1. D * D + D * F + E * D + E * F;
  2. D + D * F + E * D + E * F;
  3. D * (1 + F) + E * D + E * F;
  4. D + E * D + E * F;
  5. D * (1 + E) + E * F;
  6. D + E * F.

As you can see, if you know the laws of simplification of complex logical expressions, then this task will never cause you any difficulties.

Similar articles

 

 

 

 

Trending Now

 

 

 

 

Newest

Copyright © 2018 en.atomiyme.com. Theme powered by WordPress.