0% found this document useful (0 votes)
26 views12 pages

Chapter 2

Uploaded by

fikrutafesse08
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views12 pages

Chapter 2

Uploaded by

fikrutafesse08
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 12

Chapter 2: Boolean Algebra and Digital Logic Circuits

2.1 Boolean Algebra

The digital circuitry in digital computers and other digital systems is designed, and its behavior is
analyzed, with the use of a mathematical discipline known as Boolean algebra. The name is in honor of
an English mathematician George Boole, who proposed the basic principles of this algebra in 1854 in
his treatise, An Investigation of the Laws of Thought on Which to Found the Mathematical Theories of
Logic and Probabilities. In 1938, Claude Shannon, a research assistant in the Electrical Engineering
Department at M.I.T., suggested that Boolean algebra could be used to solve problems in relay- switching
circuit design. Shannon‟s techniques were subsequently used in the analysis and design of electronic
digital circuits.
Boolean algebra turns out to be a convenient tool in two areas:
Analysis: It is an economical way of describing the function of digital circuitry.
Design: Given a desired function, Boolean algebra can be applied to develop a simplified
implementation of that function.
Boolean algebra makes use of logical variables and logical operators. The possible values for a logical
variable are either TRUE or FALSE. For ease of use, these values are, conventionally, represented by 1
and 0 respectively. A system in which the only possible values are 0 and 1 is the binary number system.
Likewise, it is similar to the binary states of digital electronics and that is why Boolean algebra is used
to analyze digital circuits. The logical operators of Boolean algebra are AND, OR, and NOT, which are
symbolically represented by dot (∙), plus sign (+), and over bar (¯). Often the dot is omitted in Boolean
expression. Hence, A∙B is written as AB without the dot.
The operation AND yields true (binary value 1) if and only if both of its operands are true. The
operation OR yields true if either or both of its operands are true. The unary operation NOT inverts the
value of its operand. Other useful derived operators are NAND, NOR, and XOR. NAND (stands for
NOT - AND) is a combination of AND and NOT. It is the opposite of AND. NOR (NOT - OR) is
formed by combining OR and NOT. NOR is the opposite of OR. Similarly XOR is equivalent to the
equationX∙Y + X∙Y. Operator NOT is a unary operator and others are binary operators. XOR yields 1
when only if exactly one of the operands has the value 1. Except NOT, all operators and can be used
with more than two variables.
Table 1 shows the truth tables for these Boolean operators. A truth table shows the results of
an operation for every possible combination of values for its variables.
Table 2 shows important identities of Boolean algebra. These identities are useful in simplifying
Boolean functions in order to find simple circuit designs

Table 1-1: Truth table for Boolean operators


Table 2: Basic identities of Boolean algebra
Basic Postulates
A+0=A A.1=A Identity law
A+1=1 A.0=0 Boundedness Law
A+A=A A. A = A Idempotent law
A + A' = 1 A . A'=0 Compliment law
A + B = B+A A.B = B.A Commutative law
A+ (B . C) = (A+B) . (B+C) A . (B+C) = (A . B) + (A . C) Distributive law
A+ (A . B) = A A . (A+B) = A Absorption law
(A+B)+C = A+(B+C) (A . B) . C = A. (B. C) Associate law
(A+B) = A . B (A . B) = A + B De Morgan's law
A =A Involution law

2.2 Logic Gates


