0% found this document useful (0 votes)
33 views48 pages

Charting Computer Hardware & Software

Uploaded by

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

Charting Computer Hardware & Software

Uploaded by

Isa Sadiq
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Computer Hardware

CSC2315

ALI MOAYER advice to Students . . .

Participate in as many hands-on projects or internship


programs that your time allows. This will help you to learn
valuable problem-solving techniques, as well as retain the
knowledge that you gain in school.
WHAT IS COMPUTER HARDWARE?
To begin with, what is computer, and what is computer system?

A Computer can be defined as a programmable, electronic device that accepts


data, performs operations on that data, presents the results, and stores the data or
results as needed.

The four operations described in this definition can be defined as follows:

• Input - entering data into the computer.


• Processing - performing operations on the data
• Output - presenting the results.
• Storage - saving data, programs, or output for future us.

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.

VON NEUMANN ARCHITECTURE


The Von Neumann Architecture (VNA) is the basis for all modern computers. It
consists of a Central Processing Unit, Memory, and Input/Output devices.
Computers based on VNA store programs and data in a single memory system.

Figure: Von Neumann Architecture

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.

A system unit contains one or more processors, several types of memory,


interfaces to connect external peripheral devices (such as printers), and other
components all interconnected through sets of wires called buses on the
motherboard

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

• RAM – volatile memory that stores/holds data and program instructions


while the CPU works with them.
• ROM – nonvolatile memory used to store data and instructions that the
computer needs to operate, including startup instructions.

The term memory is typically used to mean RAM.

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.

KEYBOARD - Keypad for providing keyed input. Based on a typewriter.

MOUSE - Pointing device used to control a graphical pointer on the monitor for
input.

SPEAKERS - Provide sound output.

PRINTER - Provides printed paper output.

INPUT AND OUTPUT DEVICES


Input Devices are hardware components that accepts data and instructions from the
user. Examples of input devices include the keyboard, mouse, joystick, pen, trackball,
scanner, barcode reader, microphone, and touchscreen.

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.

Magnetic storage – A storage technology in which data is recorded when iron


particles are polarized on a magnetic storage medium. Magnetic storage devices
include diskette drives, hard disk drives, floppy disk drives, and tape drives.

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.

1. There is more space in storage than in memory.


2. Contents are retained in storage when the computer is turned off, whereas
data in memory disappear when the computer is turned off.
3. Storage devices operate much slower than memory chips, but storage is
much cheaper than memory.

PAGE 6
LEVELS OF MEMORY HIERARCHY

TABLE: Units of Measure for Computer Memory and Storage


Unit Abbreviation Number of Bytes
Kilobyte KB 1,024 or 210
Megabyte MB 1,048,576
Gigabyte GB 1,073,741,824
Terabyte TB 1,099,511,627,776

Note: Eight bits together form a byte (B)

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.

During the instruction cycle, a computer performs the following steps:

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.

During the execution cycle, a computer performs the following steps:

3. Execute instruction. The hardware element, fed with an instruction and


data, carries out the instruction.
4. Store results. The results are stored in registers or memory.

The time in which a machine cycle occurs is measured in nanoseconds (one-


billionth of 1 second) and picoseconds (one-trillionth of 1 second).

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.”

A computer’s operating speed is based on the number of clock cycles, or ticks, it


generates per second. For example, if a computer’s clock speed is 800 MHz, it ticks
800 million times 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.

FACTORS AFFECTING PROCESSING SPEED


A CPU’s design determines its basic speed, but other factors can make chips
already designed for speed work even faster. Those factors include:

• 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.

HARDWARE MAINTENANCE TECHNICIANS

Hardware maintenance technicians are responsible for the following task:

• Installing and configuring new Computer Hardware and Peripherals.

• Upgrading computers (memory, drivers) and dealing with network


related hardware issues.

• Troubleshooting and repairing hardware of all types.

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 Representation: representation of a quantity that varies over a


continuous range of values.

Analog System: combination of devices designed to manipulate physical


quantities that are represented in analog form.

Analog systems include speaker, audio amplifiers, magnetic tape recording and
playback equipment, and a simple light dimmer switch.

Digital Representation: representation of a quantity that varies in discrete steps


over a range of values.

Digital System: combination of devices designed to manipulate physical


quantities that are represented in digital form.

A digital system with two symbols is called a binary system.

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 => continuous

Digital => discrete (step by step)

1. Concisely describe the major difference between analog and digital


