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 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.
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 2n different values.
Physical phenomena used to represent bits
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.
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.
Signal Assignment and Logic Polarity
Demonstration of Positive and Negative Logic
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.
Black-box representation This representation does not describe how the circuit responds to input signals. Its logical operation can be described with a table.
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.
combinational circuit Logic circuit using AND, OR and NOT gates:
combinational circuit A logic circuit whose outputs depend only on its current inputs is called a combinational circuit.
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.
sequential circuit A circuit with memory, whose outputs depend on the current input and the sequence of past inputs, is called a sequential circuit.
Basic gates Just three logic functions AND, OR, and NOT can be used to build any combinational logic circuit.
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.
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.
Other gate symbols
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.
Basic gates
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.
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.
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.