☰ Contents · Computing

Logic elements

Lessons 6 · 1 lessons · B. Boltayev, A. Azamatov, A. Asqarov, M. Sodiqov, G. Azamatova. Fundamentals of Informatics and Computer Technology, Grade 8. Second edition. “O‘zbekiston milliy ensiklopediyasi” State Scientific Publishing House, Tashkent, 2015
6

Logic elements

Textbook: pp. 28–32
GoalUnderstands the AND, OR and NOT logic elements and circuits built from them, and works out a circuit’s output.
New words
logic element (gate): a simple electronic circuit that carries out one logical operation · mantiqiy elementAND element: output is 1 only if all inputs are 1 · mos tushish sxemasi (VA)OR element: output is 1 if at least one input is 1 · yig‘uvchi sxema (YOKI)inverter (NOT element): output is the opposite of the input · invertor (EMAS)
Explanation

Every logical operation of a computer is carried out by logic elements, which are simple electronic circuits. The signals at the inputs are the arguments and the output signal is their function; a signal present means 1 and absent means 0. In an AND element the output is 1 only when all inputs are 1 – like two switches connected in series: the bulb lights only when both are closed. An OR element is like a parallel connection: the bulb lights if either switch is closed. A NOT element has one input and its output is the opposite. In a larger circuit the output of one element goes to the input of the next, so we calculate the circuit step by step from left to right. Modern processors contain billions of such elements built from transistors. Do experiments only with a small battery and bulb, with an adult present, and never with mains electricity.

Worked examples
Circuit: (A AND B) OR C with A = 1, B = 0, C = 1. Stage 1: 1 ∧ 0 = 0. Stage 2: 0 ∨ 1 = 1. Output: 1.
Reverse problem: a NOT element follows an OR element and the output must be 1. For NOT to give 1 its input must be 0; for OR to give 0 both of its inputs must be 0.
Class activity

“Human circuit”: three pupils act as AND, OR and NOT. When the input pupils raise (1) or lower (0) their hands, the element pupils raise or lower their own hand according to the rule.

Practice
1
Find the output of the circuit (¬A ∧ B) ∨ C when A = 0, B = 1, C = 0.
2
What is the output of ¬(A ∧ B) when A = 1, B = 1?
3
In a circuit of two switches and a bulb, the switches are connected in parallel. Which logical operation does the circuit match?
4
Logic puzzle: Anvar, Bahodir and Kamila each keep one of a cat, a parrot and a fish. Anvar’s pet has no fur; Bahodir’s pet has neither fur nor feathers. Who has which pet?