Lesson summary logical operations. Summary of a lesson in computer science on the topic "basic logical operations"

Lesson 3

Teacher:Asylbekova L. S. . Grade: 8 Date: ______________

Lesson topic: Logic and logical operations.

Lesson Objectives:

1. form ideas: about the main logical functions (conjunction, disjunction, implication, equivalence, negation) and truth tables of logical functions; teach students to build truth tables of logical functions.

2. develop independence when working with logical functions when constructing truth tables.

3. attentiveness, concentration, accuracy in the construction of truth tables; responsibility and self-discipline.

During the classes

    Organizing time.

    Call stage.

Students are invited to complete parts of the cluster on the topic “Logic functions. Truth tables of logical functions.

The teacher updates previously acquired knowledge, which will help to more effectively master the material through questions:

What is the keyword of our topic?

What is the principle of cluster levels?

What is on the first, second, third level?

What level are you having problems with?

What have you heard or already know about logical elements, realizing the basic logical operations?

Fill in the table on the topic of the lesson.

    The stage of comprehension.

Summarize what is the purpose of our today's lesson?

Generalization of the statements of students is carried out by the teacher with a demonstration of presentations. The purpose of the demonstration: to form an idea of ​​the truth table of a complex function, to consider the algorithm for compiling a truth table, to form the ability to compile truth tables.

According to the dictionary, truth table - it tabular representation of the logic circuit (operation), which lists all possible combinations of truth values ​​of the input signals (operands) together with the truth values ​​of the output signal (the result of the operation) for each of these combinations.

Problem question:

Why create truth tables of logical functions?

For tabular representation of the logical circuit.

    Conjunction - corresponds to the union and, logical multiplication.

    Disjunction - corresponds to the union or, logical addition.

    Implication - corresponds to the union if ... then

    Equivalence - matches the word equivalent

    Negation - corresponds to the union not.

Truth table.

AV

AV

4. Consolidation of practical skills.

Exercise. Determine if the statement is true.

A) AB → AB with A-and B-l

B) ͞AB → A῀A with A-l B-and

C) ͞͞AB → S͞D῀U with A-and B-l C-and D-l U-and

D) (A→B)῀(AB῀͞A) with A-and B-l

E) (X῀͞U)  (A → B) with X-l U-and V-l A-and

5. Summing up.

Students are encouraged to do mutual verification solving logical problems.

For each correct answer, 1 point is awarded.

5 points - "5"

4 points - "4"

3 points - "3"

3 points - "2"

6. Reflection.

When conducting reflection, the "Sinkwine" technique is used.

cinquain

1 I am line - one noun.

2 I am line - two adjectives.

3 I am line - three verbs.

4 I am line - one complete sentence (statement).

5 I am line - one final word.

7. Homework assignment.

slide 1

Event: open lesson Subject: Informatics and ICT Teacher: Astafiev Sergey Valerievich Class: 8a Type of lesson: combined Methodology: development of critical thinking Date: November 27, 2014
Topic: "Logical Operations"

slide 2

Joke tasks
You are sitting in a helicopter, in front of you is a horse, behind you is a camel. Where are you at? Under which bush does a hare sit when it rains? You have entered a dark room. It has a gas and petrol lamp. What will you light first? Usually the month ends on the 30th or 31st. What month has the 28th? You are the pilot of a plane flying from Havana to Moscow with two transfers in Algiers. How old is the pilot?

slide 3

The triune task of the lesson:
cognitive aspect. repeat the concepts: a logical variable, logical operations, to form the ability to use logical operations; learn new logical operations Developing aspect. development of logical thinking in students and cognitive interest in the subject; educational aspect. formation of sustainable attention among students; ability to work in groups; respect for the opinions of others;

slide 4

Lesson plan:

No. Stages Time
1 Organizational moment (presence check, d/z) 3
2 Testing by forms of thinking 6
3 Checking tests (name, 2 people), collecting homework (1 person) 4
4 Working out complex statements at the blackboard (1 person), group work for 2 people 4
5 Physical education 3
6 Phase comprehension of the content. Implication, equivalence 10
7 Consolidation of material, problem solving 10
8 Reflection, cinquain, grading, homework - 5
Total: 45

slide 5

