Abstract of a lesson in informatics on the topic "basic logical operations". Lesson summary "logical operation and logical elements" Lesson topic basic logical operations

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? 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
BUT
AT

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. All 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 ordinary 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:

Poll.

  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:

Poll:

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 physics course. 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

in) 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

in) 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.








Back forward

Attention! The slide preview is for informational purposes only and may not represent the full extent of the presentation. If you are interested in this work, please download the full version.

Checking homework in the lesson is carried out using the author's test, developed in the testing shell MyTest ( Appendix 1), where the test is checked automatically (the test results are immediately sent to the teacher's computer).

In the study of a new topic, the definition of simple and complex statements is given, and logical operations are also considered. The explanation of the new material is carried out using an interactive presentation. In order to consolidate skills and abilities, students are offered cards to fill out ( Annex 2).

At the end of the lesson, students are asked to evaluate the degree of satisfaction with the process and the result of their work, and cards are issued for homework ( Annex 3).

Textbook edited by Professor N.V. Makarova "Informatics and ICT".

Target:

  • Study theoretical material on the topic "Logical expressions and logical operations"
  • Develop logical thinking, the ability to communicate, compare and apply the acquired skills in practice.
  • To develop the cognitive activity of students, the ability to analyze.

Lesson type: combined lesson.

Forms of work: frontal.

Visibility and equipment:

  • a computer;
  • multimedia projector;
  • presentation prepared in MS PowerPoint;
  • test on the topic "Basic concepts of the algebra of logic" ;
  • cards to consolidate the material covered;
  • card for homework.

Lesson plan:

  1. Organizing time (1 min.)
  2. Checking the studied material (10 minutes.)
  3. Learning new material (20 minutes.)
  4. Consolidation of the studied material (oral work, 5 minutes.)
  5. Summing up the lesson (2 minutes.)
  6. Homework (2 minutes.)

During the classes

1. Organizational moment.

Purpose: to prepare students for the lesson.

The topic of the lesson is announced. The task is set for the students: to show how they learned to solve problems on the topic.

2. Repetition of the studied material.

Execution in the testing shell MyTest of the test on the topic "Basic concepts of the algebra of logic." (Appendix 1.mtf)

3. Learning new material.

Questions to study:

  1. Simple and complex expressions.
  2. Basic logical operations.

When explaining new material, a computer presentation (presentation.ppt)

  • 1. Simple and complex expressions.

Boolean expressions can be simple or complex.

A simple logical expression consists of one statement and does not contain logical operations. In a simple boolean expression, only two results are possible - either "true" or "false".

A complex logical expression contains statements joined by logical operations. By analogy with the concept of a function in algebra, a complex logical expression contains arguments, which are statements.

  • 2. Basic logical operations.

In the course of explaining the new material, the students fill in the following table in their notebooks.

Name of the logical operation Boolean operation notation The result of the logical operation truth table Examples
Negation
Disjunction
Conjunction
implication
Equivalence

The following are used as basic logical operations in complex logical expressions:

  • NOT(logical negation, inversion);
  • OR(logical addition, disjunction);
  • And(logical multiplication, conjunction)

Operation NOT - logical negation (inversion)

The logical operation is NOT applied to a single argument, which can be either a simple or a complex logical expression. The result of the operation is NOT the following:

  • if the original expression is true, then the result of its negation will be false;
  • if the original expression is false, then the result of its negation will be true.

The following conventions are NOT accepted for the negation operation NOT: NOT, ‾, ˥ not A. The result of the negation operation is NOT determined by the following truth table.

Operation OR - logical addition (disjunction, union)

The logical OR operation performs the function of combining two statements, which can be either a simple or a complex logical expression. Statements that are initial for a logical operation are called arguments.

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

The result of the OR operation is determined by the following truth table:

BUT AT A v B
0 0 0
0 1 1
1 0 1
1 1 1

Applicable designations: A or B; A v B; A og B. When performing complex logical transformations, for clarity, we agree to use the designation A + B, where A, B are arguments (initial statements).

Operation AND - logical multiplication (conjunction)

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

The result of the AND operation is an expression that is true if and only if both of the original expressions are true.

The result of the AND operation is determined by the following truth table:

BUT AT A^B
0 0 0
0 1 0
1 0 0
1 1 1