quantities.

Analog quantities can take on any value over a continuous range; digital quantities
can take on only discrete values.

2. What are the advantages of digital techniques over analog?

PAGE 10
Easier to design; easier to store information; greater accuracy and precision;
programmability; less affected by noise; higher degree of integration.

3. What is the chief limitation to the use of digital techniques?

Real-world physical quantities are analog. Digital processing takes time.

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.

A combinational logic element is a circuit whose output depends only on its


current inputs, whereas the output from a sequential element depends on its past
history (i.e., a sequential element remembers its previous inputs) as well as its
current input.

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.

The AND gate


The AND gate is a circuit with two or more inputs and a single output. The output
of an AND gate is true if and only if each of its inputs is also in a true state.
Conversely, if one or more of the inputs to the AND gate is false, the output will
also be false.

PAGE 11
Figure. The AND gate.

Table. Truth table for 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.

Figure. The OR gate.

PAGE 13
Table. Truth table for the OR gate.

Figure. The representation of an 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’.

Figure. The NOT gate or inverter.

Table. Truth table for the inverter.

The NAND and NOR gates


The two most widely used gates in real circuits are the NAND and NOR gates.
These aren’t fundamental gates because the NAND gate is derived from an AND
gate followed by an inverter (Not AND) and the NOR gate is derived from an OR
gate followed by an inverter (Not OR), respectively.

NAND and NOR gates are considered to be the "universal gates".

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.

Table. Truth table for the NAND and NOR gates.

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.

Table: Truth table for six 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.

The three intermediate signals P, Q, and R are defined by P = A⋅ B, Q = B ⋅C, and R


=A⋅C. Figure above tells us that we can write down the output function, F, as the
logical OR of the three intermediate signals P, Q, and R; that is, F = P + Q + R. We
can substitute the expressions for P, Q, and R to get F = A⋅ B + B ⋅C + A⋅C. This is a
Boolean equation, but it doesn’t help us a lot at this point. However, by visually
inspecting the truth table for F we can see that the output is true if two or more of
the inputs A, B, and C, are true. That is, this circuit implements a majority logic
function whose output takes the same value as the majority of inputs. Such a
circuit is used in an automatic landing system in an aircraft by choosing the output
from three independent computers to be the best (i.e. majority) of three inputs.
Using just four basic gates, we’ve constructed a circuit that does something useful.

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.

The circuit of the below Figure is a two-input multiplexer. A multiplexer that


allows one of two data streams to flow through a switch that is electronically
controlled.

Figure: The use of gates— Example 2.

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 = ̅̅̅̅̅̅
𝑌 · 𝑋̅ · ̅̅̅̅̅̅
𝑋·𝑍

This expression can be simplified using Boolean algebra.

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.

An alternative way of writing a Boolean equation is called a product-of-sums (P-


of-S) expression and consists of several terms ANDed together. The terms are
made up of variables ORed together. A typical product-of-sums expression has the
form

F = (𝐴 + 𝐵̅ + 𝐶) · (𝐴̅ + 𝐵 + 𝐶) · (𝐴̅ + 𝐵 + 𝐶) · (𝐴̅ + 𝐵̅ + 𝐶̅ )

sum-of-products expressions can be converted into product-of sums expressions


and vice versa.

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.

When an equation is expressed as a sum of minterms, it is said to be in its


canonical form. Canonical is just a fancy word that means standard.

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
̅̅̅̅̅̅̅̅̅̅̅̅̅̅
̅̅̅̅̅̅
𝑌 · 𝑋̅ · ̅̅̅̅̅̅
𝑋 · 𝑍 = 𝑋̅ · 𝑌 · 𝑍̅ + 𝑋̅ · 𝑌 · 𝑍 + 𝑋 · 𝑌̅ · 𝑍 + 𝑋 · 𝑌 · 𝑍

This equation demonstrates that a given Boolean function can be expressed in


more than one way.

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.

Figure X: Circuit symbol for an EOR gate.

PAGE 23
Figure: The use of gates—Example 3.

Table: Truth table for the circuit of above Figure.

The Table demonstrates that F is true when A = 0 and B = 1, or when A = 1 and B =


0. Consequently, the output F = 𝐴̅ · 𝐵 + 𝐴 · 𝐵̅

From the above Figure we can write

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.

Figure: An alternative circuit for an EOR gate

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

Figure Y: An EOR circuit constructed with NAND gates only.

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.

Figure P: Circuit diagram for P.

