You are on page 1of 21

# Combination of Basic Logic Gates

## Review- Basic Logic gates

The OR, AND and NOT gates are the three basic circuits that make up all digital circuits.

AND Operator
Consider: If the car is fueled AND the engine works, then the engine will start A
Inputs
Output

## AND Operator Truth Table A B Output 0 0 0 0 1 0 1 0 0 1 1 1

AND means that both conditions must be true in order for the conclusion to be true

OR Operator
Another basic operator is the OR Consider: If I have cash OR a credit card, then I can pay the bill OR works such that the output is true, if either of the two inputs is true

## NOT Operator/Inverter Gate

The NOT gate reverses the input
A B

NOT Operator Truth Table All digital computers are built using only three gate types: AND, OR, and NOT
A B 0 1 1 0

logical relationships
1. "If you wash the dishes and clean your room, you can go to the party." Your kid has washed the dishes but not cleaned the room. Does your kid get to go to the party under this rule? (AND) 2. "I will let you go to the party if you wash the dishes or clean your room." Your kid has cleaned their room but the dishes are still dirty. Does your kid get to go to the party under this rule? (OR) 3. Same rule as #2, but your kid both washed the dishes and cleaned up their room - do they get to go? (Inclusive or, OR, includes cases where both conditions are true)

NAND Gate: It is combination of AND gate is connected to the input of a NOT gate. The output of a NAND gate is opposite to the AND gate. The Boolean expression for NAND

function is

Y = A.B

A 1 1 0 0

B 1 0 1 0

C 0 1 1 1

(II) NOR Gate: It is a combination of OR gate and NOT gate. In other words, output of OR gate is connected to the input of a NOT gate. (c). The output of OR gate is inverted to form NOR gate.. The Boolean expression
for NOR function
Y=A+B

is

A 1 1 0 0

B 1 0 1 0

C 0 0 0 1

The XOR ( exclusive-OR ) gate acts in the same way as the logical "either/or." The output is "true" if either, but not both, of the inputs are "true." The output is "false" if both inputs are "false" or if both inputs are "true." Another way of looking at this circuit is to observe that the output is 1 if the inputs are different, but 0 if the inputs are the same.

## Consider a biological example: If gender A XOR gender B, then reproduction is possible

A 1 1 0 0

B 1 0 1 0

C 0 1 1 0

XOR works such that output is activated (equal to one) if both inputs are of a different value

The XNOR (exclusive-NOR) gate is a combination XOR gate followed by an inverter. Its output is "true" if the inputs are the same, and"false" if the inputs are different.

REVIEW: Rule for an AND gate: output is "high" only if first input and second input are both "high." Rule for an OR gate: output is "high" if input A or input B are "high." Rule for a NAND gate: output is not "high" if both the first input and the second input are "high. Rule for a NOR gate: output is not "high" if either the first input or the second input are "high."

A Negative-AND gate behaves like a NOR gate. A Negative-OR gate behaves like a NAND gate. Rule for an Exclusive-OR gate: output is "high" if the input logic levels are different. Rule for an Exclusive-NOR gate: output is "high" if the input logic levels are the same.

## Digital Combination Lock

Using 3 two-input AND gates, we could build a combination lock that requires a four-digit code, specifically: 1 1 1 1
1 1 1 AND 1 1 AND 1 AND 1

The number of inputs could be increased by using more and more AND gates

A 1 1 0 0

B 1 0 1 0

C D

## And and And

A 1 1 0 0

B C D 1 0 1 0

XOR and OR A 1 1 0 B 1 0 1 C

A 1 1 0 0

A 1 0 1 0

C 1 1 0 0

D 1 0 1 0

A 1 1 0 0

B 1 0 1 0

C 1 0 1 0

A 1

B 1

1
0

0
1

Shie-shie..
Physics Kay Ganda!!!