Designations used: A and B; A ^ B; A & B; A and B.

Let us agree to use the designation A-B when performing complex logical transformations, where A, B are arguments (initial statements).

Operation "IF- TO» - logical following (implication)

This operation connects two simple logical expressions, of which the first is a condition, and the second is a consequence of this condition.

Applied designations:

if A, then B; A attracts B; if A then B; A-»B.

The result of the consequence operation (implication) is false only when premise A is true and conclusion B (consequence) is false.

Truth table:

Operation "A if and only if B" (equivalence, equivalence)

Used designation: A ~ AT.

The result of an equivalence operation is true only if both A and B are both true or both false.

Truth table:

BUT AT BUT ~ AT
0 0 1
0 1 1
1 0 0
1 1 1

4. Consolidation of the studied material

This material is distributed to each student. (appendix 2)

5. Summing up the lesson

Tell me, was today's lesson educational for you?

What do you remember most from the lesson?

6. Homework

  1. Textbook. p.23.2., fill in the table "Logical operations" to the end.
  2. Perform a task(Appendix 3)
  3. Prepare for testing.
  4. Know the answers to questions:
    • what statements are;
    • which statements are called simple and which are complex;
    • basic logical operations and their properties.

Logic lesson 2

Subject: Basic logical operations.

Target:

    to consolidate the concepts of logic, propositional algebra;

    consider the basic logical operations, their properties and notation.

Lesson plan.

    Checking homework (frontal survey).

    Learning new material.

    Homework.

    1. Checking homework.

      1. Formulate the definition of logic as a science. ( Logicsthe science of forms and ways of thinking; the doctrine of methods of reasoning and evidence.)

        Define the algebra of logic. ( Algebra of logic is a branch of mathematical logic that studies the structure of complex logical statements and ways to establish their truth using algebraic methods.)

        Formulate the concept of a statement. (A proposition is a declarative sentence about which one can say whether it is true or not.)

        How are true and false statements defined?(In propositional algebra, propositions are denoted by the names of logical variables, which can take only two values: "true" (1) and "false" (0).)

        Which of the following sentences are true and which are false statements?

        • The city of Paris is the capital of France. (one)

          3+5=2x4. (one)

          2+6>10 (0)

          A scanner is a device that can print on paper what is displayed on a computer screen. (0)

          II+VI ≥ VIII (1)

          The sum of the numbers 2 and 6 is greater than the number 8. (0)

          The mouse is an input device. (one)

    What is a compound statement? ( Statements formed from other statements with the help of logical connectives are calledcomposite)

    Learning new material.

In the algebra of propositions, certain logical operations can be performed on propositions, as a result of which new, compound propositions are obtained. To form new statements, the most commonly used are the basic logical operations expressed using the logical connectives “and”, “or”, “not”.

A logical operation is a method of constructing a complex statement from given statements, in which the truth value of the complex statement is completely determined by the truth values ​​of the original statements.

Logical negation (inversion).

Attaching the particle "not" to the statement is called the operation of logical negation or inversion. Logical negation (inversion) makes a true statement false and, conversely, a false one - true. The word "inversion" (from Latin inversio - turning over) means that white changes to black, good to evil, beautiful to ugly, truth to falsehood, falsehood to truth, zero to one, one to zero.

Let be A = “Two times two equals four” is a true statement, then the statement NOT (A) = “Two times two is not equal to four”, formed using the logical negation operation, is false.

In the formal language of propositional algebra (algebra of logic), the operation of logical negation (inversion) is usually denoted: NOT (A); A; NOT(A);Ã .

A

NOT (A)

A \u003d "I have the prefix Dandy" - a statement.

Inversion A is the statement "I don't have the prefix Dandy"

0

1

1

0

Logical multiplication (conjunction).

Combining two (or more) statements into one using the union "and" is called the operation of logical multiplication or conjunction.

A compound statement formed as a result of the operation of logical multiplication (conjunction) is true if and only if all the simple statements included in it are true.

Consider the following statements:

(1) "2*2=5 and 3*3=10";

(2) "2*2=5 and 3*3=9";

(3) “2*2=4 and 3*3=10;

(4) "2*2=4 and 3*3=9".

Only the fourth statement will be true, since in the first three at least one of the simple statements is false.

