Boolean Algebra & Digital Logic

Similar documents
Implementation of Boolean Logic by Digital Circuits

Chapter 2: Switching Algebra and Logic Circuits

Combinational Logic Design Principles

Boolean Algebra and Digital Logic

Computer Organization: Boolean Logic

Building a Computer Adder

Switches: basic element of physical implementations

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

4 Switching Algebra 4.1 Axioms; Signals and Switching Algebra

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

CS 226: Digital Logic Design

EEE130 Digital Electronics I Lecture #4

Chapter 2. Boolean Algebra and Logic Gates

Logic Design. Chapter 2: Introduction to Logic Circuits

2009 Spring CS211 Digital Systems & Lab CHAPTER 2: INTRODUCTION TO LOGIC CIRCUITS

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

20. Combinational Circuits

Binary addition example worked out

Digital Logic (2) Boolean Algebra

CS61c: Representations of Combinational Logic Circuits

DIGITAL CIRCUIT LOGIC BOOLEAN ALGEBRA

Computer Science. 20. Combinational Circuits. Computer Science COMPUTER SCIENCE. Section

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

XI STANDARD [ COMPUTER SCIENCE ] 5 MARKS STUDY MATERIAL.

Number System conversions

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

Computer Science. 19. Combinational Circuits. Computer Science COMPUTER SCIENCE. Section 6.1.

CSE 20 DISCRETE MATH. Fall

Chapter 2 Combinational Logic Circuits

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

UC Berkeley College of Engineering, EECS Department CS61C: Representations of Combinational Logic Circuits

Combinational Logic. Review of Combinational Logic 1

Digital Circuit And Logic Design I. Lecture 3

IST 4 Information and Logic

Chapter 2: Boolean Algebra and Logic Gates

2. Associative Law: A binary operator * on a set S is said to be associated whenever (A*B)*C = A*(B*C) for all A,B,C S.

Boolean Algebra and Logic Gates

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

Applications. Smartphone, tablet, game controller, antilock brakes, microprocessor, Wires

Experiment 7: Magnitude comparators

Digital electronic systems are designed to process voltage signals which change quickly between two levels. Low time.

Intro To Digital Logic

Combinational Logic. By : Ali Mustafa

Fundamentals of Digital Design

COSC 243. Introduction to Logic And Combinatorial Logic. Lecture 4 - Introduction to Logic and Combinatorial Logic. COSC 243 (Computer Architecture)

BOOLEAN ALGEBRA. Introduction. 1854: Logical algebra was published by George Boole known today as Boolean Algebra

Contents. Chapter 2 Digital Circuits Page 1 of 30

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

Chapter 2 Combinational Logic Circuits

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

EGC221: Digital Logic Lab

Binary Logic and Gates

Chapter-2 BOOLEAN ALGEBRA

Carry Look Ahead Adders

S C F F F T T F T T S C B F F F F F T F T F F T T T F F T F T T T F T T T

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

WEEK 2.1 BOOLEAN ALGEBRA

Note: The area of logic that deals with propositions is called the propositional calculus or propositional logic.

Digital Systems and Information Part II

Systems I: Computer Organization and Architecture

DIGITAL CIRCUIT LOGIC BOOLEAN ALGEBRA (CONT.)

Function of Combinational Logic ENT263

Boolean Algebra and Digital Logic 2009, University of Colombo School of Computing

Unit 2 Boolean Algebra

Total Time = 90 Minutes, Total Marks = 50. Total /50 /10 /18

CprE 281: Digital Logic

Appendix A: Digital Logic. Principles of Computer Architecture. Principles of Computer Architecture by M. Murdocca and V. Heuring

Week-I. Combinational Logic & Circuits

CS/COE0447: Computer Organization and Assembly Language

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

Chapter 2 Combinational Logic Circuits

THE LOGIC OF COMPOUND STATEMENTS

Unit 8A Computer Organization. Boolean Logic and Gates

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

ELE2120 Digital Circuits and Systems. Tutorial Note 9

Administrative Notes. Chapter 2 <9>

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

DIGITAL CIRCUIT LOGIC BOOLEAN ALGEBRA

Cs302 Quiz for MID TERM Exam Solved

Ch 2. Combinational Logic. II - Combinational Logic Contemporary Logic Design 1

Chapter 2 Boolean Algebra and Logic Gates

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

CSC9R6 Computer Design. Practical Digital Logic

MC9211 Computer Organization

