20
Logic Gates

Logic Gates. The Inverter The inverter (NOT circuit) performs the operation called inversion or complementation. Standard logic symbols: 1 1 input output

Embed Size (px)

Citation preview

Page 1: Logic Gates. The Inverter The inverter (NOT circuit) performs the operation called inversion or complementation. Standard logic symbols: 1 1 input output

Logic Gates

Page 2: Logic Gates. The Inverter The inverter (NOT circuit) performs the operation called inversion or complementation. Standard logic symbols: 1 1 input output

The Inverter

The inverter (NOT circuit) performs the operation called inversion or complementation.

Standard logic symbols:

1

1input output input output

Page 3: Logic Gates. The Inverter The inverter (NOT circuit) performs the operation called inversion or complementation. Standard logic symbols: 1 1 input output

Inverter Truth Table & Logic Expression

Input Output

LOW (0) HIGH (1)

HIGH (1) LOW (0)

0 1

1 0

A X = A

Page 4: Logic Gates. The Inverter The inverter (NOT circuit) performs the operation called inversion or complementation. Standard logic symbols: 1 1 input output

The AND Gate & Its Operation The AND gate is composed of two or more

inputs and a single output.

For a 2-input AND gate: Output X is HIGH only when inputs A and B are

HIGH X is LOW when either A or B is LOW, or when

both A and B are LOW.

&A

BX

A

BX

Page 5: Logic Gates. The Inverter The inverter (NOT circuit) performs the operation called inversion or complementation. Standard logic symbols: 1 1 input output

AND Gate Truth Table

The total number of possible combinations of binary inputs to a gate is determined by:

N = 2n

Therefore: 2 bits (n=2) = 4 combinations 3 bits = 8 combinations 4 bits = 16 combinations

INPUTS OUTPUT

A B X

0 0 0

0 1 0

1 0 0

1 1 1

A

BX

Page 6: Logic Gates. The Inverter The inverter (NOT circuit) performs the operation called inversion or complementation. Standard logic symbols: 1 1 input output

AND Gate – Logic Expressions Use either:

X = A · B ,or X = AB

If there are more than 2 inputs, do as below:

A

BX

X= ABC

X= ABCD

ABC

ABCD

Page 7: Logic Gates. The Inverter The inverter (NOT circuit) performs the operation called inversion or complementation. Standard logic symbols: 1 1 input output

The OR Gate

Like AND gate, an OR gate has two or more inputs and one output.

For a 2-input OR gate: output X is HIGH when either input A or input B is

HIGH, or when both A and B are HIGH. X is LOW only when both A and B are LOW.

A

BX

≥ 1A

B

X

Page 8: Logic Gates. The Inverter The inverter (NOT circuit) performs the operation called inversion or complementation. Standard logic symbols: 1 1 input output

OR Gate Truth Table

INPUTS OUTPUT

A B X

0 0 0

0 1 1

1 0 1

1 1 1

A

BX

Page 9: Logic Gates. The Inverter The inverter (NOT circuit) performs the operation called inversion or complementation. Standard logic symbols: 1 1 input output

OR Gate – Logic Expressions

Use the operator + for OR operation X = A + B If there are more than 2 inputs, do as below:

X= A+B+C

X= A+B+C+D

ABC

ABCD

Page 10: Logic Gates. The Inverter The inverter (NOT circuit) performs the operation called inversion or complementation. Standard logic symbols: 1 1 input output

The NAND Gate

NAND = NOT-AND

For a 2-input NAND gate: Output X is LOW only when inputs A and B are

HIGH X is HIGH when either A or B is LOW, or when

both A and B are LOW

&A

BX

A

BX

A

BX

Page 11: Logic Gates. The Inverter The inverter (NOT circuit) performs the operation called inversion or complementation. Standard logic symbols: 1 1 input output

NAND Gate Truth Table & Logic Expression

INPUTS OUTPUT

A B X

0 0 1

0 1 1

1 0 1

1 1 0

A

BX

The Boolean expression for the output of a 2-input NAND gate is

X = AB

Page 12: Logic Gates. The Inverter The inverter (NOT circuit) performs the operation called inversion or complementation. Standard logic symbols: 1 1 input output

Negative-OR Equivalent Op of a NAND For a 2-input NAND gate performing a

negative-OR operation Output X is HIGH when either input A or input B is

LOW or when both A and B are LOW

NAND Negative-OR

Page 13: Logic Gates. The Inverter The inverter (NOT circuit) performs the operation called inversion or complementation. Standard logic symbols: 1 1 input output

The NOR Gate

NOR = NOT-OR

For a 2-input NOR gate: Output X is LOW when either input A or input B is

HIGH, or when both A and B are HIGH X is HIGH only when both A and B are LOW

A

BX

A

BX

≥ 1A

BX

Page 14: Logic Gates. The Inverter The inverter (NOT circuit) performs the operation called inversion or complementation. Standard logic symbols: 1 1 input output

NOR Gate Truth Table & Logic Expression

INPUTS OUTPUT

A B X

0 0 1

0 1 0

1 0 0

1 1 0

A

BX

The Boolean expression for the output of a 2-input NOR gate is

X = A+B

Page 15: Logic Gates. The Inverter The inverter (NOT circuit) performs the operation called inversion or complementation. Standard logic symbols: 1 1 input output

Negative-AND Equivalent Op of a NOR For a 2-input NOR gate performing a

negative-AND operation Output X is HIGH only when both inputs A and B

are LOW

NOR Negative-AND

Page 16: Logic Gates. The Inverter The inverter (NOT circuit) performs the operation called inversion or complementation. Standard logic symbols: 1 1 input output

The XOR and XNOR Gates

Exclusive-OR and Exclusive-NOR gates are formed by a combination of other gates already discussed.

Because of their fundamental importance in many applications, these gates are often treated as basic logic elements with their own unique symbols.

Page 17: Logic Gates. The Inverter The inverter (NOT circuit) performs the operation called inversion or complementation. Standard logic symbols: 1 1 input output

The XOR Gate

For a 2-input exclusive-OR gate: Output X is HIGH when input A is LOW and input

B is HIGH, or when input A is HIGH and input B is LOW

X is LOW when A and B are both HIGH and both LOW

= 1A

B

X

A

BX

Page 18: Logic Gates. The Inverter The inverter (NOT circuit) performs the operation called inversion or complementation. Standard logic symbols: 1 1 input output

XOR Gate Truth Table & Logic Expression

INPUTS OUTPUT

A B X

0 0 0

0 1 1

1 0 1

1 1 0

A

BX

The Boolean expression for the output of a 2-input XOR gate is

X = A+B

Page 19: Logic Gates. The Inverter The inverter (NOT circuit) performs the operation called inversion or complementation. Standard logic symbols: 1 1 input output

The XNOR Gate

For a 2-input exclusive-NOR gate: Output X is LOW when input A is LOW and input

B is HIGH, or when input A is HIGH and input B is LOW

X is HIGH when A and B are both HIGH and both LOW

= 1A

B

X

A

BX

Page 20: Logic Gates. The Inverter The inverter (NOT circuit) performs the operation called inversion or complementation. Standard logic symbols: 1 1 input output

XNOR Gate Truth Table & Logic Expression

INPUTS OUTPUT

A B X

0 0 1

0 1 0

1 0 0

1 1 1

A

BX

The Boolean expression for the output of a 2-input XNOR gate is

X = A+B