Conjunction notation: A AND B; A AND B ; A^B; A&B; A b.

We form a compound statement F , which will be the result of the conjunction of two simple statements A and B : F = A ^B . From the point of view of propositional algebra, we have written the formula for the logical multiplication function, the arguments of which are the logical variables A and B, which can take the values ​​"true" (1) and "false" (0).

The logical multiplication function F itself can also take only two values ​​"true" (1) and "false" (0). The value of a logical function can be determined using the truth table of this function, which shows what values ​​the logical function takes on all possible sets of its arguments.

A

B

F=A^B

0

0

0

0

1

0

1

0

0

1

1

1

According to the truth table, it is easy to determine the truth of a compound statement formed using the operation of logical multiplication. Consider, for example, the compound statement "2*2=4 and 3*3=10". The first simple statement is true (A=1), and the second statement is false (B=0), we determine from the table that the logical function takes the value false (F = 0), that is, this compound statement is false.

Logical addition (disjunction).

Combining two (or more) statements using the union "or" is called the logical addition operation or disjunction. A compound statement formed as a result of logical addition (disjunction) is true when at least one of the simple statements included in it is true.

In Russian, the union "or" is used in a double sense, and this makes it difficult to interpret statements with the union "or"

(1) "2*2=5 or 3*3=10";

(2) "2*2=5 or 3*3=9";

(3) “2*2=4 or 3*3=10;

(4) "2*2=4 or 3*3=9".

Of the above compound statements, only the first one will be false, since in the rest at least one of the simple statements is true.

The designation of the operation of logical addition (disjunction): A OR B;AORB; A + B; AB.

We form a compound statement F , which will be obtained as a result of the disjunction of two simple statements A and B : F = A ν b. From the point of view of propositional algebra, we have written down the formula of the logical addition function, the arguments of which are the logical variables A and B .

A

B

F=A ν B

0

0

0

0

1

1

1

0

1

1

1

1


According to the truth table, it is easy to determine the truth of a compound statement formed using the logical addition operation. Consider, for example, the compound statement "2*2=4 or 3*3=10". The first simple statement is true (A = 1), and the second statement is false (B = 0), we determine from the table that the logical function takes the value true (F = 1), that is, this compound statement is true.

Logical following (implication).

Logical consequence (implication) is formed by combining two statements into one using the figure of speech "if ... then ...".

Examples of implications:

A = If an oath is given, then it must be kept.

B = If a number is divisible by 9, then it is divisible by 3.

In logic, it is permissible (accepted, agreed) to consider statements that are meaningless from an everyday point of view. Here are examples that are not only legitimate to consider in logic, but which, moreover, have the meaning of "true":

C= If cows fly, then 2+2=5

X= If I am Napoleon, then the cat has four legs.

Implication notation: A->B ; A =>B ;A IMP B .

They say: if A, then B; A implies B; A attracts B; B comes from A.

This operation is not as obvious as the previous ones. It can be explained, for example, as follows. Let the statements be given:

A = It's raining outside.

B = Asphalt is wet.

(A implication B) = If it is raining outside, then the asphalt is wet.

Then, if it is raining (A=1) and the asphalt is wet (B=1), then this is true, that is, true. But if you are told that it is raining outside (A=1), and the asphalt remains dry (B=0), then you will consider this a lie. But when there is no rain outside (A=0), then the asphalt can be both dry and wet (for example, a watering machine has just passed).

The meaning of statements A and B for the indicated values

The meaning of the saying "If it's raining outside, then the asphalt is wet"

There is no rain

dry asphalt

True

There is no rain

Asphalt is wet

True

It's raining

dry asphalt

Lie

It's raining

Asphalt is wet

True

Truth table.

BUT

AT

A=> B

0

0

0

0

1

1

1

0

0

1

1

1

It follows from the truth table that the implication of two statements is false if and only if a false statement follows from a true statement (when a true premise leads to a false conclusion).

Let us examine one of the above examples of consequences that contradict common sense.

Given a statement: "If cows fly, then 2 + 2 = 5."

Statement form: "if A, then B", where A = Cows fly = 0; B = (2 + 2 = 5) = 0.

Based on the truth table, we determine the meaning of the statement:0 => 0 = 1, i.e. the statement is true.

Logical equality (equivalence).