Homework
A - “The letter A is a vowel”; B - "Tiger is a herbivore."
Make up all possible compound statements from them.
A&B - false AvB - true A&¬B - true ¬AvB - false ¬Av¬B - true ¬A&¬B - false Av¬B - true ¬A&B - false

slide 6

Physical education minute
Logic is the science of the forms and laws of human thought; A declarative sentence in which something is affirmed or denied is called an utterance; The statement "It is impossible to create a perpetual motion machine" is true; "An electron is an elementary particle" - a statement; A statement is called compound if it is built from simple statements.

Slide 7

Topic: "Logical Operations"
Implication Equivalence

Slide 8

Logical operation IMPLICATION (logical consequence)
in natural language corresponds to the connective if ..., then ...; in propositional algebra, the notation is → (A → B). An implication is a logical operation that will be false if and only if true implies false.

Slide 9

truth table
A B A→B
0 0 1
0 1 1
1 0 0
1 1 1

Slide 10

Logical operation EQUIVALENCE (logical equality).
in natural language corresponds to the connective if and only if ...; in propositional algebra, the notation is ↔ (A ↔ B). Equivalence is a logical operation whose value is true when both statements are true or both are false.

slide 11

truth table
A B A↔B
0 0 1
0 1 0
1 0 0
1 1 1

slide 12

Euler-Ven diagram
A
V

slide 13

Precedence of logical operations
Inversion Conjunction Disjunction Implication and equivalence

Slide 14

Write the following statements as logical expressions.
The number 17 is odd and two-digit. It is not true that a cow is a carnivorous animal. In a physics lesson, students conduct experiments or solve problems. If the weather is sunny, Katya will go for a walk. When Katya has learned her lessons, she will go for a walk.
A&B ¬A AVB A→B A↔B

slide 15

Solve the problem: Natasha put on a red dress for prom, Tanya was not in black, not in blue and not in blue. Oksana has two dresses: black and blue. Nadia has a white dress and a blue one. Olga has dresses of all colors. Determine what color dresses the girls wore if everyone was wearing dresses of different colors at the evening.
Red Black Blue Blue White
Natasha
Tanya
Oksana
Nadia
Olga
Natasha
Tanya
Olga
Nadia
Oksana
The answer is here!

slide 16

Practical work
Fill in the truth table in MS EXCEL If Ivanov is healthy and rich, then he is healthy. A-Ivanov is healthy B-Ivanov is rich (A&B) →A

  1. The concept of the science of "Logic".
  2. logical operations.
  3. Logics.

Teacher: Deryabina I.N.

The concept of science "Logic"

The purpose of the lesson: to give the basic concepts of logic, to consider the main stages in the development of logic as a science.

During the classes:

Explanation of the new material:

Word logics denotes a set of rules to which the process of thinking is subject, or denotes the science of the rules of reasoning and the forms in which it is carried out. Logic studies abstract thinking as a means of knowing the objective world, explores the forms and laws in which the world is reflected in the process of thinking. The main forms of abstract thinking are:

  • CONCEPTS,
  • JUDGMENTS
  • CONCLUSIONS.

CONCEPT- a form of thinking that reflects the essential features of an individual object or a class of homogeneous objects: briefcase trapeze hurricane wind

JUDGMENT- a thought in which something is affirmed or denied about objects. Judgments are declarative sentences, true or false. They can be simple or complex: Spring has come and the rooks have arrived.

CONCLUSION- a method of thinking, through which new knowledge is obtained from the original knowledge; from one or more true judgments, called premises, we obtain a conclusion according to certain rules of inference. There are several types of inferences. Everything metals are simple substances. Lithium is a metal. Lithium is a simple substance.

To reach the truth with the help of inferences, it is necessary to observe the laws of logic.

FORMAL LOGIC- the science of the laws and forms of correct thinking.

