☰ Contents · Computing

Logic circuits and practice in logic

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

Practical lesson: logic and logic circuits

Textbook: p. 16
GoalPicks out statements, builds the truth table and circuit of an expression, writes the expression for a circuit and checks two expressions against each other with a table.
New words
expression for a circuit: written by reading the elements from inputs to output · sxemaga mos ifodaoutput signal: the value that comes out of the last element · chiqish signaliinput values: the combination of 0s and 1s given to the circuit · kirish qiymatlarichecking by a table: comparing the last columns of two expressions · jadval orqali tekshirish
Explanation

This practical lesson uses everything from Chapter I together. First decide whether a sentence is a statement, then mark the simple statements with letters and write the compound statement as an expression. Build the table of the expression with the 8-step procedure and draw a circuit for the same expression: both rely on the same order of operations. To write an expression from a circuit, read the elements from the inputs to the output: each element gives one operation. If you are asked whether two expressions are the same, build both tables and compare the last columns; a difference in even one row means the expressions are not the same. Always check the result by walking through the circuit by hand for one input combination.

Worked examples
X = (A ∨ ¬B) ∧ C: n = 3, k = 3, so 6 columns and 8 rows. For (A,B,C) from 000 to 111 the result is 0, 1, 0, 0, 0, 1, 0, 1. Circuit: B → inverter; A and ¬B → disjunctor; its output and C → conjunctor.
Are ¬(A ∨ B) and ¬A ∨ ¬B the same? For A = 1, B = 0 the first gives ¬1 = 0 and the second gives 0 ∨ 1 = 1. The results differ, so the expressions are not the same.
Class activity

“Circuit workshop”: pairs give each other an expression; the partner draws the circuit and then shows the output for one input combination.

Practice
1
Write the last column of A => ¬B for (A,B) = 00, 01, 10, 11.
2
Circuit: A and ¬B go to a conjunctor, whose output and C go to a disjunctor. Write the expression.
3
Which are statements: a) Silver is a metal; b) Open your notebooks; c) 3 · 4 > 15; d) Which season is the most beautiful?
4
Why can ¬(A ∨ B) and ¬A ∨ ¬B not be treated as equal?