Figure Q: Circuit diagram for 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.

We can compare the two circuits in terms of speed and cost

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.

Cost: Total number of gates needed to implement P is 7. Total number of gates


needed to implement Q is 5. Total inputs in the circuit for P is 12. Total inputs in
the circuit for Q is 9. Clearly, the circuit for Q is better than that for P both in
terms of the number of gates and the number of inputs to the gates.

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.

Boolean algebra permits an idea to be expressed in a mathematical form and the


resulting expression to be simplified and then translated into the real hardware of
gates and other logic elements.

PAGE 27
Only three functions or operations (AND, OR, NOT) are permitted in Boolean
algebra.

The arithmetic operations of subtraction and division do not exist in Boolean


algebra. For example, the Boolean expression X + Y = X + Z, cannot be rearranged
in the form

(X + Y) - X = (X + Z) - X, which would lead to Y = Z.

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.

Axioms and theorems of Boolean algebra


i. Closure property – If variables A and B belong to a set of Boolean elements,
the operations A⋅ B, A + B, and NOT A and NOT B also belong to the set of
Boolean elements.
ii. Commutative
iii. Distributive
iv. Associative

Table: Commutative, distributive, and associative laws of Boolean algebra.

PAGE 28
Table: Basic axioms of Boolean algebra Table: Boolean operations on a
constant and a variable.

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

Proof X + X⋅ Y = X⋅ 1 + X⋅ Y Using 1 ⋅X = X and commutativity


= X⋅ (1 + Y) Using distributivity
= X⋅ (1) Because 1 + Y = 1
=X

Theorem 2 X + 𝑋̅⋅ Y = X + Y
(This can be proved using Theorem 1 and X + 𝑋̅ = 1)

Theorem 2 X⋅Y + 𝑋̅⋅ Z + Y⋅ Z = X⋅Y + 𝑋̅⋅ Z

Theorem 4 X⋅ (X + Y) = X

Theorem 5 X⋅ (𝑋̅ + Y) = X⋅Y

Theorem 6 (X + Y) (X + 𝑌̅) = X

Theorem 7 (X + Y) (𝑋̅ + Z) = X⋅Z + 𝑋̅⋅ Y

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

• replacing AND operators by OR operators,


• replacing OR operators by AND operators, and
• complementing variables and literals.

An important rule in Boolean algebra is called the principle of duality. Any


expression that is true is also true if AND is replaced by OR (and vice versa) and 1
replaced by 0 (and vice versa). Consider the following examples of duals.

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.

Use of Boolean algebra in simplifying equations

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.

We first demonstrate how de Morgan’s theorem is applied to Boolean expressions


and then show how circuits can be converted to NAND-only or NOR-only forms.
You may wonder why anyone should wish to implement circuits in NAND (or
NOR) logic only. There are several reasons for this, but, in general, NAND gates
operate at a higher speed than AND gates and NAND gates can be built with fewer
components (at the chip level). Later we shall examine in more detail how a circuit
can be designed entirely with NAND gates only.

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

= (𝐴̅ + 𝐵̅) (𝐶̅ + 𝐷


̅ ) (𝐴̅ + 𝐷
̅) Expand the complemented 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.

To construct a circuit solely in terms of NAND gates, de Morgan’s theorem must


be invoked to get rid of all OR operators in the expression.

For example, suppose we wish to generate the expression F = A + B + C using


NAND gates only. We begin by applying a double negation to the expression, as
this does not alter the expression’s value but it does give us the opportunity to
apply de Morgan’s theorem.

F=A+B+C The original expression using OR logic

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.

Figure: Implementing F = A + B + C with NAND logic only.

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.

Figure: The Karnaugh map.

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.

Figure below demonstrates how a function of three variables,

F = 𝐴̅⋅𝐵̅⋅ 𝐶̅ + 𝐴̅⋅B⋅C + A⋅𝐵̅⋅C is plotted on a Karnaugh

Figure: Relationship between a Karnaugh map and truth table.

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.

Figure: Plotting two functions on Karnaugh maps.

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.

Transferring a truth table to a Karnaugh map is easy. We now have to demonstrate


how the product terms of a general Boolean expression are plotted on the map.
Figures 2–7 present six functions plotted on Karnaugh maps.

The following notes should help in understanding these diagrams:

1. For a four-variable Karnaugh map


one-variable product term covers 8 squares
two-variable product terms cover 4 squares
three-variable product terms cover 2 squares
four-variable product terms cover 1 square.

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.