MATHEMATICAL LOGIC studies the logical connections and relationships that underlie deductive (logical) inference. (Which writer's books are good about the deductive method?)

Formal logic is concerned with the analysis of our usual meaningful inferences expressed in colloquial language. Mathematical logic studies only inferences with strictly defined objects and propositions, for which it is possible to decide unambiguously whether they are true or false.

Stages of development of logic

The 1st stage is associated with the works of the scientist and philosopher Aristotle (384-322 BC). He tried to find the answer to the question "how do we reason", he studied the "rules of thinking". Aristotle was the first to give a systematic exposition of logic. He analyzed human thinking, its forms - concept, judgment, conclusion, and considered thinking from the side of the structure, structure, that is, from the formal side. This is how formal logic arose.

2nd stage - the emergence of mathematical or symbolic logic. Its foundations were laid by the German scientist and philosopher Gottfried Wilhelm Leibniz(1646-1716). He tried to build the first logical calculus, believed that it was possible to replace simple reasoning with actions with signs, and gave rules. But Leibniz expressed only the idea, and it was finally developed by the Englishman George Bull(1815-1864). Boole is considered the founder of mathematical logic as an independent discipline. In his works, logic found its own alphabet, its own spelling and grammar. No wonder the initial section of mathematical logic is called the algebra of logic, or Boolean algebra. (according to the stages of development of logic, you can give a message to the house)

d/h notes, report on the investigation of Sherlock Holmes

Algebra of logic. Basic concepts. Scope of algebra-logic. Logic functions. truth tables.

Target: To consolidate the knowledge gained in the previous lesson, to give the concept of conjunction, disjunction, inversion.

During the classes:

Survey.

  1. Stages of development of logic.
  2. Basic forms of abstract thinking.
  3. Logic F.L, M.L.

Explanation of the new material:

The basis of the operation of the logical circuit and devices P.K-logic. In logic, a proposition - a statement - a declarative sentence - is true or false.

2+8<5
5*5=25
2*2=5
A square is a parallelogram
A parallelogram is a square. -simple.
Complex (using connectives and, or and particles not.)

In M. L., the specific content of the statement is not considered, it is only important whether it is true or false, therefore the statement can be represented by some ~ value, the value of which can be 0 or 1

0 is false, 1 is true.

For ease of notation, the statement is denoted by Latin letters. A cat has 4 legs A=1.

Moscow is located on 2 hills B=0

The PK device that performs an action on binary numbers can be considered as some kind of functional converter, and the input numbers are the values ​​of the input logical variables, and the output number is the value of the logical function, which is obtained as a result of performing certain operations. Thus, this converter implements some logical function.

The values ​​of logical functions for different combinations of values ​​of input variables (sets of input ~) are usually set by a special table - a truth table.

The number of input sets ~ (Q) is determined by the expression: (Q)=2n – where n is the number of input ~ . the truth table might look like

X Y Z F (x, y, z)
0 0 0 1
0 0 1 1
0 1 0 1
0 1 1 0
1 0 0 0
1 0 1 1
1 1 0 1
1 1 1 0

d/h abstracts

Boolean operations

The purpose of the lesson: to introduce students to the basic logical operations and the priority of actions in logical expressions, truth tables, learn how to make truth tables for a logical expression.

During the classes:

Survey:

The task on the board:

Underline the simple ones in the complex sentences below. Write a complex statement with a formula and give a truth table:

  • All planets in the solar system are spherical and revolve around the sun.
  • We will go for a walk in the park or go out of town.

Onsite questions:

  • What is logic as a science?
  • Formal logic and mathematical
  • Examples of the deductive method
  • Forms of abstract thinking
  • What is a statement, what are statements?

Explanation of new material:

In propositional algebra, any logical function can be expressed through basic logical operations, written as a logical expression, and simplified by applying the laws of logic and the properties of logical operations. Using the formula of a logical function, it is easy to calculate its truth table. It is only necessary to take into account the order of execution of logical operations (priority) and brackets. Operations in a boolean expression are performed from left to right, including parentheses. Priority of logical operations:

  • INVERSION,
  • CONJUNCTION,
  • DISJUNCTION

CONJUNCTION

Conjunction: corresponds to the union: "and", denoted by the sign ^, denotes logical multiplication.

The conjunction of two logical ~ is true if and only if both statements are true. Can be generalized to any number of variables A^B^C = 1 if A=1, B=1, C=1.

DISJUNCTION

The logical operation corresponds to the union OR, denoted by the sign v, otherwise called LOGICAL ADDITION.
A disjunction of two logical variables is false if and a pebble if both statements are false.

This definition can be generalized to any number of logical variables combined by disjunction.

A v B v C = 0 only if A = O, B = O, C - 0.

The disjunction truth table has the following form:

INVERSION

The logical operation corresponds to the particle not, denoted ¬ or ¯ and is a logical negation.

The inverse of a boolean variable is true if the variable is false and vice versa: the inversion is false if the variable is true.

A ¬A
1 0
0 1

statements whose truth tables are the same are called equivalent.

IMPLICATION and EQUIVALENCE

The implication "if A, then B", denoted by A → B

A B A → B
0 0 1
0 1 1
1 0 0
1 1 1

Equivalence "A then B and only if", denoted by A ~ B

A B A~ B
0 0 1
0 1 0
1 0 0
1 1 1

Fixing:

  1. Determine the truth table of the logical function: F (A, B, C) \u003d A v (C ^ B), Determine the number of rows in the table: Q \u003d 23 \u003d 8
  2. Determine the number of logical operations (3) and the sequence of their execution
  3. Determine the number of columns: three variables + three logical operations = 6.

At the blackboard

Build a truth table for the statements "Sasha did not complete the task" and "Sasha was reprimanded"

Sasha did not complete the task

Sasha was reprimanded

Result

C/r by cards

d/z: abstracts

Using the logic of utterance in technology. Logic circuits on contact elements.

Purpose: to show the application of the topic in practice, to learn how to compose functions that describe the state of electrical circuits.

During the classes:

A logical element is a circuit that implements logical operations and, or, not. Consider the implementation of logical elements through electrical contact circuits, familiar to you from the school course in physics. Contacts on the diagrams will be denoted in Latin letters.

  1. Serial connection of contacts
  2. Parallel connection of contacts

Let's make a table of the dependence of the state of the circuits on all possible combinations of the state of the contacts. Let us introduce notation. 1 - the contact is closed, there is current in the circuit; 0 - the contact is open, there is no current in the circuit.

Serial circuit status

Parallel circuit status

As you can see, a circuit with a serial connection corresponds to a logical operation and, since the current in the circuit appears only when contacts A and B are closed simultaneously. A circuit with a parallel connection corresponds to a logical operation or, since the current in the circuit appears as if one of the contacts A or B, and with their simultaneous closure. A logical operation is not implemented through the contact circuit of an electromagnetic relay, the principle of operation of which is studied in a school physics course. Contact not X is called inversion of contact X, when X is closed, not X is open, and vice versa.

State truth table of inverted contacts

Any electrical circuit can be divided into chains of series or parallel connected contacts, let's call them elementary.

Fixing:

Split into elementary chains

Determine the type of elementary chains, build a truth table.

C/r by cards

D / s abstracts

Characteristics of logical elements.

The purpose of the lesson: Get acquainted with the schematic symbols of logical elements, learn how to build and read electrical circuits using formulas.

During the classes:

Explanation of the new material:

ELEMENT "AND" has several inputs and 1 output, implements the logical operation "AND"

ELEMENT "OR" has several inputs and 1 output, implements the logical operation "OR" (adder)

ELEMENT "NOT" has 1 input and 1 output, implements the logical operation "NOT" since the output signal is always opposite to the input element "NOT" is called "inverter"

Fixing: On cards 1, disassemble the scheme together with the students at the blackboard (write down a logical function according to this scheme), then independently on the spot according to the ind schemes.

s/r by cards

d/z: abstracts

Analysis, simplification and synthesis of contact circuits.

The purpose of the lesson: consolidate knowledge on the topic "Contact diagrams".

During the classes:

Repetition: On the spot, each card breaks the electric circuit into elementary chains, draws up a formula for a logical function

Explanation of the new material:

The main work on the electrical circuit consists of:

a) in the analysis of a contact circuit, the determination of all possible conditions for the flow of electric current. It boils down to defining a logic function corresponding to this circuit

