Basic Digital Logic: AND, OR and NOT gates Technician Series ©Paul Godin Last Update Dec 2014
Digital Logic: Introduction The foundation of digital systems is the ability to make logic-based decisions on input states. Boolean Algebra is a relatively simple mathematic form based on logic functions comprising of two states: true (logic 1) or false (logic 0). It is used to describe output states based on a set of input states. Boolean mathematics has been around for over a hundred years but much of it is well suited to digital systems. Boolean logic is used in internet search engines.
Truth Tables Truth tables describe the function of a digital device. They show the output states based on input states. Input Output 1 Every possible input combination
Basic Digital Logic Functions Digital logic is based on 3 primary functions (the Basic Gates): AND OR NOT
The AND Operation AND All inputs must be True for the output to be True. Other ways to describe AND: If all inputs are 1 the output is 1 If any input is 0, the output is 0 “If this input AND this input are 1, the output is 1”
AND Logic Symbol Output Inputs If all inputs are 1, the output is 1 If any input is 0, the output is 0
AND Logic Symbol Inputs Output Determine the output
AND Logic Symbol Inputs Output 1 Determine the output
AND Logic Symbol 1 Inputs Output 1 Determine the output
AND Truth Table Input Output 1 AND
AND Gates It is possible to have AND gates with more than 2 inputs. The same logic rule applies – all inputs must be 1 for the output to be 1.
The AND operation operates similarly to multiplication. AND Gates IEEE symbol for an AND gate Boolean equations for an AND gate: A●B = x AB = x & The AND operation operates similarly to multiplication.
If any input is True, the output is True The OR Operation OR If any input is True, the output is True Other ways to describe OR: if any input is 1, the output is 1 if all inputs are 0, the output is 0 “If this input OR this input is 1, the output is 1”
OR Logic Symbol Output Inputs If any input is 1, the output is 1 If all inputs are 0, the output is 0
OR Logic Symbol Inputs Output Determine the output
OR Logic Symbol Inputs Output 1 Determine the output
OR Logic Symbol 1 Inputs Output 1 Determine the output
OR Truth Table Input Output 1 OR
OR Gates It is possible to have OR gates with more than 2 inputs. The same logic rule applies – If any input is 1, the output is 1.
The OR operation operates similarly to Addition. OR Gates IEEE symbol for an OR gate Boolean equation for an OR gate: A+B = x ≥1 The OR operation operates similarly to Addition.
The NOT Operation NOT The output is the opposite state of the input. Other ways to describe NOT: If any input is 1, the output is 0 If any input is 0, the output is 1 The NOT function is often called INVERTER or COMPLIMENTARY.
NOT Logic Symbol Input Output If the input is 1, the output is 0 Note: The “bubble” on the output is considered the NOT function.
NOT Logic Symbol Output Input Determine the output
NOT Logic Symbol 1 Output Input Determine the output
NOT Truth Table Input Output 1 NOT
Note: The triangle symbol on the output is considered the NOT function NOT Gates IEEE symbol for a NOT gate: Boolean for a NOT function: A = x (overbar symbol) A’ = x (prime symbol) 1 Note: The triangle symbol on the output is considered the NOT function
1 Alternate Symbols The NOT is the “bubble” on the gate. Alternate symbols for the NOT gate: 1
Review 1 There are 3 basic gates: AND, where all inputs must be high for a high output OR, where any input must be high for a high output NOT, where the output is the opposite (compliment) of the input
Review 2 AND Logic Symbol OR Logic Symbol NOT (or Inverter) Logic Symbol
Review 3 A AND B = Y A OR B = Y NOT A = Y A ● B = Y AB = Y A + B = Y
Exercise 1 What is the outcome of the following: 1 1 1 1 1
Exercise 2 If all inputs of an OR gate are low, the output is_________ Complete the sentences: If all inputs of an OR gate are low, the output is_________ If any input of an AND gate is low, the output is _________ The output of a NOT gate is always the ___________ of the input.
Exercise 3 Draw the logic equivalent of the AND and the OR gates using switches.
Is it a boy or a girl? Yes! End ©Paul R. Godin prgodin°@ gmail.com