Department of Preparatory Year, Umm Al Qura University

Slides:



Advertisements
Similar presentations
Department of Computer and Information Science, School of Science, IUPUI CSCI 240 Digital Logic.
Advertisements

Lecture 6 More Logic Functions: NAND, NOR, XOR and XNOR
Digital Circuits.
Introduction to Logic Circuits
Chapter 2 Logic Circuits.
Boolean rules for simplification Dr. Ahmed Telba.
Relationship Between Basic Operation of Boolean and Basic Logic Gate The basic construction of a logical circuit is gates Gate is an electronic circuit.
1 COMP541 Combinational Logic Montek Singh Jan 16, 2007.
Lecture 14 Today we will Learn how to implement mathematical logical functions using logic gate circuitry, using Sum-of-products formulation NAND-NAND.
Contemporary Logic Design Two-Level Logic © R.H. Katz Transparency No. 3-1 Chapter #2: Two-Level Combinational Logic Section 2.1, Logic Functions.
Propositional Calculus Math Foundations of Computer Science.
Chapter 2: Boolean Algebra and Logic Functions
Digital Logic ENEL 111. Digital systems A digital system is a system whose inputs and outputs fall within a discrete, finite set of values Two main types.
Binary Numbers.
Systems Architecture I1 Propositional Calculus Objective: To provide students with the concepts and techniques from propositional calculus so that they.
BOOLEAN ALGEBRA Saras M. Srivastava PGT (Computer Science)
Logic Design A Review. Binary numbers Binary numbers to decimal  Binary 2 decimal  Decimal 2 binary.
Boolean Algebra and Digital Circuits
Digital Circuits. Review – Getting the truth table The first step in designing a digital circuit usually is to get the truth table. That is, for every.
Dr. Eng. Farag Elnagahy Office Phone: King ABDUL AZIZ University Faculty Of Computing and Information Technology CPCS 222.
Logic Gates Shashidhara H S Dept. of ISE MSRIT. Basic Logic Design and Boolean Algebra GATES = basic digital building blocks which correspond to and perform.
Chapter 2 Two- Level Combinational Logic. Chapter Overview Logic Functions and Switches Not, AND, OR, NAND, NOR, XOR, XNOR Gate Logic Laws and Theorems.
Lecture 4 Nand, Nor Gates, CS147 Circuit Minimization and
Boolean Algebra AND gate A B | AB 0 0 | | | | 1 OR gate A B | A + B 0 0 | | | | 1 NOT gate _ A | A or A’ 0 | 1 1 |
5 - Digital Logic with Boolean Algebra
BOOLEAN ALGEBRA AND LOGIC SIMPLIFICATION
CEC 220 Digital Circuit Design SOP and POS forms Friday, January 23 CEC 220 Digital Circuit Design Slide 1 of 17.
BOOLEAN ALGEBRA LOGIC GATES. Introduction British mathematician George Boole( ) was successful in finding the link between logic and mathematics.
Department of Preparatory Year, Umm Al Qura University CSCI 240 Digital Logic.
CEC 220 Digital Circuit Design SOP and POS forms Friday, Sept 11 CEC 220 Digital Circuit Design Slide 1 of 17.
Digital Logic. Boolean Algebra to Logic Gates Logic circuits are built from components called logic gates. The logic gates correspond to Boolean operations.
Mu.com.lec 9. Overview Gates, latches, memories and other logic components are used to design computer systems and their subsystems Good understanding.
Boolean Algebra & Logic Gates
Combinational Circuits Part 1
Digital Logic.
Morgan Kaufmann Publishers
Logic Gates and Boolean Algebra
De Morgan’s Theorem,.
Lecture 4 Nand, Nor Gates, CS147 Circuit Minimization and
Chapter 2: Boolean Algebra and Logic Functions
Digital Fundamentals Floyd Chapter 5 Tenth Edition
Logic Gates and Boolean Algebra
CS 105 Digital Logic Design
Digital Logic.
Boolean Algebra.
Princess Sumaya University
CHAPTER 3 SETS AND BOOLEAN ALGEBRA
IB Computer Science Computer Organization
Digital Fundamentals Floyd Chapter 5 Tenth Edition
Boolean Algebra.
Boolean Algebra.
Boolean Algebra & Logic Circuits
Basic Logic Gates 1.
Digital Circuits.
BASIC & COMBINATIONAL LOGIC CIRCUIT
Logic Gates.
Boolean Algebra.
Week 7: Gates and Circuits: PART II
Boolean Algebra.
Chapter 2 Introduction to Logic Circuits
Digital Fundamentals Floyd Chapter 5 Tenth Edition
Logic Gates By Dr.Mazin Alzewary
Logic Gates.
Digital Fundamentals Floyd Chapter 5 Tenth Edition
Digital Fundamentals Floyd Chapter 5 Tenth Edition
Digital Fundamentals Floyd Chapter 5 Tenth Edition
Digital Fundamentals Floyd Chapter 5 Tenth Edition
Combinational Logic Circuit
Digital Circuits.
Circuit Simplification and
Presentation transcript:

Department of Preparatory Year, Umm Al Qura University Digital Logic

Boolean Algebra to Logic Gates Logic circuits are built from components called logic gates. The logic gates correspond to Boolean operations +, *, ’. Binary operations have two inputs, unary has one OR + AND * NOT ’

AND A Logic Gate: A*B Truth Table: B A B A*B 1 A B Series Circuit: A*B

