Boolean Algebra and Logic Gates CSE-1108 Ahsanullah University of Science and Technology (AUST)

Slides:



Advertisements
Similar presentations
Boolean Algebra and Logic Gates
Advertisements

Logic Gates.
Lecture 5 EGRE 254 1/28/09. 2 Boolean algebra a.k.a. “switching algebra” –deals with Boolean values -- 0, 1 Positive-logic convention –analog voltages.
Chapter 2 Logic Circuits.
Chapter 2 – Combinational Logic Circuits Part 1 – Gate Circuits and Boolean Equations Logic and Computer Design Fundamentals.
SYEN 3330 Digital SystemsJung H. Kim Chapter SYEN 3330 Digital Systems Chapter 2 -Part 2.
Section 10.3 Logic Gates.
1 Boolean Algebra & Logic Design. 2 Developed by George Boole in the 1850s Mathematical theory of logic. Shannon was the first to use Boolean Algebra.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Edited by Dr. Muhamed Mudawar for COE 202 & EE 200 at KFUPM) Boolean Algebra and Logic Gates.
Lecture 3. Boolean Algebra, Logic Gates
CSCE 211: Digital Logic Design
Part 2: DESIGN CIRCUIT. LOGIC CIRCUIT DESIGN x y z F F = x + y’z x y z F Truth Table Boolean Function.
CS 105 Digital Logic Design
Boolean Algebra. Binary Logic and Gates Binary variables take on one of two values. Logical operators operate on binary values and binary variables. Basic.
Gate Circuits and Boolean Equations BIL- 223 Logic Circuit Design Ege University Department of Computer Engineering.
Logic Design CS221 1 st Term combinational circuits Cairo University Faculty of Computers and Information.
OCR GCSE Computing © Hodder Education 2013 Slide 1 OCR GCSE Computing Chapter 2: Binary Logic.
Boolean Algebra and Logic Gates 1 Computer Engineering (Logic Circuits) Lec. # 3 Dr. Tamer Samy Gaafar Dept. of Computer & Systems Engineering Faculty.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Logic Circuits I.
Binary Logic and Gates Binary variables take on one of two values.
SUPLEMENTARY CHAPTER 1: An Introduction to Digital Logic The Architecture of Computer Hardware and Systems Software: An Information Technology Approach.
Boolean Algebra and Digital Circuits
1 Representation of Logic Circuits EE 208 – Logic Design Chapter 2 Sohaib Majzoub.
1 Logic Gates. 2 Review of Boolean algebra Just like Boolean logic Variables can only be 1 or 0 Instead of true / false Instead of true / false.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Logic Circuits I.
Overview Part 1 – Gate Circuits and Boolean Equations
COMPSCI 210 Semester Tutorial 2: Logic Gates.
Lecture 22: 11/19/2002CS170 Fall CS170 Computer Organization and Architecture I Ayman Abdel-Hamid Department of Computer Science Old Dominion University.
4. Computer Maths and Logic 4.2 Boolean Logic Logic Circuits.
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.
Figure 2.6. A truth table for the AND and OR operations. 2.3 Truth Tables 1.
Computer Systems 1 Fundamentals of Computing Simplifying Boolean Expressions.
Lecture 4 Boolean Algebra. Logical Statements °A proposition that may or may not be true: Today is Monday Today is Sunday It is raining °Compound Statements.
1 Lect # 2 Boolean Algebra and Logic Gates Boolean algebra defines rules for manipulating symbolic binary logic expressions. –a symbolic binary logic expression.
Binary Logic and Gates Boolean Algebra Canonical and Standard Forms Chapter 2: Boolean Algebra and Logic Gates.
CS151 Introduction to Digital Design Chapter 2: Combinational Logic Circuits Lecture 5: Binary Logic and Gates.
Chapter-3: BOOLEAN ALGEBRA & LOGIC GATES Analysis and logical design.
Boolean Algebra and Logic Gates
R. Johnsonbaugh Discrete Mathematics 5 th edition, 2001 Chapter 9 Boolean Algebras and Combinatorial Circuits.
Chapter 3 Digital Logic Structures
Boolean Algebra. BOOLEAN ALGEBRA Formal logic: In formal logic, a statement (proposition) is a declarative sentence that is either true(1) or false (0).
1 Logic Gates CS 202, Spring 2008 Epp, sections 1.4 and 1.5.
LOGIC CIRCUITLOGIC CIRCUIT. Goal To understand how digital a computer can work, at the lowest level. To understand what is possible and the limitations.
1 Review of Boolean algebra Just like Boolean logic Variables can only be 1 or 0 Instead of true / false Instead of true / false.
1 Review of Boolean algebra Not is a horizontal bar above the number –0 = 1 –1 = 0 Or is a plus –0+0 = 0 –0+1 = 1 –1+0 = 1 –1+1 = 1 And is multiplication.
SAM GIRLS COLLEGE, BHOPAL DEPARTMENT OF COMPUTER SCIENCE.
Computer Code.
DIGITAL LOGIC CIRCUITS
14:332:231 DIGITAL LOGIC DESIGN Boolean Algebra
CS 105 Digital Logic Design
Gate Circuits and Boolean Equations
Overview Part 1 – Gate Circuits and Boolean Equations
Computer Architecture CST 250
DIGITAL LOGIC CIRCUITS
ECE/CS 352 Digital Systems Fundamentals
Lecture 3: Boolean Algebra
Boolean Algebra.
Boolean Algebra & Logic Circuits
Week 7: Gates and Circuits: PART II
Digital Logic.
Logic Gates.
Digital Logic.
DIGITAL ELECTRONICS B.SC FY
Chapter 10.3 and 10.4: Combinatorial Circuits
Logic Circuits I Lecture 3.
XOR Function Logic Symbol  Description  Truth Table 
Introductory Concepts
Boolean Algebra and Gate Networks
Lecture 4 – Binary Logic and Logic Gates
Presentation transcript:

