Charting Computer Hardware & Software
Charting Computer Hardware & Software
CSC2315
For example, look at a supermarket barcode reader to see how it fits this definition
of a computer.
1. First, the grocery item being purchased is passed over the barcode reader -
input.
2. Next, the description and price of the item are looked up - processing.
3. Then, the item description and price are displayed on the cash register and
printed on the receipt - output.
4. Finally, the inventory, ordering, and sales records are updated - storage.
We can see that the computer functions through four stages: input, processing,
output, and storage.
Computers come in many varieties, from the tiny computers built into household
appliances, to the astounding supercomputers. But no matter how big it is or how
it is used, every computer is part of a system. A complete Computer System
consists of four parts:
i. Hardware
ii. Software
iii. Data
iv. User
PAGE 1
Computer Hardware includes all the physical components the make
up the computer system. these components range from the CPU to
the memory and input/output devices.
The programs that control the operation of the computer are its software.
In VNA data and instructions share the same path. This effect slows the computer
down and is called the von Neumann bottleneck.
PAGE 2
COMPUTER HARDWARE DEVICE
Computer hardware can be categorized using two ways:
• By Function – they may fall into Processing, Memory, Input & Output, or
Storage Devices.
• By Location – They may be inside the system unit (internal devices -
processor, RAM), or outside (peripherals - mouse, keyboard, printer).
SYSTEM UNIT
The system unit is the main case of a computer or mobile device. It houses the
processing hardware for that device, as well as a few other components, such as
storage devices, the power supply, and cooling fans.
PAGE 3
MOTHERBOARD
The main circuit board inside the system unit, everything connects to the
motherboard either directly or indirectly.
The CPU, RAM, ROM, and buses are directly attached to the motherboard.
CPU
CPU is the brain of the computer; it organizes and carries out instructions that
cone from the either the user or the software. It consists of three associated
elements: the arithmetic and logic unit (ALU), the control unit (CU), and the
register areas.
• The arithmetic and logic unit (ALU) handles mathematical calculations and
logical comparisons.
PAGE 4
• The control unit (CU) accesses program instructions, decodes them, and
coordinates the flow of data throughout the computer system.
• Registers are high-speed memory locations used to hold data and instructions
as they are being manipulated by the CU and ALU.
MEMORY DEVICES
PERIPHERALS
Parts of the PC— the printer, the keyboard, the monitor, etc.— that connect to the
system unit through interfaces are known collectively as peripherals.
MONITOR - The big television thing that provides a visual output for the computer.
MOUSE - Pointing device used to control a graphical pointer on the monitor for
input.
Output Devices are hardware components that returns processed data to the user.
Examples of input devices include the monitor, speaker, projectors and printer.
PAGE 5
Communication or I/O Device – A device that performs both input and output
functions. Modems and network interface cards are examples of I/O devices.
STORAGE DEVICES
The hardware component that holds data or programs while they are not being
used.
The physical materials on which data is stored are called storage medium. The
hardware components that write data to, and read data from, storage media are
called storage devices. For example, a diskette is storage medium; a diskette drive
is a storage device.
The three main categories of storage technologies used today are magnetic, optical
and solid-state storage.
Optical storage – A storage technology that use light beams(lasers) to read data
from or write data to the surface of an optical disc. Optical storage devices include
CD drive, DVD drives, and Blu-ray Disc.
Solid-state storage – a storage technology that uses memory chips rather than
disks to store data. E.g., flash memory, smart cards, solid state disk (ssd).
Magnetic and optical storage are less expensive than solid-state storage. However
solid-state storage devices can move data in much less time (because they have no
moving parts).
There are three (3) major distinctions between storage and memory.
PAGE 6
LEVELS OF MEMORY HIERARCHY
PAGE 7
MACHINE CYCLE
Machine cycle is the complete series of steps a CPU takes in executing an
instruction. A machine cycle itself can be broken down into two smaller cycles: the
instruction cycle and the execution cycle.
1. Fetch instruction. The computer fetches the data and instruction from
memory into the processor.
2. Decode instruction. The instruction is decoded and passed to the
appropriate processor execution unit.
Machine cycle time also can be measured by how many instructions are executed
in 1 second. This measure, called MIPS, stands for millions of instructions per
second.
Clock speed
A measure of processor’s operating speed. The number of clock cycle per second.
The basic unit is in Hertz (Hz).
Hertz (Hz) is a measure of cycle per second, Megahertz (MHz) means “millions of
cycles per second.” Gigahertz (MHz) means “billions of cycles per second.”
PAGE 8
Clock cycle
A clock cycle is a single tick, or the time it takes to turn a transistor off and back
on again.
• Registers
• Memory
• Cache
• Clock speed
• Data bus
ASSISGNMENT
There are around 5 factors that affect processing speed. Explain how each of them affect
the processing speed.
PAGE 9
ANALOG AND DIGITAL SYSTEMS
The term analog is derived from the noun analogy and means a quantity that is
related to, or resembles, or corresponds to, another quantity; for example, the
length of a column of mercury in a thermometer is an analog of the temperature
because the length of the mercury is proportional to the temperature. Analog
electronic circuits represent physical quantities in terms of voltages or currents.
Analog systems include speaker, audio amplifiers, magnetic tape recording and
playback equipment, and a simple light dimmer switch.
Digital systems include digital computers and calculators, digital audio and video
equipment, and the telephone system (largest digital system).
The major difference between analog and digital quantities, then, can be simply
stated as follows:
Analog quantities can take on any value over a continuous range; digital quantities
can take on only discrete values.
PAGE 10
Easier to design; easier to store information; greater accuracy and precision;
programmability; less affected by noise; higher degree of integration.
DIGITAL COMPUTERS
Digital computers are constructed from millions of very simple logic elements.
These circuit elements are gates and flip-flops and are also known as
combinational and sequential logic elements, respectively.
FUNDAMENTAL GATES
The digital computer consists of nothing more than the interconnection of three
types of primitive elements called AND, OR, and NOT gates. Other gates called
NAND, NOR, and EOR gates can be derived from these gates. We shall see that all
digital circuits, may be designed from the appropriate interconnection of NAND
(or NOR) gates alone. In other words, the most complex digital computer can be
reduced to a mass of NAND gates.
We don’t use gates to build computers because we like them or because Boolean
algebra is great fun. We use gates because they provide a way of mass producing
cheap and reliable digital computers.
PAGE 11
Figure. The AND gate.
PAGE 12
Figure. The representation of an AND gate.
The OR gate
The output of an OR gate is true if any one (or more than one) of its inputs is true.
Notice the difference between AND, and OR operations. The output of an AND is
true only if all inputs are true whereas the output of an OR is true if at least one
input is true.
PAGE 13
Table. Truth table for the OR gate.
PAGE 14
The NOT gate
The NOT gate is also called an inverter or a complementor and is a two-terminal
device with a single input and a single output. If the input of an inverter is X, its
output is NOT X which is written 𝑋̅, X* or X’.
PAGE 15
Figure. Circuit symbols for the NAND and NOR gates.
The little circle at the output of a NAND gate represents the symbol for inversion
or complementation. It is this circle that converts the AND gate to a NAND gate
and an OR gate to a NOR gate. This circle can be applied to the inputs of gates as
well as to their outputs.
We can get a better feeling for the effect that different gates have on two inputs, A
and B, by putting all the gates together in a single table. We have also included the
EXCLUSIVE OR (i.e. EOR) and its complement the EXCLUSIVE NOR (i.e. EXNOR)
PAGE 16
in the table below for reference. The EOR gate is derived from AND, OR, and NOT
gates.
Applications of gates
We will look at four simple circuits to demonstrate that a few gates can be
connected together in such a way as to create a circuit whose function and
importance may readily be appreciated.
Circuits are constructed by connecting gates together. The output from one gate
can be connected (i.e. wired) to the input of one or more other gates. However,
two outputs cannot be connected together.
Example 1 Consider the circuit of Figure below that uses three two-input AND
gates labeled G1, G2, and G3, and a three input OR gate labeled G4. This circuit has
three inputs A, B, and C, and an output F. What does it do?
PAGE 17
Figure: The use of gates—Example 1.
We can tackle this problem in several ways. One approach is to create a truth table
that tabulates the output F for all the eight possible combinations of the three
inputs A, B, and C. Table below corresponds to the circuit of the Figure and
includes columns for the outputs of the three AND gates as well as the output of
the OR gate, F.
PAGE 18
Table: Truth table for Fig. The use of gates—Example 1.
Example 2 The circuit of Figure below has three inputs, one output, and three
intermediate values.
PAGE 19
By inspecting the truth table for this circuit (Table below) we can see that when
the input X is 0, the output, F, is equal to Y. Similarly, when X is 1, the output is
equal to Z. The circuit of Figure behaves like an electronic switch, connecting the
output to one of two inputs, Y or Z, depending on the state of a control input X.
PAGE 20
Table: Truth table for Figure above
We can derive an expression for F in terms of inputs X, Y, and Z in two ways. From
the circuit diagram of the above Figure, we can get an equation for F by writing the
output of each gate in terms of its inputs.
̅̅̅̅̅
F = 𝑄. 𝑅
Q = ̅̅̅̅̅
𝑌. 𝑃
P = 𝑋̅
Therefore Q = ̅̅̅̅̅
𝑌. 𝑋̅ by substituting for P
R = ̅̅̅̅̅̅
𝑋·𝑍
̅̅̅̅̅̅̅̅̅̅̅̅̅̅
Therefore F = ̅̅̅̅̅̅
𝑌 · 𝑋̅ · ̅̅̅̅̅̅
𝑋·𝑍
Another way of obtaining a Boolean expression is to use the truth table. Each time
a logical one appears in the output column, we can write down the set of inputs
that cause the output to be true. In the Table above the output is true when
PAGE 21
(1) X = 0, Y = 1, Z = 0 (𝑋̅ · 𝑌 · 𝑍̅)
(2) X = 0, Y = 1, Z = 1 (𝑋̅ · 𝑌 · 𝑍)
(3) X = 1, Y = 0, Z = 1 (𝑋 · 𝑌̅ · 𝑍)
(4) X = 1, Y = 1, Z = 1 (𝑋 · 𝑌 · 𝑍)
There are four possible combinations of inputs that make the output true.
Therefore, the output can be expressed as the logical sum of the four cases (1) – (4)
above; that is,
F = 𝑋̅ · 𝑌 · 𝑍̅ + 𝑋̅ · 𝑌 · 𝑍 + 𝑋 · 𝑌̅ · 𝑍 + 𝑋 · 𝑌 · 𝑍
This function is true if any of the conditions (1)– (4) are true. A function
represented in this way is called a sum-of products (S-of-P) expression because
it is the logical OR (i.e. sum) of a group of terms each composed of several of
variables ANDed together (i.e. products). A sum-of-products expression represents
one of the two standard ways of writing down a Boolean expression.
Each of the terms (1) – (4) in Example 2, is called a minterm. A minterm is an AND
(product) term that includes each of the variables in either its true or
complemented form. For example, in the case above 𝑋 · 𝑌̅ · 𝑍 is a minterm, but if
we had had the term 𝑋 · 𝑌̅ that would not be a minterm, because it includes only
two of the three variables.
As the output of the circuit in Example 2 Figure must be the same whether it is
derived from the truth table or from the logic diagram, the two equations we have
derived for F must be equivalent, with the result that
PAGE 22
̅̅̅̅̅̅̅̅̅̅̅̅̅̅
̅̅̅̅̅̅
𝑌 · 𝑋̅ · ̅̅̅̅̅̅
𝑋 · 𝑍 = 𝑋̅ · 𝑌 · 𝑍̅ + 𝑋̅ · 𝑌 · 𝑍 + 𝑋 · 𝑌̅ · 𝑍 + 𝑋 · 𝑌 · 𝑍
Example 3 Figure below describes a simple circuit with three gates: an OR gate, an
AND gate, and a NAND gate. This circuit has two inputs, two intermediate values,
and one output. Table below provides its truth table.
The Figure represents one of the most important circuits in digital electronics, the
exclusive or (also called EOR or XOR). The output of an EOR gate output is true if
one of the inputs is true but not if both inputs are true.
An EOR circuit always has two inputs (remember that AND and OR gates can have
any number of inputs).
Because the EOR function is so widely used, the EOR gate has its own special
circuit symbol (Figure X) and the EOR operator its own special logical symbol ‘⨁’;
for example, we can write
F = A EOR B = A ⨁ B
The EOR is not a fundamental gate because it is constructed from basic gates.
PAGE 23
Figure: The use of gates—Example 3.
F = P·Q
P=A+B
Q = ̅̅̅̅̅̅
𝐴·𝐵
Therefore F = (A + B) · ̅̅̅̅̅̅
𝐴·𝐵
PAGE 24
As these two equations (i.e. F = 𝐴̅ · 𝐵 + 𝐴 · 𝐵̅ and F = (A + B) · ̅̅̅̅̅̅
𝐴 · 𝐵 are equivalent,
we can therefore also build an EOR function in the manner depicted in Figure
below.
It’s perfectly possible to build an EOR with four NAND gates (Fig. Y). To
demonstrate that two different circuits have the same function, all you need do is
to construct a truth table for each circuit. If the outputs are the same for each and
every possible input, the circuits are equivalent
PAGE 25
Example 5 Our final example looks at two different circuits that do the same
thing.
a) Using AND, OR, and NOT gates only, draw circuits to generate P and Q from
inputs X, Y, and Z, where P = (X + Y)(Y⨁ Z) and Q = Y·Z + X·Y·Z.
b) By means of a truth table establish a relationship between P and Q.
c) Compare the circuit diagrams of P and Q in terms of speed and cost of
implementation.
The circuit diagram for P = (X + Y)(Y⨁ Z) is given by Fig. P and the circuit diagram
for Q = Y·Z + X·Y·Z is given by Fig. Q.
The truth table for functions P and Q is given in Table PQ from which it can be
seen that P = Q.
PAGE 26
Table PQ: Truth table for Figs P and Q.
Propagation delay: The maximum delay in the circuit for P is four gates in series
in the Y path (i.e. NOT gate, AND gate, OR gate, AND gate). The maximum delay
in the circuit for Q is three gates in series in both Y and Z paths (i.e. NOT gate,
AND gate, OR gate). Therefore, the circuit for Q is 33% faster than that for P.
BOOLEAN ALGEBRA
The behavior of digital circuits can be described in terms of a formal notation
called Boolean algebra. Boolean algebra allows you to analyze circuits containing
gates and sometimes enables circuits to be constructed in a simpler form. Boolean
algebra leads on to Karnaugh maps, a graphical technique for the simplification
and manipulation of Boolean equations.
Boolean algebra is used to design digital circuits and to analyze their behavior.
PAGE 27
Only three functions or operations (AND, OR, NOT) are permitted in Boolean
algebra.
Boolean variable: Takes only two values – either true (1) or false (0). They are used
as basic units of formal logic.
Boolean algebra: Deals with binary variables and logic operations operating on
those variables.
Logic diagram: Composed of graphic symbols for logic gates. A simple circuit
sketch that represents inputs and outputs of Boolean functions.
PAGE 28
Table: Basic axioms of Boolean algebra Table: Boolean operations on a
constant and a variable.
The axioms of Boolean algebra could be used to simplify equations, but it would be
too tedious to keep going back to first principles. Instead, we can apply the axioms
of Boolean algebra to derive some theorems to help in the simplification of
expressions. Once we have proved a theorem by using the basic axioms, we can
apply the theorem to equations.
Theorem 1 X + X⋅ Y = X
Theorem 2 X + 𝑋̅⋅ Y = X + Y
(This can be proved using Theorem 1 and X + 𝑋̅ = 1)
Theorem 4 X⋅ (X + Y) = X
Theorem 6 (X + Y) (X + 𝑌̅) = X
PAGE 29
Theorem 8 (X + Y) (𝑋̅ + Z) (Y + Z) = (X + Y) (𝑋̅ + Z)
Theorem 9 ̅̅̅̅̅̅̅̅̅̅
𝑋 ⋅ 𝑌 ⋅ 𝑍 = 𝑋̅ + 𝑌̅ + 𝑍̅
Theorem 10 ̅̅̅̅̅̅̅̅̅̅̅̅̅
𝑋 + 𝑌 + 𝑍 = 𝑋̅ ⋅ 𝑌̅ ⋅ 𝑍̅
Theorems 9 and 10 are collectively called de Morgan’s theorem. This theorem can
be stated as an entire function is complemented by
Expression Dual
X=X+X X = X⋅X (replace + by ⋅)
1=X+1 0 = X⋅ 0 (replace + by ⋅ and replace 1 by 0)
X = X⋅ (X + Y) X = X + X⋅ Y (replace ⋅ by + and replace + by ⋅)
As you can see, the dual of each expression is also true.
It’s difficult to be sure we have reached an optimal solution. Later we study Karnaugh
maps, which provide an approach that gives us confidence that we’ve reached an optimal
solution.
PAGE 30
De Morgan’s theorem
Theorems 9 and 10 provide the designer with a powerful tool because they enable
an AND function to be implemented by an OR gate and inverter. Similarly, these
theorems enable an OR gate to be implemented by an AND gate and inverter.
To apply de Morgan’s theorem to a function the ANDs are changed into ORs, ORs
into ANDs and variables (and literals) are complemented. The following examples
illustrate the application of de Morgan’s theorem.
1. F = ̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅
𝑋⋅𝑌+ 𝑌⋅𝑍
= ̅̅̅̅̅̅
𝑋 ⋅ 𝑌 ⋅ ̅̅̅̅̅̅
𝑋⋅𝑍
2. F = ̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅
𝐴⋅𝐵+ 𝐶⋅𝐷+ 𝐴⋅𝐷
= ̅̅̅̅̅̅
𝐴 ⋅ 𝐵 ⋅ ̅̅̅̅̅̅
𝐶 ⋅ 𝐷 ⋅ ̅̅̅̅̅̅
𝐴⋅𝐷 Replace + by ⋅ and complement the product terms
̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅
3. F = 𝐴 ⋅ 𝐵 ⋅ (𝐷 + 𝐸 ⋅ 𝐷) This is a product term with three elements.
= 𝐴̅ + 𝐵̅ + ̅̅̅̅̅̅̅̅̅̅̅̅
𝐶+𝐸⋅𝐷 Replace + by ⋅ and complement variables
= 𝐴̅ + 𝐵̅ + 𝐶̅ ⋅ ̅̅̅̅̅̅
𝐸⋅𝐷 Evaluate the complemented expression (change + to ⋅)
= 𝐴̅ + 𝐵̅ + 𝐶̅ ⋅ (𝐸̅ + 𝐷
̅) Final step, evaluate ̅̅̅̅̅̅
𝐸⋅𝐷
This example demonstrates how you have to keep applying de Morgan’s theorem
until there are no complemented terms left to evaluate.
PAGE 31
Implementing logic functions in NAND or NOR two logic only
Some gates are better than others; for example, the NAND gate is both faster and
cheaper than the corresponding AND gate. Consequently, it’s often necessary to
realize a circuit using one type of gate only.
F = 𝐹̿ = ̿̿̿̿̿̿̿̿̿̿̿̿̿̿̿̿
𝐴 + 𝐵 + 𝐶 Double negation has no effect on the value of a function
F = ̅̅̅̅̅̅̅̅̅̅
𝐴̅ · 𝐵̅ · 𝐶̅ Apply de Morgan's theorem
We’ve now converted the OR function into a NAND function. The three NOT
functions that generate 𝐴̅, 𝐵̅, and 𝐶̅ can be implemented in terms of NOT gates, or
by means of two input NAND gates with their inputs connected together.
PAGE 32
It’s important to note that we are not using de Morgan’s theorem here to simplify
Boolean expressions. We are using de Morgan’s theorem to convert an expression
into a form suitable for realization in terms of NAND (or NOR) gates.
Karnaugh maps
The Karnaugh map, or more simply the K-map, is a graphical technique for the
representation and simplification of a Boolean expression that shows
unambiguously when a Boolean expression has been reduced to its most simple
form.
The Karnaugh map is just a two-dimensional form of the truth table, drawn in
such a way that the simplification of a Boolean expression can immediately be seen
from the location of 1s on the map. A system with n variables has 2n lines in its
truth table and 2n squares on its Karnaugh map. Each square on the Karnaugh map
is associated with a line (i.e., minterm) in the truth table. Figure below shows
Karnaugh maps for one to four variables.
PAGE 33
You need to develop three skills to use a Karnaugh map.
• The first is to plot terms on the map (i.e. transfer a truth table or a Boolean
expression onto the map).
• The second skill is the ability to group the 1s you’ve plotted on the map.
• The third skill is to read the groups of 1s on the map and express each group as a
product term.
Note that no two 1s plotted on the Karnaugh map of above Figure are adjacent to
each other, and that the function F = 𝐴̅⋅𝐵̅⋅ 𝐶̅ + 𝐴̅⋅B⋅C + A⋅𝐵̅⋅C cannot be simplified.
PAGE 34
Simplifying Sum-of-Product expressions with a Karnaugh map
The first step in simplifying a Boolean expression by means of a Karnaugh map is
to plot all the 1s (i.e., minterms) in the function’s truth table on the Karnaugh map.
The next step is to combine adjacent 1s into groups of one, two, four, eight, or 16.
The groups of minterms should be as large as possible. The final stage in
simplifying an expression is reached when each of the groups of minterms (i.e., the
product terms) are ORed together to form the simplified sum-of-products
expression.
2. A square covered by a 1 may belong to more than one term in the sum-of-products
expression (see fig. 3). If a 1 on the Karnaugh map appears in two groups, it is
equivalent to adding the corresponding minterm to the overall expression for the
function plotted on the map twice. Repeating a term in a Boolean expression does
not alter the value of the expression, because one of the axioms of Boolean algebra
is X + X = X.
4. In order either to read a product term from the map, or to plot a product term on
the map, it is necessary to ask the question, ‘what minterms (squares) are covered
by this term?’ Consider the term 𝐴̅⋅D in Fig. 2. This term covers all squares for
which A = 0 and D = 1 (a group of 4).
PAGE 35
Having shown how terms are plotted on the Karnaugh map, the next step is
to apply the map to the simplification of the expressions. Once again, we
demonstrate this process by means of examples. In each case, the original
function is plotted on the left-hand side of the figure and the regrouped
ones (i.e., minterms) are plotted on the right-hand side.
PAGE 36
INTEGRATED CIRCUITS (ICS)
ICs are a collection of resistors, diodes, and transistors fabricated on a single piece
of semiconductor material (usually silicon) called a substrate, which is commonly
referred to as a chip. The chip is enclosed in a protective plastic or ceramic package
from which pins extend for connecting the IC to other devices.
Digital ICs are often categorized according to their circuit complexity as measured
by the number of equivalent logic gates on the substrate. There are currently six
levels of complexity that are commonly defined as shown in Table below.
Most of the reasons that modern digital systems use integrated circuits are
obvious.
• ICs pack a lot more circuitry in a small package, so that the overall size of
almost any digital system is reduced.
• The cost is dramatically reduced because of the economies of mass-
producing large volumes of similar devices.
• ICs have made digital systems more reliable by reducing the number of
external interconnections from one device to another.
• Before we had ICs, every circuit connection was from one discrete
component (transistor, diode, resistor, etc.) to another. Now most of the
connections are internal to the ICs, where they are protected from poor
soldering, breaks or shorts in connecting paths on a circuit board, and other
physical problems.
• ICs have also drastically reduced the amount of electrical power needed to
perform a given function because their miniature circuitry typically requires
less power than their discrete counterparts. In addition to the savings in
PAGE 37
power supply costs, this reduction in power has also meant that a system
does not require as much cooling.
Logic Family
There are variety of circuits technology or various approaches used to produce
different types of digital ICs. Each fundamental approach is called a Logic Family.
PAGE 38
Characteristics of Logic Family
• Fan-out – Maximum number of inputs that can be connected to the output
of the gate.
• Power Dissipation – Amount of power needed by the gate from a power
supply.
• Propagation Delay – Interval of time for a signal to propagate from input to
the output of a gate
• Noise Margin – Maximum noise that can be tolerated by a gate.
Significance of the logic family with reference to digital integrated circuits (ICs)
A Digital System in general comprises of digital ICs performing different logic
functions, and choosing these ICs from the same Logic Family guarantees
compatibility and accuracy.
In the case where the output of an IC in certain family feeds the input of another
IC in a different family, Interface techniques must be established to ensure
compatibility.
PAGE 39
𝐶 = 𝐴 ⋅ 𝐵.
PAGE 40
The Full adder
The full adder, represented by the circuit symbol of Figure below, adds together
two bits A and B, plus a carry-in Cin from the previous stage, to generate a sum S
and a carry-out Cout.
In other words, the full adder is a 3-bit adder. Table above provides the truth table
for a full adder.
An alternative full adder circuit may be derived directly from the equations for the
sum and the carry from the truth table. Let the sum be S, the carry-out Co, and the
carry-in C (Figure below).
PAGE 41
Decoders
A decoder is a combinational logic circuit that converts binary information from
input lines to maximum of 2n unique output lines. If n-bit decoded information
has unused or don’t care combinations, the decoder output will have fewer than 2n
output lines (n-to-m-line, where m ≤ 2n).
PAGE 42
Encoders
An encoder is a combinational logic circuit that performs the inverse operation of
a decoder. It has 2n (or fewer) input lines and n output lines.
PAGE 43
The applications of Multiplexer include data selection, data routing, operation
sequencing, parallel-to-serial conversion, waveform generation, and logic-function
generation.
In other words, the de multiplexer takes one input data source and selectively
distributes it to 1 of N output channels just like a multiposition switch.
SEQUENTIAL LOGIC
The output of a sequential circuit is a function of both its current inputs and its
past inputs; that is, a sequential circuit has memory. The building blocks used to
construct devices that store data are called flip-flops. In this section we look at
basic sequential elements and the counters, registers, and shifters that are
constructed from flip-flops.
The basic building blocks of sequential circuits are the flip-flop, bistable, and latch
just as the basic building block of the combinational circuit is the gate.
PAGE 44
Figure: The sequential circuit.
The flip-flop (FF) is known by other names, including latch and bistable
multivibrator.
The most basic FF circuit can be constructed from either two NAND gates or two
NOR gates. The NAND gate version, called a NAND gate latch or simply a latch.
PAGE 45
Sequential logic elements perform as many different functions as combinational
logic elements; however, they do carry out certain well-defined functions, which
have been given names.
Latch: A latch is a 1-bit memory element. You can capture a single bit in a latch at
one instant and then use it later; for example, when adding numbers you can
capture the carry-out in a latch and use it as a carry-in in the next calculation.
Register: The register is just m latches in a row and is able to store an m-bit word;
that is, the register is a device that stores one memory word. A computer’s memory
is just a very large array of registers.
Shift register: A shift register is a special-purpose register that can move the bits
of the word it holds left or right; for example, the 8-bit word 00101001 can be
shifted left to give 01010010.
PAGE 46
State machines: A state machine is a digital system that moves from one state to
another each time it is triggered. You can regard a washing machine controller as a
state machine that steps though all the processes involved in washing (at a rate
depending on the load, the temperature, and its preselected functions). Ultimately,
the computer itself is a nothing more than a state machine controlled by a
program and its data.
PAGE 47