X Y not X not X v Y X ^ (not X v Y)
1 0 0 0 0
1 1 0 1 1
0 1 1 1 0
0 0 1 1 0

b) simplification of the contact circuit is reduced to the simplification of the formula corresponding to it using the laws of logic.

X ^ (not X v Y)= X ^ Y, so we removed 1 contact

v) in the synthesis of a contact circuit, the development of a circuit, the operating condition of which is given by a truth table or a verbal description.

A B F
0 0 0

0 1 1 not A and B
or
1 0 1 A and not B
or
1 1 1 A and B
F(A,B)=(not A ^ B) v (A ^ not B) v (A ^ B)= A v B after simplification.

Fixing:

A B C F
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 0
1 0 0 0
1 0 1 1
1 1 0 1
1 1 1 1
F= (A ^ not B ^C) v (A ^ B ^ not C) v (A ^ B ^ C)= A ^ (B v C)

s/r by cards

d/z: abstracts

Logics

The purpose of the lesson: generalize knowledge on the topic "Logic", repeat the main parameters, prepare for the test.

During the classes:

Problem solving

a) Underline the simple ones in the sentences below. Write complex statements in the form of a formula, give truth tables.

Spring has come, and the rooks have arrived.

A B F
1 0 0
0 1 0
0 0 0
1 1 1