Logical equality (equivalence) is formed by combining two statements into one using the figure of speech "... if and only if ...".

Equivalence examples:

1) An angle is called right if and only if it is equal to 90°.

2) Two lines are parallel if and only if they do not intersect.

3) Any material point maintains a state of rest or uniform rectilinear motion if and only if there is no external influence. (Newton's first law.)

4) The head thinks when and only when the tongue is at rest. (Joke.)

All laws of mathematics, physics, all definitions are the equivalence of propositions.

Equivalence notation: A = B; BUT<=>AT; A~B; A EQV B .

Let's give an example of equivalence. Let the statements be given: A = The number is divisible by 3 without a remainder (a multiple of three). B = The sum of the digits of the number is divisible by 3.

(A is equivalent to B) = A number is a multiple of 3 if and only if the sum of its digits is divisible by 3.

BUT<=>AT

From the truth table it follows that the equivalence of two statements is true if and only if both statements are true or both are false.

    Homework.

Work with abstract.

Municipal educational institution
secondary school №1
named after the 50th anniversary of Krasnoyarskgesstroy

Sayanogorsk 2009


Municipal stage of the republican competition
"Electronic Developments" in 2009

Direction: natural science

Title of the contest entry

Boolean operations

computer science lesson in grade 9

IT-teacher,
1 qualification category

Technological map of the lesson

Name of the teacher

Oreshina Nina Semyonovna

MOU secondary school No. 1 named after the 50th anniversary of Krasnoyarskgesstroy, Sayanogorsk

Subject, class

Computer science, grade 9

lesson topic,

"Logic Operations"

Lesson type

Combined lesson

The purpose of the lesson

Lesson objectives

educational

developing

educational

    1. Develop logical thinking.

Type of ICT tools used in the lesson (universal, OER on CD-ROM, Internet resources)

    Power point presentation;

    Text Document

Required hardware and software

  • multimedia projector;

Literature

    Informatics and ICT. Textbook. Grade 8–9 / Ed. by prof. N.V. Makarova. - St. Petersburg: Peter, 2007

    Program in informatics and ICT (system-information concept) for a set of textbooks in informatics and ICT grades 5-11, 2007

    Informatics and ICT: Methodological guide for teachers. Part 3. Technical support of information technologies / Ed. by prof. N.V. Makarova. - St. Petersburg: Peter, 2008

ORGANIZATIONAL STRUCTURE OF THE LESSON

STAGE 1

Organizational

Actualization of students' attention to the lesson

Stage duration

Perception of the purpose of the lesson, mood for the lesson

Set students up for the lesson, focus students on the topic of the lesson.

STAGE 2

Knowledge update

Actualization of students' knowledge

Stage duration

Work on assignments on cards.

Verification is carried out by demonstrating the presentation (2).

Form of organization of student activities

1 task - work on the options on the cards

Task 2 - individual work on multi-level tasks on cards

Functions of the teacher at this stage

organizing

intermediate control

selective

STAGE 3

Learning new material

To introduce students to the simplest logical operations and the stages of building a truth table

Stage duration

Main activity with ICT tools

Presentation demonstration (3-26 slide)

Form of organization of student activities

individual,

Functions of the teacher at this stage

Presentation of new material

STEP 4

Fizkultminutka.

Removal of local fatigue.

Stage duration

STAGE 5

Consolidation of new knowledge

Check the degree of understanding of the new material

Stage duration

Main activity with ICT tools

Presentation demonstration (27 - 32 slide)

Form of organization of student activities

Independent work of students in a notebook

Functions of the teacher at this stage

organizing, advising

intermediate control

self control

STEP 6

Summarizing. Reflection

Summarize the students' knowledge gained in the lesson

Stage duration

Form of organization of student activities

Reflex comprehension

Functions of the teacher at this stage

organizing

Final control

Evaluation of each student

STAGE 7

Homework

Consolidation of knowledge gained in the lesson

Stage duration

Main activity with ICT tools

Presentation demonstration (33 slide)

Form of organization of student activities

individual

Functions of the teacher at this stage

consulting, guiding

Lesson outline

Thing:"Informatics and ICT"

Class: 9

Lesson topic:"Logical operations" (1 lesson 80 minutes)

