Chapter 3. Boolean Algebra and Digital Logic

Similar documents
Objectives: 1- Bolean Algebra. Eng. Ayman Metwali

Chapter 2. Boolean Expressions:

Experiment 4 Boolean Functions Implementation

Combinational Logic & Circuits

IT 201 Digital System Design Module II Notes

CS8803: Advanced Digital Design for Embedded Hardware

Circuit analysis summary

1. Mark the correct statement(s)

Chapter 2 Boolean algebra and Logic Gates

Chapter 2 Combinational Logic Circuits

Gate-Level Minimization. BME208 Logic Circuits Yalçın İŞLER

Gate Level Minimization Map Method

DIGITAL SYSTEM DESIGN

Unit-IV Boolean Algebra

Chapter 3. Gate-Level Minimization. Outlines

Date Performed: Marks Obtained: /10. Group Members (ID):. Experiment # 04. Boolean Expression Simplification and Implementation

Binary logic. Dr.Abu-Arqoub


Boolean Algebra and Logic Gates

Assignment (3-6) Boolean Algebra and Logic Simplification - General Questions

Boolean algebra. June 17, Howard Huang 1

Computer Science. Unit-4: Introduction to Boolean Algebra

SYNERGY INSTITUTE OF ENGINEERING & TECHNOLOGY,DHENKANAL LECTURE NOTES ON DIGITAL ELECTRONICS CIRCUIT(SUBJECT CODE:PCEC4202)

QUESTION BANK FOR TEST

UNIT-4 BOOLEAN LOGIC. NOT Operator Operates on single variable. It gives the complement value of variable.

X Y Z F=X+Y+Z

Lecture 4: Implementation AND, OR, NOT Gates and Complement

Computer Organization and Levels of Abstraction

BOOLEAN ALGEBRA. Logic circuit: 1. From logic circuit to Boolean expression. Derive the Boolean expression for the following circuits.

Experiment 3: Logic Simplification

Chapter 2: Combinational Systems

Digital Logic Design (3)

Simplification of Boolean Functions

Computer Organization

Chapter 6. Logic Design Optimization Chapter 6

Standard Forms of Expression. Minterms and Maxterms

UNIT 2 BOOLEAN ALGEBRA

Points Addressed in this Lecture. Standard form of Boolean Expressions. Lecture 4: Logic Simplication & Karnaugh Map

Menu. Algebraic Simplification - Boolean Algebra EEL3701 EEL3701. MSOP, MPOS, Simplification

Bawar Abid Abdalla. Assistant Lecturer Software Engineering Department Koya University

2.1 Binary Logic and Gates

ELCT201: DIGITAL LOGIC DESIGN

Lecture (05) Boolean Algebra and Logic Gates

Dr. Chuck Cartledge. 10 June 2015

Chapter 2. Boolean Algebra and Logic Gates

Boolean Algebra. BME208 Logic Circuits Yalçın İŞLER

Gate-Level Minimization

A graphical method of simplifying logic

R10. II B. Tech I Semester, Supplementary Examinations, May


Module -7. Karnaugh Maps

Summary. Boolean Addition

Lecture 5. Chapter 2: Sections 4-7

Review. EECS Components and Design Techniques for Digital Systems. Lec 05 Boolean Logic 9/4-04. Seq. Circuit Behavior. Outline.

LSN 4 Boolean Algebra & Logic Simplification. ECT 224 Digital Computer Fundamentals. Department of Engineering Technology

Philadelphia University Faculty of Information Technology Department of Computer Science. Computer Logic Design. By Dareen Hamoudeh.

Introduction to Boolean Algebra

Austin Herring Recitation 002 ECE 200 Project December 4, 2013

Combinational Logic Circuits

MODULE 5 - COMBINATIONAL LOGIC

Computer Engineering Chapter 3 Boolean Algebra

B.Tech II Year I Semester (R13) Regular Examinations December 2014 DIGITAL LOGIC DESIGN

Bawar Abid Abdalla. Assistant Lecturer Software Engineering Department Koya University

Introduction to Boolean Algebra

Review: Standard forms of expressions

Combinational Logic Circuits Part III -Theoretical Foundations

ELCT201: DIGITAL LOGIC DESIGN

Code No: R Set No. 1

Designing Computer Systems Boolean Algebra

Boolean Algebra. P1. The OR operation is closed for all x, y B x + y B

