LECTURE 2 An Introduction to Boolean Algebra

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

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

Propositional Calculus. Math Foundations of Computer Science

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

Algebra of Sets. Aditya Ghosh. April 6, 2018 It is recommended that while reading it, sit with a pen and a paper.

2.2 Set Operations. Introduction DEFINITION 1. EXAMPLE 1 The union of the sets {1, 3, 5} and {1, 2, 3} is the set {1, 2, 3, 5}; that is, EXAMPLE 2

Introduction to Computer Architecture

Experiment 4 Boolean Functions Implementation

To prove something about all Boolean expressions, we will need the following induction principle: Axiom 7.1 (Induction over Boolean expressions):

IT 201 Digital System Design Module II Notes

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

(Refer Slide Time 3:31)

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

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

Introduction to Boolean logic and Logical Gates

Bawar Abid Abdalla. Assistant Lecturer Software Engineering Department Koya University

Cambridge International AS & A Level Computer Science

To prove something about all Boolean expressions, we will need the following induction principle: Axiom 7.1 (Induction over Boolean expressions):

COMP combinational logic 1 Jan. 18, 2016

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

Introduction to Boolean Algebra

Introduction to Boolean Algebra

Computer Science. Unit-4: Introduction to Boolean Algebra

Sets 1. The things in a set are called the elements of it. If x is an element of the set S, we say

BOOLEAN ALGEBRA AND CIRCUITS

Mathematical Logic Prof. Arindama Singh Department of Mathematics Indian Institute of Technology, Madras. Lecture - 9 Normal Forms

Boolean Algebra A B A AND B = A*B A B A OR B = A+B

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

Circuit analysis summary

Computer Engineering Chapter 3 Boolean Algebra

CS February 17

Project 2: How Parentheses and the Order of Operations Impose Structure on Expressions

Intermediate Algebra. Gregg Waterman Oregon Institute of Technology

2. BOOLEAN ALGEBRA 2.1 INTRODUCTION

(Refer Slide Time 6:48)

CSC Discrete Math I, Spring Sets

Introduction to Programming in C Department of Computer Science and Engineering. Lecture No. #06 Loops: Operators

Prepared by Sa diyya Hendrickson. Package Summary

Program Verification & Testing; Review of Propositional Logic

Unit-IV Boolean Algebra

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

Digital Logic Lecture 7 Gate Level Minimization

Boolean algebra. June 17, Howard Huang 1

Interpretations and Models. Chapter Axiomatic Systems and Incidence Geometry

4. Write a sum-of-products representation of the following circuit. Y = (A + B + C) (A + B + C)

Notes. Notes. Introduction. Notes. Propositional Functions. Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry.

Combinatorial Optimization

Sets. Mukulika Ghosh. Fall Based on slides by Dr. Hyunyoung Lee

QUESTION BANK FOR TEST

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

for all x, the assertion P(x) is false. there exists x, for which the assertion P(x) is true.

ELCT201: DIGITAL LOGIC DESIGN

Formal Methods of Software Design, Eric Hehner, segment 1 page 1 out of 5

Starting Boolean Algebra

CS470: Computer Architecture. AMD Quad Core

Math 302 Introduction to Proofs via Number Theory. Robert Jewett (with small modifications by B. Ćurgus)

Chapter 2 Boolean algebra and Logic Gates

X Y Z F=X+Y+Z

Objectives: 1- Bolean Algebra. Eng. Ayman Metwali

Chapter 3. Set Theory. 3.1 What is a Set?

Propositional Calculus. Math Foundations of Computer Science

Mathematical Logic Part One

Characterization of Boolean Topological Logics

AXIOMS FOR THE INTEGERS

2.1 Binary Logic and Gates

ENGIN 112 Intro to Electrical and Computer Engineering

ENGIN 112 Intro to Electrical and Computer Engineering

Module -7. Karnaugh Maps

2.6 BOOLEAN FUNCTIONS

1.1 - Introduction to Sets

(a) (4 pts) Prove that if a and b are rational, then ab is rational. Since a and b are rational they can be written as the ratio of integers a 1

Chapter 3 Boolean Algebra

ELEMENTARY NUMBER THEORY AND METHODS OF PROOF