Goals:

    Formation of ideas about the algebra of propositions, and basic logical operations, familiarity with the algorithm for constructing truth tables.

Tasks:

    To ensure the assimilation and primary consolidation of new concepts during the lesson.

    Develop logical thinking

    Develop the ability to identify essential features and properties.

    Build communication skills.

    To cultivate a culture of work in the process of performing written work.

Means of education:

    PC; MS Power Point;

    Multimedia projector; Printer.

    Informatics and ICT. Textbook. Grade 8–9 / Ed. by prof. N.V. Makarova. - St. Petersburg: Peter, 2007.

    Program in informatics and ICT (system-information concept) for a set of textbooks in informatics and ICT grades 5-11, 2007.

    Informatics and ICT: Methodological guide for teachers. Part 3. Technical support of information technologies / Ed. by prof. N.V. Makarova. - St. Petersburg: Peter, 2008.

Lesson stages

    1. Organizing time. Setting the goal of the lesson. 3 min.

      Actualization of knowledge (work on cards). 10 minutes.

      Explanation of new material. 37 min.

      Fizkultminutka. 3 min.

      Consolidation of new knowledge. 17 min.

      Summarizing. Reflection. 7 min.

      Setting homework. 3 min.

During the classes

  1. Organizing time

Reporting the topic and setting lesson objectives

Hello guys!

Today we will continue to study the elements of mathematical logic. The purpose of our lesson is to get acquainted with the basic logical operations, learn how to build truth tables for logical statements. At the end of the lesson, you will complete practical tasks that will help you evaluate how you learned the new material. I hope for mutual understanding and coherence in work.

  1. Knowledge update

Card work

Next, we control knowledge on the topic "Basic concepts of the algebra of logic." Work in pairs according to the options, the students write down the answers on a sheet, which is previously distributed by the teacher. After completing the tasks, there is a check in pairs with assessment. The correct answers are shown on the frames of the presentation.

Sample for option 1.

Option 1.

    In formal logic notion called

B) a form of thinking that reflects the distinctive essential features of objects or phenomena.

C) a form of thinking that affirms or denies something about objects, their properties or relations between them.

A) A - River;

B) A- Schoolchildren;

B - Athletes.

B) A- Dairy product;

B- sour cream.

A) The number 6 is even.

b) Look at the blackboard.

C) Some bears are brown.

    Determine the type of utterance.

a) Paris is the capital of China.

b) Some people are artists.

c) The tiger is a carnivorous animal.

    Which of the following statements are common?

    Not all books contain useful information.

    The cat is a pet.

    All soldiers are brave.

    No thoughtful person will make a mistake.

    Some students are doubles.

    All pineapples taste good.

    My cat is a terrible bully.

    Any unreasonable person walks on his hands.

Sample for option 2.

Option 2.

    In formal logic saying called

A) a form of thinking with the help of which a new judgment (conclusion) can be obtained from one or more judgments (premisses).

B) a form of thinking that reflects the distinctive essential features of objects or phenomena.

C) a form of thinking that affirms or denies something about objects, their properties or relations between them.

    This Euler-Venn diagram illustrates the relationship between the following scope of concepts:

A) A - River;

B) A- Geometric figure - rhombus;

B- The geometric figure is a rectangle.

B) A- Dairy product;

B- sour cream.

    Which of the sentences are statements? Determine their truth.

a) Napoleon was the emperor of France.

b) What is the distance from Earth to Mars?

B) Attention! Look to the right.

    Determine the type of utterance.

a) All robots are machines.

B) Kyiv is the capital of Ukraine.

C) Most cats love fish.

    Which of the following statements are private?

    Some of my friends collect stamps.

    All medicines taste bad.

    Some medicines taste good.

    A is the first letter in the alphabet.

    Some bears are brown.

    The tiger is a predatory animal.

    Some snakes do not have venomous teeth.

    Many plants have medicinal properties.

    All metals conduct heat.

The answer sheet might look like this:

  1. Explanation of new material.

The objects of Boolean algebra are propositions. If statements are connected by logical operations, then they are usually called logical expressions .

In the algebra of logic, various operations can be performed on statements (just as the operations of addition, multiplication, division, exponentiation over numbers are defined in the algebra of numbers). With the help of logical operations on simple statements, compound or complex statements are obtained. In natural language, compound statements are formed with the help of conjunctions.

