Introduction to Boolean logic and Logical Gates

Similar documents
Circuit analysis summary

CS February 17

QUESTION BANK FOR TEST

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

COMP combinational logic 1 Jan. 18, 2016

Standard Forms of Expression. Minterms and Maxterms

Logic Gates and Boolean Algebra ENT263

Bawar Abid Abdalla. Assistant Lecturer Software Engineering Department Koya University

Objectives: 1- Bolean Algebra. Eng. Ayman Metwali

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

Propositional Calculus: Boolean Algebra and Simplification. CS 270: Mathematical Foundations of Computer Science Jeremy Johnson

Gate Level Minimization Map Method

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

Permutation Matrices. Permutation Matrices. Permutation Matrices. Permutation Matrices. Isomorphisms of Graphs. 19 Nov 2015

Computer Organization

Boolean algebra. June 17, Howard Huang 1

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

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.

Propositional Calculus. CS 270: Mathematical Foundations of Computer Science Jeremy Johnson

DSAS Laboratory no 4. Laboratory 4. Logic forms

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

3. According to universal addressing, what is the address of vertex d? 4. According to universal addressing, what is the address of vertex f?

Review: Standard forms of expressions

Simplification of Boolean Functions

60-265: Winter ANSWERS Exercise 4 Combinational Circuit Design

Propositional Calculus. Math Foundations of Computer Science

Binary logic. Dr.Abu-Arqoub

Chapter 2 Boolean algebra and Logic Gates

2.1 Binary Logic and Gates

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

EE292: Fundamentals of ECE

Gate-Level Minimization

Chapter 3. Boolean Algebra and Digital Logic

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

Chapter 2: Combinational Systems

Gate-Level Minimization

Logic Design: Part 2

Computer Engineering Chapter 3 Boolean Algebra

LOGIC CIRCUITS. Kirti P_Didital Design 1

2.6 BOOLEAN FUNCTIONS

Boolean Algebra and Logic Gates

boolean.py Documentation

Computer Organization and Levels of Abstraction

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

Experiment 4 Boolean Functions Implementation

LECTURE 2 An Introduction to Boolean Algebra

2. BOOLEAN ALGEBRA 2.1 INTRODUCTION

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

UNIT 2 BOOLEAN ALGEBRA

Gate Level Minimization

Introduction to Computer Architecture

CDA 3103 Computer Organization Exam 1 (Sep. 22th, 2014)

Unit-IV Boolean Algebra

Experiment 3: Logic Simplification

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

Basic circuit analysis and design. Circuit analysis. Write algebraic expressions or make a truth table

TA: Jade Cheng ICS 241 Recitation Lecture Notes #12 November 13, 2009

Code No: R Set No. 1

GC03 Boolean Algebra

Combinational Circuits Digital Logic (Materials taken primarily from:

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

[Ch 6] Set Theory. 1. Basic Concepts and Definitions. 400 lecture note #4. 1) Basics

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

Chapter 3. Gate-Level Minimization. Outlines

Combinational Logic & Circuits

Boolean Logic CS.352.F12

Combinational Circuits

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

Computer Organization and Levels of Abstraction

LAB #1 BASIC DIGITAL CIRCUIT

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

Lecture (05) Boolean Algebra and Logic Gates

IT 201 Digital System Design Module II Notes

Computer Science. Unit-4: Introduction to Boolean Algebra

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

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

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

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

COMPUTER ARCHITECTURE AND DIGITAL DESIGN

Code No: R Set No. 1

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

1. Mark the correct statement(s)

Chapter 4. Combinational Logic. Dr. Abu-Arqoub

Digital Design. Chapter 4. Principles Of. Simplification of Boolean Functions

Code No: 07A3EC03 Set No. 1

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

S1 Teknik Telekomunikasi Fakultas Teknik Elektro FEH2H3 2016/2017

Digital Logic Lecture 7 Gate Level Minimization

Gate-Level Minimization

Bawar Abid Abdalla. Assistant Lecturer Software Engineering Department Koya University

BOOLEAN ALGEBRA AND CIRCUITS

Lecture #21 March 31, 2004 Introduction to Gates and Circuits

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

Information Science 1

Introduction to Boolean Algebra

Department of Electrical Engineering McGill University ECSE 221 Introduction to Computer Engineering Assignment 2 Combinational Logic

Introduction to Boolean Algebra

Combinational Circuits

Combinatorial Algorithms. Unate Covering Binate Covering Graph Coloring Maximum Clique

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:

Transcription:

Introduction to Boolean logic and Logical Gates Institute of Statistics Fall 2014

We saw the importance of the binary number system for data representation in a computer system. We ll see that the construction of computer circuits is based upon a branch of mathematics called Boolean algebra.

Boolean algebra consists of the set {0, 1} with the operations complement ( ), sum (+), and product ( ). We can rephrase the previous definition as: the set {FALSE, TRUE} with the operations of negation (NOT, ), disjunction (OR, ), and conjunction (AND, ). A Boolean variable is one that assumes one of the two aforementioned possible values.

Let x, y, and z be Boolean variables: The NOT or complement operation is defined as: x x 1 0 0 1 The AND or product is defined as: x y x y 1 1 1 1 0 0 0 1 0 0 0 0

The OR or sum operation is defined as: x y x + y 1 1 1 1 0 1 0 1 1 0 0 0

Boolean expressions take values on {0, 1}. E.g. x + y or z(x + y). As with the definition of the basic operations, Boolean expressions can be represented with a truth table. If a Boolean expression has n variables the table will have 2 n rows and n + 1 columns. The first n columns define the posible values of the variables and the n + 1 column the result for the expression.

Properties of Boolean algebra. Let x, y, and z be Boolean expression. Identity of the sum, x + 0 = x. Identity of the product, x 1 = x. Domination law of the sum, x + 1 = 1. Domination law of the product, x 0 = 0. Conmutativity of the sum, x + y = y + x. Conmutativity of the product, x y = y x. Asociativity of the sum, x + (y + z) = (x + y) + z. Asociativity of the product, x (y z) = (x y) z.

Distributivity of the product with respect of the sum, x (y + z) = x y + x z. Distributivity of the sum with respect of the product, x + (y z) = (x + y) (x + z). De Morgan law of the sum, (x + y) = x y. De Morgan law of the product, (x y) = x + y.

Even more properties: x + x = 1 x x = 0 (x ) = x x + x = x x x = x x + (x y) = x + y x (x + y) = x y

Simplifying Boolean expressions: x + (x y) = (x + x ) (x + y) distributive property of the sum over the product = 1 (x + y) complement of sum = x + y identity of product x (x + y) = (x x ) + (x y) distributive property of product over sum = 0 + (x y) complement of the product = x y identity of the sum

Simplify the following expressions, verify with the truth table. x(x + z) + xz (Answer: x.) Verify the following identities: y + xy + x y = 1 z (y + (x + y)(x + z) + xy) = xz + yz

We know how to construct the truth table for a Boolean expression. But, how to go the other way around. Let F be a Boolean function of n variables x 1,..., x n, a boolean product in which each one of the variables appears once is called miniterm. For a function of three variables (x, y and z) the possible miniterms are: xyz, xyz, xy z, x yz, xy z, x yz, x y z, x y z.

Observe that a boolean function of n variables could have up to 2 n different miniterms. Each term represents a row in the truth table. If the value of the variable is 0 then the complement of the variable appears in the term. If the value of the variable is 1 then the variable itself appears in the term.

Any Boolean function can be written as a sum of miniterms. This way of writing the Boolean function is called the sum of product. To find the sum of products form of a Boolean function from the truth table choose the sum of miniterms for which F = 1.

For example, consider the following truth table for the Boolean function F. x y F miniterm 0 0 1 x y 0 1 0 x y 1 0 1 xy 1 1 1 xy The sum of products is given by the sum of miniterms that correspond to the rows with value 1. F (x, y) = x y + xy + xy.

Let F (x, y, z) = (x + y )z. Determine the sum of products of F. (Answer: F (x, y, z) = xyz + xy z + x y z.)

We can reach the answer using the properties that we already know: F (x, y, z) = (x + y )z = xz + y z = (1)xz + (1)y z = (y + y )xz + (x + x )y z = yxz + y xz + xy z + x y z = yxz + xy z + x y z F (x, y, z) = (x + y )z = xyz + xy z + x y z

We can use a truth table approach: x y z y x + y F miniterm 0 0 0 1 1 0 x y z 0 0 1 1 1 1 x y z 0 1 0 0 0 0 x yz 0 1 1 0 0 0 x yz 1 0 0 1 1 0 xy z 1 0 1 1 1 1 xy z 1 1 0 0 1 0 xyz 1 1 1 0 1 1 xyz F (x, y, z) = xyz + xy z + x y z

The complement of a miniterm is its respective maxiterm. Such complement is obtained using De Morgan laws and it is called the product of sums. To find the product of sums form of a Boolean function from a truth table, we choose the sum of miniterms for which F = 0 and take the complement of the result applying the De Morgan laws.

Let us return to the truth table of the previous example. x y F miniterm 0 0 1 x y 0 1 0 x y 1 0 1 xy 1 1 1 xy We take the complement of the sum of miniterms that correspond to the rows with value 0. applying the De Morgan laws. F (x, y) = (x y) = x + y

Exercise. Consider the following truth table and construct the boolean function: x y F miniterm 0 0 0 0 1 1 1 0 1 1 1 0

Exercise. Consider the following truth table and construct the boolean function: x y F miniterm 0 0 0 x y 0 1 1 xy 1 0 1 x y 1 1 0 xy F (x, y) = xy + x y This function is called the exclusive or (XOR).

Two important boolean operations: NOR means NOT OR, i.e., sum s complement x y = (x + y) = x y NAND means NOT AND, i.e., product s complement. x y = (xy) = x + y

The truth tables for those operations are: x y x y x y 1 1 0 0 1 0 0 1 0 1 0 1 0 0 1 1

All boolean functions can be represented with the operators NOR or NAND. For example: the complement, sum, and product can be expressed with the NOR operator. x = x x xy = (x x) (y y) x + y = (x y) (x y)

Logical gates and logical circuits A gate is an electronic device that operates on a collection of binary inputs and produces a binary output. That is, it maps from the set {0, 1} (or a set of n-tuples {0, 1}... {0, 1}) to {0, 1}. An unary operator has one input and one output. A binary operator has two inputs and one output. We ll discuss the logical gates for the basic operations: OR, AND, NOT.

Logical gates and logical circuits The logical gates are represented graphically as follows: The complement (NOT) A A The sum (OR) A B A+B The product (AND) A B AB

Logical gates and logical circuits NOR A B (A+B) NAND A B (AB)

Logical gates and logical circuits A logical circuit is a combination of two or more logical gates. The gates are combined by using the output of a gate as the input of another. For example: A B AB AB+AC C AC

Logical circuits: Example Design a logica circuit for the function: F (x, y, z) = x(y + z )

Logical circuits: Example A light bulb is controlled by two electrical switches. The light bulb will turn on when both switches are on. Any other combination will turn off the light bulb. If the light bulb is on, it can be turned off by turning off any switch. Design a circuit that implements how the light bulb functions.

Logical circuits: Example Let x and y be the variables that represent the switches and let F (x, y) represent the state of the light bulb. Assign 1 to the state when the switch is on, and 0 to state when the state is off. Observe that the light bulb is on when both switches are on.

Logical circuits: Example We construct a truth table to obtain the function. x y F (x, y) 1 1 1 1 0 0 0 1 0 0 0 0 By writing the sum of products we obtain the function F (x, y) = xy The circuits that implements the light bulb s function is: A B AB

Logical circuits: Example In amateur boxing to assign points to the boxers the following method is used: Three judges assign points. Each judge press a button when he/she see that one boxer lands a punch in the other. To assign a point to the boxer at leasr two of the three judges have to press the button simultaneously. That is, a boxer receives a point when the majority of the judges agree that the boxer hits the adversary. Design a circuit to solve this problem.

Logical circuits: Example Let x, y, and z be the values that assign each judge in a given moment and F (x, y, z) be the result whether a point is given to a boxer. The truth table is x y z F (x, y, z) 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 1 1 0 0 0 1 0 1 1 1 1 0 1 1 1 1 1

Circuitos lógicos: Ejemplo Writing the sum of products functions F (x, y, z) = x yz + xy z + xyz + xyz = (x y + xy + xy)z + xyz = (x y + x(y + y))z + xyz = (x y + x)z + xyz