3. The Karnaugh map is not a square or a rectangle as it appears in these diagrams. A


Karnaugh map is a torus or doughnut shape. That is, the top edge is adjacent to the
bottom edge and, the left-hand edge is adjacent to the right-hand edge. Whenever
a group of terms extends across the edge of a Karnaugh map, we shaded it to
emphasize the wraparound nature of the map.

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.

Example 1 Figure below gives a Karnaugh map for the expression


𝐹 = 𝐴 ⋅ B + 𝐴̅ ⋅ B ⋅ C̅ ⋅ D + 𝐴̅ ⋅ B ⋅ C ⋅ D + 𝐴 ⋅ B
̅ ⋅ C̅ ⋅ D
̅ . The simplified function
is 𝐹 = 𝐴 ⋅ B + B ⋅ D + 𝐴̅ ⋅ B ⋅ C ⋅ D + 𝐴 ⋅ C̅ ⋅ D
̅.

Figure: Karnaugh map for Example 1.

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.

There are some things that ICs cannot do.


They cannot handle very large currents or voltages because the heat generated in
such small spaces would cause temperatures to rise beyond acceptable limits. In
addition, ICs cannot easily implement certain electrical devices such as inductors,
transformers, and large capacitors. For these reasons, ICs are principally used to
perform low-power circuit operations that are commonly called information
processing. The operations that require high power levels or devices that cannot be
integrated are still handled by discrete components.

Relationship between the different scales of integration of electronic components


to the different generations of Computers.
Integrated Circuits were the basis of third generation machines in the form of SSI
and, later, MSI. The 1st generation machines date from the 1960s. Computer built
since the mid - 1970s, i.e., fourth-generation Computers, have been largely based
on LSI, although some components may still be SSI or MSI. These Computers
include the microcomputer. The fifth-generation computers may be based upon
VLSI, ULSI as the trends shows.

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.

Popular Logic Families


• TTL (Transistor – transistor logic) – in operations for some time and
considered standard (RTL, DTL).
• ECL (Emitter – coupled logic) – Adnatage in systems requiring high speed
operations.
• MOS (Metal – oxide semiconductor) – suitable for high component density
circuits.
• CMOS (Complementary MOS) – systems requiring low power
consumption.

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.

Understanding the nature and capabilities of Logic Family is very important in


order to make an optimum choice from the available alternatives. You will also be
much better prepared to do analysis, troubleshooting, and some design of digital
circuits that contain any combination of IC families.

The Half adder


The most primitive circuit is called the half adder or HA which adds together two
bits to give a sum, S, and a carry, C as described in Table below. The sum, S, is
given by their exclusive OR; that is, 𝑆 = 𝐴̅ ⋅ 𝐵 + 𝐴 ⋅ 𝐵̅ . The carry is given by

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.

Figure: The circuit


representation of a full adder.

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.

Figure: Logic circuit for an octal-to-binary (8-line-to-3-line) encoder.

Multiplexer (Data Selectors)


A multiplexer is a combinational circuit that selects binary information from one
of many input lines and directs it to a single output line.

The selection of a particular input line is controlled by a set of selection lines.


Normally, there are 2n input lines and n selection lines whose bit combination
determines which input is selected.

Figure: Four-input multiplexer.

PAGE 43
The applications of Multiplexer include data selection, data routing, operation
sequencing, parallel-to-serial conversion, waveform generation, and logic-function
generation.

DEMULTIPLEXERS (Data Distributors)


A demultiplexer (DEMUX) performs the reverse operation of Multiplexer: it takes
a single input and distributes it over several outputs.

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.

Sequential circuits can’t be omitted from introductory texts on computer hardware


because they are needed to implement registers, counters, and shifters, all of
which are fundamental to the operation of the central processing unit.

PAGE 44
Figure: The sequential circuit.

The most important memory element is the flip-flop, which is made up of an


assembly of logic gates. Even though a logic gate, by itself, has no storage
capability, several can be connected together in ways that permit information to
be stored. Several different gate arrangements are used to produce these flip-flops.

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.

Counter: A counter is another special-purpose register that holds an m-bit word.


However, when a counter is triggered (i.e., clocked) its contents increase by 1; for
example, if a counter holding the binary equivalent of 42 is clocked, it will hold the
value 43. Counters can count up or down, by 1 or any other number, or they can
count through any arbitrary sequence.

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

You might also like