For example:

Logical operations are given by truth tables and can be graphically illustrated using Euler-Venn diagrams.

Consider the basic logical operations.

    Logical negation (inversion)

Logical negation is formed from a statement by adding the particle "not" or using the figure of speech " it is not true that…».

Logical negation is a one-place operation, since one statement (one argument) participates in it.

The operation is denoted by the particle NOT (NOT A), sign: ¬A (¬A) or a line over the designation of the statement (Ā).

Example #1.

A=( Aristotle the founder of logic.}

Ā= { It is not true that Aristotle is the founder of logic.}

Example #2.

A=( Now there is a lesson in literature.}

Ā= { It is not true that now there is a lesson in literature.}

As a result of the negation operation, the logical meaning of the statement is changed to the opposite. The original expressions are called prerequisites .

The inverse of a statement is true when the statement is false and false when the statement is true.

This can be displayed using a table:

Table 1.

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

If we designate False - 0, and true - 1, then the table will look like this. As shown in the textbook on page 347.

Table 2. Truth table of the logical negation operation

Mnemonic rule: the word "inversion" means that white changes to black, good to evil, beautiful to ugly, truth to false, lie to truth, zero to one, one to zero.

Notes:

Logical addition (disjunction) is formed by combining two statements into one using the union "or". This is a two-place operation, since it involves two statements (two arguments). The operation is denoted by the union OR, the sign \/, and sometimes the sign + (logical addition).

In Russian, the union "or" is used in a double sense.

For example, in the sentence Usually at 8 pm I watch TV or drink tea, the conjunction “or” is taken in a non-exclusive (unifying) sense, since you can only watch TV or only drink tea, but you can also drink tea and watch TV at the same time, because that your mother is not strict. This operation is called non-strict disjunction. (If my mother was strict, then she would allow either only watching TV, or only drinking tea, but not combining eating with watching TV.)

In the statement This noun in the plural or singular, the union "or" is used in the exclusive (separating) sense. This operation is called strict disjunction.

Determine the type of disjunction yourself:

statement

Kind of disjunction

Petya sits on the western or eastern stands of the stadium.

Strict

A student is riding a train or reading a book.

Lax

You will marry either Petya or Sasha.

Strict

Are you marrying Val or Sveta

Strict

Tomorrow it may or may not rain.

Strict

Let's fight for purity. Cleanliness is achieved in this way: either do not litter, or clean often.

Lax

Teachers are either strict or not ours.

Lax

In what follows, we will consider only nonstrict disjunction. Designation: A AT.

The first sign of late blight disease is gray or brown spots on tomato leaves.

BUT= "Grey spots appeared on the leaves "

B= "Brown spots appeared on the leaves"

C= "The plant is sick with phytophthora",

Judgment With=A /\ B.

A disjunction of two propositions is false if and only if both propositions are false, and true if at least one proposition is true.

Table 3. Truth table of the logical addition operation

A B

Mnemonic rule: disjunction is a logical addition and it is easy to see that the equalities 0+0=0; 0+1=1; 1+0=1; true for ordinary addition are also true for disjunction, but 11=1.

Boolean multiplication (conjunction) is formed by combining two statements into one using the union " and". This is a two-place operation, since it involves two statements (two arguments). The operation is denoted by the union AND, the sign / \ or &, sometimes * (logical multiplication).

Designations: A·B; A^B; A&B.

A&B=(3+4=8 and 2+2=4)

A conjunction of two propositions is true if and only if both propositions are true, and false if at least one proposition is false.

Table 4. Truth table of the logical multiplication operation.

A/\B

note that in the truth table the values ​​of the incoming statements are written in ascending order.

Mnemonic rule: conjunction is a logical multiplication, and we have no doubt that you have noticed that the equalities 0 0=0; 0 1=0; 1 0=0; 1 1=1, which are true for ordinary multiplication, are also true for the conjunction operation.

    A game

Teacher question: One wealthy man was afraid of robbers and ordered a lock that opened with two keys at the same time. What logical operation can be compared with the process of opening?

Student response: Logical multiplication. Each key individually does not open the lock. Only using two keys together allows it to be opened.