Logic Simplification. Boolean Simplification Example. Applying Boolean Identities F = A B C + A B C + A BC + ABC. Karnaugh Maps 2/10/2009 COMP370 1

ELCT201: DIGITAL LOGIC DESIGN

Combinational Logic Fundamentals

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

Boolean Algebra & Logic Gates. By : Ali Mustafa

3 Boolean Algebra 3.1 BOOLEAN ALGEBRA

INTRODUCTION TO INFORMATION & COMMUNICATION TECHNOLOGY LECTURE 8 : WEEK 8 CSC-110-T

Chapter 2 Boolean Algebra and Logic Gates

Review for Test 1 : Ch1 5

Introduction to Quantum Computation

KP/Worksheets: Propositional Logic, Boolean Algebra and Computer Hardware Page 1 of 8

CprE 281: Digital Logic

Fundamentals of Computer Systems

Chapter 2 Combinational Logic Circuits

Logic Synthesis and Verification

BOOLEAN ALGEBRA INTRODUCTION SUBSETS

Transcription:

Boolean Algebra & Digital Logic Boolean algebra was developed by the Englishman George Boole, who published the basic principles in the 1854 treatise An Investigation of the Laws of Thought on Which to Found the Mathematical Theories of Logic and Probabilities. The applicability to computing machines was discovered by three Americans Claude Shannon Symbolic Analysis of Relay and Switching Circuits, 1938. George Stibitz John Atanasoff An employee of Bell Labs, he developed a binary adder using mechanical relays in 1937, the model K 1 adder because he built it at home on his kitchen table. He was probably the first to use purely electronic relays (vacuum tubes) to build a binary adder. Boolean algebra is a two valued algebra based on the constant values denoted as either FALSE, TRUE 0, 1 The use of this algebra for computation is based on the fact that binary arithmetic is based on two values, always called 0 and 1.

Basic Boolean Operators Boolean algebra is defined in terms of two constants (defined above), which we call 0 and 1. Other courses will call these values F and T. Boolean algebra is defined in terms of three basic operators, to which we shall add a useful fourth operator. The three operators are NOT, AND, & OR. Each of these three basic operators is implemented by a basic electronic device called a logic gate. We present the gates along with the definition. NOT This function takes one input and produces one output. The gate is shown below. The circle at the right end of the triangle is important. Algebraically, this function is denoted f(x) = X or f(x) = X The evaluation of the function is simple: 0= 1 and 1 = 0.

Basic Boolean Operators (Part 2) Logic OR This is a function of two Boolean variables. We denote the logical OR of two Boolean variables X and Y by X + Y. Some logic books will use X Y. The evaluation of the logical OR function is shown by a truth table X Y X + Y 0 0 0 0 1 1 1 0 1 1 1 1

Basic Boolean Operators (Part 3) Logic AND This is a function of two Boolean variables. We denote the logical AND of two Boolean variables X and Y by X Y. Some logic books will use X Y. The evaluation of the logical AND function is shown by a truth table X Y X Y 0 0 0 0 1 0 1 0 0 1 1 1

Another Boolean Operator While not a basic Boolean operator, the exclusive OR is very handy. Logic XOR This is a function of two Boolean variables. We denote the logical XOR of two Boolean variables X and Y by X Y. Most logic books seem to ignore this function. The evaluation of the logical XOR function is shown by a truth table X Y X Y 0 0 0 0 1 1 1 0 1 1 1 0 From this last table, we see immediately that X 0 = X and X 1 = X

Truth Tables The fact that any Boolean variable can assume only one of two possibly values can be shown, by induction, to imply the following. For N > 0, N Boolean variables can take only 2 N different combinations of values. For small values of N, we can use this to specify a function using a truth table with 2 N rows, plus a header row to label the variables and the function. N 1 2 2 4 3 8 4 16 5 32 6 64 Four variable truth tables have 17 rows total. This is just manageable. Five variable truth tables have 33 rows total. This is excessive. N variable truth tables, for N > 5, are almost useless. 2 N

Sample Truth Table A B C F1(A, B, C) 0 0 0 0 0 0 1 1 0 1 0 1 0 1 1 0 1 0 0 1 1 0 1 0 1 1 0 0 1 1 1 1 This truth table for 3 variables has 2 3 = 8 rows, plus a label row. This truth table forms a complete definition of the function. We shall later give it another name, but can base all our discussions on this table.

Another Sample Truth Table A B C F2(A, B, C) 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

