1 Fundamentals of Computer Science Propositional Logic (Boolean Algebra)

Slides:



Advertisements
Similar presentations
Digital Circuits.
Advertisements

Prof. Sin-Min Lee Department of Computer Science
ECE 238L Computer Logic Design Spring 2010
Chapter 2 Logic Circuits.
Gate-level Minimization
Boolean Algebra and Combinational Logic
Gate-Level Minimization. Digital Circuits The Map Method The complexity of the digital logic gates the complexity of the algebraic expression.
Circuit Optimization Goal: To obtain the simplest implementation for a given function Optimization is a more formal approach to simplification that is.
Logic Gate Level Combinational Circuits, Part 1. Circuits Circuit: collection of devices physically connected by wires to form a network Net can be: –
Chapter 4 Logic Gates and Boolean Algebra. Introduction Logic gates are the actual physical implementations of the logical operators. These gates form.
Gate-Level Minimization1 DIGITAL LOGIC DESIGN by Dr. Fenghui Yao Tennessee State University Department of Computer Science Nashville, TN.
Combinational Logic Circuits Chapter 2 Mano and Kime.
Propositional Calculus Math Foundations of Computer Science.
IKI a-Simplification of Boolean Functions Bobby Nazief Semester-I The materials on these slides are adopted from those in CS231’s Lecture.
Overview Part 2 – Circuit Optimization 2-4 Two-Level Optimization
Boolean Algebra and Logic Simplification
Chapter 2: Boolean Algebra and Logic Functions
Systems Architecture I1 Propositional Calculus Objective: To provide students with the concepts and techniques from propositional calculus so that they.
1 Logic Gates Digital Computer Logic Kashif Bashir WWW:
Lecture 2 – Boolean Algebra Lecturer: Amy Ching Date: 21 st Oct 2002.
Chapter 3.5 Logic Circuits. How does Boolean algebra relate to computer circuits? Data is stored and manipulated in a computer as a binary number. Individual.
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
Department of Computer Engineering
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.
Module 9.  Digital logic circuits can be categorized based on the nature of their inputs either: Combinational logic circuit It consists of logic gates.
Dr. Eng. Farag Elnagahy Office Phone: King ABDUL AZIZ University Faculty Of Computing and Information Technology CPCS 222.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. Circuit Optimization Logic and Computer Design Fundamentals.
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.
Lecture 22: 11/19/2002CS170 Fall CS170 Computer Organization and Architecture I Ayman Abdel-Hamid Department of Computer Science Old Dominion University.
Week 6: Gates and Circuits: PART I READING: Chapter 4.
ACOE1611 Combinational Logic Circuits Reference: M. Mano, C. Kime, “Logic and Computer Design Fundamentals”, Chapter 2.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 2 – Combinational Logic Circuits Part 2.
Gate-Level Minimization
Chapter 2 Two- Level Combinational Logic. Chapter Overview Logic Functions and Switches Not, AND, OR, NAND, NOR, XOR, XNOR Gate Logic Laws and Theorems.
LOGIC GATES & BOOLEAN ALGEBRA
Unit 1 Minimization Techniques and Logic Gates. Introduction to Digital Systems Analog devices and systems process time-varying signals that can take.
ENG241 Digital Design Week #2 Combinational Logic Circuits.
LOGIC CIRCUITLOGIC CIRCUIT. Goal To understand how digital a computer can work, at the lowest level. To understand what is possible and the limitations.
Boolean Algebra & Logic Circuits Dr. Ahmed El-Bialy Dr. Sahar Fawzy.
Karnaugh Maps (K-Maps)
June 12, 2002© Howard Huang1 Karnaugh maps Last time we saw applications of Boolean logic to circuit design. – The basic Boolean operations are.
BOOLEAN ALGEBRA AND LOGIC SIMPLIFICATION
Digital Logic (Karnaugh Map). Karnaugh Maps Karnaugh maps (K-maps) are graphical representations of boolean functions. One map cell corresponds to a row.
BOOLEAN ALGEBRA LOGIC GATES. Introduction British mathematician George Boole( ) was successful in finding the link between logic and mathematics.
School of Computer and Communication Engineering, UniMAP DKT 122/3 - DIGITAL SYSTEM I Chapter 4A:Boolean Algebra and Logic Simplification) Mohd ridzuan.
K-maps and Decoders Prof. Sin-Min Lee Department of Computer Science.
Digital Logic & Design Dr. Waseem Ikram Lecture 09.
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
Digital Logic.
CHAPTER 3 Simplification of Boolean Functions
Morgan Kaufmann Publishers
Logic Gates and Boolean Algebra
Lecture 4 Nand, Nor Gates, CS147 Circuit Minimization and
Chapter 2: Boolean Algebra and Logic Functions
Logic Gates and Boolean Algebra
CS 105 Digital Logic Design
Dr. Clincy Professor of CS
Boolean Algebra and Combinational Logic
Digital Logic and Design
Karnaugh Maps (K-Maps)
Agenda – 2/12/18 Questions? Readings: CSI 4, P
BASIC & COMBINATIONAL LOGIC CIRCUIT
CS Chapter 3 (3A and ) – Part 3 of 5
Dr. Clincy Professor of CS
Overview Part 2 – Circuit Optimization
3-Variable K-map AB/C AB/C A’B’ A’B AB AB’
Laws & Rules of Boolean Algebra
Presentation transcript:

1 Fundamentals of Computer Science Propositional Logic (Boolean Algebra)

