Computer Science 210 Computer Organization

Slides:



Advertisements
Similar presentations
Computer Science 210 Computer Organization Introduction to Logic Circuits.
Advertisements

INTRODUCTION LOGICAL OPERATIONS TRUTH TABLE AND RULES.
Digital Circuits.
Lecture 2 Dr Richard Reilly Dept. of Electronic & Electrical Engineering Room 153, Engineering Building To insert your company logo on this slide From.
Boolean Algebra. Introduction 1854: Logical algebra was published by George Boole  known today as “Boolean Algebra” 1854: Logical algebra was published.
Logic Gates Circuits to manipulate 0’s and 1’s. 0’s and 1’s used for numbers Also to make decisions within the computer. In that context, 1 corresponds.
Computer Science 101 Circuit Design Algorithm. Circuit Design - The Problem The problem is to design a circuit that accomplishes a specified task. The.
Computer Science 101 Boolean Algebra. What’s next? A new type of algebra – Helps us A new type of algebra – Helps us With logical reasoningWith logical.
Digital Logic Circuits – Chapter 1 Section 1-3, 1-2.
Boolean Algebra – I. Outline  Introduction  Digital circuits  Boolean Algebra  Two-Valued Boolean Algebra  Boolean Algebra Postulates  Precedence.
Computer Science 101 The Boolean System. George Boole British mathematician ( ) Boolean algebra –Logic –Set theory –Circuits –Conditions in if.
CPSC 171 Introduction to Computer Science Boolean Logic, Gates, & Circuits.
OCR GCSE Computing © Hodder Education 2013 Slide 1 OCR GCSE Computing Chapter 2: Binary Logic.
Logic gates & Boolean Algebra. Introduction Certain components (called logic elements) of the computer combine electric pulses using a set of rules. Electric.
Introduction to Computer Science David Goldschmidt, Ph.D. Computer Science The College of Saint Rose CIS September 6, 2007.
Lecture 2 – Boolean Algebra Lecturer: Amy Ching Date: 21 st Oct 2002.
Fall 2012: FCM 708 Foundation I Lecture 2 Prof. Shamik Sengupta
Computer Science 210 Computer Organization Introduction to Boolean Algebra.
Discrete Mathematics and Its Applications.  The English mathematician George Boole ( ) sought to give symbolic form to Aristotle's system of.
LOGIC GATES.
Lecture 22: 11/19/2002CS170 Fall CS170 Computer Organization and Architecture I Ayman Abdel-Hamid Department of Computer Science Old Dominion University.
Computer Science 101 Circuit Design - Examples. Sum of Products Algorithm Identify each row of the output that has a 1. Identify each row of the output.
Circuit Simplification Truth Table  Minimized Logic Gates.
Combination of logic gates  Logic gates can be combined to produce more complex functions.  They can also be combined to substitute one type of gate.
Linear Algebra. Circuits The circuits in computers and other input devices have inputs, each of which is either a 0 or 1, the output is also 0s and 1s.
1 EG 32 Digital Electronics Thought for the day You learn from your mistakes..... So make as many as you can and you will eventually know everything.
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI Dale Roberts, Lecturer Computer Science, IUPUI
CHAPTER 1 SETS, FUNCTIONs, ELEMENTARY LOGIC & BOOLEAN ALGEBRAs
© BYU 03 BA1 Page 1 ECEn 224 Boolean Algebra – Part 1.
CEC 220 Digital Circuit Design Boolean Algebra I Wed, Sept 2 CEC 220 Digital Circuit Design Slide 1 of 13.
Laws of Boolean Algebra Commutative Law Associative Law Distributive Law Identity Law De Morgan's Theorem.
Assoc. Prof. Dr. Ahmet Turan ÖZCERİT.  Boolean postulate  Simplifying boolean equations  Truth tables You will learn: 2.
Chapter 4 Fundamentals of Computer Logic 1 Chapter 4: Fundamental of Computer Logic - IE337.
Designing Combinational Logic Circuits
ECE DIGITAL LOGIC LECTURE 6: BOOLEAN ALGEBRA Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2016, 02/01/2016.
BOOLEAN ALGEBRA LOGIC GATES. Introduction British mathematician George Boole( ) was successful in finding the link between logic and mathematics.
Boolean Algebra. BOOLEAN ALGEBRA Formal logic: In formal logic, a statement (proposition) is a declarative sentence that is either true(1) or false (0).
CHAPTER 1 INTRODUCTION TO DIGITAL LOGIC. De Morgan’s Theorem De Morgan’s Theorem.
DE MORGAN’S THEOREM. De Morgan’s Theorem De Morgan’s Theorem.
Digital Logic Design. Truth Table  Logic Circuit 1. Start with truth table 2. When your output is a 1, figure out the combination of inputs, ANDs, and.
Logic gates.
Boolean Algebra & Logic Gates
CPS120 Introduction to Computer Science
CSIS-110 Introduction to Computer Science
Digital Logic.
Morgan Kaufmann Publishers
De Morgan’s Theorem,.
CS Chapter 3 (3A and ) Part 1 of 8
Logic Gates and Boolean Algebra
Section 7.1 Logical Operators
Boolean Algebra.
Boolean Algebra – Part 1 ECEn 224.
CHAPTER 3 SETS AND BOOLEAN ALGEBRA
CS Chapter 3 (3A and ) Part 1 of 8
Boolean Expressions Lecture No. 10.
TN 221: DIGITAL ELECTRONICS 1
CHAPTER 2 Boolean Algebra
Computer Science 210 Computer Organization
Agenda – 2/12/18 Questions? Readings: CSI 4, P
Computer Science 210 Computer Organization
Dr. Clincy Professor of CS
Boolean Algebra Introduction CSCI 240
Boolean Algebra.
Binary Logic.
Lecture 5 Binary Operation Boolean Logic. Binary Operations Addition Subtraction Multiplication Division.
XOR Function Logic Symbol  Description  Truth Table 
Truth tables Mrs. Palmer.
BOOLEAN ALGEBRA.
Chapter 3 – Describing Logic Circuits
DIGITAL ELECTRONICS AND LOGIC GATES. ANALOG SIGNAL:- Analog signal is continuous time varying current or voltage signal.
Presentation transcript:

Computer Science 210 Computer Organization Introduction to Boolean Algebra

George Boole English mathematician (1815-1864) Boolean algebra Logic Set Theory Digital circuits Programming: Conditions in while and if statements

Boolean Constants In Boolean algebra, there are only two constants, true and false Boolean constant Binary digit State of a switch Voltage level true 1 On +5V false Off 0V

Boolean Variables Boolean variables are variables that store values that are Boolean constants. Let A be true Let B be false Etc.

Boolean Operator AND If A and B are Boolean variables (or expressions) then A AND B is true if and only if both A and B are true.

Boolean Operator AND If A and B are Boolean variables (or expressions) then A AND B is false if and only if either A or B are false or they’re both false.

Boolean Operator AND We denote the AND operation like multiplication in ordinary algebra: AB or A.B

Boolean Operator OR If A and B are Boolean variables (or expressions) then A OR B is true if and only if at least one of A and B is true.

Boolean Operator OR If A and B are Boolean variables (or expressions) then A OR B is false if and only if both A and B are false.

Boolean Operator OR We denote the OR operation like addition in ordinary algebra: A+B

Boolean Operator NOT If A is a Boolean variable (or expression) then NOT A has the opposite value from A.

Boolean Operator NOT We denote the NOT operation by putting a bar over the variable (or expression) _ A Or use tilde (~) when bar is not available: ~A

Boolean Expressions As with ordinary algebra, a Boolean expression is a well-formed expression made from Boolean constants Boolean variables Operators AND, OR and NOT Parentheses Example: __ ____ AB + (A+C)B

Evaluating a Boolean expression At any time, the value of a BE can be computed using the current values of the variables. __ AB + (CD) Let A = true Let B = false Let C = true Let D = false Then the resulting value is true

Operator precedence NOT comes first, then AND, and finally OR (Like arithmetic negation, product, and addition) A + BC is not the same as (A + B)C

Evaluating a Boolean expression Unlike ordinary algebra, for a BE, there are only finitely many possible assignments of values to the variables; so, theoretically, we can make a table, called a truth table, that shows the value of the BE for every possible set of values of the variables. For convenience, use 0 = false 1 = true

Truth Table for AND A B AB 1

Truth Table for OR A B A+B 1

Truth Table for NOT A _ 1

Filling in a Truth Table If there are N variables, there are 2N possible combinations of values Thus, there are 2N rows in the truth table Fill in the values by counting up from 0 in binary

Example Construct a truth table for _ ___ E = AB + (A+C)B

_ ___ E = AB + (A+C)B A B C 1 Assign the values of the variables first

_ ___ E = AB + (A+C)B Then add columns for each operation A B C 1 _ B 1 _ B 1 Then add columns for each operation

_ ___ E = AB + (A+C)B A B C 1 _ B 1 _ AB 1

_ ___ E = AB + (A+C)B A B C 1 _ B 1 _ AB 1 A+C 1

_ ___ E = AB + (A+C)B A B C 1 _ B 1 _ AB 1 A+C 1 ___ (A+C) 1

_ ___ E = AB + (A+C)B A B C 1 _ B 1 _ AB 1 A+C 1 ___ (A+C) 1 ___ 1 _ B 1 _ AB 1 A+C 1 ___ (A+C) 1 ___ (A+C)B 1

_ ___ E = AB + (A+C)B A B C 1 _ B 1 _ AB 1 A+C 1 ___ (A+C) 1 ___ 1 _ B 1 _ AB 1 A+C 1 ___ (A+C) 1 ___ (A+C)B 1 E 1

Designing a Circuit from a Truth Table The problem reduces to this: Given a truth table with all values for inputs. And given a column of values for the output. Find a Boolean expression that gives the column. If we can do this, we can get the circuit from the Boolean expression. The Sum of Products algorithm finds the expression.

Sum of Products Algorithm Identify each row of the output that has a 1. For each such row Make a product of all the input variables. Put bar over each variable with a 0 in this row. Make a sum of all of these product terms. Then, simplify the expression if possible.