Presentation is loading. Please wait.

Presentation is loading. Please wait.

Boolean Algebra and Logic Gates 1 Computer Engineering (Logic Circuits) Lec. # 3 Dr. Tamer Samy Gaafar Dept. of Computer & Systems Engineering Faculty.

Similar presentations


Presentation on theme: "Boolean Algebra and Logic Gates 1 Computer Engineering (Logic Circuits) Lec. # 3 Dr. Tamer Samy Gaafar Dept. of Computer & Systems Engineering Faculty."— Presentation transcript:

1 Boolean Algebra and Logic Gates 1 Computer Engineering (Logic Circuits) Lec. # 3 Dr. Tamer Samy Gaafar Dept. of Computer & Systems Engineering Faculty of Engineering Zagazig University

2 Boolean Algebra and Logic Gates 2 http://www.tsgaafar.faculty.zu.edu.eg Email: tsgaafar@yahoo.com Course Web Page

3 Announcements  30 Minutes Quiz will be held at the beginning of lecture.  No Cheatings.  Zero marks for the cheaters.  Do not forget to write your names on the answer sheet. Boolean Algebra and Logic Gates 3

4 Lec. # 3 Binary Logic & Gates Boolean Algebra and Logic Gates 4

5 Boolean Algebra and Logic Gates 5 Binary Logic and Gates  Binary variables take on one of two values.  Logical operators operate on binary values and binary variables.  Basic logical operators are the logic functions AND, OR and NOT.  Logic gates implement logic functions.  Boolean Algebra: a useful mathematical system for specifying and transforming logic functions.  We study Boolean algebra as a foundation for designing and analyzing digital systems!

6 Boolean Algebra and Logic Gates 6 Binary Variables  Recall that the two binary values have different names: True/False On/Off Yes/No 1/0  We use 1 and 0 to denote the two values.  Variable identifier examples: A, B, y, z, or X 1 for now RESET, START_IT, or ADD1 later

7 Boolean Algebra and Logic Gates 7 Logical Operations  The three basic logical operations are: AND OR NOT  AND is denoted by a dot (·).  OR is denoted by a plus (+).  NOT is denoted by an over bar ( ¯ ), a single quote mark (') after.

8 Boolean Algebra and Logic Gates 8  Examples: is read “Y is equal to A AND B.” is read “z is equal to x OR y.” is read “X is equal to NOT A.” Notation Examples  Note: The statement: 1 + 1 = 2 (read “one plus one equals two”) is not the same as 1 + 1 = 1 (read “1 or 1 equals 1”).  BAY  yxz   AX 

9 Boolean Algebra and Logic Gates 9 Operator Definitions  Operations are defined on the values "0" and "1" for each operator: AND 0 · 0 = 0 0 · 1 = 0 1 · 0 = 0 1 · 1 = 1 OR 0 + 0 = 0 0 + 1 = 1 1 + 0 = 1 1 + 1 = 1 NOT 10  01  Buffer  1  1 00

10 Boolean Algebra and Logic Gates 10 01 10 X NOT XZ  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: 111 001 010 000 Z = X·Y YX AND OR XYZ = X+Y 000 011 101 111

11 Filling A Truth Table ( i/ps) Boolean Algebra and Logic Gates 11

12 Boolean Algebra and Logic Gates 12 dcba 0000 1000 0100 1100 0010 1010 0110 1110 0001 1001 0101 1101 0011 1011 0111 1111

13 Boolean Algebra and Logic Gates 13  Using Switches Inputs:  logic 1 is switch closed  logic 0 is switch open Outputs:  logic 1 is light on  logic 0 is light off. NOT input:  logic 1 is switch open  logic 0 is switch closed Logic Function Implementation Switches in series => AND Switches in parallel => OR C Normally-closed switch => NOT

14 Boolean Algebra and Logic Gates 14  Example: Logic Using Switches  Light is on (L = 1) for L(A, B, C, D) = and off (L = 0), otherwise.  Useful model for relay and CMOS gate circuits, the foundation of current digital logic circuits Logic Function Implementation – cont’d B A D C A (B C + D) = A B C + A D

15 Boolean Algebra and Logic Gates 15 Logic Gates  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.

16 Boolean Algebra and Logic Gates 16 Logic Gate Symbols and Behavior  Logic gates have special symbols:  And waveform behavior in time as follows : X 0011 Y0101 X · Y(AND)0001 X+ Y(OR)0111 (NOT)X 1100 OR gate X Y Z= X+ Y X Y Z= X · Y AND gate X Z= X NOT gate or inverter YY BUFFER

17 Boolean Algebra and Logic Gates 17

18 Boolean Algebra and Logic Gates 18 `

19 Boolean Algebra and Logic Gates 19 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 0000100 0010111 0100000 0110000 1000100 1010111 1101001 1111001

20 Boolean Algebra and Logic Gates 20 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 11 1 1 11 1 0 11 0 1 11 0 0 00 1 1 00 1 0 10 0 1 00 0 0 X Y Z Z Y X F   

21 Logic Circuit Analysis Boolean Algebra and Logic Gates 21 a b c f F = a + b + c b c a f

22 Logic Circuit Analysis Boolean Algebra and Logic Gates 22 a b c f F = abc b c a f

23 Logic Circuit Analysis Boolean Algebra and Logic Gates 23 a b c f F = ab + c

24 Logic Circuit Analysis Boolean Algebra and Logic Gates 24 a c f F = a + c

25 Logic Circuit Analysis Boolean Algebra and Logic Gates 25 a c F = (a + c). (b+d) f b d

26 Truth Table (Last Example) Boolean Algebra and Logic Gates 26

27 Boolean Algebra and Logic Gates 27 F=(a + c). (b+d) b+da + cdcba 0010000 1111000 0010100 1111100 1110010 1111010 1110110 1111110 0000001 0101001 0010101 1111101 0100011 0101011 1110111 1111111


Download ppt "Boolean Algebra and Logic Gates 1 Computer Engineering (Logic Circuits) Lec. # 3 Dr. Tamer Samy Gaafar Dept. of Computer & Systems Engineering Faculty."

Similar presentations


Ads by Google