AdvertisementYour brand could be hereYour brand hereOn every Darslab page · students, parents and teachersinfo@darslab.comAsk for pricesPricesinfo@darslab.com
☰ Contents · Computing

Logic and algorithms review; linear algorithms

Lessons 12–13 · 2 lessons · M. R. Fayziyeva, D. M. Sayfurov, N. S. Xaytullayeva. Informatics and Information Technologies, Grade 9. “Nashriyot uyi Tasvir”, Tashkent, 2020
12

Test: logic and algorithms

Textbook: p. 35
GoalReviews the topics of Chapters I–III (logical operations, truth tables, circuits, models, algorithm properties, flowcharts) and solves test-style tasks.
New words
logical expression: statements joined by logical operations and brackets · mantiqiy ifodatruth table: a table of an expression’s values for all variable combinations · rostlik jadvalialgorithm properties: discreteness, definiteness, clarity, generality, finiteness of result · algoritm xossalariscale: the ratio between a length on a map and the real length · masshtab
Explanation

Before the test recall the main rules. Order of logical operations: ¬, ∧, ∨, =>, <=>; brackets first. The implication A => B is false only for A = 1, B = 0; the equivalence is true for equal values. The table of an expression with n variables and k operations has n + k columns and 2ⁿ rows, with the values in binary increasing order. A logic circuit is a chain of AND, OR, NOT elements matching the expression. Models are classified by field of use, time factor and form of presentation. An algorithm has five properties and can be presented in words, formulas, a table, a flowchart or a program. While solving a task, first find out what is asked, write the order of operations and check the answer.

★Remember
Order of operations: ¬, ∧, ∨, =>, <=>; brackets first.
💡 Where will I use this?
In real life

Before a test a pupil made one reminder card per topic, with an expression, a table, a diagram and a rule. During revision everything was in one place.

Who uses it

Students, exam candidates and programmers organise what they know in short notes.

Try it today

Explain one rule from this chapter to a classmate in one minute, with one drawn example, and then ask the classmate to say it back to you.

Worked examples
A = “A mouse is an input device” (1), B = “1 KB = 100 bytes” (0), C = “2 + 2 = 4” (1). A ∧ ¬B ∨ C: ¬B = 1; A ∧ 1 = 1; 1 ∨ 1 = 1. ¬A ∨ B => C: ¬A ∨ B = 0 ∨ 0 = 0; 0 => 1 = 1.
AB¬AA ∨ B(A ∨ B) => ¬A
00101
01111
10010
11010
(A ∨ B) => ¬A: n = 2, k = 3, so 5 columns and 4 rows. For (A,B) = 00: 0 => 1 = 1; 01: 1 => 1 = 1; 10: 1 => 0 = 0; 11: 1 => 0 = 0. Last column: 1, 1, 0, 0 – the same as the column of ¬A.
Class activity

“Test contest”: the class splits into two teams; they take turns setting a task from a chapter and the opponents solve it in 1 minute. The team with more correct answers wins.

Practice
1
Find the value of X ∨ Y ∧ ¬Z for X = 0, Y = 1, Z = 1.
2
In how many of the 8 combinations (A,B,C) is (A ∧ B) ∨ ¬C true?
3
Which property does the instruction “save the file in the right place” break?
4
The map scale is 1 : 200 000. How many km is 3 cm on the map in reality?
Story of the Week · The Khwarizmi WayBefore the fairClose the week: all of this week’s subjects in one storyRead →