OR A Logic Gate: A+B Truth Table: B A B A+B 1 A Parallel Circuit: B 1 A Parallel Circuit: B A+B

NOT Logic Gate: A A’ or A Truth Table: a A 1 Single-throw Double-pole (also called an inverter) A A’ or A Truth Table: a A 1 Single-throw Double-pole Switch: A A’ or A

n-input Gates Because + and * are binary operations, they can be cascaded together to OR or AND multiple inputs. A A B A+B+C ABC B C A A B A+B+C ABC B C C

n-bit Inputs For convenience, it is sometimes useful to think of the logic gates processing n-bits at a time. This really refers to n instances of the logic gate, not a single logic gate with n-inputs. 1101100101 1101110111 0100110111 10001111 00001100 00111100 110001 001110

Logic Circuits ≡ Boolean Expressions All logic circuits are equivalent to Boolean expressions and any boolean expression can be rendered as a logic circuit. AND-OR logic circuits are equivalent to sum-of-products form. Consider the following circuits: A y=aB+Bc abc B C A B C Y aBc y Ab y=abc+aBc+Ab

NAND and NOR Gates NAND and NOR gates can greatly simplify circuit diagrams. As we will see, can you use these gates wherever you could use AND, OR, and NOT. A B AB 1 NAND A B AB 1 NOR

XOR and XNOR Gates XOR is used to choose between two mutually exclusive inputs. Unlike OR, XOR is true only when one input or the other is true, not both. A B AB 1 XOR A B A B 1 XNOR

Properties of NAND AND NOR NAND and NOR have special properties, but neither satisfies the distributive or associative laws. NAND NOR x1=X x0=X x  0=1 x  1=0 x  x=X x  x=X x  y=X+Y x  y=XY X  Y=x+y X  Y=xy not (x  y)=xy not (x  y)=x+y It should be clear by looking at these properties that NAND and NOR are duals.

NAND and NOR as Universal Logic Gates Any logic circuit can be built using only NAND gates, or only NOR gates. They are the only logic gate needed. Here are the NAND equivalents:

NAND and NOR as Universal Logic Gates (cont) Here are the NOR equivalents: NAND and NOR can be used to reduce the number of required gates in a circuit.

Example Problem A hall light is controlled by two light switches, one at each end. Find (a) a truth function, (b) a Boolean expression, and (c) a logic network that allows the light to be switched on or off by either switch. Let x and y be the switches: x y f(x,y) 1 (What kind of gate has this truth table?

Slightly more complex Consider my car which complains by sounding a buzzer when I have left the lights on or left the car in gear (not in Park) and taken the keys out of the ignition: 1 P (buzzer) both left lights on left in gear what I’ve done C (keys out = 0) B (in gear = 1) A (lights on = 1) A.B.C + A.B.C + A.B.C

Minimization The expression can be simplified in one of two ways: via algebra via Karnaugh maps to A.C + B.C as the following truth table shows:

Truth table shows the same result 1 A.C B.C P A.C + B.C C B A A.B.C + A.B.C + A.B.C = A.C + B.C = (A + B).C

Means fewer logic gates are required

Minterms and Maxterms 1 P C B A Notice the truth table has all possible combinations of A,B and C included: The minterm is obtained from the “product” of A,B and C by AND-ing them A.B.C The maxterm is obtained from the “sum” of A,B and C by OR-ing them and inverting inputs A + B + C 1 P C B A

Sum of Products/Product of Sums For all combinations of inputs for which the output is a logical true: Combining the minterms with OR gives the sum- of-products For all combinations of inputs for which the output is a logical false: Combining the maxterms with AND gives the product-of sums.

From our example: sum-of-products: A.B.C + A.B.C + A.B.C 1 P C B A sum-of-products: A.B.C + A.B.C + A.B.C product-of-sums: A+B+C . A+B+C . A+B+C . A+B+C . A+B+C Normally the expression is derived using sum-of-products although product-of-sums yields fewer terms when there are more 1 outputs than 0 outputs.

Exercise 1 P C B A Write out the sum-of-products expression for the truth table : A.B.C + A.B.C + A.B.C + A.B.C

Algebraic Laws DeMorgan’s Laws The AND and OR functions can be shown to be related to each other through the following equations: Explain that there is a difference between (not A AND not B) and not(A AND B)

DeMorgan DeMorgan’s Laws Example: Implement the expression A.B + C.D using only NAND gates NOT the individual terms Change the sign NOT the lot . not(a.b) not(c.d)

Boolean Algebraic Laws (A.B).C = A.B.C = A.(B.C) Associative A.(B + C) = A.B + A.C A + (B.C) = (A + B).(A + C) Distributive A . B = B . A A + B = B + A Commutative A . 0 = 0 A . 1 = A A + 0 = A A + 1 = 1 Operating with logic 0 and logic 1 A . A = 0 A + A = 1 Complementary A . A = A A + A = A Tautology (Idempotent)

Basic rules of Boolean Algebra Example: Simplify the following Expression A.B + A.C+ A.C + A.B distributive A.(B + B) + A.(C + C) re-distribute A.1 + A.1 complementary A + A op with logic 1 A idempotent Distributive law Communitative law

Exercises You should be able to: Construct truth tables given boolean expressions Compare expressions using truth tables Produce a sum-of-products form from a truth table by combining minterms Simplify the resulting expression algebraically Represent the expression as a circuit using logic gates