MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR 1 Introduction to Logic Gates Logical gates –Inverter...

30
1 MOHD. YAMANI IDRIS/ NOORZ AILY MOHAMED NOOR Introduction to Logic Gates Logical gates – Inverter – AND – OR – NAND – NOR Exclusive OR (XOR) Exclusive NOR (XNOR) Draw Logic Circuit Analysis of Logic Circuit

Transcript of MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR 1 Introduction to Logic Gates Logical gates –Inverter...

Page 1: MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR 1 Introduction to Logic Gates Logical gates –Inverter –AND –OR –NAND –NOR –Exclusive OR (XOR) –Exclusive NOR.

1MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR

Introduction to Logic Gates

• Logical gates– Inverter– AND– OR– NAND– NOR– Exclusive OR (XOR)– Exclusive NOR (XNOR)

• Draw Logic Circuit • Analysis of Logic Circuit

Page 2: MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR 1 Introduction to Logic Gates Logical gates –Inverter –AND –OR –NAND –NOR –Exclusive OR (XOR) –Exclusive NOR.

2MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR

Introduction to Logic Gates

• Universal gates NAND and NOR– NAND gate– NOR gate

• Execution using NAND gate• Execution using NOR gate• Positive & Negative Logic• SOP Expression Execution• POS Expression Execution• Integrated Logic Circuit Family

Page 3: MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR 1 Introduction to Logic Gates Logical gates –Inverter –AND –OR –NAND –NOR –Exclusive OR (XOR) –Exclusive NOR.

3MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR

Logic Gates

Page 4: MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR 1 Introduction to Logic Gates Logical gates –Inverter –AND –OR –NAND –NOR –Exclusive OR (XOR) –Exclusive NOR.

4MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR

Logic Gates

• Inverter gate

• The use of inverter: complement

Page 5: MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR 1 Introduction to Logic Gates Logical gates –Inverter –AND –OR –NAND –NOR –Exclusive OR (XOR) –Exclusive NOR.

5MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR

Logic Gates

• AND gate

Page 6: MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR 1 Introduction to Logic Gates Logical gates –Inverter –AND –OR –NAND –NOR –Exclusive OR (XOR) –Exclusive NOR.

6MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR

Logic Gates

• OR gate

Page 7: MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR 1 Introduction to Logic Gates Logical gates –Inverter –AND –OR –NAND –NOR –Exclusive OR (XOR) –Exclusive NOR.

7MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR

Logic Gates

• NAND gate

Page 8: MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR 1 Introduction to Logic Gates Logical gates –Inverter –AND –OR –NAND –NOR –Exclusive OR (XOR) –Exclusive NOR.

8MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR

Logic Gates

• NOR gate

Page 9: MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR 1 Introduction to Logic Gates Logical gates –Inverter –AND –OR –NAND –NOR –Exclusive OR (XOR) –Exclusive NOR.

9MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR

Logic Gates

• Exclusive OR (XOR) gate

Page 10: MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR 1 Introduction to Logic Gates Logical gates –Inverter –AND –OR –NAND –NOR –Exclusive OR (XOR) –Exclusive NOR.

10MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR

Logic Gates

• Exclusive NOR (XNOR) gate

Page 11: MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR 1 Introduction to Logic Gates Logical gates –Inverter –AND –OR –NAND –NOR –Exclusive OR (XOR) –Exclusive NOR.

11MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR

Draw Logic Gates

• When Boolean expression is obtained, we can draw logic gates

• Example:– F1 = xyz’ (use three input AND gate)

Page 12: MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR 1 Introduction to Logic Gates Logical gates –Inverter –AND –OR –NAND –NOR –Exclusive OR (XOR) –Exclusive NOR.

12MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR

Draw Logic Gates

Page 13: MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR 1 Introduction to Logic Gates Logical gates –Inverter –AND –OR –NAND –NOR –Exclusive OR (XOR) –Exclusive NOR.

13MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR

Logic Circuit Analysis

• When logic circuit is given, we can analyze the circuit to obtain logical expression

• Example:– What is the Boolean expression for F4

Page 14: MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR 1 Introduction to Logic Gates Logical gates –Inverter –AND –OR –NAND –NOR –Exclusive OR (XOR) –Exclusive NOR.

14MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR

Logic Circuit Analysis

• What is the Boolean expression for F5

Page 15: MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR 1 Introduction to Logic Gates Logical gates –Inverter –AND –OR –NAND –NOR –Exclusive OR (XOR) –Exclusive NOR.

15MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR

Universal Gates: NAND & NOR

• Gate AND/OR/NOT is enough to build any Boolean function

• Even though, other gates is also used because:– Very useful (no choice)

– Save transistor’s number

– Self sufficient (can build any gate from it)

NAND/NOR: save, self sufficient

XOR: useful (e.g. execute parity bit)

Page 16: MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR 1 Introduction to Logic Gates Logical gates –Inverter –AND –OR –NAND –NOR –Exclusive OR (XOR) –Exclusive NOR.

16MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR

NAND Gate

• NAND gate is self sufficient (i.e.can build any gate from it)