b) For the above formula, give 2 statements
not B or C

v) In accordance with the laws of logic, determine the result:

  1. it is not true that there is a pen on the table or a pencil on the table
    not(A or B) = not A and not B
  2. tomorrow there will be a blizzard and it will rain or tomorrow there will be no blizzard and it will rain
    (A and B) or (not A and B)=B and (not A or B)= B and 1=B
  3. it is not true that Yura did not do this
    =
    A = A

G) select all elementary chains and write down the function, make a truth table.

_ _ _ _
F(A,B,C)= A^(A V B V C) ^ B ^ C V (A V B) ^ C ^ (A V B)

A B C F
1 1 1 0
1 0 1 1
1 1 0 1
1 0 0 0
0 1 1 0
0 0 1 0
0 1 0 0
0 0 0 1

e) write the formula of the output signal

F(X,Y,Z)= (X V Y V Z) ^ (Y V X) ^ (Z V Y)

D/z: make a truth table for the resulting formula, prepare for the test. In the statement below, highlight the simple ones. troll work.

Municipal educational institution secondary school No. 63, Ulyanovsk

Informatics lesson in grade 9

"Logic Operations"

Prepared by the teacher of computer science of the highest qualification category E.A. Suvorova

2010

Lesson topic: Boolean operations.

Lesson Objectives:

    learning: to form an idea of ​​the simplest logical operations;

    development: develop logical thinking, cognitive interest;

    education: to cultivate accuracy, the ability to listen, a culture of communication.

Lesson type: combined.

Teaching methods: explanatory and illustrative (demonstration of a presentation, conversation).

Form of study: collective.

During the classes.

    Checking homework.

Questions.

    What are Boolean Algebra Objects? (Sayings)

    What is a statement?

    Give examples of statements.

    Are all sentences statements?

    Give examples of non-statements.

    From what point of view are the statements considered? (in terms of true or false)

    What is "true" and "false" for the algebra of logic?

    Can a statement be both true and false at the same time?

    Explanation of the new topic.

Boolean expressions can be simple or complex.

Simple boolean expression consists of one statement and does not contain a logical operation. In a simple logical expression, there can be only two results - either "true" or "false".

Complex boolean expression contains statements joined by logical operations.

In complex logical expressions, use logical operations.

There are three basic operations on propositions: logical addition, logical multiplication, and negation.

NOT Logical negation (inversion)

Operation Does NOT apply to a single argument, which can be either a simple statement or a compound statement. The result of the operation is NOT "false" if the original expression is true and "true" if the original expression is false.

The following notation is accepted for the negation operation: NOT A, ┐A, not A.

The table with all possible values ​​of the initial expressions and the corresponding results of the operation was called ie truth table.

Exercise 1. Create negation for boolean expressions. Determine the result of the negation operation.

    The earth revolves around the sun.

    Pushkin is a brilliant Russian poet.

    5X = 10.

    4 is a prime number.

OR Logical addition (disjunction, union)

The logical OR operation performs the function of combining two statements, which can be both simple and complex logical expressions.

Applicable designations: A or B, A \/ B, A + B, A or B.

The result of the OR operation is an expression that will be true if and only if at least one of the original expressions or both expressions is true.

Task 2. Compose a disjunction from logical expressions.

    Marina is older than Sveta. Olya is older than Sveta.

    There are textbooks in the classroom. There are reference books in the office.

    Some tourists love tea. The rest of the tourists love milk.

    The blue cube is smaller than the red one. The blue cube is smaller than the green one.

And - Logical multiplication (conjunction)

The logical operation AND performs the function of the intersection of two statements, which can be either a simple or a complex logical expression.

Designations used: A and B, A / \ B, A ∙ B, A&B, A and B.

The result of the AND operation is an expression that will be true if both statements are true.