CHAPTER-2 STRUCTURE OF BOOLEAN FUNCTION USING GATES, K-Map and Quine-McCluskey

CS40-S13: Functional Completeness

ELEMENTARY NUMBER THEORY AND METHODS OF PROOF

Please write your name and username here legibly: C212/A592 6W2 Summer 2017 Early Evaluation Exam: Fundamental Programming Structures in Java

Algebra of Sets (Mathematics & Logic A)

Binary logic. Dr.Abu-Arqoub

Section 2.2: Introduction to the Logic of Quantified Statements

Combinational Logic & Circuits

Discrete structures - CS Fall 2017 Questions for chapter 2.1 and 2.2

Teachers Teaching with Technology (Scotland) Teachers Teaching with Technology. Scotland T 3. Matrices. Teachers Teaching with Technology (Scotland)

Therefore, after becoming familiar with the Matrix Method, you will be able to solve a system of two linear equations in four different ways.

EE292: Fundamentals of ECE

Logical statements and. Lecture 1 ICOM 4075

STUDENT LESSON A14 Boolean Algebra and Loop Boundaries

Discrete Mathematics Lecture 4. Harper Langston New York University

24 Nov Boolean Operations. Boolean Algebra. Boolean Functions and Expressions. Boolean Functions and Expressions

Homework 1. Due Date: Wednesday 11/26/07 - at the beginning of the lecture

Matrices. Chapter Matrix A Mathematical Definition Matrix Dimensions and Notation

MATH 22 MORE ABOUT FUNCTIONS. Lecture M: 10/14/2003. Form follows function. Louis Henri Sullivan

Mathematical Logic Part One

The set consisting of all natural numbers that are in A and are in B is the set f1; 3; 5g;

14.1 Encoding for different models of computation

Solutions to Homework 10

