Basics of Logic gates - Part 2 Letcure: Norah Alsufyan Basics of Logic gates - Part 2
Chapter outline What is Combinational Circuits? Combinational Circuits Meaning Combinational Circuits Weakness Combinational Circuits vs. Sequential Circuits Combinational Circuits Design Real Examples Combinational Circuits Design – Example -1 Combinational Circuits Design – Example -2 Circuit Equivalence Properties of Boolean Algebra Simplification of Boolean Algebra- Example 1 Simplification of Boolean Algebra- Example 2 Several Exercises on Combinational Circuits Integrated Circuit Cpu is collection of logic gates
What is Combinational Circuits?
Combinational Circuits Meaning Gates are combined into circuits by using the output of one gate as the input for another.
Combinational Circuits Weakness Combinational logic circuits have no capacity of storing information. A different type, called sequential logic circuit, can, in addition to combinational logic, remember values and also base decisions on both input values and stored values.
Combinational Circuits vs. Sequential Circuits Combinational logic circuit Sequential logic Circuit
Combinational Circuits vs. Sequential Circuits In a combinational circuit, the input values explicitly determine the output In a sequential circuit, the output is a function of the input values as well as the existing state of the circuit
Combinational Circuits Design OK, design a combinational logic needed to control a stair way light where there are two switches, at both the bottom and top of the stairs and either switch can turn on or off the lamp. Combinational Circuits Design
Combinational Circuits Design As with gates, we can describe the operations of entire circuits using three notations Boolean expressions logic diagrams truth tables
Real Example Draw the logic diagrams for this circuit =) A drill (D) is to operate if we are in automatic (A) and the system (S) is running or if we are in manual (M) and a button (B) is pressed. The boolean (logic) expression for this can be written in the following way: D= A.S+M.B Draw the logic diagrams for this circuit =)
Real Example Buzzer Feature for a Car • Should Buzz when The engine is on, the door is closed and these at belt is unbuckled The engine is on, the door is open What are our input(s)? What are our output(s) Draw the logic diagrams for this circuit Write the truth table for this circuit Computers. Motion Sensors Alarms Computer Phone Calculator Xbox 2. In this activity we used switches for the circuit inputs and a probe for the circuit output. Though this works fine for testing purposes, it does not reflect the actual sensors and indicator used in real-world applications of combinational logic circuits. List three input and three output devices that could be used with real world applications of combinational logic. Input - Button, Switch, Sensor Output - LED, Motor, Speaker
Combinational Circuits Design – Example -1 Logic Diagrams Representation: Boolean algebra Representation : (AB + AC) Truth table Representation : in the next slide
Combinational Circuits Design – Example -1 cont. Truth table Representation : Because there are three inputs to this circuit, eight rows are required to describe all possible input combinations.. Explain ?
Combinational Circuits Design – Example -2 Now let’s go the other way; let’s take a Boolean expression and draw Consider the following Boolean expression: A(B + C) Logic diagram Truth Table
Circuit Equivalence Now compare the final result column in this truth table for the example 2 to the truth table for the example 1 They are identical We have therefore just demonstrated circuit equivalence That is, both circuits produce the exact same output for each input value combination Boolean algebra allows us to apply provable mathematical principles to help us design logical circuits
Properties of Boolean Algebra
Simplification of Boolean Algebra- Example 1 Show how rule (Absorption) can be proved : x·(x+y) = = x+x·y using (Distribution Law and idempotent) = x·(1+y) using (Distribution Law) = x · 1 using Identity Law = x as required. Note : Using the theorems of Boolean Algebra, the algebraic forms of functions can often be simplified, which leads to simpler (and cheaper) implementations
Simplification of Boolean Algebra - Example 2 A(b+b+b)= A(b)=
Activity #5 - Group Work 5- 6- 7- 8- 9. 8- 9. A and B are the input signals and X is the output signal. Boolean expression: A B (A XOR B) Logic Diagram: Truth Table A B X 0 0 0 0 1 1 1 0 1 1 1 0 If both inputs are the same value, XOR returns a 0; otherwise XOR returns a 1. 10. Boolean expression: (A B)’ (NOT (A AND B)) 0 0 1 If the inputs are different or both 0, NAND returns a 1; if both are 1, it returns a 0. 11. Boolean expression: (A + B)’ (NOT (A AND B)) If the inputs are both 0, NOR returns a 1; otherwise NOR returns a 0. 42. Compare and contrast the AND gate and the NOR gate. An AND gate produces a 1 as output only if both inputs are 1, whereas a NAND gate produces a 1 as output in all cases /except/ when both inputs are 1. That is, the AND and NAND gates produce opposite results. The values produced by one of these gates can be replicated by inverting the results produced by the other. 12. A B C X 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1 X = A . B . C 44. Draw and label the symbol for a three-input OR gate, then show its behavior with a truth table. 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 X = A + B + C Activity #5 - Group Work
5- 6- 7- 8- 9. A and B are the input signals and X is the output signal. Boolean expression: A B (A XOR B) Logic Diagram: Truth Table A B X 0 0 0 0 1 1 1 0 1 1 1 0 If both inputs are the same value, XOR returns a 0; otherwise XOR returns a 1. 10. Boolean expression: (A B)’ (NOT (A AND B)) 0 0 1 If the inputs are different or both 0, NAND returns a 1; if both are 1, it returns a 0. 11. Boolean expression: (A + B)’ (NOT (A AND B)) If the inputs are both 0, NOR returns a 1; otherwise NOR returns a 0. 42. Compare and contrast the AND gate and the NOR gate. An AND gate produces a 1 as output only if both inputs are 1, whereas a NAND gate produces a 1 as output in all cases /except/ when both inputs are 1. That is, the AND and NAND gates produce opposite results. The values produced by one of these gates can be replicated by inverting the results produced by the other. 12. A B C X 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1 X = A . B . C 44. Draw and label the symbol for a three-input OR gate, then show its behavior with a truth table. 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 X = A + B + C Lab # 3 - Group Work
Several Exercises on Combinational Circuits
Exercise 1 Draw a circuit diagram corresponding to the following Boolean expression: (A + B)(B + C)
Exercise 2 Draw a circuit diagram corresponding to the following Boolean expression: (AB + C)D
Exercise 3 Draw a circuit diagram corresponding to the following Boolean expression: A’B + (B+C)’
Exercise 4 Draw a circuit diagram corresponding to the following Boolean expression: (AB)’ + (CD)’
Exercise 5 Show the behavior of the following circuit with a truth table: A B AB A+B AB + (A+B) 1
Exercise 6 Show the behavior of the following circuit with a truth table: A B A’ AB A’ (AB) 1
Exercise 7 Show the behavior of the following circuit with a truth table: A B C A’ BC A’(BC) 1
Exercise 8 Show the behavior of the following circuit with a truth table: A B C AB (BC)’ C’ (AB+C’)’ (BC)’ + (AB+C’)’ 1
Activity #6 - Group Work 5- 6- 7- 8- 9. 8- 9. A and B are the input signals and X is the output signal. Boolean expression: A B (A XOR B) Logic Diagram: Truth Table A B X 0 0 0 0 1 1 1 0 1 1 1 0 If both inputs are the same value, XOR returns a 0; otherwise XOR returns a 1. 10. Boolean expression: (A B)’ (NOT (A AND B)) 0 0 1 If the inputs are different or both 0, NAND returns a 1; if both are 1, it returns a 0. 11. Boolean expression: (A + B)’ (NOT (A AND B)) If the inputs are both 0, NOR returns a 1; otherwise NOR returns a 0. 42. Compare and contrast the AND gate and the NOR gate. An AND gate produces a 1 as output only if both inputs are 1, whereas a NAND gate produces a 1 as output in all cases /except/ when both inputs are 1. That is, the AND and NAND gates produce opposite results. The values produced by one of these gates can be replicated by inverting the results produced by the other. 12. A B C X 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1 X = A . B . C 44. Draw and label the symbol for a three-input OR gate, then show its behavior with a truth table. 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 X = A + B + C Activity #6 - Group Work
Integrated Circuits
Integrated Circuits An integrated circuit (also called a chip) is a piece of silicon on which multiple gates have been embedded. These silicon pieces are mounted on a plastic or ceramic package with pins along the edges that can be soldered onto circuit boards or inserted into appropriate sockets
Integrated Circuits Integrated circuits (IC) are classified by the number of gates contained in them Page 107
CPU Chips The most important integrated circuit in any computer is the Central Processing Unit, or CPU. Each CPU chip has a large number of pins through which essentially all communication in a computer system occurs ntegrated Circuit (IC) can be a memory chip, configuration chip. logic chip or microprocessor chip, The difference of the last one is it is the brain that process all data taken from the other 3 chips
Conclusion Combinational Circuits are the gates that are combined into circuits by using the output of one gate as the input for another. Combinational Circuits Weakness is solved by inventing sequential logic. Combinational Circuits should simplified, , which leads to simpler (and cheaper) implementations. The most important integrated circuit in any computer is the CPU.