Basic Logic Gates -...

29
Basic Logic Gates By: Dr. Yogendar Kr. Verma S. S Jain Subodh P.G. (Autonomous) College SUBJECT -CA TITLE - Basic Logic Gates

Transcript of Basic Logic Gates -...

Page 1: Basic Logic Gates - subodhmcainstitute.comsubodhmcainstitute.com/pdf/tutorials/BasicLogicGates1.pdfBasic Logic Gates and Basic Digital Design NOT, AND, and OR Gates NAND and NOR Gates

Basic Logic Gates

By: Dr. Yogendar Kr. Verma

S. S Jain Subodh P.G. (Autonomous) College

SUBJECT -CA

TITLE - Basic Logic Gates

Page 2: Basic Logic Gates - subodhmcainstitute.comsubodhmcainstitute.com/pdf/tutorials/BasicLogicGates1.pdfBasic Logic Gates and Basic Digital Design NOT, AND, and OR Gates NAND and NOR Gates

Basic Logic Gates

and Basic Digital Design

• NOT, AND, and OR Gates

• NAND and NOR Gates

• Exclusive-OR (XOR) Gate

• Multiple-input Gates

S. S Jain Subodh P.G. (Autonomous) College

Page 3: Basic Logic Gates - subodhmcainstitute.comsubodhmcainstitute.com/pdf/tutorials/BasicLogicGates1.pdfBasic Logic Gates and Basic Digital Design NOT, AND, and OR Gates NAND and NOR Gates

NOT Gate -- Inverter

X Y

0

1

1

0

X Y

Y

NOT

X Y

Y = ~X

NOT

S. S Jain Subodh P.G. (Autonomous) College

Page 4: Basic Logic Gates - subodhmcainstitute.comsubodhmcainstitute.com/pdf/tutorials/BasicLogicGates1.pdfBasic Logic Gates and Basic Digital Design NOT, AND, and OR Gates NAND and NOR Gates

NOT • Y = ~X (Verilog) • Y = !X (ABEL) • Y = not X (VHDL) • Y = X’ • Y = X • Y = X (textook)

• not(Y,X) (Verilog)

S. S Jain Subodh P.G. (Autonomous) College

Page 5: Basic Logic Gates - subodhmcainstitute.comsubodhmcainstitute.com/pdf/tutorials/BasicLogicGates1.pdfBasic Logic Gates and Basic Digital Design NOT, AND, and OR Gates NAND and NOR Gates

NOT

X ~X ~~X = X

X ~X ~~X

0 1 0

1 0 1

S. S Jain Subodh P.G. (Autonomous) College

Page 6: Basic Logic Gates - subodhmcainstitute.comsubodhmcainstitute.com/pdf/tutorials/BasicLogicGates1.pdfBasic Logic Gates and Basic Digital Design NOT, AND, and OR Gates NAND and NOR Gates

AND Gate AND

X

Y

Z

Z = X & Y

X Y Z

0 0 0

0 1 0

1 0 0

1 1 1

S. S Jain Subodh P.G. (Autonomous) College

Page 7: Basic Logic Gates - subodhmcainstitute.comsubodhmcainstitute.com/pdf/tutorials/BasicLogicGates1.pdfBasic Logic Gates and Basic Digital Design NOT, AND, and OR Gates NAND and NOR Gates

AND

• X & Y (Verilog and ABEL)

• X and Y (VHDL)

• X Y • X Y • X * Y • XY (textbook)

• and(Z,X,Y) (Verilog)

U

V

S. S Jain Subodh P.G. (Autonomous) College

Page 8: Basic Logic Gates - subodhmcainstitute.comsubodhmcainstitute.com/pdf/tutorials/BasicLogicGates1.pdfBasic Logic Gates and Basic Digital Design NOT, AND, and OR Gates NAND and NOR Gates

OR Gate OR

X

Y Z

Z = X | Y

X Y Z

0 0 0

0 1 1

1 0 1

1 1 1

S. S Jain Subodh P.G. (Autonomous) College

Page 9: Basic Logic Gates - subodhmcainstitute.comsubodhmcainstitute.com/pdf/tutorials/BasicLogicGates1.pdfBasic Logic Gates and Basic Digital Design NOT, AND, and OR Gates NAND and NOR Gates

OR

• X | Y (Verilog)

• X # Y (ABEL)

• X or Y (VHDL)

• X + Y (textbook)

• X V Y

• X U Y

• or(Z,X,Y) (Verilog)

S. S Jain Subodh P.G. (Autonomous) College

Page 10: Basic Logic Gates - subodhmcainstitute.comsubodhmcainstitute.com/pdf/tutorials/BasicLogicGates1.pdfBasic Logic Gates and Basic Digital Design NOT, AND, and OR Gates NAND and NOR Gates