The fundamental building block of all digital logic circuits is the gate. Logical functions are
implemented by the interconnection of gates. A gate is an electronic circuit that produces an output
signal that is a simple Boolean operation on its input signals. The basic gates used in digital logic are
AND, OR, NOT, NAND, NOR, and XOR. Figure 1-1 depicts these six gates. Each gate is defined in
three ways: graphic symbol, algebraic notation, and truth table. The symbology used here is the IEEE
standard, IEEE Std 91. Note that the inversion (NOT) operation is indicated by a circle.
Each gate shown in Figure 1 has one or two inputs and one output. However, it is already stated that, all
of the gates except NOT can have more than two inputs. Thus, they can be implemented with thee
inputs. When one or more of the values at the input are changed, the correct output signal appears almost
instantaneously, delayed only by the propagation time of signals through the gate (known as the gate
delay). In some cases, a gate is implemented with two outputs, one output being the negation of the
other output.
Here we introduce a common term: we say that to assert a signal is to cause signal line to make a
transition from its logically false (0) state to its logically true (1) state. The true (1) state is either
a high or low voltage state, depending on the type of electronic circuitry.
Figure 1: Basic logic gates
Typically, not all gate types are used in implementation. Design and fabrication are simpler if
only one or two types of gates are used. Thus, it is important to identify functionally complete
sets of gates. This means that any Boolean function can be implemented using only the gates in
the set. The following are functionally complete sets:
AND, OR, NOT
AND, NOT
OR, NOT
NAND
NOR
It should be clear that AND, OR, and NOT gates constitute a functionally complete set, because
they represent the three operations of Boolean algebra. For the AND and NOT gates to form a
functionally complete set, there must be a way to synthesize the OR operation from the AND and
NOT operations.
This can be done by applying DeMorgan‟s theorem:
A+ B = A ∙ B
A OR B = NOT ((NOT A) AND (NOT B))
Similarly, the OR and NOT operations are functionally complete because they can be used
to synthesize the AND operation. Figure 2 (a) shows how the AND, OR, and NOT
functions can be implemented solely with NAND gates, and Figure 2 (b) shows the same
thing for NOR gates. For this reason, digital circuits can be and frequently are,
implemented solely with NAND gates or solely with NOR gates. Although this may not
be the minimum-gate implementation, it has the advantage of regularity, which can
simplify the manufacturing process.
With gates, we have reached the most primitive circuit level of computer hardware. An
examination of the transistor combinations used to construct gates departs from that realm
and enters the realm of electrical engineering. For our purposes, however, we are content
to describe how gates can be used as building blocks to implement the essential logical
circuits of a digital computer.

Figure 2: (a) The use of NAND gate (b) The use of NOR gate

2.3 Integrated Circuits


Integrated circuit (IC) is the basic building block of digital circuits. An integrated circuit is a
small silicon semiconductor crystal, called a chip. The various gates are interconnected inside the
chip to form the required circuit. As the technology of ICs has improved, the number of gates
that can be put in a single chip has increased.
Small-scale integration (SSI) devices contain several (usually less than 10) independent gates in
a single package.
Medium-scale integration (MSI) devices contain approximately 10 to 200 gates in a single
package.
E.g To form decoders, adders, and registers.
Large-scale integration (LSI) devices contain between 200 and a few thousands gates in a
single package.
Eg. Processors, memory chips, and programmable modules.
Very-large-scale integration (VLSI) devices contain thousands of gates in a single package.
E.g large memory arrays and complex microcomputer chips.
Digital integrated circuits are also classified based on the specific circuit technology to which
they belong. The basic circuit in each technology is either a NAND, a NOR, or an inverter gate.
The most popular logic families of integrated circuits are:
TTL Transistor-transistor logic
 Has been in operation for many years and is considered as standard.
ECL Emitter-coupled logic
 Has an advantage in systems requiring high-speed operation.
MOS Metal-oxide semiconductor
 Is suitable for circuits that need high component density.
CMOS Complementary metal-oxide semiconductor
 Preferable in systems requiring low power consumption.

2.3.1 Combinational Circuits


A combinational circuit is an interconnected set of gates whose output at any time is a function
only of the input at that time. As with a single gate, the appearance of the input is followed
almost immediately by the appearance of the output, with only gate delays. In general terms, a
combinational circuit consists of n binary inputs and m binary outputs. As with a gate, a
combinational circuit can be defined in three ways:
Truth table: For each of the 2n possible combinations of input signals, the binary value
of each
of the m output signals is listed.
Graphical symbols: The interconnected layout of gates is depicted.
Boolean equations: Each output signal is expressed as a Boolean function of its input
signals
Implementation of Boolean Functions
Any Boolean function can be implemented in electronic form as a network of gates. For any
given function, there are a number of alternative realizations. Consider the Boolean function
represented by the truth table in Table 3.We can express this function by simply itemizing the
combinations of values of A, B, and C that cause F to be 1:

