Objectives: 1- Bolean Algebra. Eng. Ayman Metwali

Similar documents
Chapter 3. Boolean Algebra and Digital Logic

IT 201 Digital System Design Module II Notes

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

Boolean Algebra and Logic Gates

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

Binary logic. Dr.Abu-Arqoub

Chapter 2 Boolean algebra and Logic Gates

QUESTION BANK FOR TEST

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

X Y Z F=X+Y+Z

Unit-IV Boolean Algebra

2.1 Binary Logic and Gates

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

Circuit analysis summary

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

Experiment 3: Logic Simplification

Computer Science. Unit-4: Introduction to Boolean Algebra

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

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

Code No: R Set No. 1

ENGIN 112 Intro to Electrical and Computer Engineering

Simplification of Boolean Functions

Arab Open University. Computer Organization and Architecture - T103

Experiment 4 Boolean Functions Implementation

Combinational Logic & Circuits

ENGINEERS ACADEMY. 7. Given Boolean theorem. (a) A B A C B C A B A C. (b) AB AC BC AB BC. (c) AB AC BC A B A C B C.

ELCT201: DIGITAL LOGIC DESIGN

COMPUTER ARCHITECTURE AND DIGITAL DESIGN

Introduction to Computer Architecture

1. Mark the correct statement(s)

2.6 BOOLEAN FUNCTIONS

Introduction to Boolean logic and Logical Gates

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

Code No: 07A3EC03 Set No. 1

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

LECTURE 4. Logic Design

UNIT 2 BOOLEAN ALGEBRA

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

Code No: R Set No. 1

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

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

ELCT201: DIGITAL LOGIC DESIGN

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

Lecture (05) Boolean Algebra and Logic Gates

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

Spring 2010 CPE231 Digital Logic Section 1 Quiz 1-A. Convert the following numbers from the given base to the other three bases listed in the table:

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

CS8803: Advanced Digital Design for Embedded Hardware

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

Code No: R Set No. 1


Gate Level Minimization

CS470: Computer Architecture. AMD Quad Core

60-265: Winter ANSWERS Exercise 4 Combinational Circuit Design

2. BOOLEAN ALGEBRA 2.1 INTRODUCTION

Bawar Abid Abdalla. Assistant Lecturer Software Engineering Department Koya University

Boolean algebra. June 17, Howard Huang 1

Summary. Boolean Addition

Gate-Level Minimization

Standard Forms of Expression. Minterms and Maxterms

Philadelphia University Student Name: Student Number:

Lecture (04) Boolean Algebra and Logic Gates

Lecture (04) Boolean Algebra and Logic Gates By: Dr. Ahmed ElShafee

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

Digital Logic Lecture 7 Gate Level Minimization

Dr. Chuck Cartledge. 10 June 2015

Chapter 2: Combinational Systems

CS February 17

SIDDHARTH GROUP OF INSTITUTIONS :: PUTTUR Siddharth Nagar, Narayanavanam Road QUESTION BANK (DESCRIPTIVE)

Computer Organization

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

Chapter 2 Combinational Logic Circuits

Gate-Level Minimization

Gate Level Minimization Map Method

Chapter 2 Combinational

Computer Organization and Levels of Abstraction

Question Total Possible Test Score Total 100

INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR Stamp / Signature of the Invigilator

NODIA AND COMPANY. GATE SOLVED PAPER Computer Science Engineering Digital Logic. Copyright By NODIA & COMPANY

Computer Engineering Chapter 3 Boolean Algebra

Gate-Level Minimization

SWITCHING THEORY AND LOGIC CIRCUITS

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

DSAS Laboratory no 4. Laboratory 4. Logic forms

Combinational Logic Circuits

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

Digital logic fundamentals. Question Bank. Unit I

Chapter 2. Boolean Expressions:

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

Software Engineering 2DA4. Slides 2: Introduction to Logic Circuits

Injntu.com Injntu.com Injntu.com R16

Combinational Devices and Boolean Algebra

Combinational Logic Circuits

01 Introduction to Digital Logic. ENGR 3410 Computer Architecture Mark L. Chang Fall 2008

Boolean Logic CS.352.F12

