30
COMPUTER ARCHITECTURE TRUTH TABLES AND LOGIC GATES

COMPUTER ARCHITECTURE TRUTH TABLES AND LOGIC GATES

Embed Size (px)

Citation preview

Page 1: COMPUTER ARCHITECTURE TRUTH TABLES AND LOGIC GATES

COMPUTER ARCHITECTURE

TRUTH TABLES AND LOGIC GATES

Page 2: COMPUTER ARCHITECTURE TRUTH TABLES AND LOGIC GATES

TRUTH TABLES & LOGIC GATES

What is a truth table? What is a gate? Concept of AND gate Concept of OR gate Exclusive OR Concept of NOT gate Concept of NAND gate Concept of NOR gate Exclusive

NOR

Page 3: COMPUTER ARCHITECTURE TRUTH TABLES AND LOGIC GATES

What is a truth table?

A truth table is a mathematical table used in logic – specifically in connection with Boolean algebra, Boolean functions etc.

Truth tables are used to tell whether a propositional expression is true for all legitimate inputs.

Page 4: COMPUTER ARCHITECTURE TRUTH TABLES AND LOGIC GATES

Truth table image

Truth tables are used to show the function of a logic gate i.e. inputs and corresponding outputs.

Page 5: COMPUTER ARCHITECTURE TRUTH TABLES AND LOGIC GATES

What is a gate? A gate is used to describe a circuit

that performs a basic logic operation. The commonest use of logic elements

is to act as switches, although they have no moving parts.

They open to pass on a pulse of electricity or close to shut it off

Page 6: COMPUTER ARCHITECTURE TRUTH TABLES AND LOGIC GATES

Types of gates These are the types of gates they

are AND gate OR gate Exclusive OR NOT gate NAND gate NOR gate Exclusive NOR

Page 7: COMPUTER ARCHITECTURE TRUTH TABLES AND LOGIC GATES

Symbol of the AND gate

Composed of two or more inputs and a single output usually indicated by the respective symbol below.

Page 8: COMPUTER ARCHITECTURE TRUTH TABLES AND LOGIC GATES

Concept of the AND gate

The AND gate is an electronic circuit that gives a high output (1) only if all its inputs are high.  A dot (.) is used to show the AND operation i.e. A.B  Bear in mind that this dot is sometimes omitted i.e. AB

Page 9: COMPUTER ARCHITECTURE TRUTH TABLES AND LOGIC GATES

AND gate TRUTH TABLE

Page 10: COMPUTER ARCHITECTURE TRUTH TABLES AND LOGIC GATES

Symbol of the OR gate

This has two or more inputs and one output as indicated below;

Page 11: COMPUTER ARCHITECTURE TRUTH TABLES AND LOGIC GATES

Concept of the OR gate

The OR gate is an electronic circuit that gives a high output (1) if one or more of its inputs are high.  A plus (+) is used to show the OR operation.

Page 12: COMPUTER ARCHITECTURE TRUTH TABLES AND LOGIC GATES

OR gate TRUTH TABLE

Page 13: COMPUTER ARCHITECTURE TRUTH TABLES AND LOGIC GATES

Symbol of the NOT gateA NOT gate can only have one input. A NOT gate is also called an inverter.

Page 14: COMPUTER ARCHITECTURE TRUTH TABLES AND LOGIC GATES

Concept of the NOT gate

The NOT gate is an electronic circuit that produces an inverted version of the input at its output.

Page 15: COMPUTER ARCHITECTURE TRUTH TABLES AND LOGIC GATES

NOT gate TRUTH TABLE

Page 16: COMPUTER ARCHITECTURE TRUTH TABLES AND LOGIC GATES

Concept of the NAND gate

The NAND gate is a popular logic element, because it can be used as a universal gate; that is NAND gates can be used in combination to perform the AND, OR, and inverter operations.

Page 17: COMPUTER ARCHITECTURE TRUTH TABLES AND LOGIC GATES

Symbol of the NAND gateThis is a NOT-AND gate which is equal to an AND gate followed by a NOT gate.  The outputs of all NAND gates are high if any of the inputs are low. The symbol is an AND gate with a small circle on the output. The small circle represents inversion.

Page 18: COMPUTER ARCHITECTURE TRUTH TABLES AND LOGIC GATES

NAND gate TRUTH TABLE

Page 19: COMPUTER ARCHITECTURE TRUTH TABLES AND LOGIC GATES

Concept of the NOR gate

The NOR gate, like the NAND gate, is a useful logic element because it can also be used as a universal gate

This means that the NOR gates can be used in combination to perform the AND, OR, and the inverter operations.

Page 20: COMPUTER ARCHITECTURE TRUTH TABLES AND LOGIC GATES

Concept of the NOR gate

The NOR is a contraction of NOT-OR and implies an OR function with an inverted (complemented) output.

The NOR gate produces a LOW output when any of its inputs is HIGH. Only when ALL the inputs are LOW is the output HIGH.

Page 21: COMPUTER ARCHITECTURE TRUTH TABLES AND LOGIC GATES

Symbol of NOR gate

Page 22: COMPUTER ARCHITECTURE TRUTH TABLES AND LOGIC GATES

NOR gate TRUTH TABLE

Page 23: COMPUTER ARCHITECTURE TRUTH TABLES AND LOGIC GATES

Concept of the Exclusive-OR gate

The exclusive-OR gate are formed by a combination of other gates. The exclusive-OR is treated as basic logic elements with their own symbols.

The exclusive-OR gate has only TWO inputs

Page 24: COMPUTER ARCHITECTURE TRUTH TABLES AND LOGIC GATES

Symbol of the Exclusive-OR gate

Page 25: COMPUTER ARCHITECTURE TRUTH TABLES AND LOGIC GATES

Concept of the Exclusive-OR gate

The output of an exclusive –OR gate is HIGH only when the TWO inputs are at opposite logical levels. This means that when both inputs differ a 1 is given

Exclusive-OR gates connected to form an adder circuit allow a computer to perform addition, subtraction, multiplication, and division in the ALU. The Exclusive-OR gate is implemented with the basic logic circuits of AND, OR, AND NOT.

Page 26: COMPUTER ARCHITECTURE TRUTH TABLES AND LOGIC GATES

Exclusive-OR gate TRUTH TABLE

Page 27: COMPUTER ARCHITECTURE TRUTH TABLES AND LOGIC GATES

Concept of the Exclusive-NOR gate

The exclusive-NOR has only TWO inputs.

The output is opposite that of the XOR gate.

When the TWO inputs logical level are opposite, the output of the XNOR gate is low

Page 28: COMPUTER ARCHITECTURE TRUTH TABLES AND LOGIC GATES

Symbol of the Exclusive-NOR gate

Page 29: COMPUTER ARCHITECTURE TRUTH TABLES AND LOGIC GATES

Exclusive-NOR gate TRUTH TABLE

Page 30: COMPUTER ARCHITECTURE TRUTH TABLES AND LOGIC GATES

TRUTH TABLES AND LOGIC GATES

Thank you for watching