logic signals and gates. binary code digital logic hides the pitfalls of the analog world by mapping...

24
Logic Signals and Gates

Upload: dulcie-mccarthy

Post on 14-Jan-2016

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Logic Signals and Gates. Binary Code Digital logic hides the pitfalls of the analog world by mapping the infinite set of real values for a physical quantity

Logic Signals and

Gates

Page 2: Logic Signals and Gates. Binary Code Digital logic hides the pitfalls of the analog world by mapping the infinite set of real values for a physical quantity

Binary Code

Digital logic hides the pitfalls of the analog world

by mapping the infinite set of real values for a physical quantity into two subsets corresponding to just two possible numbers or logic values - 0 and 1.

As a result, digital logic circuits can be analyzed and designed functionally, using switching algebra, tables, and other abstract means to describe the operation of well-behaved 0s and 1s in a circuit.

Page 3: Logic Signals and Gates. Binary Code Digital logic hides the pitfalls of the analog world by mapping the infinite set of real values for a physical quantity

Binary digit - bit

• A logic value, 0 or 1, is often called a binary

digit, or bit. If an application requires more than two discrete values, additional bits may be used, with a set of n bits representing 2n different values.

Page 4: Logic Signals and Gates. Binary Code Digital logic hides the pitfalls of the analog world by mapping the infinite set of real values for a physical quantity

Physical phenomena used to represent bits

Page 5: Logic Signals and Gates. Binary Code Digital logic hides the pitfalls of the analog world by mapping the infinite set of real values for a physical quantity

LOW & HIGH

• When discussing electronic logic circuits such as CMOS and TTL, digital designers often use the words “LOW” and “HIGH” in place of “0” and “1” to remind them that they are dealing with real circuits, not abstract quantities:

• LOW - a signal in the range of algebraically lower voltages, which is interpreted as a logic 0.

• HIGH - a signal in the range of algebraically higher voltages, which is interpreted as a logic 1.

Page 6: Logic Signals and Gates. Binary Code Digital logic hides the pitfalls of the analog world by mapping the infinite set of real values for a physical quantity

Positive logic & negative logic

• The assignments of 0 and 1 to LOW and HIGH are somewhat arbitrary.

• Assigning 0 to LOW and 1 to HIGH seems most natural and is called positive logic.

• The opposite assigning, 1 to LOW and 0 to HIGH, is not often used and is called negative logic.

Page 7: Logic Signals and Gates. Binary Code Digital logic hides the pitfalls of the analog world by mapping the infinite set of real values for a physical quantity

Signal Assignment and Logic Polarity

Page 8: Logic Signals and Gates. Binary Code Digital logic hides the pitfalls of the analog world by mapping the infinite set of real values for a physical quantity

Demonstration of Positive and Negative Logic

Page 9: Logic Signals and Gates. Binary Code Digital logic hides the pitfalls of the analog world by mapping the infinite set of real values for a physical quantity

Buffer amplifier

• Because a wide range of physical values represent the

same binary value, digital logic is highly immune to component and power-supply variations and noise.

• Buffer-amplifier circuits can be used to regenerate weak values in to strong ones, so that digital signals can be transmitted over arbitrary distances without loss of information.

• A buffer- amplifier for CMOS logic converts any HIGH input voltage into an output very close to 5.0 v, and any LOW input voltage into an output very close to 0.0 v.

Page 10: Logic Signals and Gates. Binary Code Digital logic hides the pitfalls of the analog world by mapping the infinite set of real values for a physical quantity

Black-box representation

• This representation does not describe how the circuit responds to input signals.

• Its logical operation can be described with a table.

Page 11: Logic Signals and Gates. Binary Code Digital logic hides the pitfalls of the analog world by mapping the infinite set of real values for a physical quantity

combinational circuit

• A logic circuit whose outputs depend only on its current

inputs is called a combinational circuit.• Its operation is fully described by a truth table that lists

all combination of input values and the output value(s) produced by each one.

