☰ Contents · Computing

Foundations of logic and logical operations

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

Foundations of logic

Textbook: pp. 4–5
GoalKnows what logic is and the difference between concept, statement and inference; recognises a statement and finds its value (true – 1, false – 0).
New words
logic: the science of correct reasoning · mantiqstatement (proposition): a declarative sentence that is either true or false · mulohazainference: a new statement drawn from one or more known statements · xulosalogical variable: a letter (A, B, C…) standing for a statement; its value is 1 or 0 · mantiqiy o‘zgaruvchi
Explanation

Logic is the science that studies the rules of correct reasoning. It was set up as a separate science in the 4th century BC by the Greek scholar Aristotle; in the East his teaching was developed by Abu Nasr al-Farabi. Thinking takes three main forms: a concept (the main features of a thing), a statement, and an inference (getting a new statement from known ones). A statement is a declarative sentence that can clearly be called true or false; questions, exclamations and commands are not statements. A statement that cannot be split into parts is simple; one joined with words like “and”, “or”, “not” is compound. Statements are named with capital Latin letters (A, B, C…); such a letter is a logical variable whose value is 1 (true) or 0 (false). One statement cannot be both true and false at the same time.

Worked examples
“17 is a prime number” is a statement with value 1. “Samarkand is the capital of Uzbekistan” is also a statement, but its value is 0. “What time is it?” is a question, so it is not a statement.
Inference: from “Dilorom is taller than Akmal, Akmal is taller than Sardor” we get the new statement “Dilorom is taller than Sardor”. “It is raining and the wind is blowing” is a compound statement: A = “It is raining”, B = “The wind is blowing”.
Class activity

“Green and red cards”: the teacher reads sentences. Students raise a green card for a true statement, a red card for a false one, and cross their arms if it is not a statement.

Practice
1
What is called a statement?
2
Which are statements: a) 5 + 3 = 9; b) Close the door!; c) The Nile is a river in Africa; d) What is the weather today?
3
A = “The Sun is a star”, B = “The Moon is a star”. Write the values of A and B.
4
Why is “This number is divisible by 7” not a statement when we are not told which number it is?