• Can be used for building AND/OR/NOT gate

• Build NOT gate using NAND gate

Page 17: MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR 1 Introduction to Logic Gates Logical gates –Inverter –AND –OR –NAND –NOR –Exclusive OR (XOR) –Exclusive NOR.

17MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR

NAND Gate

• Build AND gate using NAND gates

• Build OR gate using NAND gates

Page 18: MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR 1 Introduction to Logic Gates Logical gates –Inverter –AND –OR –NAND –NOR –Exclusive OR (XOR) –Exclusive NOR.

18MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR

NOR Gate

• NOR gate is also self sufficient

• Can be used for building AND/OR/NOT gate

• Build NOT gate using NOR gate

Page 19: MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR 1 Introduction to Logic Gates Logical gates –Inverter –AND –OR –NAND –NOR –Exclusive OR (XOR) –Exclusive NOR.

19MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR

NOR Gate

• Build AND gate using NOR gates

• Build OR gate using NOR gates

Page 20: MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR 1 Introduction to Logic Gates Logical gates –Inverter –AND –OR –NAND –NOR –Exclusive OR (XOR) –Exclusive NOR.

20MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR

Build using NAND gate

• It is not impossible to build Boolean expression using NAND gatesSteps– Obtain sum-of-product Boolean expression

• E.g: F3 = xy’ +x’z

– Use DeMorgan theorem to get expression using two level NAND gate

• E.g: F3 = xy’ +x’z = (xy’+x’z)” = ((xy’)’.(x’z)’)’

Page 21: MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR 1 Introduction to Logic Gates Logical gates –Inverter –AND –OR –NAND –NOR –Exclusive OR (XOR) –Exclusive NOR.

21MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR

Build using NAND gate

Page 22: MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR 1 Introduction to Logic Gates Logical gates –Inverter –AND –OR –NAND –NOR –Exclusive OR (XOR) –Exclusive NOR.

22MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR

Build using NOR gate

• It is not impossible to build Boolean expression using NOR gatesSteps– Obtain product-of-sum Boolean expression

• E.g: F6 = (x+y’).(x’+z)

– Use DeMorgan theorem to get expression using two level NAND gate

• E.g: F3 = (x+y’).(x’+z) =((x+y’).(x’+z))’’ = ((x+y’)+(x’+z)’)’

Page 23: MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR 1 Introduction to Logic Gates Logical gates –Inverter –AND –OR –NAND –NOR –Exclusive OR (XOR) –Exclusive NOR.

23MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR

Build using NOR gate

Page 24: MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR 1 Introduction to Logic Gates Logical gates –Inverter –AND –OR –NAND –NOR –Exclusive OR (XOR) –Exclusive NOR.

24MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR

Positive & Negative Logic

• In logic gate, most of the time– H (High Voltage, 5V) = logic 1

– L (Low Voltage, 0V) = logic 0

• This is called positive logic• However, if it is inverted, it is negative logic

– H (High Voltage, 5V) = logic 0

– L (Low Voltage, 0V) = logic 1

• Depends, some similar gate need different Boolean function

Page 25: MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR 1 Introduction to Logic Gates Logical gates –Inverter –AND –OR –NAND –NOR –Exclusive OR (XOR) –Exclusive NOR.

25MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR

Positive & Negative Logic

• Signal which is set to logic 1 is said to be active and true

• Signal which is set to logic 0 is said to be not active and false

• The name of active high signal is always written in non-compliment form

• The name of active low signal is always written in non-compliment form

Page 26: MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR 1 Introduction to Logic Gates Logical gates –Inverter –AND –OR –NAND –NOR –Exclusive OR (XOR) –Exclusive NOR.

26MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR

Positive & Negative Logic

Page 27: MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR 1 Introduction to Logic Gates Logical gates –Inverter –AND –OR –NAND –NOR –Exclusive OR (XOR) –Exclusive NOR.

27MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR

Construction of SOP Expression

• Sum-of-product expression can be built using– Two level logic gate AND-OR– Two level logic gate AND-NOT

• Logic AND-OR gate

Page 28: MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR 1 Introduction to Logic Gates Logical gates –Inverter –AND –OR –NAND –NOR –Exclusive OR (XOR) –Exclusive NOR.

28MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR

Construction of SOP Expression

• NAND-NAND circuit (with transformation circuit)– Add two balls– Change OR with NAND

with inverted input and ball

on it’s compliment input

Page 29: MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR 1 Introduction to Logic Gates Logical gates –Inverter –AND –OR –NAND –NOR –Exclusive OR (XOR) –Exclusive NOR.

29MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR

Construction of POS Expression

• Product-of-sum expression can be built using– Two level logic gate AND-OR– Two level logic gate AND-NOT

• Logic AND-OR gate

Page 30: MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR 1 Introduction to Logic Gates Logical gates –Inverter –AND –OR –NAND –NOR –Exclusive OR (XOR) –Exclusive NOR.

30MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR

Construction of POS Expression

• NOR-NOR circuit (with transformation circuit)– Add two balls– Change AND with NOR

with inverted input and ball

on it’s compliment input

   

”: