. T SHREE MAHAPRABHU PUBLIC SCHOOL & COLLEGE NOTES FOR BOARD EXAMINATION SUBJECT COMPUTER SCIENCE (Code: 083) Boolean Algebra

Similar documents
Boolean algebra. Examples of these individual laws of Boolean, rules and theorems for Boolean algebra are given in the following table.

Digital Logic (2) Boolean Algebra

4 Switching Algebra 4.1 Axioms; Signals and Switching Algebra

Chapter 2: Switching Algebra and Logic Circuits

Logic Design. Chapter 2: Introduction to Logic Circuits

Binary Logic and Gates. Our objective is to learn how to design digital circuits.

EEE130 Digital Electronics I Lecture #4

Binary Logic and Gates

CHAPTER1: Digital Logic Circuits Combination Circuits

BOOLEAN LOGIC. By- Neha Tyagi PGT CS KV 5 Jaipur II Shift, Jaipur Region. Based on CBSE curriculum Class 11. Neha Tyagi, KV 5 Jaipur II Shift

Chapter 2 (Lect 2) Canonical and Standard Forms. Standard Form. Other Logic Operators Logic Gates. Sum of Minterms Product of Maxterms

Chapter 2. Boolean Algebra and Logic Gates

EECS150 - Digital Design Lecture 4 - Boolean Algebra I (Representations of Combinational Logic Circuits)

BOOLEAN ALGEBRA THEOREMS

Outline. EECS150 - Digital Design Lecture 4 - Boolean Algebra I (Representations of Combinational Logic Circuits) Combinational Logic (CL) Defined

DIGITAL CIRCUIT LOGIC BOOLEAN ALGEBRA

Combinational Logic Design Principles

E&CE 223 Digital Circuits & Systems. Lecture Transparencies (Boolean Algebra & Logic Gates) M. Sachdev

Logic Gate Level. Part 2

CS 121 Digital Logic Design. Chapter 2. Teacher Assistant. Hanin Abdulrahman

Combinational Logic. Review of Combinational Logic 1

Switches: basic element of physical implementations

Lecture 3: Boolean Algebra

Chapter 2 Combinational Logic Circuits

Gates and Flip-Flops

Chapter 2 Combinational Logic Circuits

Boolean Algebra. The Building Blocks of Digital Logic Design. Section. Section Overview. Binary Operations and Their Representation.

UNIVERSITI TENAGA NASIONAL. College of Information Technology

School of Computer Science and Electrical Engineering 28/05/01. Digital Circuits. Lecture 14. ENG1030 Electrical Physics and Electronics

E&CE 223 Digital Circuits & Systems. Lecture Transparencies (Boolean Algebra & Logic Gates) M. Sachdev. Section 2: Boolean Algebra & Logic Gates

Chapter 2: Princess Sumaya Univ. Computer Engineering Dept.

XOR - XNOR Gates. The graphic symbol and truth table of XOR gate is shown in the figure.

Chapter-2 BOOLEAN ALGEBRA

Digital Circuit And Logic Design I. Lecture 3

Review: Additional Boolean operations

University of Technology

control in out in out Figure 1. Binary switch: (a) opened or off; (b) closed or on.

Prof.Manoj Kavedia 2 Algebra

Learning Objectives. Boolean Algebra. In this chapter you will learn about:

Every time has a value associated with it, not just some times. A variable can take on any value within a range

Implementation of Boolean Logic by Digital Circuits

Week-I. Combinational Logic & Circuits

Chapter 2 Boolean Algebra and Logic Gates

In Module 3, we have learned about Exclusive OR (XOR) gate. Boolean Expression AB + A B = Y also A B = Y. Logic Gate. Truth table

Chapter 2: Boolean Algebra and Logic Gates

DIGITAL CIRCUIT LOGIC BOOLEAN ALGEBRA

MC9211 Computer Organization

Contents. Chapter 2 Digital Circuits Page 1 of 30

BOOLEAN ALGEBRA INTRODUCTION SUBSETS

XI STANDARD [ COMPUTER SCIENCE ] 5 MARKS STUDY MATERIAL.

CSE20: Discrete Mathematics for Computer Science. Lecture Unit 2: Boolan Functions, Logic Circuits, and Implication

WEEK 2.1 BOOLEAN ALGEBRA

Unit 4: Computer as a logic machine

Boolean Algebra CHAPTER 15

COS 140: Foundations of Computer Science

CS 226: Digital Logic Design

Boolean Algebra and Logic Gates

Lecture 2. Logic Compound Statements Conditional Statements Valid & Invalid Arguments Digital Logic Circuits. Reading (Epp s textbook)

Unit 2 Boolean Algebra

Digital Logic. Lecture 5 - Chapter 2. Outline. Other Logic Gates and their uses. Other Logic Operations. CS 2420 Husain Gholoom - lecturer Page 1

Functions. Computers take inputs and produce outputs, just like functions in math! Mathematical functions can be expressed in two ways:

Boolean Algebra & Logic Gates. By : Ali Mustafa

Boolean Algebra and Digital Logic

Unit 2 Boolean Algebra

Number System. Decimal to binary Binary to Decimal Binary to octal Binary to hexadecimal Hexadecimal to binary Octal to binary

Computer organization

Ex: Boolean expression for majority function F = A'BC + AB'C + ABC ' + ABC.

EEA051 - Digital Logic 數位邏輯 吳俊興高雄大學資訊工程學系. September 2004

1. Name the person who developed Boolean algebra

Computer Organization: Boolean Logic

Number System conversions

Boolean Algebra and Logic Gates Chapter 2. Topics. Boolean Algebra 9/21/10. EECE 256 Dr. Sidney Fels Steven Oldridge

Chapter 2 Boolean Algebra and Logic Gates

Logic Gates and Boolean Algebra

Theorem/Law/Axioms Over (.) Over (+)

Additional Gates COE 202. Digital Logic Design. Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals

of Digital Electronics

CHAPTER 3 LOGIC GATES & BOOLEAN ALGEBRA

Boolean Algebra. Boolean Variables, Functions. NOT operation. AND operation. AND operation (cont). OR operation

CHAPTER 2 BOOLEAN ALGEBRA

ELCT201: DIGITAL LOGIC DESIGN

Discrete Mathematics. CS204: Spring, Jong C. Park Computer Science Department KAIST

10/14/2009. Reading: Hambley Chapters

Digital electronics form a class of circuitry where the ability of the electronics to process data is the primary focus.

Digital Techniques. Figure 1: Block diagram of digital computer. Processor or Arithmetic logic unit ALU. Control Unit. Storage or memory unit

Boolean Algebra, Gates and Circuits

Boolean Algebra & Digital Logic

Digital Logic Design ABC. Representing Logic Operations. Dr. Kenneth Wong. Determining output level from a diagram. Laws of Boolean Algebra

Logic and Boolean algebra

BOOLEAN ALGEBRA TRUTH TABLE

LOGIC GATES. Basic Experiment and Design of Electronics. Ho Kyung Kim, Ph.D.

Binary addition example worked out

Set Theory Basics of Set Theory. mjarrar Watch this lecture and download the slides

II. COMBINATIONAL LOGIC DESIGN. - algebra defined on a set of 2 elements, {0, 1}, with binary operators multiply (AND), add (OR), and invert (NOT):

Chapter 2 Combinational Logic Circuits

Combinational Logic Fundamentals

Chapter 3 Combinational Logic Design

EECS150 - Digital Design Lecture 19 - Combinational Logic Circuits : A Deep Dive

CHAPTER III BOOLEAN ALGEBRA

Chapter 2. Digital Logic Basics

Transcription:

. T SHREE MAHAPRABHU PUBLIC SCHOOL & COLLEGE NOTES FOR BOARD EXAMINATION 2016-17 SUBJECT COMPUTER SCIENCE (Code: 083) Boolean Algebra Introduction to Boolean Algebra Boolean algebra which deals with two-valued (true / false or 1 and 0) variables and functions find its use in modern digital computers since they too use two-level systems called binary systems. Let us examine the following statement:"i will buy a car If I get a salary increase or I win the lottery." This statement explains the fact that the proposition "buy a car" depends on two other propositions "get a salary increase" and "win the lottery". Any of these propositions can be either true or false hence the table of all possible situations: Salary Increase Win Lottery Buy a car = Salary Increase or Win Lottery False False False False True True True False True True True True The mathematician George Boole, hence the name Boolean algebra, used 1 for true, 0 for false and + for the or connective to write simpler tables. Let X = "get a salary increase", Y = "win the lottery" and F = "buy a car". The above table can be written in much simpler form as shown below and it defines the OR function. X Y F = X + Y

0 0 0 0 1 1 1 0 1 1 1 1 Let us now examine the following statement:"i will be able to read e-books online if I buy a computer and get an internet connection." The proposition "read e-books" depends on two other propositions "buy a computer" and "get an internet connection". Again using 1 for True, 0 for False, F = "read e- books", X = "buy a computer", Y = "get an internet connection" and use. for the connective and, we can write all possible situations using Boolean algebra as shown below. The above table can be written in much simpler form as shown below and it defines the AND function. X Y F = X. Y 0 0 0 0 1 0 1 0 0 1 1 1 We have so far defined two operators: OR written as + and AND written.. The third operator in Boolean algebra is the NOT operator which inverts the input. Whose table is given below where NOT X is written as X'. X NOT X = X' 0 1 1 0 The 3 operators are the basic operators used in Boolean