Task 3. Compose a conjunction from logical expressions.

    One half of the class is learning English. The other half of the class is learning German.

    A suffix is ​​part of a word. The suffix comes after the root.

    Two lines in a plane are parallel. They don't intersect.

    Petya will go to the village. Peter will go fishing.

    Consolidation.

Task 4. Let A = "This starry night" and B = "This night is cold." Express the following formulas in plain language:

    A AND V;

    A AND NOT V;

    NOT A AND NOT V;

    NOT A OR V;

    A AND NOT V;

    NOT A AND NOT V;

Task 5. Compose and write down true complex statements using logical operations.

    It is not true that y > 5 and z

    Any of the numbers X, Y, Z is negative.

    All numbers X, Y, Z are equal to 12.

    It is not true that all numbers X, Y, Z are positive.

    Summary of the lesson.

Questions.

    What is a simple boolean expression?

    What is a complex boolean expression?

    What basic logical operations do you know?

    What is denial?

    What is logical addition?

    What is logical multiplication?

    Give examples of complex logical expressions.

    Homework. Topic 23.2, p.346 - 352,

Task. Statements are given: A \u003d "p is divisible by 5" and B \u003d "p is an odd number." Find the set of p values ​​for which the result of a) logical addition and b) logical multiplication will be:

      true;

Lesson on the topic: “Fundamentals of logic. Algebra of propositions.

Lesson Objectives: to introduce children to the forms of thinking, to form concepts: a logical statement, logical quantities, logical operations; create conditions for the development of cognitive interest of students, promote the development of memory, attention, logical thinking; contribute to the education of the ability to listen to the opinions of others, to work in a team.

During the classes.

I.Presentation of the topic and objectives of the lesson.

How does a person think? What in our speech is a statement, and what is not? What are the similarities and differences in arithmetic multiplication and logical multiplication, let's get acquainted with the basic logical expressions and operations, learn some of the components of our thinking.

II. Explanation of new material.

1. At the heart of modern logic are the teachings created by the ancient Greek thinkers, although the first teachings about the forms and methods of thinking arose in ancient China and India. The founder of formal logic is Aristotle, who was the first to separate the logical forms of thinking from its content.

Logics- it is the science of forms and ways of thinking. This is the doctrine of the methods of reasoning and evidence. The laws of the world, the essence of objects, the common in them, we learn through abstract thinking. Thinking is always carried out through concepts, statements and conclusions.

Concept- it is a form of thinking that highlights the essential features of an object or class of objects that make it possible to distinguish them from others. Example: rectangle, heavy rain, computer.

statement is the formulation of one's understanding of the world around. An utterance is a declarative sentence in which something is affirmed or denied.

A statement can be said to be true or false. A statement will be true in which the connection of concepts correctly reflects the properties and relations of real things. A statement will be false if it contradicts reality.

Example: true statement: "The letter "a" is a vowel", a false statement: "The computer was invented in the middle of the 19th century."

Example. Which of the sentences are statements? Determine their truth.

1.How long is this tape? 2.Listen to the message.

3. Do morning exercises! 4.Name the input device.

5. Who is absent? 6. Paris is the capital of England. (LYING)

7. The number 11 is prime. (TRUE) 8. 4 + 5=10. (LYING)

9. You can’t even pull a fish out of a pond without difficulty. 10. Add the numbers 2 and 5.

11. Some bears live in the north. (TRUE) 12. All bears are brown. (LYING)

13. What is the distance from Moscow to Leningrad.
inference- this is a form of thinking with the help of which a new judgment (knowledge or conclusion) can be obtained from one or more judgments.

2. Logical expressions and operations

Algebra is the science of general operations similar to addition and multiplication, which are performed not only on numbers, but also on other mathematical objects, including statements. This algebra is called algebra of logic. The algebra of logic is abstracted from the semantic content of statements and takes into account only the truth or falsity of the statement.

You can define the concepts of boolean variable, boolean function, and boolean operation.

boolean variable is a simple statement containing only one thought. Its symbolic designation is a Latin letter. The value of a boolean variable can only be the constants TRUE and FALSE (1 and 0).

Compound statement - logic Function, which contains several simple thoughts, interconnected with the help of logical operations. Its symbolic designation is F(A,B,...). Compound statements can be built on the basis of simple statements.

Boolean operations- logical action.