Combinational Circuits Digital Logic (Materials taken primarily from:

Boolean Algebra & Digital Logic

Chapter 2 Combinational

Ch. 5 : Boolean Algebra &

Gate Level Minimization

Computer Organization and Levels of Abstraction

Combinational Logic Circuits

CprE 281: Digital Logic

Henry Lin, Department of Electrical and Computer Engineering, California State University, Bakersfield Lecture 7 (Digital Logic) July 24 th, 2012

Introduction to Computer Architecture

EEE130 Digital Electronics I Lecture #4_1

R.M.D. ENGINEERING COLLEGE R.S.M. Nagar, Kavaraipettai

Contents. Chapter 3 Combinational Circuits Page 1 of 34

COMP combinational logic 1 Jan. 18, 2016

Gate-Level Minimization

CS February 17

2008 The McGraw-Hill Companies, Inc. All rights reserved.

Gate-Level Minimization. section instructor: Ufuk Çelikcan

6. Combinational Circuits. Building Blocks. Digital Circuits. Wires. Q. What is a digital system? A. Digital: signals are 0 or 1.

UNIT II. Circuit minimization

COMBINATIONAL LOGIC CIRCUITS

Combinational Circuits

Chapter Three. Digital Components

Boolean Logic CS.352.F12

DKT 122/3 DIGITAL SYSTEM 1

6.1 Combinational Circuits. George Boole ( ) Claude Shannon ( )

Code No: R Set No. 1

BOOLEAN ALGEBRA. 1. State & Verify Laws by using :

Variable, Complement, and Literal are terms used in Boolean Algebra.

Propositional Calculus. Math Foundations of Computer Science

Transcription:

Chapter 3 Boolean Algebra and Digital Logic

Chapter 3 Objectives Understand the relationship between Boolean logic and digital computer circuits. Learn how to design simple logic circuits. Understand how digital circuits work together to form complex computer systems. 2

3. Introduction In the latter part of the nineteenth century, George Boole incensed philosophers and mathematicians alike when he suggested that logical thought could be represented through mathematical equations. Computers, as we know them today, are implementations of Boole s Laws of Thought. 3

3. Introduction In the middle of the twentieth century, computers were commonly known as thinking machines and electronic brains. Many people were fearful of them. Nowadays, we rarely ponder the relationship between electronic digital computers and human logic. Computers are accepted as part of our lives. 4

3.2 Boolean Algebra Boolean algebra is a mathematical system for the manipulation of variables that can have one of two values. In formal logic, these values are true and false. In digital systems, these values are on and off and, or high and low. Boolean expressions are created by performing operations on Boolean variables. Common Boolean operators include AND, OR, and NOT. 5

3.2 Boolean Algebra A Boolean operator can be completely described using a truth table. The truth table for the Boolean operators AND and OR are shown at the right. The AND operator is also known as a Boolean product. The OR operator is the Boolean sum. 6

3.2 Boolean Algebra The truth table for the Boolean NOT operator is shown at the right. The NOT operation is most often designated by an overbar. It is sometimes indicated by a prime mark ( ) or an elbow ( ). 7

3.2 Boolean Algebra A Boolean function has: At least one Boolean variable, At least one Boolean operator, and At least one input from the set {,}. It produces an output that is also a member of the set {,}. x y 8

3.2 Boolean Algebra The truth table for the Boolean function: is shown at the right. To make evaluation of the Boolean function easier, the truth table contains extra (shaded) columns to hold evaluations of subparts of the function. 9

3.2 Boolean Algebra As with common arithmetic, Boolean operations have rules of precedence. The NOT operator has highest priority, followed by AND and then OR. This is how we chose the (shaded) function subparts in our table.

Logic A logic circuit is composed of: Inputs Outputs Functional specification Timing specification inputs functional spec timing spec outputs

Circuits Nodes Inputs: A, B, C Outputs: Y, Z Internal: n Circuit elements E, E2, E3 Each a circuit A E n B E3 Y C E2 Z 2

Types of Logic Circuits Combinational Logic Memoryless Outputs determined by current values of inputs Sequential Logic Has memory Outputs determined by previous and current values of inputs inputs functional spec timing spec outputs 3

Combinational Logic ZX ZX Y Functional specification expresses as a truth table or a Boolean equation: 4

3.2.2 Boolean Identities Axioms and theorems of Boolean algebra obey the principle of duality. If the symbols and and the operators (AND) and + (OR) are interchanged, the statement will still be correct. Symbol ( ) denote the dual of a statement. 5

3.2.2 (Theorems of One Variable) Involution Identity Nullity Idempotency Complements 6

3.2.2 (Theorems of Several Variables) 7 B C B+C B(B+C)=B B C C B+C B+C (B+C)(B+C )=B

3.2.2 Boolean Identities 8

3.2.3 Simplification of Boolean Expressions Ex: Given the function F(x,y,z) = x yz + x yz + xz, we simplify as follows Ex: Given the function F(x,y) = y + (xy), we simplify as follows: 9

3.2.3 Simplification of Boolean Expressions Ex: Given the function F(x,y) = x (x + y) + (y + x)(x + y ), we simplify as follows: 2

3.2.4 Complements The most common Boolean operator applied to more complex Boolean expressions is the NOT operator, resulting in the complement of the expression. To find the complement of a Boolean function, we use DeMorgan s theorem T2. The OR form of this law states that (x + y) = x y. 2

3.2.4 Complements We can easily extend DeMorgan s Law to three or more variables as follows: Given the function: F(x,y,z) = (x+y+z). Then F (x,y,z) = (x + y + z). Let w = (x + y). Then F (x,y,z) = (w + z) = w z. Now, applying DeMorgan s Law again, we get: w z = (x + y) z = x y z = F (x,y,z) If F(x,y,z) = (x + y + z), then F (x,y,z) = x y z. so that, (xyz) = x + y + z. 22

3.2.4 Complements Table depicts the truth tables for F(x,y,z) = x + yz and its complement, F (x,y,z) = x(y + z). 23

3.2.4 Complements DeMorgan s law can be extended to any number of variables. Replace each variable by its complement and change all ANDs to ORs and all ORs to ANDs. Thus, we find the the complement of: 24

3.2.5 Representing Boolean Functions There are an infinite number of Boolean expressions that are logically equivalent to one another, as seen in Ex. Ex: Suppose F(x,y,z) = x + xy. We can also express F as F(x,y,z) = x + x + xy From idempotent Law, these two expressions are the same. 25

SOP/POS Simplify Boolean function to the form canonical, or standardized. For any given Boolean function, there exists a unique standardized form. But, there are different standards that designers use. The two most common are: the sum-of-products (SOP) form and the product-of-sums (POS) form. 26

27

28

Sum-Of-Products form SOP collects of ANDed variables. F (x,y,z) = xy + yz + xyz is in SOP form. F 2 (x,y,z) = xy + x (y + z ) is not in SOP form. Apply the Distributive Law to distribute the x variable in F 2, now F 2 (x,y,z) = xy + xy + xz, which is in SOP form. 29

SUM-OF-PRODUCTS FORM Ben Bitdiddle is having a picnic. He won t enjoy it if it rains or if there are ants. Design a circuit that will output TRUE only if Ben enjoys the picnic. 3

SUM-OF-PRODUCTS FORM Ants Rain Enjoy E = A B 3

32

33

Product-Of-Sums form POS consists of ORed variables (sum terms) that are ANDed together. F (x,y,z) = (x + y) (x + z )(y + z )(y + z) is in POS form. Ex: from Ben s picnic POS: E = A + R A + R A + R Ants Rain Enjoy 34

Simplifying Equations Consider the sum-of-products expression Y = A B + AB: By Theorem T, the equation simplifies to Y = B. Y = A B + AB Y = A + A B Y = B 35

Simplifying Equations Consider the sum-of-products expression Y = A B + AB: By Theorem T, the equation simplifies to Y = B. Ex: Minimize Equation A B C + AB C + AB C 36

Improved equation minimization A B C + AB C + AB C 37

K-maps Maurice Karnaugh, 924. Graduated with a bachelor s degree in physics from the City College of New York in 948 and earned a Ph.D. in physics from Yale in 952. Worked at Bell Labs and IBM from 952 to 993 and as a computer science professor at the Polytechnic University of New York from 98 to 999. Karnaugh maps (K-maps) are a graphical method for simplifying Boolean equations. They were invented in 953 by Maurice Karnaugh. K- maps work well for problems with up to four variables. 4

K-maps Logic minimization involves combining terms. Two terms containing an implicant P and the true and complementary forms of some variable A are combined to eliminate A: PA+ PA = P. Karnaugh maps make these combinable terms easy to see by putting them next to each other in a grid. 42

Karnaugh Maps to Represent Boolean Functions 43

K-map of 3 variables 44

Logic Minimization with K-Maps K-maps help us do this simplification graphically by circling s in adjacent squares, as shown in the map. As before, we can use Boolean algebra to minimize equations in SOP form. Y = A B 45

Logic Minimization with K-Maps Rules for finding a minimized equation from a K- map are as follows: Use the fewest circles necessary to cover all the s. All the squares in each circle must contain s. Each circle must span a rectangular block that is a power of 2 (i.e.,, 2, or 4) squares in each direction. Each circle should be as large as possible. A circle may wrap around the edges of the K-map. A in a K-map may be circled multiple times if doing so allows fewer circles to be used. 46

MINIMIZATION OF A THREE-VARIABLE FUNCTION USING A K-MAP Each circle in the K-map represents a prime implicant, and the dimension of each circle is a power of two (2 and 2 2). 47

5

53 A B C D Y

3.3 Logic Gates We have looked at Boolean functions in abstract terms. In this section, we see that Boolean functions are implemented in digital computer circuits called gates. A gate is an electronic device that produces a result based on two or more input values. In reality, gates consist of one to six transistors, but digital designers think of them as a single unit. Integrated circuits contain collections of gates suited to a particular purpose. 55

3.3 Logic Gates The three simplest gates are the AND, OR, and NOT gates. They correspond directly to their respective Boolean operations, as you can see by their truth tables. 56

3.3 Logic Gates Another very useful gate is the exclusive OR (XOR) gate. The output of the XOR operation is true only when the values of the inputs differ. Note the special symbol for the XOR operation. 57

3.3 Logic Gates NAND and NOR are two very important gates. Their symbols and truth tables are shown at the right. 58

3.3 Logic Gates NAND and NOR are known as universal gates because they are inexpensive to manufacture and any Boolean function can be constructed using only NAND or only NOR gates. 59

3.3 Logic Gates Gates can have multiple inputs and more than one output. A second output can be provided for the complement of the operation. We ll see more of this later. A Three-Input OR Gate Representing x + y + z Three-Input AND Gate Representing x y z AND Gate with Two Inputs and Two Outputs 6

3.3 Logic Gates Drawing schematics, we make them easier to read and debug, generally use the following guidelines: Inputs are on the left side. Outputs are on the right side. Gates should flow from left to right. Drawing with straight wires. Wires always connect at a T junction. A dot where wires cross indicates a connection between the wires. Wires crossing without a dot make no connection. 6

3.5 Combinational Circuits We have designed a circuit that implements the Boolean function: This circuit is an example of a combinational logic circuit. Combinational logic circuits produce a specified output (almost) at the instant when input values are applied. 63

COMBINATIONAL CIRCUITS Combinational circuit consists of n binary inputs and m binary outputs. As with a gate, a combinational circuit can be defined in three ways: Truth table: For each of the 2 n possible combinations of input signals, the binary value of each of the m output signals is listed. Graphical symbols: The interconnected layout of gates is depicted. Boolean equations: Each output signal is expressed as a Boolean function of its input signals. 64

3.5 Combinational Circuits One of the simplest is the half adder to find the sum of two bits. Construction of a half adder by looking at its truth table. f x, y = x y f x, y = xy 65

3.5 Combinational Circuits 69

3.5 Combinational Circuits 7

3.5 Combinational Circuits 7

3.5 Combinational Circuits How can we change the half adder shown below to make it a full adder? 73

3.5 Combinational Circuits Here s our completed full adder. 74

3.5 Combinational Circuits 75

3.5 Combinational Circuits 76

3.5 Combinational Circuits 77

3.5 Combinational Circuits 78

3.5 Combinational Circuits 79

3.5 Combinational Circuits Just as we combined half adders to make a full adder, Full adders can connected in series, 8 or 6 bits. By replicating the above circuit 6 times, feeding the Carry Out of one circuit into the Carry In of the circuit immediately to its left. This configuration is called a ripple-carry adder. 8

3.5 Combinational Circuits Decoders are another important type of combinational circuit. Among other things, they are useful in selecting a memory location according a binary value placed on the address lines of a memory bus. Address decoders with n inputs can select any of 2 n locations. This is a block diagram for a decoder. 82

3.5 Combinational Circuits This is what a 2-to-4 decoder looks like on the inside. If x = and y =, which output line is enabled? 83

3.5 Combinational Circuits A multiplexer does just the opposite of a decoder. It selects a single output from several inputs. The particular input chosen for output is determined by the value of the multiplexer s control lines. This is a block diagram for a multiplexer. 84

3.5 Combinational Circuits This is what a 4-to- multiplexer looks like on the inside. If S = and S =, which input is transferred to the output? 85

A Simple Two-Bit ALU 87

A Simple Two-Bit ALU 88

A Simple Two-Bit ALU 89

End of Chapter 3 9