Page 12: Logic Signals and Gates. Binary Code Digital logic hides the pitfalls of the analog world by mapping the infinite set of real values for a physical quantity

combinational circuit

• Logic circuit using AND, OR and NOT gates:

Page 13: Logic Signals and Gates. Binary Code Digital logic hides the pitfalls of the analog world by mapping the infinite set of real values for a physical quantity

combinational circuit

• A logic circuit whose outputs depend only on its current

inputs is called a combinational circuit.

Page 14: Logic Signals and Gates. Binary Code Digital logic hides the pitfalls of the analog world by mapping the infinite set of real values for a physical quantity

sequential circuit

• A circuit with memory, whose outputs depend on the current input and the sequence of past inputs, is called a sequential circuit.

• The behaviour of such a circuit may be described by a state table that specifies its output and next state as functions of its current state and input.

Page 15: Logic Signals and Gates. Binary Code Digital logic hides the pitfalls of the analog world by mapping the infinite set of real values for a physical quantity

sequential circuit

• A circuit with memory, whose outputs depend on the current input and the sequence of past inputs, is called a sequential circuit.

Page 16: Logic Signals and Gates. Binary Code Digital logic hides the pitfalls of the analog world by mapping the infinite set of real values for a physical quantity

Basic gates

• Just three logic functions AND, OR, and NOT can be

used to build any combinational logic circuit.

Page 17: Logic Signals and Gates. Binary Code Digital logic hides the pitfalls of the analog world by mapping the infinite set of real values for a physical quantity

Gate’s functions in words:

• An AND gate produces a 1 output if and only if all of its

inputs are 1.• An OR gate produces a 1 output if and only if one or

more of its inputs are 1.• A NOT gate, usually called an inverter, produces an

output value that is the opposite of its input value.

Page 18: Logic Signals and Gates. Binary Code Digital logic hides the pitfalls of the analog world by mapping the infinite set of real values for a physical quantity

Inversion bubble

• The circle on the inverter symbol’s output is called an

inversion bubble.• It is used in other gate symbols to denote “inverting”

behaviour.

Page 19: Logic Signals and Gates. Binary Code Digital logic hides the pitfalls of the analog world by mapping the infinite set of real values for a physical quantity

Other gate symbols

Page 20: Logic Signals and Gates. Binary Code Digital logic hides the pitfalls of the analog world by mapping the infinite set of real values for a physical quantity

NAND and NOR

• NAND and Nor can be obtained by combining NOT

with an AND and OR.

• An NAND gate produces the opposite of an AND gate’s output, a 0 output if and only if all of its inputs are 1.

• An NOR gate produces the opposite of an OR gate’s output, a 0 output if and only if one or more of its inputs are 1.

Page 21: Logic Signals and Gates. Binary Code Digital logic hides the pitfalls of the analog world by mapping the infinite set of real values for a physical quantity

Basic gates

Page 22: Logic Signals and Gates. Binary Code Digital logic hides the pitfalls of the analog world by mapping the infinite set of real values for a physical quantity

Gates with more than two inputs

• The symbols and truth tables for AND, OR and XOR

may be extended to gates with any number of inputs.

Page 23: Logic Signals and Gates. Binary Code Digital logic hides the pitfalls of the analog world by mapping the infinite set of real values for a physical quantity

Timing diagram

• Real logic circuits also function in another analog dimension -

time.

• The logic signals do not change between 0 and 1 instantaneously.

• There is a lag between an input change and the corresponding output change.

The circuit can be viewed as moving between discrete states at precise intervals defined by a clock signal.

Page 24: Logic Signals and Gates. Binary Code Digital logic hides the pitfalls of the analog world by mapping the infinite set of real values for a physical quantity

analog phenomena

• Even if you nothing about the analog electronics, you

should be able to understand the logical behaviour of digital circuits.

• However, there comes a time in design and debugging when every logic designer must throw out “the digital abstraction” temporarily and consider the analog phenomena that limit or disrupt digital performance.