There are three basic logical operations - conjunction, disjunction and negation and additional ones - implication and equivalence.

In the algebra of logic, propositions are denoted names of logical variables (A, B, C), which can take the values ​​true (1) or false (0). Truth, lies boolean constants.
boolean expression- a simple or compound statement. A complex statement is built from simple ones using logical operations.

logical operations.

Conjunction (logical multiplication)– connection of two logical expressions (statements) using the union AND. This operation is denoted by the symbols & and ∧.

The rules for performing a logical operation are reflected in a table called truth table:
A - I have the knowledge to pass the test.
B - I have a desire to pass the test.
A&B - I have the knowledge and desire to pass the test.

Conclusion: The logical operation conjunction is true only if both simple statements are true, otherwise it is false.

Disjunction (logical addition)- connecting two logical statements using the union OR. This operation is indicated by V.
Consider the truth table for a given logical operation.
Denote by A - in the summer I will go to the camp, B - in the summer I will go to my grandmother.
AVB - In the summer I will go to the camp or go to my grandmother.

Conclusion: the logical operation disjunction is false if both simple propositions are false. Otherwise it is true

Negation or inversion- the particle NOT is added or the word WRONG THAT is indicated by the symbol ¬, ¯. Let A - It's summer now.

Conclusion: if the original expression is true, then the result of its negation will be false, and vice versa, if the original expression is false, then it will be true.

Logical following (implication): if ..., then ... (if premise, then conclusion); signs , . Truth table:

AB is equivalent toVV. Prove.


Boolean equality (equivalence): if and only if ...; signs , . Truth table:

AB is equivalent to (AV ) & ( VB) or (&)V (A& B).

Prove the 1st algebraically on the board. Prove the 2nd with spreadsheets yourself.

The sequence of operations:
negation, conjunction, disjunction, implication, equivalence . In addition, the order in which the operation is performed is affected by parentheses that can be used in logical formulas.

III. Consolidation of the studied material.

Example 1 From two simple statements, build a complex statement using the logical operations AND, OR.

    All students study mathematics. All students study literature.

All students study mathematics and literature.

    The blue cube is smaller than the red one. Blue is smaller than green.

    There are textbooks in the classroom. There are reference books in the office.

Example 2 Calculate the value of the logical formula: not X and Y or X and Z, if the logical variables have the following values: X=0, Y=1, Z=1
Solution. We mark the order of execution of operations in the expression with numbers from above:
1. not 0=1
2. 1 and 1= 1
3. 0 and 1 =0
4. 1 or 0 =1 answer: 1

Example 3 Determine the truth of the formula is not P or Q and not P

Example 4 Write down the following statement as a logical expression: "In the summer, Petya will go to the village and, if the weather is fine, he will go fishing."

1. Let's break the compound statement into simple statements: "Peter will go to the village", "The weather will be fine", "He will go fishing."

Let's denote them through logical variables: A = Petya will go to the village; B = The weather will be fine; C = He will go fishing.

2. Let's write the statement as a logical expression, taking into account the order of actions. If necessary, put the brackets: F = A& (B+C).

Example 5.Write the following statements as logical expressions.

1. The number 17 is odd and two-digit.

2. It is not true that a cow is a predatory animal.

Example 6 Compose and write true complex statements from simple ones using logical operations.

1. It is not true that 10Y5 and Z (answer: (Y 5) & (Z

2.Z is min(Z,Y) (answer: Z

3.A is max(A,B,C) (answer: (AB)&(AC)).

4. Any of the numbers X,Y,Z is positive (answer: (X0)v(Y0)v(Z0).

5. Any of the numbers X, Y, Z is negative (answer: (X

6. At least one of the numbers K, L, M is not negative (answer: (K 0) v (I 0) v (M O))

7. At least one of the numbers X,Y,Z is not less than 12 (answer: (X 12) v (Y 12) v (Z 12))

8. All numbers X,Y,Z are equal to 12 (answer: (X=12)&(Y=12)&(Z=12)).

9. If X is divisible by 9, then X is also divisible by 3 ((X is divisible by 9)→(X is divisible by 3)).

10. If X is divisible by 2, then it is even ((X is divisible by 2)→(X is even)).

IV. Summing up the lesson, in grading.

v.Homework learn the basic definitions from the notebook, know the notation.

Share with friends or save for yourself:

Loading...