2 What is Propositional logic? Propositional logic is a mathematical model that allows us to reason about the truth or falsehood of logical expressions. Propositional logic is used in the design of computer circuits. Propositional logic is made up of propositions. A proposition is any statement that evaluates to one of the truth values TRUE or FALSE.

3 Propositional Variables A proposition variable is a variable that stands for some proposition. For example, p  c < d NOT p  NOT (c < d)  means “is equivalent to” or “has the same Boolean value as”. In this class I will use the terms propositional and Boolean interchangeably.

4 Logical Expressions Logical expressions are made up of –Boolean variables –Boolean constants –Boolean operators There is no strict naming convention for Boolean variables. There are only two Boolean constants, TRUE and FALSE. There are many Boolean operators, the most frequently used being NOT, AND, and OR.

5 Truth Tables Boolean functions are commonly displayed using truth tables. The truth tables for the NOT, AND, and OR operators are as follows. A NOT A A B A AND B A B A OR B

6 Truth Tables Other Boolean operators include XOR (exclusive or), NAND (not-and), and NOR (not-or). NAND and NOR transistors are well represented in circuit design due to their simplicity. A B A XOR B A B A NAND B A B A NOR B

7 Transistor Implementation of Elementary Logic Gates

8 Precedence of Logical Operators The order of precedence is.. 1. NOT (highest) 2. NAND 3. NOR 4. AND 5. OR 6.  (lowest)

9 Shorthand Notations for Boolean Operators NOT A  A A NAND B  AB A NOR B  A+B A AND B  AB A OR B  A+B Common misconceptions: AB  AB A+B  A+B

10 Evaluating Complex Boolean Expressions with Truth Tables Truth tables can be used to verify the equality of inequality of two or more Boolean expressions. The size of a truth table grows exponentially relative to the number of variables in the Boolean expression. –The number of entries (rows) in a truth table is 2 n where n represents the number of variables in the expression. Truth tables are one of the principle tools used in digital circuit design.

11 Evaluating Complex Boolean Expressions with Truth Tables AB + CA  A(B + C) A B C AB C CA AB+CA B+C A(B+C)

12 Boolean Identities Boolean identities are rules used to simplify Boolean expressions.

13 Proof of DeMorgan’s Law X + Y = XY

14 More Useful Boolean Identities

15 Circuit Design Problem Design a combinational circuit that determines if a binary value in the range of 0 to 7 (000b to 111b) is prime. P(A,B,C)  1 if the value ABC is prime and 0 if ABC is not prime. Circuit P A B C High-level block diagram

16 Circuit Design Problem Steps to developing the “Prime” circuit: 1. Construct the truth table. 2. Express the value of the truth table as a Boolean expression in sum of the min terms format. 3. Using Boolean identities, simplify the Boolean expression. 4. Draw the circuit from the simplified Boolean expression.

17 Circuit Design Problem 1. Draw the truth table A, B, and C are the inputs to the circuit; P is the output. A, B, and C collectively represent a single three digit unsigned binary number. A is the most significant digit and C is the least significant digit. If the digit is prime the output, P, is high (1); if the digit is not prime the output, P, is low (0).

18 Circuit Design Problem 2. Express the value of the truth table in sum of the min terms format. Notice that each term in the expression corresponds to the values for A, B, and C when P is high

19 Circuit Design Problem 3. Using Boolean identities, simplify the Boolean expression. Simplest form

20 Circuit Design Problem 4. Draw the circuit from the simplified Boolean expression. Circuit P A B C

21 Digital Logic Gates

22 Digital Logic Gates

23 Implementation of Boolean Functions with Gates Both of these circuits are logically equivalent. However, version (b) saves on performance, space, and cost.

24 Karnaugh Maps Karnaugh maps (a.k.a. k-maps) provide an alternative technique for simplifying Boolean expressions. K-maps are most commonly used for Boolean expressions containing 2, 3, or 4 variables. Steps to using a k-map in a digital design 1. Construct the truth table. 2. Transfer the value (output) of the truth table to an appropriate size k-map. 3. Group the appropriate elements of the k-map. 4. Convert the groupings to the resulting simplified Boolean expression.

25 Karnaugh Map Grouping Rules Each grouping must be a power of 2: 1, 2, 4, 8, 16, etc. Each grouping must be in the shape of a square or a rectangle - no diagonals are allowed. Groupings may overlap. Each grouping should be as large as possible so as to minimize the total number of groupings. Each grouping should have at least one element that is not a part of another grouping.

26 Karnaugh Map Example Using a Karnaugh map to generate a simplified Boolean expression for the prime number problem.

27 Three-Variable K-Map Interpretation Each box in the k-map corresponds to a row in the truth table. Row 1 is m 0, row 2 is m 1, etc. The boxes do not follow a strict sequential numbering. The labeled brackets in illustration (b) show where the corresponding variable has a value of 1.

28 Karnaugh Map Interpretation The grouping of 4 is completely inside the area of the k-map where C  1. This gives us the term C. The grouping of 2 is completely inside the area of the k-map where B  1, and completely outside the area where A  1. This gives us the term AB.

29 Two-Variable Karnaugh Maps m i represents a min-term –m 0 = 00 –m 1 = 01 –m 2 = 10 –m 3 = 11

30 Four-Variable Karnaugh Maps

31 “Don’t Care” Conditions Occasionally there will be combinations of inputs that will never occur for one reason or another. For those combinations we can label the outputs as don’t-cares by putting an ‘X’ in the corresponding output field. An ‘X’ may be treated either as a 0 or a 1 in k-map simplification.

32 Propagation Delay for an Inverter Gate