There are three combinations of input values that cause F to be 1, and if any one of these
combinations occurs, the result is 1. This form of expression, for self-evident reasons, is known
as the sum of products (SOP) form. Figure 3 shows a straightforward implementation with AND,
OR, and NOT gates.
Table 3: Truth table for the function in Equation (1.1)
Figure 3: Sum of products implementation of Table 3
Another form can also be derived from the truth table. The SOP form expresses that the output is
1 if any of the input combinations that produce 1 is true. We can also say that the output is 1 if
none of the input combinations that produce 0 is true. Thus,
This is in the product of sums (POS) form, which is illustrated in Figure 4. For clarity, NOT
gates are not shown. Rather, it is assumed that each input signal and its complement are
available. This simplifies the logic diagram and makes the inputs to the gates more readily
apparent. Thus, a Boolean function can be realized in either SOP or POS form. At this point, it
would seem that the choice would depend on whether the truth table contains more 1s or 0s for
the output function: The SOP has one term for each 1, and the POS has one term for each 0.
However, there are other considerations:
 It is often possible to derive a simpler Boolean expression from the truth table
than either SOP or POS.
 It may be preferable to implement the function with a single gate type (NAND or
NOR).
The significance of the first point is that, with a simpler Boolean expression, fewer gates will be
needed to implement the function. Three methods that can be used to achieve simplification are:
 Algebraic simplification
 Karnaugh maps
 Quine–McKluskey tables
Algebraic Simplification
Algebraic simplification involves the application of the identities of Table 2 to reduce the
Boolean expression to one with fewer elements. For example, Equation (1.1) can be simplified
to:
Figure 4: Product of sums implementation of Table 3
This expression can be implemented as shown in Figure 5. The simplification of Equation (1.1)
was done essentially by observation. For more complex expressions, some more systematic
approach is needed.
Common Combinational Circuits
1. Adders
Binary addition differs from Boolean algebra in that the result includes a carry term. Thus,

However, addition can still be dealt with in Boolean terms. In Table 4 a, we show the logic for
adding two input bits to produce a 1-bit sum and a carry bit. This truth table could easily be
implemented in digital logic. A digital arithmetic circuit that carries out the addition of a pair of
bits is called a half adder.
However, we are not interested in performing addition on just a single pair of bits. Rather, we
wish to add two n-bit numbers along with a carry from a previous bitwise addition. Such digital
circuit is called a full adder. A combination of two half adders creates a full adder. This can be
done by putting together a set of adders so that the carry from

2.4 Sequential Circuits


Combinational circuits implement the essential functions of a digital computer. However, except
for the special case of ROM, they provide no memory or state information, elements also
essential to the operation of a digital computer. For the latter purposes, a more complex form of
digital logic circuit is used: the sequential circuit. The current output of a sequential circuit
depends not only on the current input, but also on the past history of inputs. Another and
generally more useful way to view it is that the current output of a sequential circuit depends on
the current input and the current state of that circuit.
In this section, we examine sequential circuits taking flip-flops as example. As will be seen, the
sequential circuit makes use of combinational circuits. One adder is provided as input to the next.
Figure 6 shows the block diagram and the logic diagram for a half adder and Figure 7 shows
that of a full adder. You can notice that the sum and carry columns of the half adder truth table
are similar to that of an XOR and AND logic operation truth tables. Therefore, the sum and carry
of a pair of bits can be implemented with an XOR and an AND gate as shown in Figure 6 and
Figure 7.
Table 4: Binary Addition Truth Table

Figure 6: Half Adder

Figure 7: Full Adder

Figure 7: Construction of 32-bit Adder using 8-bit Adders