algebra and from which more complicated Boolean expressions may be written. Example: F = X. (Y + Z) Truth Tables Truth tables are a means of representing the results of a logic function using a table. They are constructed by defining all possible combinations of the inputs to a function, and then calculating the output for each combination in turn. For the three functions we have just defined, the truth tables are as follows. AND X Y F(X,Y) 0 0 0 0 1 0 1 0 0 1 1 1 OR X Y F(X,Y) 0 0 0 0 1 1 1 0 1 1 1 1 NOT X F(X) 0 1 1 0 Truth tables may contain as many input variables as desired

F(X,Y,Z) = X.Y + Z X Y Z F(X,Y,Z) 0 0 0 0 0 0 1 1 0 1 0 0 0 1 1 1 1 0 0 0 1 0 1 1 1 1 0 1 1 1 1 1 Different Properties or Laws of Boolean Algebra A "property" or a "law," describes how differing variables relate to each other in a system of numbers. Commutative Property It applies equally to addition and multiplication. In essence, the commutative property tells us we can reverse the order of variables that are either added together or multiplied together without changing the truth of the expression.

Associative Property This property tells us we can associate groups of added or multiplied variables together with parentheses without altering the truth of the equations.

Distributive Property Distributive Property, illustrating how to expand a Boolean expression formed by the product of a sum, and in reverse shows us how terms may be factored out of Boolean sums-ofproducts.

To summarize, here are the three basic properties: commutative, associative, and distributive. Identities In mathematics, an identity is a statement true for all possible values of its variable or variables. The algebraic identity of x + 0 = x tells us that anything (x) added to zero equals the original "anything," no matter what value that "anything" (x) may be. Boolean algebra has its own unique identities based on the bivalent states of Boolean variables. Inverse Another identity having to do with complementation is that of the double complement: a variable inverted twice. Complementing a variable twice (or any even number of times) results in the original Boolean value. This is analogous to negating (multiplying by -1) in real-number algebra: an even number of negations cancel to leave the original value.

Duality Principle In Boolean algebras the duality Principle can be is obtained by interchanging AND and OR operators and replacing 0's by 1's and 1's by 0's. Compare the identities on the left side with the identities on the right. Example X.Y+Z' = (X'+Y').Z Indempotent Law An input AND ed with itself or OR ed with itself is equal to that input. 1. A + A = A, A variable OR'ed with itself is always equal to the variable. 2. A. A = A, A variable AND'ed with itself is always equal to the variable. Involution Law: A =A When A=0, A =1, A =1 =0=A When A=1, A =0, A =0 =1=A Thus A =A Absorption Law: (i) A+AB=A LHS=A+AB=A.1+A.B=A(1+B)+A(B+1)=A.1=A=RHS (ii) A.(A+B)=A

LHS=A.)A+B)=A.A+A.B=A+A.B=A+A.B=A(1+B)=A.1=A=RHS Complementary Law A term ANDed with its complement equals 0, and a term ORed with its complement equals 1 AA' = 0 A+A' = 1 De Morgan s Theorem De Morgan was a great logician and Mathematician, as well as a friend of Charles Boole. The theorems given by De Morgan are associated with Boolean algebra. First Theorem: The complement of a sum equals to the product of the complements. (A+B) =A.B Proof: LHS= (A+B) = (0+0) = 0 =1 RHS=A.B =0.0 =1.1=1 Second Theorem: The complement of a product equals the sum of the complements. Proof: LHS = (A.B) = (0.0) = 0 = 1 RHS = A + B = 0 + 0 =1 +1 =1 Logical Gates Logical Gates A logic gate is an elementary building block of a digital circuit. Most logic gates have two inputs and one output. At any given moment, every terminal is in one of the two binary conditions low (0) or high (1), represented by different voltage levels. The logic state of a terminal can, and generally does, change often, as the circuit processes data. In most logic gates, the low state is approximately zero volts (0 V), while the high state is approximately five volts positive (+5 V).

There are seven basic logic gates: AND, OR, XOR, NOT, NAND, NOR, and XNOR. The AND gate is so named because, if 0 is called "false" and 1 is called "true," the gate acts in the same way as the logical "and" operator. The following illustration and table show the circuit symbol and logic combinations for an AND gate. (In the symbol, the input terminals are at left and the output terminal is at right.) The output is "true" when both inputs are "true." Otherwise, the output is "false." AND gate Input 1 Input 2 Output 1 1 1 1 The OR gate gets its name from the fact that it behaves after the fashion of the logical inclusive "or." The output is "true" if either or both of the inputs are "true." If both inputs are "false," then the output is "false." OR gate Input 1 Input 2 Output 1 1 1 1

1 1 The XOR ( exclusive-or ) gate acts in the same way as the logical "either/or." The output is "true" if either, but not both, of the inputs are "true." The output is "false" if both inputs are "false" or if both inputs are "true." Another way of looking at this circuit is to observe that the output is 1 if the inputs are different, but 0 if the inputs are the same. XOR gate Input 1 Input 2 Output 1 1 1 1 1 1 A logical inverter, sometimes called a NOT gate to differentiate it from other types of electronic inverter devices, has only one input. It reverses the logic state. Inverter or NOT gate Input Output 1 The NAND gate operates as an AND gate followed by a NOT gate. It acts in the manner of the logical operation "and" followed by negation. The output is "false" if both inputs are "true." Otherwise, the output is "true." 1

NAND gate Input 1 Input 2 Output 1 1 1 1 1 1 1 The NOR gate is a combination OR gate followed by an inverter. Its output is "true" if both inputs are "false." Otherwise, the output is "false." NOR gate Input 1 Input 2 Output 1 1 1 1 The XNOR (exclusive-nor) gate is a combination XOR gate followed by an inverter. Its output is "true" if the inputs are the same, and"false" if the inputs are different. 1 XNOR gate

Input 1 1 Input 2 1 Output 1 1 1 1 Using combinations of logic gates, complex operations can be performed. In theory, there is no limit to the number of gates that can be arrayed together in a single device. But in practice, there is a limit to the number of gates that can be packed into a given physical space. Arrays of logic gates are found in digital integrated circuits (ICs). As IC technology advances, the required physical volume for each individual logic gate decreases and digital devices of the same or smaller size become capable of performing ever-morecomplicated operations at ever-increasing speeds. Logic Circuits, Boolean Algebra, and Truth Tables Logic Representation There are three common ways in which to represent logic. 1. Truth Tables 2. Logic Circuit Diagram 3. Boolean Expression We will discuss each herein and demonstrate ways to convert between them. Truth Tables A truth table is a chart of 1s and 0s arranged to indicate the results (or outputs) of all possible inputs. The list of all possible inputs are arranged in columns on the left and the resulting outputs are listed in columns on the right. There are 2 to the power n possible states (or combination of inputs). For example with three inputs there are 2^3=8 possible combination of inputs.

Logic Diagram A logic diagram uses the pictoral description of logic gates in combination to represent a logic expression. An example below shows a logic diagram with three inputs (A, B, and C) and one output (Y). The interpretation of this will become clear in the following sections. Boolean Expression Boolean Algebra can be used to write a logic expression in equation form. There are a few symbols that you ll recognize but need to redefine. Note: Sometimes when the! is used to represent the NOT it is used before the letter and sometimes it is used after the letter. Care should be used so that you understand which method is being used! Below is an example boolean expression. In fact, it represents the same logic as the example logic circuit diagram above.

Converting from a Logic Circuit Diagram to a Truth Table This conversion is accomplished by selecting each state (or combination of inputs) one at a time, replacing the inputs with their respective values and figuring the value of each point through the circuit until the output is reached. The final output value for each state is then listed in the truth table next to the value of each input. Below is a logic circuit diagram with the input values. Study it carefully for an extended period of time, it is an animated image and the inputs and output will change every few seconds. Below are the results of the conversion in truth table form Converting Logic Circuit Diagrams to Boolean Expressions To convert from a logic circuit diagram to a boolean expression we start by listing our inputs at the correct place and process the inputs through the gates, one gate at a time, writing the result at each gate s output. The following is the resulting boolean expression of each of the gates.

And here is an example of the process being carried out. The fact that the result simplifies to the XOR is merely coincidental. Converting Truth Tables to Boolean Expressions There are two methods for converting truth tables to boolean expressions. The Sum of Products The Product of Sums

Converting Boolean Expressions to Logic Diagrams Converting boolean expressions to logic diagrams is the most challenging conversion on this page because it requires a very good understanding of order of operation. Below is the order of operations used in this conversion. Converting a Truth Table to a Logic Diagram The easiest way to accomplish this is to first convert the truth table to a boolean expression and then to a logic diagram. Application of Boolean Logic Applications of Boolean

Logic