Bawar Abid Abdalla. Assistant Lecturer Software Engineering Department Koya University

Announcements. Chapter 2 - Part 1 1

01 Introduction to Digital Logic. ENGR 3410 Computer Architecture Mark L. Chang Fall 2006

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

Combinational Circuits Digital Logic (Materials taken primarily from:

Transcription:

Objectives: Chapter 3 : 1- Boolean Algebra Boolean Expressions Boolean Identities Simplification of Boolean Expressions Complements Representing Boolean Functions 2- Logic gates 3- Digital Components 4- Combinational circuits 5- Sequential circuits 1- Bolean Algebra Boolean algebra is an algebra for the manipulation of objects that can take on only two values, typically true and false Boolean variable: it is a variable that can take only two values : 0 (false) or 1 (true) Example: x, y, z, Where, for instance, x could be 0 or 1 Boolean expressions: Combination of Boolean variables and operators (AND, OR, NOT, ) Example: x AND y, x OR y, Boolean function: typically has one or more input values and yields a result, based on these input values, in the range {0,1} Example: F(x, y, z) = (x AND y) OR z Three common Boolean operators AND, OR and NOT In Boolean expression/arithmetic (a AND b) is expressed as a Boolean product: a.b or simply ab (a OR b) is expressed as a Boolean sum: a+b (NOT a) is expressed as: aa 1

Truth Table A Boolean operator can be completely described using a truth table that lists: The inputs, All possible values for these inputs, The resulting values of the operation for all possible combinations of three inputs Boolean function can also be described using a truth table The following rules of precedence should be respected Parentheses first NOT next AND next OR finally 2

Draw the truth table to show all possible outputs of the following Boolean function: F(x,y,z) = x +yy z Sol. Logically we should calculate y, y z and then x + y z The truth table for F(x,y,z) is: (MID-TERM Make Up Fall 2011) Show that x = xy + xy Using truth tables Sol. (MOCK MTA 2012) drawing the truth table of F(x,y,z) = x +z. Sol. 3

Boolean Identities Frequently, a Boolean expression is not in its simplest form Recall from algebra the expression 2x + 6x can be simplified to 8x Boolean expressions can also be simplified We need new identities, or laws, that apply to Boolean algebra instead of regular algebra These laws are grouped in the following table Simplification of Boolean Expressions Simplify the function F(x,y,z) = xyz + xyz + xz Using Identities: The simplest form for F(x,y,z) is F(x,y,z) = F(x,y,z) = xyz + xyz + xz = xyz + xz = xz(y + 1) = xz(1) = xz (idempotent) (Distributive) (Null) (Identity) 4

Exercises Simplify the following functional expressions using Boolean Algebra a. xy + xy' b. F(x,y,z) = x'y + xyz' + xyz c. F(w,x,y,z) = (xy' + w'z)(wx' + yz') ans. a. xy + x'y = x(y + y') = x(1) = x b. x'y + xyz' + xyz = x'y + xy(z' + z) = x'y + xy(1) = x'y + xy = (x' + x)y = (1)y = y c. (xy' + w'z)(wx' + yz') = xy'wx' + xy'yz' + w'zwx' + w'zyz' = (xx')y'w + (y'y)xz' + (w'w)zx' + (zz')w'y = (0)y'w + (0)xz' + (0)zx' + 0(w'y) = 0 + 0 + 0 + 0 = 0 (MTA - 2nd Semester 2012/2013) Use Boolean algebra and Boolean identities to prove that F1 is really a simplified version of F (found in part a). a bc + a bc + c = a b + c a bc + a bc + c =a b(c+c ) + c = a b + c (you should use identities) (Final 1st Semester 2011) Simplify the following expressions in sum of products: x z +y z +yz +xy Sol. x z +z (y +y)+xy = x z +z +xy= z (x+1)+xy TMA Spring 2013 5

Using the basic identities of Boolean algebra, show that: x + x' y = x + y. Ans. x + x'y = x(y + y') + x'y = xy + xy' + x'y = xy + xy' +x'y +xy = x(y + y') + y(x' + x) = x(1) + y(1) = x + y Simplify the following functional expressions using Boolean Algebra xy'z + x'y'z + xyz Ans. = (xy'z + xy'z) + x'y'z + xyz = (xy'z + x'y'z) + (xy'z + xyz) = (x + x')y'z + (y' + y)xz = y'z + xz Using the basic identities of Boolean algebra, show that: xy + x'z + yz = xy + x' z Ans. xy + x'z + yz = xy + x'z + (1)yz = xy + x'z + (x + x')yz = xy + x'z + xyz + x'yz = (xy + xyz) + (x'z + x'yz) = xy(1 + z)+x'z(1 + y) = xy + x'z (MOCK MTA 2012, TMA Spring 2013) Use Boolean identities and Boolean algebra to simplify F to its simplest form. Show your simplification steps clearly x y z + xyz + xy z + x yz + x y z + x yz. Sol. x y z + xyz + xy z + x yz + x y z + x yz =( x y z + x y z) + (x yz + x yz ) + (xyz + xy z) = x y + x y + xz = (x y + x y) + xz = x + xz = x (1+z) + xz = x + x z + xz = x +z (Final Exam 1st Semester 2012/2013) Use Boolean algebra and identities to simplify F to its simplest form. x y z + x y+xy z + x y z+ x yz + y - The equality between two Boolean expressions can also be proved by drawing and comparing their truth tables. - Exercise: prove the following equality by drawing the truth tables of its Boolean Expressions: (x + y)(x + y) = y 6

Complements Quite often, it is cheaper and less complicated to implement the complement of a fuction rather than the function itself To find the compelmet of a Boolean function, we use DeMorgan's Law xx. yy = xx + yy xx = + yy xx. yy The complement of a function F is expressed as F Example1: Find the complement F of the function, Use truth table to prove your solution: F(x,y) = x+y F(x,y) = x.y Sol. F(x, y) = x + y = x y (OR form of the DeMorgans Law) F(x,y) = x. y = x + y (AND form of the DeMorgans Law) Example: Find the complement F of the function F(x,y,z) = x+y+z Solution: F(x, y, z) = x + y + z = (x + y) + z =(x + y) z = (x y )z = x y z So xx + yy + zz = xx yy zz Applying the principle of duality, we see that xyz = xx + yy + zz 7

We can clearly see that to find the complement of a Boolean expression We simply replace each variable by its complement (x is replaced by x) And interchange ANDs and ORs Example: Find the complement of x + yz First Step: Replacing Variable - x is replaced by x - y is replaced by y - zz is replaced by z Second Step: Replacing Operands - The "+" between x and yz is preplaced by "." - The "." between y and z is replaced by "+" The result is : x + yz = x(y + z) Example: Prove that the complement of x + yz is x(x + y) Using truth Table. 8

(MTA 2nd Semester 2012/2013) If F1 is the simplified version of F and F1 = c. (a + b ), what would be the Boolean expression of F1? F1 = F1 = c. (a + b ) = c + a b (MTA 3 2nd Semester 2012/2013) (MTA (Makeup)1st Semester 2013/2014) Consider the following Boolean function: F(a,b,c)=a b c + ab. a. Use DeMorgan s law, other Boolean identities and Boolean algebra to find the complement F of the function F. You should also represent F in its simplest sum of products form. (5 Marks) F(a, b, c) = a b c + ab = a b c. ab = (a + b + c). (a + b) (2 Mark) = aa + ab + ba + bb + ca + cb = 0 + ab + ba + b + ca + cb = b + ca (MTA 1 1st Semester 2013/2014) Consider the following Boolean function: F(a,b,c) = (a +c).(a+b +c) a. Find the complement function F of F. (1 Mark) The student can use the initial F expression or the simplest expression he/she calculated in a. Method 1: F(a, b, c) = (a + c). (a + b + c) = (a + c) + (a + b + c) = ac + a bc No need for further simplifications F(a, b, c) = c + a b = c. (a + b) = ac + bc (FINAL - 2nd Semester 2012/2013) 9

(TMA 2013) Q. Using DeMorgan's Law, write an expression for the complement of F if F(x,y,z) = x(y' + z). Ans. F(x,y,z) = x(y' + z) F'(x,y,z) = (x(y' + z))' = x'+(y' + z)' = x' + yz' Q. Simplify the following functional expressions using Boolean algebra and its identities. List the identity used at each step (xx + yy) (xx + yy ) = (x + y) (x y ) = (x y ) (x y ) = (x y ) (xy) = (x x)(yy ) = (0)(0) = 0 DeMorgan DeMorgan Double Complement Associative Inverse Idempotent (x + y) (x + y ) = (x + y) + (x y ) = (x y ) + (x y ) = x y + xy DeMorgan DeMorgan Double Complement Given the Boolean function: F(x,y,z)=x' y + xyz' a. Derive an algebraic expression for the complement of F. Express in sum-of-products form. a. (x'y + xyz')' = xy' + xz + x'y' + y' + y'z (not simplified) 10

To help eliminate potential confusion, logic canonical, or standardized, form of Boolean functions are used: The sum-of-products The product-of-sums The sum of products: consitst of ANDed variables (or product terms) that Ored together. Example: f(x,y,z) = xy + yz + xyz The product of sums: consist of ORed variables (sum terms) that are ANDed together Example: f(x,y,z) = (x + y)(x + z )(y + z ) Note, We will study Sum of Products Any Boolean expression can be represented in sum-of-products form. Any Boolean expression can also be represented as a truth table So any truth table can also be represented in sum-of-products form How to generate a sum of product expression using truth table For any Boolean expression? 1- Search for the lines where the function outputs a "1" 2- Fir each of these lines, generate a product term of the input variables a. If a (for instance "x") variable is set to 1, take it as it is ("x") b. If a variable (for instance "y") is set to 0, take its complement ("y ") 3- Sum these products. Example: Give the sum of products form of the following truth table: F(x,y,z) = xx yz + xyy z + xyzz + xyz 11

Logic Gates The logical operators, functions and expressions have been represented thus far in an abstract sense What is a Gate? It is a group of physical components, or digital circuits, that perform arithmetic operations or make choices in a computer. A gate is a small, electronic device that computes various functions of two-valued signals (or more) Each gate requires from one to six or more transistors If the basic physical component of a computer is the transistor; the basic logic element is the gate 12

(MTA 2nd Semester 2012/2013) Draw the combinational circuit that directly implements the Boolean expression: F(x,y,z)= xz + (xy + z') Give the Boolean expression of the following logical diagram s output function F(a,b,c). Sol. F = a bc + a bc + c (MTA- 1 st Semester 2013/2014) Draw a logical diagram for the following function: F 1 =abc + (b c ) Hint: Keep F 1 s expression intact. Do NOT simplify. 13

Find the output function F 2 of the following logical diagram. Hint: Copy the logical diagram to your answer sheet and fill the empty boxes. Final 2nd Semester 2012/2013 (FALL 2011 MTA MOCK MTA 2012 - Final Summer 2011) Give the Boolean expression of the following logical diagram s output function. (A + B) (C + D)C 14

Universal Gates The NAND gate is commonly referred to as a universal gate Any electronic circuit can be constructed using only NAND gates (MTA -Fall-2012) Construct an AND gate using only NAND gates. Put labels on your logical circuit to explain how you have obtained the output xy from the inputs x and y. SOL. 15

(Final 1st Semester 2012/2013 ) Consider the function: F(x,y,z) = xyzz. Use only two-inputs gates to draw the logical diagram of F. Draw a second logical diagram that uses only two-inputs NAND gates. (MTA 2nd Semester 2012/2013) Construct the XOR operator using only NAND gates. Hint: x XOR y = ((x ' y)' (xy' )' )' Use only NAND gates to draw the logical diagram of the simplified F= c + b 16

Why not simply use the AND, OR, and NOT gates we already know exist? For two reasons: - NAND gates are cheaper to build than the other gates - complex integrated circuits are often much easier to build using the same building Applying the duality principle, NOR is also a universal gate In practice, NAND are used for implementing an expression in sum ofproducts form In practice, NOR is used for implementing an expression in product-of-sums form Gates could have multiple inputs: Also, sometimes it is useful to depict the output of a gat as Q along with its Complement Q 17

Digital Components Every computer is built using collections of gates that are all connected by way of wires These collections of gates are often quite standard, resulting in a set of building blocks These building blocks are all constructed using the basic AND, OR, and NOT operations. building blocks could be: - Combinational logic - Sequential logic Any Boolean expression can be represented as a Logical Digram Logical Diagram is a combinations of AND, OR, and NOT gates that describes a Boolean expression. Example: F(x,y,z) = x + y z Gates are sold in units called integrated circuits (ICs) First ICs were SSI (small scale integration See Lecture 1) chips and contained very few transistors (up to 100 transistors) We now have ULSI (ultra large-scale integration) with more than 1 million electronic components per chip 18

Combinational circuits - Adder (half adder, full adder, ripple carry adder) - Decoder - Multiplexer Combinational logic is used to build circuits that contain basic Boolean operators, inputs, and outputs. Half Adder A half-adder is a very simple combinational circuit Consider the problem of adding two binary digits together, three cases are possible: 0 + 0 = 0 1 + 0 = 0 + 1 = 1 1 + 1 = 10 (the result is 0 with a carry of 1 ) We have two inputs (the bits to add) and two outputs (the sum and the carry ) Drawing the truth table lead us to the Boolean function of a half-adder Note that each output has a Boolean Function 19

Full Adder A half adder could be extended to a circuit that allows the addition of larger binary numbers: A full adder Remember how we added binary numbers? We add each column without forgetting the carry from the nearest right column A full adder have three inputs: The two bits to add (x and y) The carry from the nearest right column (carry-in) A full adder has two outputs (the sum and the carry ) Think of how this logic diagram is obtained. Note that a full-adder is composed of two half-adders and an OR gate. ripple-carry adder A full-adder can only add two bits and a carry (three bits) The simplest way to add large binary numbers is to use a ripple-carry adder A ripple-carry is a succession of full-adders but it is slow Faster methods are nowadays implemented in computers (40% to 90% faster than the ripplecarry adder) (MOCK MTA- October 2012) Draw the logic diagram of a full adder. 20

Decoder A decoder decodes binary information from a set of n inputs to a maximum of 2 n outputs A decoder uses the inputs and their respective values to select one specific output line For a given input, only one output is set to 1 and all others are set to 0 Example: Chip selection application: Selecting one of several memory chips for a given address in a decoder 21

Multiplexer A multiplexer selects binary information from one of many input lines and directs it to a single output line. Selection of a particular input line is controlled by a set of selection variables or control lines 22

A 4-to-1 multiplexer We have 4=2 2 input lines To select one of the 4 inputs we need 2 selection bits: S 0, S 1 A 8-to-1 multiplexer We have 8=2 3 input lines To select one of the 8 inputs we need 3 selection bits: S 0, S 1, S 2 A 16-to-1 multiplexer? A 64-to-1 multiplexer? 23

Questions: (MTA 1st Semester 2012/2013) a) Copy the following 2-to-4 decoder to your answer sheet with the outputs fulfilled. 1 1 0 2-to-4 1 decoder2-to- 4 decoder 2 3 b) Consider the following 4-to-1 multiplexer. What are the possible values of the control lines S 0 S 1 in binary? 0 0 0 1 0 I 0 1 I 1 4-to-1 1 multiplexer I 2 1 0 I 3 S 1 S 0 S 1 S 0 = 01 or S 1 S 0 = 10 (2x0.5 = 1 Mark) (MTA 1st Semester 2013/2014) 1. List three examples of combinational circuits and define only one of them. Examples: Adder, Decoder, Multiplexer (1.5 Mark) One correct definition is enough (1 Mark) Adder: Used to add binary numbers. Decoder: decodes binary information from a set of n inputs to a maximum of 2 n outputs. Multiplexer: selects binary information from one of many input lines and directs it to a single output line. (MTA 2nd Semester 2012/2013) a) Copy the following 2-to-4 decoder to your answer sheet with the inputs fulfilled. 24

More Questions: a) half adder b) ripple carry adder c) full adder d) None of the above Describe how each of the following circuits works and indicate typical inputs and outputs. Also provide a carefully labeled "black box" diagram for each. a) Decoder b) Multiplexer Ans. a. A decoder takes n inputs and uses those inputs to select exactly one of (typically) 2n outputs. b. A multiplexer uses n control lines to select one of its input lines to route through to the output. 25