Lecture 3 Logic Gates Basic Logic Gates The

Lecture 3 Logic Gates

Basic Logic Gates • The fundamental building blocks from which all other logic circuit and digital system are constructed. • Basic logic operations: – AND – OR – NOT 2

The AND Gate • An AND gate can have two or more inputs and performs what is known as logical multiplication. • Logic Expression Symbol is dot : Or no symbol Z=X·Y Z = XY • This is read as “Z equals X and Y. ” Z = 1 when X = 1 and Y = 1. 3

Logic Operation: • Output X is 1 when all inputs A, B are 1 • Output Z is 0 when at least one of the inputs A or B is 0 All possible logic levels for a 2 -input AND gate.

• The total number of possible combinations of binary inputs to a gate is determined by the following formula: N = 2 n N is the number of possible input combinations and n is the number of input variables • Examples of truth tables with 2, 3, and 4 inputs. 5

Example of AND gate operation with a timing diagram showing input and output relationships. 6

Example • Determine the output waveform corresponding to the input and show the timing diagram. 7

Answer 8

Example: Determine the output waveform corresponding to the 3 input and show the timing diagram.

The OR Gate • An OR gate can have two or more inputs and performs what is known as logical addition. • Logic expression: Symbol is + , Not addition Z=X+Y • This is read as “Z equals X or Y. ” Z = 1 when X = 1 or Y = 1. 10

Logic operation: • Output X is 1 when at least one of the inputs A or B is 1 • Output X is 0 when all inputs A, B are 0 11 All possible logic levels for a 2 -input OR gate.

Example of OR gate operation with a timing diagram showing input and output time relationships 12

Example For the 2 input OR gate, determine the output waveform in relation to the inputs. 13

Answer 14

Inverter (NOT Gate) • Also known as NOT circuit performs operation of inversion or complement Logic Operation: This is read as: • x equals NOT A, or • x equals the inverse of A, or • x equals the complement of A 15

The Inverter Also known as NOT circuit • performs operation of inversion or complement • If input =1, output = 0 • Input = 0, output = 1 16

17

Inverter operation with a pulse input. Inverter timing diagram

Example: Answer:

The NAND gate • A universal gate – Used in combination to perform AND, OR and inverter operations. • NAND is a contraction of NOT-AND – AND function with complemented output • Logic Expression Z = XY 20

Logic Operation • Output X is 0 when all inputs A, B are 1 • Output X is 1 when at least one of the inputs , A or B is 0 21

Operation of a 2 -input NAND gate.

NAND Timing Diagrams 23

The NOR Gate • A universal gate – Used in combination to perform AND, OR and inverter operations. • NOR is a contraction of NOT-OR – OR function with complemented output Logic Expression: Z=X+Y 24

Logic Operation: • Output X is 1 when all inputs A, B are 0 • Output X is 0 when at least one of the inputs , A or B is 1 25

Operation of a 2 -input NOR gate.

NOR Timing Diagram 27

The Exclusive-OR and Exclusive-NOR Gates • Formed by a combination of other gates • Important in many application • Symbol of Exclusive-OR (XOR) 28

Logic Operation: • Output Z is 1 when X and Y are different. • Output Z is 0 when X and Y are same X = A⊕ B 29

The XNOR • Symbol of Exclusive-NOR (XNOR) Logic Expression: X = A⊕ B 30

Logic Operation: • Output Z is 0 when X and Y are different. • Output Z is 1 when X and Y are same. 31

All possible logic levels for an exclusive-NOR gate.

• Example of exclusive-OR & exclusive-NOR gate operation with pulse waveform inputs. 33

Summary of Methods to Describe Logic Circuits • The three basic logic functions are AND, OR, and NOT. • Logic functions allow us to represent a decision process. – If it is raining OR it looks like rain I will take an umbrella. – If I get paid AND I go to the bank I will have money to spend. 34

END Of LOGIC GATE Thank You 35
- Slides: 35