Download chap2-1_c150

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Chapter 2
Combinational Logic Circuits
2-1 Binary Logic and Gates
 Digital circuits are hardware components that
manipulate binary information.
 The circuits are implemented using transistors and
interconnections in complex semiconductor devices
called integrated circuits.
 Each basic circuit is referred to as a logic gate.
 For simplicity in design, we model the transistor-based
electronic circuits as logic gates.
 Thus, the designer need not be concerned with the
internal electronics of the individual gates, but only with
their external logic properties.
 Each gate performs a specific logical operation.
 The outputs of gates are applied to the inputs of other
gates to form a digital circuit.
 The specific Boolean algebra we will study is used to
describe the interconnection of digital gates and to
introduce the concept of binary logic and show its
relationship to digital gates and binary signals.
Binary Logic
 Associated with the binary variables are three basic
logical operations called AND, OR, and NOT:
1. AND
2. OR
3. NOT
chap_2-1_c150
Combinational Logic Circuit
Page 1 of 13
 Binary logic resembles binary arithmetic, and the
operations AND and OR have similarities to multiplication
and addition, respectively.
 However, binary logic should not be confused with binary
arithmetic.
 One should realize that an arithmetic variable designates
a number that may consist of many digits, whereas a
logic variable is always either a 1 or 0.
 The following equations define the logical OR
operation:
0+0=0
0+1=1
1+0=1
1+1=1
 Logical AND operation:
0+0=0
0+1=0
1+0=0
1+1=1
 This operation is identical to binary multiplication, provided
that we use only a single bit.
 Alternative symbols to the . for AND and + for OR, are
symbols ^ and , respectively, that represent conjunctive
operations in propositional calculus.
chap_2-1_c150
Combinational Logic Circuit
Page 2 of 13
Logic Gates:
 Logic gates are electronic circuits that operate on one
or more input signals to produce and output signal.
 Electrical signals such as voltage or currents exist
throughout a digital system in either of two recognizable
values.
 Voltage-operated circuits respond to two separate
voltage ranges that represent a binary variable equal to
logic 1 or logic 0.
 The graphics symbols used to designate the three
types of gates ----- AND, OR, and NOT ----- are shown
in Figure 2-1(a).
 The gates are electronic circuits that produce the
equivalents of logic-1 and logic-0 output signals in
accordance with their respective truth tables if the
equivalents of logic-1 and logic-0 input signals are
applied.
 The two input signals X and Y to the AND and OR
gates take on one of four possible combinations:
00, 01, 10, or 11.
 These input signals are shown as timing diagrams in
Figure 2-1(b), together with the timing diagrams for the
corresponding output signal for each type of gate.
chap_2-1_c150
Combinational Logic Circuit
Page 3 of 13
 The AND gate responds with a logic-1 output signal
when both input signals are logic 1.
 The OR gate responds with a logic-1 output signal if
either input signal is logic 1.
 The NOT gate is more commonly referred to as an
inverter.
 AND and OR gates may have more than two inputs.
 An AND gate with three inputs and an OR gate with six
inputs are shown in Figure 2-2.
 The three input AND gate responds with a logic-1
output if all three inputs are logic 1.
 The output is logic 0 if any input is logic 0.
chap_2-1_c150
Combinational Logic Circuit
Page 4 of 13
 The six-input OR gate responds with a logic 1 if any
input is logic 1; its output becomes a logic 0 only when
all inputs are logic 0.
2-2 Boolean Algebra
 The Boolean algebra we present is an algebra dealing
with binary variables and logic operations.
 The variables are designated by letters of the alphabet,
and the three basic logic operations are AND, OR, and
NOT.
 A Boolean expression is an algebraic expression
formed by using binary variables, the constants 0 and
1, the logic operation symbols, and parentheses.
 Consider an example Boolean equation representing
function F:
 The two parts of the expression, X and
, are called
terms of the expression for F.
 The function F is equal to 1 if term X is equal to 1 or if
term is equal to 1.
chap_2-1_c150
Combinational Logic Circuit
Page 5 of 13
 A Boolean function can be represented by a truth
table.
 An algebraic expression for a Boolean function can be
transformed into a circuit diagram composed of logic
gates that implements the function.
 The logic circuit diagram for function F is shown in
Figure 2-3.
 Circuit gates are interconnected by wires that carry
logic signals.
 Logic circuits of this type are called combinational
logic circuits, since the variables are “combined” by
the logical operations.
 There is only one way that Boolean function can be
represented in a truth table.
chap_2-1_c150
Combinational Logic Circuit
Page 6 of 13
 However, when the function is in algebraic equation
form, it can be expressed in a variety of ways.
Basic Identities of Boolean Algebra
 Table 2-3 lists the most basic identities of Boolean
algebra.
 The first nine identities show the relationship between a
single variable X, its complement
, and the binary
constants 0 and 1.
 The next five identities, 10 through 14, have
counterparts in ordinary algebra.
 The last three, 15 through 17, do not apply in ordinary
algebra, but are useful in manipulating Boolean
expressions.
chap_2-1_c150
Combinational Logic Circuit
Page 7 of 13
 Table 2-4 shows two truth tables that verify the first part
of DeMorgan’s theorem.
 In A, we evaluate
for all possible values of X and
Y.
 This is done by first evaluating X+Y and then taking its
complement.
 In B, we evaluate
and
and then AND them
together.
 The result is the same for the four binary combinations
of X and Y, which verifies the identify of the equation.
chap_2-1_c150
Combinational Logic Circuit
Page 8 of 13
Algebraic Manipulation
 Boolean algebra is useful tool for simplifying digital
circuits.
 Consider, for example, the Boolean function
represented by
chap_2-1_c150
Combinational Logic Circuit
Page 9 of 13
 The expression is reduced to only two terms and can
be implemented with gates as shown in Figure 2-4(b).
 It is obvious that the circuit in (b) is simpler than the one
in (a), yet, both implement the same function.
 It is possible to use a truth table to verify that the two
implementations are equivalent.
chap_2-1_c150
Combinational Logic Circuit
Page 10 of 13
 The two circuits have the same output for all possible
binary combinations of the three input variables.
 Each circuit implements the same function, but the one
with fewer gates is preferable because it requires fewer
components.
 When a Boolean equation is implemented with logic
gates, each term requires a gate, and each variable
within the term designates an input to the gate.
 The following examples are identities from
Table 2-3 to illustrate a few of the possibilities:
 The following are three more examples to
simplifies Boolean expressions:
 Along with the results just given in equations 1
through 6, the following consensus theorem is
useful when simplifying Boolean expressions:
 The theorem shows that the third term, YZ, is
redundant and can be eliminated.
chap_2-1_c150
Combinational Logic Circuit
Page 11 of 13
Complement of a Function
 The complement representation for a function F, , is
obtained from an interchange of 1’s to 0’s and 0’s to 1’s
for the values of F in the truth table.
 The complement of a function can be derived algebraically
by applying DeMorgan’s theorem.
 The generalized form of this theorem states that the
complement of an expression is obtained by
interchanging AND and OR operations and
complementing each variable and constant, as shown in
Example 2-1.
chap_2-1_c150
Combinational Logic Circuit
Page 12 of 13
 Remember that the dual of an expression is obtained
by interchanging AND and OR operations and 1’s and
0’s.
 To avoid confusion in handling complex functions,
adding parentheses around terms before taking the
dual is helpful.
chap_2-1_c150
Combinational Logic Circuit
Page 13 of 13