Digital Logic PDF
Document Details
Uploaded by SupportiveRetinalite697
Tags
Summary
These notes cover digital logic, including different logic gates (AND, OR, NOT, XOR, NOR, NAND), truth tables, and Boolean algebra expressions. The notes provide a conceptual overview of the topic.
Full Transcript
Digital Logic Learning Goals By the end of the lesson I will be able to: Define and explain logic gates Visually identify the 6 main logic gates Define the truth tables associated with the 6 logic gates Identify the logical operations by their mathematical operators. Binary Binary is the b...
Digital Logic Learning Goals By the end of the lesson I will be able to: Define and explain logic gates Visually identify the 6 main logic gates Define the truth tables associated with the 6 logic gates Identify the logical operations by their mathematical operators. Binary Binary is the base 2 number system Binary digits are either 0’s or 1’s Each digit in binary represents a power of 2 (rather than 10 in decimal numbers) We use binary because computers deal with electric signals being either on (1) or off (0) Logic Gates In a computer, these binary signals are processed with logic gates. Logic gates are electronic circuits that have one or more inputs (typically 2) and exactly 1 output. How those inputs are processed are based on 6 specific logical operations. To simplify, the inputs will be represented by a 1 or 0. OR Gates A digital OR gate takes 2 inputs, and produces a 1 as output if AT LEAST one input is 1. Visually: Truth Table Inputs Output A B Q 0 0 0 0 1 1 1 0 1 1 1 1 AND Gates A digital AND gate takes 2 inputs, and produces a 1 as output if BOTH inputs are 1. Visually: Truth Table Inputs Output A B Q 0 0 0 0 1 0 1 0 0 1 1 1 NOT Gates A digital NOT gate takes 1 input, and directly changes the output to its opposite. Visually: Truth Table Inputs Output A NOT A 0 1 1 0 XOR Gates A digital XOR gate takes 2 inputs, and produces a 1 as output if EXACTLY ONE input is 1. Visually: Truth Table Inputs Output A B Q 0 0 0 0 1 1 1 0 1 1 1 0 NOR Gates A digital NOR gate takes 2 inputs, and produces a 1 as output if NO inputs are 1. AKA Both inputs are 0. Visually: Truth Table Inputs Output A B Q 0 0 1 0 1 0 1 0 0 1 1 0 NAND Gates A digital NAND gate takes 2 inputs, and produces a 1 as output if AT LEAST one input is 0. Visually: Truth Table Inputs Output A B Q 0 0 1 0 1 1 1 0 1 1 1 0 Important Bits A few things to note when reviewing these slides: Normally, the shape of the gate is what tells you the type of gate. It will not be labelled. We draw these symbols in this direction as standard: Inputs on the left, outputs on the right. The flow of data is from left to right. These diagrams and the corresponding truth tables can be expanded. Forever. In any combination. 2 Input… 3 Gates A AND B Inputs can A A B Output be reused! 0 0 0 Q 0 1 0 1 0 0 B 1 1 1 A B A AND B A OR B (A AND B) NOR (A OR B) A OR B 0 0 0 0 1 A B Output 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 0 1 1 1 1 1 1 1 1 0 4 Input... Because inputs aren’t being reused, it’s actually easier to arrange this table a A different way: B Q AB C 00 01 10 11 D 00 0 0 0 1 01 1 1 1 0 CD 10 1 1 1 0 11 1 1 1 0 Let’s Try it AB A 00 01 10 11 B Q 00 C 01 D CD 10 11 What about this? A B C D E F POP! G Written Boolean Logic Expressions It is often helpful to represent this logic in a mathematical way. This is accomplished by using the following symbols: A AND B becomes A ⋅ B (A dot B) or AB A OR B becomes A + B A XOR B becomes A ⨁ B NOT A becomes A’ or Ā Written Logic Continued The other two logical operators NAND and NOR are accomplished by combining the other 4 operations: A NAND B is the same as NOT (A AND B) which is represented like: (AB) or (AB)’ A NOR B is the same as NOT (A OR B) which is represented like: (A+B) or (A+B)’ Example Find the Boolean algebra expression for the following system.