By combining a number of full adders, we can have the necessary logic to implement a multiple-
bit adder such as shown in Figure 2-3. Note that because the output from each adder depends on
the carry from the previous adder, there is an increasing delay from the least significant to the
most significant bit. Each single-bit adder experiences a certain amount of gate delay, and this
gate delay accumulates. For larger adders, the accumulated delay can become unacceptably high.
2. Multiplexers
The multiplexer connects multiple inputs to a single output. At any time, one of the inputs is
selected to be passed to the output. A general block diagram representation is shown in Figure 8.
This represents a 4-to-1 multiplexer. There are four input lines, labeled D0, D1, D2, and D3. One
of these lines is selected to provide the output signal F. To select one of the four possible inputs,
a 2-bit selection code is needed, and this is implemented as two select lines labeled S1 and S2.
Table 5: 4-to-1 Multiplexer Truth Table

Figure 7: Block Diagram of a 4-to-1 Multiplexer


An example 4-to-1 multiplexer is defined by the truth table in Table 5. This is a simplified form
of a truth table. Instead of showing all possible combinations of input variables, it shows the
output as data from line D0, D1, D2, or D3. Figure 8 shows an implementation using AND, OR,
and NOT gates. S1 and S2 are connected to the AND gates in such a way that, for any
combination of S1 and S2, three of the AND gates will output 0.The fourth AND gate will output
the value of the selected line, which is either 0 or 1. Thus, three of the inputs to the OR gate are
always 0, and the output of the OR gate will equal the value of the selected input gate. Using this
regular organization, it is easy to construct multiplexers of size 8-to-1, 16-to-1, and so on.

Figure 8: Implementation of a 4-to-1 Multiplexer


Multiplexers are used in digital circuits to control signal and data routing. An example is the
loading of the program counter (PC).
3. Demultiplexer
The demultiplexer performs the inverse function of a multiplexer. It connects a single input to
one of several outputs.
4. Decoders
A decoder is a combinational circuit with a number of output lines, only one of which is selected
at any time, depending on the pattern of input lines. In general, a decoder has n inputs and 2 n
outputs. Decoders find many uses in digital computers.
 One example is address decoding.
 The other is binary-to- octal conversion.

Figure 9: Decoder with 3 inputs and 2n = 8 outputs

2.5 Sequential Circuits


In case of combinational circuits, the value of each output depends on the values of signals
applied to the inputs. However, in case of Sequential Circuits, the values of the outputs depend
not only on the present values of the inputs but also on the past behaviour of the circuit. Such
circuits include storage elements that store the values of logic signals. The contents of the storage
elements are said to represent the state of the circuit.
E.g flip-flops

2.5.1 Flip-Flops
The simplest form of sequential circuit is the flip-flops. There are a variety of flip-flops, all of
which share two properties: The flip-flop is a bistable device, i.e. has two stable states. It exists
in one of two states and, in the absence of input- function as a 1-bit memory. The flip-flop has
two outputs, Q and the complement of Q.
E.g S-R, J-K & D flip-flops
A. S-R Flip-Flops
The circuit has two inputs, S (Set) and R (Reset), and two outputs, Q & complement of Q.
Mostly, events in the digital computer are synchronized to a clock pulse, so that changes occur
only when a clock pulse occurs. The S and R inputs are passed to the NOR gates only during the
clock pulse. Only when the clock signal changes [0-1] can output affected according to the
values of input S and R.

Figure 10: S-R Flip-Flop


B. D Flip-Flops
The D (data) flip-flop -data flip-flop uses for storage of one bit of data. The output of the D flip-
flop is always equal to the most recent value applied to the input. Hence, it remembers and
produces the last input.

Figure 11: D Flip-Flops


C. J-K Flip Flops
Like S–R flip-flops, it has two inputs. However, in this case all possible combinations of input
values are valid. Intermediate state of S-R type is defined in J-K flip- flops.

Figure 12: J-K Flip Flops

You might also like