Basic Logic Gates

and Basic Digital Design • NOT, AND, and OR Gates

• NAND and NOR Gates

• Exclusive-OR (XOR) Gate

• Multiple-input Gates

S. S Jain Subodh P.G. (Autonomous) College

Page 11: Basic Logic Gates - subodhmcainstitute.comsubodhmcainstitute.com/pdf/tutorials/BasicLogicGates1.pdfBasic Logic Gates and Basic Digital Design NOT, AND, and OR Gates NAND and NOR Gates

NAND Gate NAND

X

Y

Z

X Y Z

0 0 1

0 1 1

1 0 1

1 1 0

Z = ~(X & Y)

nand(Z,X,Y)

S. S Jain Subodh P.G. (Autonomous) College

Page 12: Basic Logic Gates - subodhmcainstitute.comsubodhmcainstitute.com/pdf/tutorials/BasicLogicGates1.pdfBasic Logic Gates and Basic Digital Design NOT, AND, and OR Gates NAND and NOR Gates

NAND Gate NOT-AND

X

Y

Z

W = X & Y

Z = ~W = ~(X & Y)

X Y W Z

0 0 0 1

0 1 0 1

1 0 0 1

1 1 1 0

W

S. S Jain Subodh P.G. (Autonomous) College

Page 13: Basic Logic Gates - subodhmcainstitute.comsubodhmcainstitute.com/pdf/tutorials/BasicLogicGates1.pdfBasic Logic Gates and Basic Digital Design NOT, AND, and OR Gates NAND and NOR Gates

NOR Gate NOR

X

Y Z

X Y Z

0 0 1

0 1 0

1 0 0

1 1 0 Z = ~(X | Y)

nor(Z,X,Y)

S. S Jain Subodh P.G. (Autonomous) College

Page 14: Basic Logic Gates - subodhmcainstitute.comsubodhmcainstitute.com/pdf/tutorials/BasicLogicGates1.pdfBasic Logic Gates and Basic Digital Design NOT, AND, and OR Gates NAND and NOR Gates

NOR Gate NOT-OR

X

Y

W = X | Y

Z = ~W = ~(X | Y)

X Y W Z

0 0 0 1

0 1 1 0

1 0 1 0

1 1 1 0

Z W

S. S Jain Subodh P.G. (Autonomous) College

Page 15: Basic Logic Gates - subodhmcainstitute.comsubodhmcainstitute.com/pdf/tutorials/BasicLogicGates1.pdfBasic Logic Gates and Basic Digital Design NOT, AND, and OR Gates NAND and NOR Gates

Basic Logic Gates

and Basic Digital Design

• NOT, AND, and OR Gates

• NAND and NOR Gates

• Exclusive-OR (XOR) Gate

• Multiple-input Gates

S. S Jain Subodh P.G. (Autonomous) College

Page 16: Basic Logic Gates - subodhmcainstitute.comsubodhmcainstitute.com/pdf/tutorials/BasicLogicGates1.pdfBasic Logic Gates and Basic Digital Design NOT, AND, and OR Gates NAND and NOR Gates

NAND Gate X

Y

X

Y

Z Z

Z = ~(X & Y) Z = ~X | ~Y

=

X Y W Z

0 0 0 1

0 1 0 1

1 0 0 1

1 1 1 0

X Y ~X ~Y Z

0 0 1 1 1

0 1 1 0 1

1 0 0 1 1

1 1 0 0 0

S. S Jain Subodh P.G. (Autonomous) College

Page 17: Basic Logic Gates - subodhmcainstitute.comsubodhmcainstitute.com/pdf/tutorials/BasicLogicGates1.pdfBasic Logic Gates and Basic Digital Design NOT, AND, and OR Gates NAND and NOR Gates

NOR Gate X

Y Z

Z = ~(X | Y)

X Y Z

0 0 1

0 1 0

1 0 0

1 1 0

X

Y

Z

Z = ~X & ~Y

X Y ~X ~Y Z

0 0 1 1 1

0 1 1 0 0

1 0 0 1 0

1 1 0 0 0

S. S Jain Subodh P.G. (Autonomous) College

Page 18: Basic Logic Gates - subodhmcainstitute.comsubodhmcainstitute.com/pdf/tutorials/BasicLogicGates1.pdfBasic Logic Gates and Basic Digital Design NOT, AND, and OR Gates NAND and NOR Gates

Basic Logic Gates

and Basic Digital Design

• NOT, AND, and OR Gates

• NAND and NOR Gates

• Exclusive-OR (XOR) Gate

• Multiple-input Gates

S. S Jain Subodh P.G. (Autonomous) College

Page 19: Basic Logic Gates - subodhmcainstitute.comsubodhmcainstitute.com/pdf/tutorials/BasicLogicGates1.pdfBasic Logic Gates and Basic Digital Design NOT, AND, and OR Gates NAND and NOR Gates