Combinational Circuits Digital Logic (Materials taken primarily from:

Information Science 1

Week 8: The fundamentals of graph theory; Planar Graphs 25 and 27 October, 2017

CS 3512, Spring Instructor: Doug Dunham. Textbook: James L. Hein, Discrete Structures, Logic, and Computability, 3rd Ed. Jones and Barlett, 2010

Transcription:

IST 210: Boot Camp Ritendra Datta LECTURE 2 An Introduction to Boolean Algebra 2.1. Outline of Lecture Fundamentals Negation, Conjunction, and Disjunction Laws of Boolean Algebra Constructing Truth Tables Things You Should Know 2.2. Fundamentals Boolean algebra is a mathematical way to represent logical statements we make. At the end of this lecture, you should be able to construct boolean algebra statements out of logical statements such as The temperature is low and it is not snowing. Definition 2.1. Boolean algebra is the algebra of propositions. Propositions (or statements) are denoted by letters and referred to as Boolean variables. A proposition can have only two possible values: T (meaning T rue) and F (meaning F alse). Suppose A is Boolean variable denoting The earth is not flat. Then most people (I agree, not all) will treat this as a fact, hence the value of A will be T. Boolean algebra, however, really does not care about facts, reality etc. You define the facts, and boolean algebra helps draw conclusions from those facts. This means that boolean algebra is 1

2 RITENDRA DATTA, IST 210: BOOT CAMP a kind of math which, when told that the moon is square is T rue, will deduce that the moon is not square is F alse. 2.3. Negation, Conjunction, and Disjunction In order to make more sense out of the concept of Boolean variables, we must introduce some operations that can be performed on them. We can think of the addition 5 + 4 as a + operation on the numbers 5 and 4. Similar operations can be performed on Boolean variables. Definition 2.2. Negation (NOT) is an operation on a Boolean variable which changes its value from T rue to F alse and vice-versa. We denote the negation of a variable A as A. For example, if A = T, then A = F, and if B = F, then B = T. In order to summarize such Boolean operations, we use what is known as a truth table: Negation: A T F A F T Exercise 1. Show that ( A) = A. If ( C) = F, what is C? Remember that when you do math such as 2 + (5-3), you first do the (5-3) part. The same logic holds here as well. Definition 2.3. Conjunction (AND) is an operation on two Boolean variables which produces a T rue value only when both variables are T rue, and F alse in all other cases. Disjunction (OR) is an an operation on two Boolean variables which produces a T rue value when at least one variable is T rue, and F alse only when both are F alse. Given variables A and B, we denote their conjunction as A.B, and disjunction as A+B. For all possible values of any two variables A and B = F, the following truth tables summarize these operations: Conjunction: A B A.B T T T T F F F T F F F F Disjunction: A B A+B T T T T F T F T T F F F Exercise 2. Without knowing the value of A, can you find the value of (or simplify) the following? (a) (i) A.T (ii) A.F (iii) A+T (iv) A+F (b) (i) A.A (ii) A+A (c) (i) A. A (ii) A+ A

LECTURE 2. AN INTRODUCTION TO BOOLEAN ALGEBRA 3 2.4. Laws of Boolean Algebra The following laws hold true for Boolean variables. While proofs are not required for this course, it may be a good practise to construct truth tables for each of them in order to convince yourself that they do hold true. We will get more into proving with truth tables in the following section. (a) A.B = B.A (b) A+B = B+A (Commutative Laws) (c) A.(B.C) = (A.B).C (d) A+(B+C) = (A+B)+C (Associative Laws) (e) A.(B+C) = (A.B)+(A.C) (f) A+(B.C) = (A+B).(A+C) (Distributive Laws) (g) A.(A+B) = A (h) A+(A.B) = A (Redundancy Laws) (i) (A.B) = A+ B (j) (A+B) = A. B (De Morgan s Laws) In addition to these laws, once you have figured out the answers to Exercise 2, you can consider those as laws too. In case you are wondering, the A and B used here are just placeholders for any Boolean variable. So do not be hesitant to apply these laws on a Boolean expression involving X, Y, and Z, for example. Remember that when using these laws on a given expression, you should go from left to right. When calculating values of the expressions, you should first work on what s inside brackets (), then any NOT ( ) operations, then any AND (.) operations, and finally any OR (+) operations. Exercise 3. Use the laws of Boolean algebra to simplify the following expressions: (a) F +(X.Y) (b) F +(X. X) (c) X.( X+Y) (d) X.( X+Y)+Y (e) X.Z + Z. ( X+ X.Y) (Optional)

4 RITENDRA DATTA, IST 210: BOOT CAMP 2.5. Constructing Truth Tables Besides using laws, one way to find the values of Boolean expressions or prove the validity of simplifications is by using truth tables. The basic ides is to create a list of all possible values that the different Boolean variables can take, and figure out what the corresponding values of the entire expression are. Let us start with a simple example. Suppose we want to find the values of E for all possible values of A and B, where E = (A+B). We construct a truth table as follows: A B A+B E = (A+B) T T T F T F T F F T T F F F F T Exercise 4. Extend this truth table, by including three additional columns, in order to show that the De Morgan s law holds true. Let us now take a more elaborate example. Suppose we want to find the values of E for all possible values of X and Y, where E = ( X.( X+Y) ) +Y. We construct a truth table as follows: X Y X X+Y X.( X+Y) E = ( X.( X+Y) ) +Y T T F T T T T F F F F F F T T T F T F F T T F F Incidentally, also note that the values in the Y column and the final E column are exactly the same. This therefore proves that E can be simply represented by Y. Exercise 3.(d) asked you to simplify this expression using laws alone. The answer turns out to be Y in both cases, as expected. This shows that you can prove things or simplify expressions using either ways. Exercise 5. Use truth tables to prove that the following hold true: (a) ( A) = A (b) A.(A+B) = A (c) X.(Y + Z) = X.Y + X.Z (d) X.Y + X. Y = X

LECTURE 2. AN INTRODUCTION TO BOOLEAN ALGEBRA 5 2.6. Things You Should Know Although you will not be asked to define anything, an understanding of the concepts most certainly will help to solve problems. Concepts: Purpose of Boolean Algebra Boolean variables, values of Boolean variables Negation, Conjunction, Disjunction, and their truth tables Application of Laws of Boolean algebra Truth tables and their application to proofs Problems: Application of the above concepts. Close variants of problems in the Exercises of this lecture. Proving the laws of Boolean algebra using truth tables.