Teacher question: The boy Vasya was distracted and always lost his keys. As soon as the parents put in a new lock, how is the old key (under the rug, in the pocket, in the briefcase). Come up with a "super lock" for Vasya so that an outsider cannot open the door, and Vasya - for sure.

Student response: A lock with logical addition, so that it can be opened by at least one key that is at hand.

note that the operation of logical addition is more "compliant" ("at least something"), and the operation of logical multiplication is more "strict" ("all or nothing"). Given this fact, it is easier to remember the signs of logical operations

The operations of inversion, conjunction and disjunction are basic logical operations . There are others (not the main ones), but they can be expressed through three main ones. As an example, consider the operations implications andequivalence .

Logical following (implication) is formed by combining two statements into one using the figure of speech " if…..then…..”

Designations: A→B, AB.

Example1. A=(2 2=4) and B=(3 3=10).

AB=(If 2 2=4, then 3 3=10 ).

Example 2 If you learn the material, then you will pass the test (the statement is false only when the material is learned and the test is not passed, because you can pass the test by accident, for example, if you came across the only familiar question or managed to use the cheat sheet).

Conclusion: An implication of two propositions is false if and only if a false proposition follows from a true proposition.

Table 5. Truth table of the logical consequence operation.

AB

    Boolean equality (equivalence)

Equivalence is formed by combining two statements into one using the figure of speech ".... if and only if…».

Equivalence notation: A=B; AB; A~B.

Example 1. A \u003d (Angle of a straight line); B \u003d (Angle is 90 0)

AB =(An angle is called right if and only if it is equal to 90 0 }

Example 2 When the sun shines on a winter day and frost bites, it means that the atmospheric pressure is high.

Example 3. Statement A: “the sum of the digits that make up the number X, is divisible by 3", statement B: "X divisible by 3. Operation A<=>B means the following: "A number is divisible by 3 if and only if the sum of its digits is divisible by 3."

Conclusion: the equivalence of two propositions is true if and only if both propositions are true or both are false.

Table 6. Truth table of the logical equality operation.

AB

    Compiling truth tables using a logical formula

More complex statements can be made from simple statements. These statements are like mathematical formulas. In them, in addition to statements, denoted by capital Latin letters, and signs of logical operations, brackets may also be present.

Operation Priority:

    inversion;

    conjunction;

    disjunction;

    implication and equivalence.

Consider examples.

Example 1. Given a logical expression ¬A V b. You need to build a truth table.

Decision

¬ A

¬A V B

Example 2. The logical expression ¬A  B is given. You need to build a truth table.

Decision. The logical expression contains 2 statements A, B. So the truth table will contain 2 2 = 4 rows of possible combinations of values ​​of the original statements A and B. The first two columns of the truth table will be filled with different combinations of argument values. Further, the results of intermediate calculations and the final result will be located.

¬ A

¬ AB

Example 3. Given a logical expression ¬(A V B). You need to build a truth table.

Decision. The logical expression contains 2 statements A, B. So the truth table will contain 2 2 = 4 rows of possible combinations of values ​​of the original statements A and B. The first two columns of the truth table will be filled with different combinations of argument values. Further, the results of intermediate calculations and the final result will be located.

A V B

¬(A V b)

  1. Physical education minute

For the next job, we need to focus. Let's do some exercises.

  1. Consolidation of new knowledge.

To consolidate the material, the following tasks are performed:

1. Below is a table, the left column of which contains the main logical conjunctions (connections), with the help of which complex statements are built in natural language. Fill in the right column of the table with the appropriate names of logical operations.

In natural language

In logic

…..It is not true that…..

*inversion

…..if and only if ….

equivalence

conjunction

conjunction

If…..then…..

*implication

……but….

conjunction

….if and only if….

equivalence

Or either…

*strict disjunction

….necessary and sufficient….

*equivalence

From ……… follows….

*implication

2. Formulate the negatives of the following statements:

BUT) ( It is not true that New York City is the capital of the United States};

B) ( Kolya solved all 6 tasks of the test};

AT) ( It is not true that the number 3 is not a divisor of the number 198}.

Decision:

BUT)(New York City is the capital of the USA };

B) ( It is not true that Kolya solved all 6 tasks of the test};

AT) ( The number 3 is not a divisor of 198}

    Find expression values:

A) ((10)1)1; Decision: ((10)1)1=1;