Exclusive-OR Gate

X Y Z XOR

X

Y Z 0 0 0

0 1 1

1 0 1

1 1 0

Z = X ^ Y

xor(Z,X,Y)

S. S Jain Subodh P.G. (Autonomous) College

Page 20: Basic Logic Gates - subodhmcainstitute.comsubodhmcainstitute.com/pdf/tutorials/BasicLogicGates1.pdfBasic Logic Gates and Basic Digital Design NOT, AND, and OR Gates NAND and NOR Gates

XOR

• X ^ Y (Verilog)

• X $ Y (ABEL)

• X @ Y

• xor(Z,X,Y) (Verilog)

X Y (textbook)

S. S Jain Subodh P.G. (Autonomous) College

Page 21: Basic Logic Gates - subodhmcainstitute.comsubodhmcainstitute.com/pdf/tutorials/BasicLogicGates1.pdfBasic Logic Gates and Basic Digital Design NOT, AND, and OR Gates NAND and NOR Gates

Exclusive-NOR Gate

X Y Z XNOR

X

Y Z 0 0 1

0 1 0

1 0 0

1 1 1

Z = ~(X ^ Y)

Z = X ~^ Y

xnor(Z,X,Y)

S. S Jain Subodh P.G. (Autonomous) College

Page 22: Basic Logic Gates - subodhmcainstitute.comsubodhmcainstitute.com/pdf/tutorials/BasicLogicGates1.pdfBasic Logic Gates and Basic Digital Design NOT, AND, and OR Gates NAND and NOR Gates

XNOR

• X ~^ Y (Verilog)

• !(X $ Y) (ABEL)

• X @ Y

• xnor(Z,X,Y) (Verilog)

X Y

S. S Jain Subodh P.G. (Autonomous) College

Page 23: Basic Logic Gates - subodhmcainstitute.comsubodhmcainstitute.com/pdf/tutorials/BasicLogicGates1.pdfBasic Logic Gates and Basic Digital Design NOT, AND, and OR Gates NAND and NOR Gates

Basic Logic Gates

and Basic Digital Design • NOT, AND, and OR Gates

• NAND and NOR Gates

• Exclusive-OR (XOR) Gate

• Multiple-input Gates

S. S Jain Subodh P.G. (Autonomous) College

Page 24: Basic Logic Gates - subodhmcainstitute.comsubodhmcainstitute.com/pdf/tutorials/BasicLogicGates1.pdfBasic Logic Gates and Basic Digital Design NOT, AND, and OR Gates NAND and NOR Gates

Multiple-input Gates

Z 1 2

3 4 Z Z

Z

S. S Jain Subodh P.G. (Autonomous) College

Page 25: Basic Logic Gates - subodhmcainstitute.comsubodhmcainstitute.com/pdf/tutorials/BasicLogicGates1.pdfBasic Logic Gates and Basic Digital Design NOT, AND, and OR Gates NAND and NOR Gates

Multiple-input AND Gate

Z 1

Output is HIGH only if all inputs are HIGH Z 1

An open input will float HIGH

S. S Jain Subodh P.G. (Autonomous) College

Page 26: Basic Logic Gates - subodhmcainstitute.comsubodhmcainstitute.com/pdf/tutorials/BasicLogicGates1.pdfBasic Logic Gates and Basic Digital Design NOT, AND, and OR Gates NAND and NOR Gates

Multiple-input OR Gate

Output is LOW only if all inputs are LOW Z 2

2 Z

S. S Jain Subodh P.G. (Autonomous) College

Page 27: Basic Logic Gates - subodhmcainstitute.comsubodhmcainstitute.com/pdf/tutorials/BasicLogicGates1.pdfBasic Logic Gates and Basic Digital Design NOT, AND, and OR Gates NAND and NOR Gates

Multiple-input NAND Gate

Output is LOW only if all inputs are HIGH Z 3

3 Z

S. S Jain Subodh P.G. (Autonomous) College

Page 28: Basic Logic Gates - subodhmcainstitute.comsubodhmcainstitute.com/pdf/tutorials/BasicLogicGates1.pdfBasic Logic Gates and Basic Digital Design NOT, AND, and OR Gates NAND and NOR Gates

Multiple-input NOR Gate

Output is HIGH only if all inputs are LOW Z 4

4 Z

S. S Jain Subodh P.G. (Autonomous) College

Page 29: Basic Logic Gates - subodhmcainstitute.comsubodhmcainstitute.com/pdf/tutorials/BasicLogicGates1.pdfBasic Logic Gates and Basic Digital Design NOT, AND, and OR Gates NAND and NOR Gates

S. S Jain Subodh P.G. (Autonomous) College

Thanks you………