Boolean Algebra and Logic Gates CSE-1108 Ahsanullah University of Science and Technology (AUST)

Have you ever asked yourself? 1.How does a computer adds/ subtract/ multiply/ divide two (or more) numbers? Does it have a brain like human? 2.How does computer stores something? (Documents, songs, movies etc.) Does it have a memory like human? Answer 01: Logic gates and circuits. Answer 02: Logic gates and circuits. 2

What is Logic Gate? Logic gates are electronic circuits that operates on one or more input signals to produce standard output signals. Are the building blocks of all the circuits in a computer. Some of the most useful and basic logic gates are AND, OR, NOT, NAND and NOR gates. 3

Logic Gate Implementation Using Switches Inputs: Inputs: logic 1 is switch closed logic 0 is switch open Outputs: Outputs: logic 1 is light on logic 0 is light off. NOT input: NOT input: logic 1 is switch open logic 0 is switch closed Switches in series => AND Switches in parallel => OR C Normally-closed switch => NOT

Logic Gate Implementation In the earliest computers, switches were opened and closed by magnetic fields produced by energizing coils in relays. The switches in turn opened and closed the current paths. Later, vacuum tubes that open and close current paths electronically replaced relays. Today, transistors are used as electronic switches that open and close current paths.

What is Boolean Algebra? We need operator and operands in an Algebra. In Boolean algebra, operands are called binary variables. Operators are called Logical Operators. Basic logical operators are the logic functions AND, OR and NOT. Logic gates implement logic functions. Boolean Algebra is a useful mathematical system for specifying and transforming logic functions. We study Boolean algebra as a foundation for designing and analyzing digital systems!

7 Basic logic gates NotAndOrNandNorXor

Truth Tables Tabular listing of the values of a function for all possible combinations of values on its arguments Example: Truth tables for the basic logic operations: X NOT XZ  Z = X·Y YX AND OR XYZ = X+Y

Truth Tables – Cont’d Used to evaluate any logic function Consider F(X, Y, Z) = X Y + Y Z XYZX YYY ZF = X Y + Y Z

Logic Diagrams and Expressions Boolean equations, truth tables and logic diagrams describe the same function! Truth tables are unique, but expressions and logic diagrams are not. This gives flexibility in implementing functions. X Y F Z Logic Diagram Logic Equation ZY X F  Truth Table X Y Z Z Y X F   

Boolean Algebra Commutative Associative Distributive DeMorgan’s X. 1 X = X. 00 = X. XX = 0 = X + YY + X = (X + Y)Z + X + (YZ)Z) += X(Y + Z)XYXZ += X + YX. Y = XYYX = (XY)ZX(YX(YZ)Z) = X+ YZ(X + Y)(X + Z)= X. YX + Y = X + 0 X = + X 11 = X + XX = 1 = X = X  Invented by George Boole in 1854  An algebraic structure defined by a set B = {0, 1}, together with two binary operators (+ and ·) and a unary operator ( ) Idempotence Complement Involution Identity element

Boolean Operator Precedence  The order of evaluation is: 1.Parentheses 2.NOT 3.AND 4.OR  Consequence: Parentheses appear around OR expressions  Example: F = A(B + C)(C + D)

13 Logic Circuit to Boolean expression Find the output of the following circuit Answer: (x+y)y Or (x  y)  y Or (x  y)  y x+yx+y y (x+y)y(x+y)y__

14 Logic Circuit to Boolean expression Find the output of the following circuit Answer: xy Or  (  x  y) ≡ x  y Or  (  x  y) ≡ x  y x y xyxy _ _ ___ ___

15 Boolean expression to Logic Circuit Write the circuits for the following Boolean algebraic expressions a) x+y __ __ x x+yx+y

16 Boolean expression to Logic Circuit Write the circuits for the following Boolean algebraic expressions b)(x+y)x _______ x+yx+y x+yx+y (x+y)x(x+y)x

17 How to add binary numbers Consider adding two 1-bit binary numbers x and y 0+0 = = = = = = = = 10 Carry is x AND y Sum is x XOR y The circuit to compute this is called a half-adder xyCarrySum

18 The half-adder Sum = x XOR y Carry = x AND y

19 Using half adders We can then use a half-adder to compute the sum of two Boolean numbers ? 001

20 How to fix this We need to create an adder that can take a carry bit as an additional input Inputs: x, y, carry in Inputs: x, y, carry in Outputs: sum, carry out Outputs: sum, carry out This is called a full adder Will add x and y with a half-adder Will add x and y with a half-adder Will add the sum of that to the carry in Will add the sum of that to the carry in What about the carry out? It’s 1 if either (or both): It’s 1 if either (or both): x+y = 10 x+y = 10 x+y = 01 and carry in = 1 x+y = 01 and carry in = 1 xyccarrysum

21 The full adder The “HA” boxes are half-adders

22 The full adder The full circuitry of the full adder