Two Truth Tables in One A B C F1(A, B, C) F2(A, B, C) 0 0 0 0 0 0 0 1 1 0 0 1 0 1 0 0 1 1 0 1 1 0 0 1 0 1 0 1 0 1 1 1 0 0 1 1 1 1 1 1 Truth tables are often used to show pairs of functions, such as these two, which will later be shown to be related. This is easier than two complete tables. Truth tables rarely show more than two functions, just because large truth tables are messy and hard to read.

Labeling Rows in a Truth Table The row numbers are just labels. They are not really a part of the truth table, but aid in our discussions and conversions to Boolean expressions. The row numbers are the decimal equivalents of the variable values viewed as binary Row Number X Y Z F(X, Y, Z) 0 0 0 0 1 1 0 0 1 1 2 0 1 0 0 3 0 1 1 1 4 1 0 0 1 5 1 0 1 0 6 1 1 0 1 7 1 1 1 1 numbers. The first row is always row 0. 0 = 0 4 + 0 2 + 0 1 1 = 0 4 + 0 2 + 1 1 2 = 0 4 + 1 2 + 0 1 3 = 0 4 + 1 2 + 1 1 4 = 1 4 + 0 2 + 0 1 5 = 1 4 + 0 2 + 1 1 6 = 1 4 + 1 2 + 0 1 7 = 1 4 + 1 2 + 1 1

The and Notations These can be viewed as shorthand notation for expressing truth tables. notation: Give the row numbers in which the function has value 1. notation: Give the row numbers in which the function has value 0. Example: The Exclusive OR (XOR) function Row Number X Y X Y 0 0 0 0 1 0 1 1 2 1 0 1 3 1 1 0 X Y = ( 1, 2 ) X Y = ( 0, 3 ) Exercise: Answer: Convert F(X, Y, Z) = ( 0, 2, 4, 6 ) to the notation. The function has three variables, so the truth table has 2 3 = 8 rows, numbered 0 through 7. If rows 0, 2, 4, and 6 have ones, then the rows containing zeroes must be 1, 3, 5, and 7. F(X, Y, Z) = ( 1, 3, 5, 7 ).

Examples: F1 and F2 Consider the two functions (F1 and F2), which we shall explain later. Row A B C F1(A, B, C) F2(A, B, C) 0 0 0 0 0 0 1 0 0 1 1 0 2 0 1 0 1 0 3 0 1 1 0 1 4 1 0 0 1 0 5 1 0 1 0 1 6 1 1 0 0 1 7 1 1 1 1 1 F1(X, Y, Z) = ( 1, 2, 4, 7 ) = ( 0, 3, 5, 6 ) F2(X, Y, Z) = ( 3, 5, 6, 7 ) = ( 0, 1, 2, 4 )

The relative precedence of the operators is: 1) NOT do this first 2) AND 3) OR do this last Evaluation of Boolean Expressions As in the usual algebra, parentheses take precedence. A B + C D, often written as AB + CD, is read as (A B) + (C D) A B C D is read as A B C D A B + C D = 1 0 + 1 1 = 0 + 1 = 1 A (B + C) D = 1 (0 + 1) 1 = 1 1 1 = 1 A B C D = 1 0 1 1 A B = 1 0 = 0 = 1 A B = 1 0 = 0 1 = 0. The latter is really messy. = 0 0 + 1 0 = 0 + 0 = 0

The Basic Unusual Boolean Theorem Here are two sets of theorems in Boolean algebra. For all X 0 X = 0 OK For all X 1 X = X OK For all X 0 + X = X OK For all X 1 + X = 1 What? Consider the following truth tables W X W + X 0 0 0 0 1 1 1 0 1 1 1 1 From this, we derive the truth table proving the last two theorems. X 0 + X 1 + X 0 0 1 1 1 1

The Principle of Duality If a statement in Boolean algebra is true, so is its dual. To take the dual of an expression do the following: change all logical AND to logical OR and all logical OR to logical AND change all 0 to 1 and 1 to 0. Postulate Dual 0 X = 0 1 + X = 1 1 X = X 0 + X = X 0 + X = X 1 X = X 1 + X = 1 0 X = 0 An Unexpected Pair: Two distributive laws, each the dual of the other. For all Boolean values of Boolean variables A, B, C: A (B + C) = A B + A C For all Boolean values of Boolean variables A, B, C: A + B C = (A + B) (A + C) If A = 1, the statement becomes 1 + B C = (1 + B) (1 + C), or 1 = 1 1. If A = 0, the statement becomes 0 + B C = (0 + B) (0 + C), or B C = B C.