Lesson 1 to 6 computer system
Lesson 1 to 6 computer system
Editorial Board
Deekshant Awasthi
Published by:
Department of Distance and Continuing Education
Campus of Open Learning, School of Open Learning,
University of Delhi, Delhi-110007
Printed by:
School of Open Learning, University of Delhi
COMPUTER SYSTEM ARCHITECTURE
External Reviewer
Dr. Seema Thakur
Disclaimer Assistant Professor
Shaheed Rajguru College of Applied Sciences for Women,
University of Delhi
Printed at: Taxmann Publications Pvt. Ltd., 21/35, West Punjabi Bagh,
New Delhi - 110026 (600 Copies, 2024)
PAGE
Glossary 131–133
PAGE i
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
1
Digital Logic Circuits
Asha Yadav
Assistant Professor
Department of Computer Science
School of Open Learning
University of Delhi
Email-Id: [email protected]
STRUCTURE
1.1 Learning Objectives
1.2 Introduction
1.3 Basic Components of a Digital Computer
1.4 Hardware and Software
1.5 Binary Information
1.6 Logic Gates
1.7 Boolean Algebra
1.8 Representation of Boolean Expression
1.9 K-Map (Karnaugh MaP)
1.10 Combinational Circuit
1.11 Sequential Circuit
1.12 Flip-flops
1.13 Summary
1.14 Answers to In-Text Questions
1.15 Self-Assessment Questions
1.16 References
1.17 Suggested Readings
PAGE 1
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Notes
1.1 Learning Objectives
After reading this lesson you will be able to:
Applythe functions of logic gates such as AND, OR, NOT, XOR,
and NAND in digital circuits.
Evaluateand construct Boolean expressions, truth tables, and apply
Boolean laws to simplify digital circuits.
Optimize logic expressions using methods like Karnaugh maps to
enhance circuit efficiency.
Explain the operation of various flip-flops (SR, D, JK, T) and their
applications in sequential circuits.
Design combinational circuits by applying logic gates and Boolean
algebra.
1.2 Introduction
Since you are already familiar with the concept of compiler and inter-
preter in your previous semester, in this course you will learn about
computer system architecture. Let’s first understand the definition of
computer system architecture: “Computer architecture is concerned
with the structure and behaviour of the computer as seen by the user.
It includes the information formats, the instruction set and techniques
for addressing memory. The architectural design of a computer is con-
cerned with the specifications of the various functional modules, such as
processors and memories, and structuring them together into a computer
system.” (Ref 1)
Hence, computer system architecture can be thought of as the blueprint
of a computer. Imagine you’re building a house—just like you need
a plan that shows where all the rooms, doors, and windows go simi-
larly a computer needs a plan that shows how its different parts work
together. When you study this course, you gain a deep understanding of
how computers work at a fundamental level, that is how they process
instructions, manage data, and communicate between various components.
In this course we’re interested in understanding how the computer is
organized and how it behaves when you use it. This includes things
2 PAGE
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
like how data is stored and processed, what kind of instructions the Notes
computer can understand, and how it keeps track of where everything
is stored in memory. When we talk about the architectural design of
a computer, we’re really talking about how we put all the important
pieces—like the processor, which does the calculations, and the memory,
where data is stored—together to create a system that works smoothly
and efficiently. This lesson will help you to gain a basic idea of digital
computers, introducing you the concept of logic gates and its function.
As we go along, we learn about Boolean algebra, a powerful tool that
helps us make these circuits more efficient by simplifying and analys-
ing them. So, digital logic isn’t just about learning how circuits work;
it’s also about developing a strong analytical mind and learning how
to solve problems.
1.2.2 History
The early 20th century saw several significant turning points in the
development of digital computers Table 1.1 given below discusses some
of the important developments of each major era:
PAGE 3
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Storage Unit: Hard drives, SSDs, and external storage media are Notes
used for long term data storage.
Figure 1.1 shows the various components of a digital computer and their
interaction amongst each other.
PAGE 5
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
6 PAGE
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
PAGE 7
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Notes kinds of data. These binary digits, also known as bits, are the building
blocks of all digital system operations and data storage. They are the
smallest unit of data in computing.
For example, when you type a letter on your keyboard, the computer
translates that letter into a specific combination of 0s and 1s. These com-
binations might represent anything from numbers and letters to instructions
for the computer on what to do next. The reason we use binary is because
it’s simple and reliable. The computer’s internal circuits, made up of mil-
lions of tiny switches, can easily distinguish between two states—on or
off, 0 or 1—allowing them to process and store information efficiently.
So, binary information is essentially the fundamental way that computers
encode, process, and communicate all the data they handle.
In nutshell binary information in digital computers is represented using
0 and 1. Binary signals, corresponding to these states, are electrical
voltages or currents where specific levels represent 0 or 1, enabling
the encoding, processing, and transmission of data within and between
computer components.
8 PAGE
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
PAGE 9
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Notes
Note that NAND and NOR gates are also called universal gate because
they can be used to create any digital circuit.
or truth functions, and the outcomes TRUE or FALSE are referred to Notes
as truth values. Variables capable of holding truth values are known as
logical variables or binary valued variables. A decision resulting in either
TRUE or FALSE is called a Binary decision.
Logic operations like AND, OR, and NOT are often used to describe
Boolean functions, along with their symbols. They are very important in
digital logic design because they show how digital circuits work and are
used for jobs like logic synthesis, optimisation, and analysis. There are
different ways to show boolean functions, such as truth tables, Boolean
expressions, logic gates, and Karnaugh maps. Each gives a different view
of the function’s behaviour and features.
Example: F(A, B, C) = A + Bʹ + C defines a boolean function that takes
3 inputs A, B, C and evaluates the output as (A) OR (NOT (B)) OR C.
0 0 0 1
0 0 1 1
0 1 0 0
0 1 1 1
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 1
PAGE 11
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Notes
1.7.3 Logic circuit
Logic circuit is a graphical representation of a digital circuit having logic
gates and their interconnections. We have already studied the graphical
representation of various logical operators as gate in section 1.6. The
Logic circuit for Table 1.3 is shown in Figure 1.2.
12 PAGE
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Note the • symbol can also be dropped from the expression i.e. no symbol
between variables also indicates AND operation like A • B = AB
IN-TEXT QUESTION
1. Simplify the following Boolean expressions:
(a) Y = BC + BCʹ + BA
(b) Y = A + AʹB + AʹBʹC + AʹBʹCʹD + AʹBʹCʹDʹE
PAGE 13
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
A B C Y
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 1
1 1 0 0
1 1 1 1
14 PAGE
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
It can be minimized (using boolean laws mentioned previously in Table 1.4) Notes
to give a simpler expression (minimal SOP form) as:
Points to Remember
1. Both the Canonical SOP form and the minimal SOP form can be
interconverted efficiently by employing a truth table method.
2. Every individual term within the SOP form, recognized as minterms,
contributes distinctly to the expression.
Product of Sum (POS): The Boolean expressions that produces the prod-
uct of sum for two or more input variables (that give 0 as output). Each
“Sum” term in the POS form is known as a “maxterm” and each maxterm
corresponds to a row in the truth table where the function output is false
(0). Further the POS combines these maxterm (sum terms) by product.
Consider truth table given below:
A B C Y
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 1
1 1 0 0
1 1 1 1
The canonical POS form of Boolean expression derived from truth table
for Y is
Y = (A + B + C)(A + Bʹ + Cʹ)(Aʹ + Bʹ + C)
PAGE 15
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Key points
� The number of cells in a Karnaugh map (K-map) corresponds to
the total number of possible combinations of input variables.
This total number of possible combinations is calculated using the
formula: 2n, where n represents the number of input variables in
the Boolean expression.
Each cell in the K-map represents a unique combination of input
values, with the number of cells equalling the number of possible
cases.
For example, if there are 3 input variables, there will be 23 i.e. 8
cells in the K-map, where each variable can independently take on
one of two binary values (0 or 1).
16 PAGE
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
� For SOP form, mark the cells corresponding to minterms with Notes
‘1’, and fill the rest with ‘0’.
� For POS form, mark the cells corresponding to maxterms with
‘0’, and fill the rest with ‘1’.
� In POS form, take the complement of the output variable to
obtain the resultant expression.
3. Group Terms:
Group the terms (either 0’s or 1’s) in rectangular shapes, with the
total number of terms being 2, 4, 8, (2n) etc., covering as many
elements as possible in one group. Groups can overlap each other,
opposite and corner grouping is allowed, also there can be no
diagonal groups (Remember to make a group as large as possible).
4. (a) Find Product Terms for SOP: From the groups formed, identify
the product terms for SOP form, product terms in SOP form
represent the product (AND) of input variables.
(b) F
ind Sum Terms for POS: From the groups formed identify
the sum terms for POS form, sum terms in POS form represent
the sum (OR) of input variables.
The maps of two, three and four variable functions is given below:
PAGE 17
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Notes
Now,
Minimise the following function in SOP minimal form using K-Maps: Notes
F(A, B, C, D) = Σ(1, 2, 6, 7, 8, 13, 14, 15) + d(0, 3, 5, 12)
The SOP K-map for the given expression is:
Notes
1.10.1 Half Adder
The half adder adds two binary digits and produces two outputs as sum
and carry. It consists of one XOR logic gate producing “SUM” and one
AND gate producing “CARRY” as outputs.
Logical Expression for half adder is: S = A ⊕ B; C = A*B.
A S (Sum)
Half Adder
B C (Carry)
The circuit diagram and truth table of half adder is shown below it has
two inputs A, B and produces sum and carry as output.
Limitation: The main problem with the Half Adder circuit is that it can
only add two values and doesn’t care about carry. Thus, Full Adder was
developed.
20 PAGE
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
A S (Sum)
Full Adder
B Cout (Carry)
Cin
Figure 1.7: Full Adder (Block Diagram)
A full adder circuit can be constructed using two half adders and an OR
gate. In this configuration, the first half adder adds the inputs A and B,
generating a partial sum. The second half adder then adds this partial sum
to the carry input Cin, producing the final sum output, S. If either half
adder generates a carry, the overall carry output, Cout, will be produced
by taking the OR of the carry outputs from both half adders.
A full adder, which uses the previous carry as an input, is ideal for
adding multi-digit binary numbers. To add such numbers, multiple full
adders are connected in a series, or cascade. The number of full adders
required in this cascade is equal to the number of binary digits (bits) in
the numbers being added.
PAGE 21
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Notes
Uses
They are fundamental in constructing various digital devices.
These circuits are used to create complex arithmetic and logic
circuits, such as Arithmetic Logic Units (ALUs).
Primarily designed for adding binary numbers, they also serve in
other applications including:
Binary-Coded Decimal (BCD) operations
Address decoding
Table index calculation
22 PAGE
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
1.12 Flip-flops
Flip-flops are a type of sequential circuit and are not just standalone
components; they’re actually derived from logic gates. Once a specific
input value is provided, flip-flops retain and execute it, provided the
logic gates are configured accurately. Flip-flops can be used to create
memory by applying Boolean logic. In fact, flip-flops can be viewed as
the foundational concept behind Random Access Memory (RAM). They
store 1 bit information. There are four types of flip-flops that are used
commonly:
S-R Flip-flop
D Flip-flop
PAGE 23
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
S-R Flip-flop
The basic Set -Reset flip-flop, is a type of flip-flop circuit that stores
one bit of data. It has two inputs, S (set) and R (reset), and two outputs,
Q and the complement of Q.
D Flip-flop
A D flip-flop or delay flip-flop is a type of flip-flop circuit used in
digital electronics to store and transfer data. It has a single data input
(D), a clock input (CLK), and two outputs: the normal output (Q) and
its complement. The D flip-flop operates as follows:
24 PAGE
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
1. Data Input (D): The data input determines the state the flip-flop Notes
will store when the clock signal transitions. When the clock signal
changes, the value at the data input is transferred to the output.
2. Clock Input (CLK): The clock input controls when the data input
is sampled and transferred to the output. The flip-flop changes its
state only on the rising or falling edge (depending on the specific
implementation) of the clock signal.
� When the clock signal transitions (typically from low to high or
high to low, depending on the specific flip-flop implementation),
the value present at the data input (D) is transferred to the
output (Q).
� Between clock transitions, the output state remains stable and
holds the previously sampled value.
D flip-flops are widely used in digital systems for various purposes,
including data storage, synchronization, and control. They are particu-
larly useful for storing data that needs to be synchronized with a clock
signal, making them essential components in sequential logic circuits like
counters, shift registers, and memory elements.
JK Flip-flop
A JK flip-flop is a type of sequential logic circuit used in digital elec-
tronics for storing and transferring binary data. It has two data inputs,
labelled J and K, a clock input (CLK), and two outputs: the normal output
(Q) and its complement.
The JK flip-flop has four possible operating modes, which are determined
by the combinations of inputs J and K:
PAGE 25
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Notes 1. Set Mode: When J = 1 and K = 0, the flip-flop sets to the state
where Q = 1 , regardless of the previous state.
2. Reset Mode: When J = 0 and K = 1, the flip-flop resets to the
state where Q = 0 , regardless of the previous state.
3. Toggle Mode: When both J and K are set to 1 (J = 1 and K = 1),
the flip-flop toggles its output. If the previous state was Q = 1, the
next state will be Q = 0, and vice versa.
4. No Change Mode: When both J and K are set to 0 (J = 0 and
K = 0), the flip-flop maintains its current state, regardless of the
clock input.
The operation of a JK flip-flop is synchronized with a clock signal (CLK).
The flip-flop changes its state (according to the operating mode) only on
the rising or falling edge of the clock signal, depending on the specific
implementation.
JK flip-flops are widely used in digital systems for various applications,
including frequency dividers, counters, shift registers, and memory ele-
ments. They offer more flexibility compared to other types of flip-flops,
such as the D and SR flip-flops, due to their ability to operate in multiple
modes and toggle functionality.
T flip-flop
A T flip-flop, also known as a toggle flip-flop, is a type of sequential
logic circuit used in digital electronics to toggle its output state based
on the transitions of its inputs. It has a single input (T), a clock input
(CLK), and two outputs: the normal output (Q) and its complement.
26 PAGE
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Notes from low to high, the output updates from the current state to the
new state.
2. The negative edge-triggered flip-flop, also referred to as the falling
edge-triggered flip-flop, alters its state or output exclusively when
the clock signal experiences a falling edge. Therefore, the output
undergoes a change from its current state to a new state when the
clock signal transitions from a high voltage level to a low voltage
level.
Master-Slave Flip-flop
A master-slave flip-flop is a sequential logic circuit that consists of two
interconnected flip-flops, namely a master flip-flop and a slave flip-flop.
The master flip-flop is triggered by the leading edge (either positive or
28 PAGE
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
negative) of the clock signal, whereas the slave flip-flop is triggered by Notes
the trailing edge of the clock signal. This configuration guarantees that the
outputs of the flip-flop transition between states only at precise moments,
thereby preventing undesired fluctuations and ensuring dependable func-
tionality. The master flip-flop acquires the input data and retains it until
the subsequent clock transition, while the slave flip-flop seizes the output
of the master flip-flop and presents it as the ultimate output. Master-slave
flip-flops are frequently employed in digital systems that require precise
timing and dependable functionality, such as microprocessors, memory
units, and communication systems.
IN-TEXT QUESTIONS
2. What type of signal does a digital system use?
3. How many bits are in a byte?
4. What is the smallest unit of data in a digital system?
5. What is the output of an AND gate when all inputs are 1?
6. What type of circuit has outputs depending only on the current
inputs?
7. What type of circuit includes memory elements?
8. What element is used to store a single bit of data?
9. Which Boolean operation outputs true if at least one input is
true?
10. What mathematical tool is used to simplify Boolean expressions?
1.13 Summary
This chapter lays the groundwork for understanding complex digital
systems by introducing the essential concepts of digital computer, Bool-
ean algebra, and logic gates. It establishes the basic principles that are
crucial for designing and analyzing digital circuits. This chapter explains
combinational circuits, sequential circuits, flip-flops and K-map. Various
types of combinational circuit half adder and full adder are also discussed
in the chapter.
PAGE 29
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Notes
1.14 Answers to In-Text Questions
1. (a)
(b)
2. Digital
3. 8
4. Bit
5. 1
6. Combinational circuit
7. Sequential circuit
8. Flip-flop
9. OR
10. Algebra
30 PAGE
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Notes
1.16 References
u Computer System Architecture by M. Morris Mano, Third edition,
1993, Prentice Hall of India.
u Computer System Architecture by M. Morris Mano, Third edition,
1993, Pearson Education.
PAGE 31
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
2
Digital Components
Asha Yadav
Assistant Professor
Department of Computer Science
School of Open Learning
University of Delhi
Email-Id: [email protected]
STRUCTURE
2.1 Learning Objectives
2.2 Introduction to Digital Components
2.3 Arithmetic Microoperations
2.4 Decoders
2.5 Encoder
2.6 Multiplexer
2.7 Memory Units
2.8 Summary
2.9 Answers to In-Text Questions
2.10 Self-Assessment Questions
2.11 References
2.12 Suggested Readings
32 PAGE
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Notes
2.2 Introduction to Digital Components
Computer systems are made up of a lot of different digital components
that work together to process, store, and send data very quickly and
correctly. The abilities of these systems are greatly affected by each of
these components; from the Central Processing Unit (CPU)’s basic arith-
metic operations to the complex data manipulation done by memory units,
decoders, and multiplexers. Logic gates, microprocessors, and memory
devices like RAM and ROM all work together to make sure that data
processing goes smoothly and quickly.
As technology improves, it becomes more and more important to under-
stand and use these digital components correctly. Advanced components
like microcontrollers, FPGAs, and Digital Signal Processors (DSPs)
improve the functionality of modern devices by performing specific tasks
in different contexts. A/D and D/A converters make it possible for analog
and digital signals to talk to each other. Interface controllers control how
different parts of a system talk to each other. These systems are more
complicated and powerful because they need sensors and actuators to
change physical parameters into digital signals and back again.
Notes The basic circuits for arithmetic operations will be discussed in this sec-
tion like add, subtract and increment. Some of the arithmetic operations
and their symbolic representation is provided below in Table 2.1 (where
R represents register)
The bits of binary number A are added to bits of binary number B, sub- Notes
script numbers are given from right to left, with subscript 0 representing
the least significant bit. The carries are interconnected in a sequential
manner through the utilisation of full adders. The binary adder receives
the input carry signal C0 and produces the output carry signal C4. The
output signals of the full adders generate the required sum bits. The
output of each full-adder is connected to the input carry of the next
higher-order full-adder. The n data bits for the A inputs are sourced
from a single register, specifically R1, while the n data bits for the B
inputs are sourced from another register, specifically R2. The sum can
be transferred to a third register R3 or one of the source registers (R 1
or R2), thereby restoring its previous content.
PAGE 35
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Notes
36 PAGE
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Notes
2.4 Decoders
As we already know an n bit binary number can represent 2n different
values, a decoder is a combinational circuit that can convert a n-bit binary
code to a maximum of 2n unique output combinations. Thus, decoding
is the process by which binary input code is transformed into a desired
output. Decoders are responsible for decrypting or extracting the real data
PAGE 37
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Notes from the code that has been received. Encoder (that we will study later
in this lesson) and decoder are essential components of modern digital
systems such as calculators, mobile phones, fax machines, computers,
and other digital devices. Encoders are used at the input side to encode
information, while decoders are used at the output side to decode the
information. There are numerous applications, such as data de-multiplexing,
memory address decoding, seven segment display decoding, and binary
function generation.
The decoders below are called n to m line decoders, where m ≤ 2n. Their
goal is to use n variables to make 2n or fewer binary combinations. One
that takes in n input signals and sends out m output signals is called a
n × m decoder.
3 to 8 Decoder
A 3 × 8 decoder is a digital circuit that accepts three input lines and
generates eight output lines. A 3 × 8 decoder is shown in figure below:
Input Lines: The decoder is equipped with three input lines,
designated as x, y and z. These input lines correspond to a binary
code, where each line can be either 0 or 1. The combination of
inputs determines which output line will be activated.
Output Lines: The decoder is equipped with eight output lines F0
to F7. Each output line represents a distinct binary combination of
the input lines. For instance, when the input lines are set to 000
(x = 0, y = 0, z = 0), the output line F0 will be active. If the input
lines are 001 (with x = 0, y = 0, z = 1), the output line F1 will
be enabled, and so on.
A 3 × 8 decoder offers a handy method for converting a three-bit
binary code into one of eight potential output states. This makes
it a versatile and indispensable element in the design of digital
circuits.
38 PAGE
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Notes
Enable Input
An enable input in a decoder is a signal that controls whether the decoder
will work or not. The decoder works when the enable input 1 and it
turns off when enable is 0. Below are two states of decoder based on
enable input.
Active State: The decoder looks at its input lines when the enable input is
active. It turns on one of its many output lines based on the binary code
on the input lines. In a 3-to-8 decoder with 3 input lines, for example,
one of the 8 outputs will be turned on depending on how the 3 input
lines are combined.
Inactive State: If enable input is not active, the decoder does not respond
to the signals sent to it and all output lines are set to an inactive state.
The enable input is very important in situations where more than one
decoder is needed because it lets you choose which decoder to use at any
given time. For Example, in a memory system, the enable input can be
used to choose which memory chip is accessed. This way, read or write
commands will only work on the chosen memory. The Figure 2.2 shows
updated truth table and decoder logic circuit.
PAGE 39
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Notes
40 PAGE
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Notes
2.4.1 Decoder Expansion
Decoder expansion is a technique used to create larger decoders from
smaller ones to handle a greater number of input lines than a single
smaller decoder can manage. This approach is particularly useful when
a digital system requires more output lines than what is provided by the
available decoder i.e. the scenario wherein you need a bigger decoder
but only small size decoder is available. The basic idea is to use multi-
ple smaller decoders in combination, controlled by additional inputs, to
expand the number of possible outputs. This is often achieved by using
the higher-order bits to enable one of several smaller decoders.
Expanding a 2-to-4 decoder to create a 3-to-8 decoder involves using
additional logic to combine multiple 2-to-4 decoders in a way that can
handle three input lines and produce eight unique outputs. By using
the higher-order bit A2 to control the enable inputs of two 2-to-4
decoders, you can effectively create a 3-to-8 decoder. This expanded
decoder can handle three input lines and produce eight unique outputs,
thus increasing the decoding capacity without the need for a single,
larger decoder chip.
Figure 2.5 below illustrates how decoders with enable inputs can be
connected to create a larger decoder. In this example, two 2-to-4 line
decoders are combined to form a 3-to-8 line decoder:
The two least significant bits (A1 and A0) are connected to both
decoders.
The most significant bit (A2) is connected to the enable input of
one decoder.
The complement of the most significant bit (A2) is connected to
the enable input of the other decoder.
When A2 is 0, the upper decoder is enabled while the lower decoder
is disabled, producing outputs corresponding to minterms D 0
through D3.
When A 2 is 1, the upper decoder is disabled while the lower
decoder is enabled, producing outputs corresponding to minterms
D4 through D7.
PAGE 41
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Notes
2.5 Encoder
An encoder is a digital circuit that takes in a signal, usually in the form
of binary data, and turns it into an output signal that has been coded. In
a way, it does the opposite of what a decoder does. Digital communi-
cation systems, data transmission, and different kinds of digital sensors
all use encoders all the time. Most encoders have 2n or less input lines
and n output lines. The number of input lines shows how many ways the
input can be put in. The number of output lines shows how the output
was encoded.
Below is example of a 8-to-3 encoder, which means it has 8 input lines
and 3 output lines. This is an octal to binary encoder, as you can see
each row has one specific octal number set , the 3 bit output depicts
the binary value of that octal number. The truth table for this encoder
would look like this:
42 PAGE
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Notes
2.6 Multiplexer
A multiplexer, abbreviated as “mux,” is a combinational digital circuit.
It can select one of several input signals and direct it to a single output
line. It is frequently employed in digital systems for the purpose of data
routing, signal switching, and selection.
Inputs: A multiplexer is equipped with multiple data input lines
and control input lines that determine the data input that is selected.
Selection Lines: The control inputs, which are frequently referred
to as select lines or address lines, are responsible for determining
which input line is directed to the output. The multiplexer’s capacity
to handle a certain number of input lines is contingent upon the
number of select lines.
Output: The output line is then directed to the selected input.
The symbol “MUX” is frequently used to represent a multiplexer, which
is followed by the number of input lines and the number of select lines.
For example, “4 × 1 MUX” represents a multiplexer with 4 input lines
and 1 select line.
The relationship between the input signals, the select lines, and the
output is defined by the truth table of a multiplexer. For instance, for
a 4 × 2 multiplexer with two select lines, the truth table is shown in
Figure 2.10.
PAGE 43
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Notes
IN-TEXT QUESTIONS
1. Which device converts 2n inputs into an n-bit code?
2. What device converts binary information into a maximum of
2n outputs?
3. What device selects one input from multiple inputs based on
select lines?
44 PAGE
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
vary from 8 bits to 96 bits. There are various types of memories in a Notes
computer as shown in Figure 2.11.
PAGE 45
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Notes The memory unit is organized into 2k words, with each word consisting
of n bits. The address lines are used to select one of these 2k words.
Data input and output lines are used for writing and reading n bits to
and from the memory unit, respectively. The above figure has following
components:
Address Lines (k address lines): These lines are used to select a specific
memory location. The number of address lines determines the addressable
memory space. With k address lines, the memory can address 2k unique
locations (words). For example 3 address lines will have 23 = 8 unique
memory addresses.
Data Input Lines (n data input lines): These lines are used to input
data into the memory. The number of data input lines corresponds to the
number of bits in each word that the memory unit can store.
Data Output Lines (n data output lines): These lines are used to output
data from the memory. The number of data output lines is the same as
the number of data input lines, allowing the same number of bits to be
read from the memory.
Control Lines: Read Line control signal tells the memory unit to read
data from the selected memory location and send it out via the data out-
put lines. Write Line control signal tells the memory unit to write data
present on the data input lines to the selected memory location.
Read Operation: When the read control line is activated, the memory
unit retrieves the data from the addressed location and places it on the
data output lines.
Write Operation: When the write control line is activated, the data
present on the data input lines is written to the addressed location.
ROM (Read-Only Memory): ROM is a type of non-volatile memory that
stores data and instructions that are permanently written in the memory
(during manufacturing). It is used to store firmware and essential system
instructions that do not change over time. It retains its contents even
when power is removed from the system, making it ideal for storing
critical system software and firmware. Unlike RAM, ROM is typically
read-only, meaning that its contents cannot be easily modified or updated
after manufacturing. There are various types of ROM, including Mask
ROM, which is programmed during manufacturing, and Programmable
ROM (PROM), which can be programmed by the user after manufacturing.
46 PAGE
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Notes
PAGE 47
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Notes (DRAM) will be erased when the power supply is disconnected, whereas
the data stored in the Electrically Erasable Programmable Read-Only
Memory (EEPROM) will remain intact even when the power is turned
off. Furthermore, EEPROM has the capability to delete previously stored
data and then rewrite it.
In nutshell RAM provides volatile storage for actively used data, while
ROM offer non-volatile storage for firmware, system instructions, and
infrequently changing data. Each type of memory serves specific purposes
and has distinct characteristics regarding programmability, volatility, and
data retention.
IN-TEXT QUESTIONS
4. What type of memory retains data even when power is turned
off?
5. What type of memory is volatile and used for temporary storage?
2.8 Summary
This chapter provides a thorough insight of various digital components
that are essential to understand computer system architecture. The chapter
explains the designing and concept of circuits like binary adder, binary
subtractor, binary incrementer. It also focuses on working of decoder,
encoder and multiplexer, along with their usage in real life. The chapter
ends with a detailed discussion of memory units. This chapter will help
the student to gain a deeper understanding these components.
48 PAGE
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Notes
2.10 Self-Assessment Questions
1. What is the function of a multiplexer (MUX)?
2. Explain the working of a 4-to-1 multiplexer with a truth table.
3. What is a decoder, and how is it used in digital circuits?
4. What is the function of an encoder in digital systems?
5. Describe the role of a decoder in digital circuits.
6. What is the difference between RAM and ROM?
7. Explain the use of ROM in digital systems.
8. How does volatile memory differ from non-volatile memory?
2.11 References
u Computer System Architecture by M. Morris Mano, Third edition,
1993, Prentice Hall of India.
u Computer System Architecture by M. Morris Mano, Third edition,
1993, Pearson Education.
PAGE 49
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
3
Data Representation
Asha Yadav
Assistant Professor
Department of Computer Science
School of Open Learning
University of Delhi
Email-Id: [email protected]
STRUCTURE
3.1 Learning Objectives
3.2 Data Representation
3.3 Number Systems
3.4 Conversion of Radix ‘r’
3.5 Binary Coded Decimal
3.6 Compliments
3.7 Fixed Point Representation
3.8 Integer (Sign and Magnitude) Representation
3.9 Addition and Subtraction of Signed and Unsigned Numbers
3.10 Overflow Detection
3.11 Summary
3.12 Answers to In-Text Questions
3.13 Self-Assessment Questions
3.14 References
3.15 Suggested Readings
Notes
3.2 Data Representation
Data representation is a critical aspect of computer systems architecture,
as it refers to the representation of various types of data (like text, images,
audio, and video) in a manner that enables computers to store, perform
operation and interpret them. Computers employ binary numbers, or bits,
which are strings of 0s and 1s to store data internally, also formats and
encoding methods are employed to display various types of data.
Notes base 10. For instance, the decimal number 2234 (or (2234)10) can be
expanded in the following manner:
52 PAGE
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
PAGE 53
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Notes 3. W
rite down the octal digits obtained from each group in order from
left to right to get the final octal number.
For example covert (101101110)2 to octal
1. Group the binary digits:
101 101 110
2. Convert each group to octal:
101 (binary) = 5 (octal)
101 (binary) = 5 (octal)
110 (binary) = 6 (octal)
3. Combine the octal digits:
Octal number: 556
So, the octal equivalent of the binary number 101101110 is 556.
54 PAGE
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
PAGE 55
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Decimal to Octal
1. Divide the decimal number by 8.
2. Note the remainder.
3. Repeat steps 1 and 2 with the quotient obtained from the division
until the quotient becomes zero.
4. Write down the remainders obtained in reverse order to get the
octal equivalent.
56 PAGE
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Notes
Decimal to Hexadecimal
1. Divide the decimal number by 16.
2. Note the remainder. If the remainder is 10, write A; if it’s 11, write
B; and so on up to F for 15.
3. Repeat steps 1 and 2 with the quotient obtained from the division
until the quotient becomes zero.
4. Write down the remainders obtained in reverse order to get the
hexadecimal equivalent.
PAGE 57
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Octal to Decimal
1. Multiply each digit of the octal number by 8n where n, is the
position of the digit (starting from 0 for the rightmost digit).
2. Add up the results from step 1 to get the decimal equivalent.
� 3 × 82 = 3 × 64 = 192
� 4 × 81 = 4 × 8 = 32
� 5 × 80 = 5 × 1 = 5
Adding result together: 192 + 32 + 5 = 229
So, 3458 = 22910
Octal to Hexadecimal
1. Convert the octal number to binary.
2. Group the binary digits into sets of four.
3. Convert each group of binary digits to its hexadecimal equivalent
using table given in section 3.3.1.
Example:
Convert (725)8 to Hexadecimal
(725)8 = (111010101)2
Grouping into sets of four: 0001 1101 0101
(Add leading zeros to make a complete set of four bits 0001 1101 0101)
58 PAGE
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
4. Each set of four binary digits can be converted to one hexadecimal Notes
digit.
0001→1
1101→D
0101→5
Hence (725)8→(1D5)16
PAGE 59
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Notes Example:
convert (3F8)16
3 -> 0011
F -> 1111
8 -> 1000
⇒ (3F8)16 -> (0011 1111 1000)2
60 PAGE
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Example: Notes
1. Convert (A5)16 to octal
Step 1:
� A -> 1010
� 5 -> 0101
⇒ (A5)16 -> 10100101
Step 2:
010 100 101 (Group in 3)
Writing binary equivalent
⇒ (A5)16 = (245)8
IN-TEXT QUESTIONS
1. Convert the decimal number 25 to binary.
2. Convert the binary number 11010 to decimal.
3. Convert the octal number 157 to decimal.
4. Convert the hexadecimal number 3F to decimal.
62 PAGE
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Alphanumeric Representation
Alphanumeric representation is the use of a combination of letters and
numbers to represent data. This system comprises:
Alphabetic characters refer to both uppercase (A-Z) and lowercase
(a-z) letters.
Numeric characters refer to the digits 0-9.
Non-alphanumeric characters: Examples of symbols include @, #,
$, %, &, *, and so on.
Alphanumeric characters are essential for the storage and manipulation
of textual data in computer systems. Names, addresses, and other textual
data are encoded using alphanumeric characters. Human-Computer Inter-
action (HCI) involves the use of text-based interfaces that allow users to
interact with computer systems by providing and receiving information
in a format that is easily understandable to humans. Computer systems
utilise representation methods to store and process information. Alpha-
numeric characters are encoded using different encoding schemes. The
most prevalent ones are:
ASCII stands for American Standard Code for Information Interchange,
in this each character is represented by a distinct binary code consisting
of either 7 or 8 bits. Standard ASCII employs a 7-bit encoding scheme,
enabling the representation of 128 distinct characters. Extended ASCII
employs 8 bits, enabling the representation of 256 distinct characters.
Unicode is a standardised character encoding system that assigns a unique
number to each character in various writing systems. It is an extensive
PAGE 63
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
3.6 Compliments
Complements are used in computers to make operations like subtraction
easier and for the logical manipulations. Radix r stands for the base of
the number system. There are two kinds of complements for each radix-r
system:
(r-1)’s complement
r’s complement
(r−1)’s Complement
The (r-1) complement of a number is a method used to represent negative
numbers in a specific radix (base) system. It is beneficial for carrying out
arithmetic computations, particularly subtraction. The (r-1) complement
of a number N in each radix r is obtained by subtracting each digit of
N from (r-1).
Binary System (Base 2): For a binary number (base 2), the r−1’s com-
plement is known as the 1’s complement.
Number: 1010
Radix: 2
(r-1) Complement Calculation:
For base 2, r – 1 = 1.
Subtract each digit from 1:
1 – 1 = 0
1 – 0 = 1
1 – 1 = 0
1 – 0 = 1
(1’s complement of 1010): 0101
It can be obtained by inverting each digit as well (i.e., 0 → 1, 1 → 0).
64 PAGE
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Decimal System (Base 10): For a decimal number (base 10), the r−1’s Notes
complement is known as the 9’s complement.
Number: 256
Radix: 10
(r-1) Complement Calculation:
For base 10, r – 1 = 9.
Subtract each digit from 9:
9 – 2 = 7
9 – 5 = 4
9 – 6 = 3
(9’s complement of 256): 743
r’s Complement: The r’s complement of a number N, given a radix r,
is obtained by calculating the (r-1) complement and then adding 1 to
the least significant digit. Example of binary and decimal calculation is
given below:
Binary
Number: 1010
Radix: 2
(r-1) Complement Calculation:
For base 2, r – 1 = 1.
� Subtract each digit from 1:
1 – 1 = 0
1 – 0 = 1
1 – 1 = 0
1 – 0 = 1
(1’s complement of 1010): 0101
Add 1 to the Least Significant Digit:
0101 + 1 = 0110
(2’s complement of 1010): 0110
PAGE 65
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Notes Decimal
For base 10, r – 1 = 9.
� Subtract each digit from 9:
9 – 2 = 7
9 – 5 = 4
9 – 6 = 3
(9’s complement of 256): 743
Add 1 to the Least Significant Digit:
743 + 1 = 744
(10’s complement of 256): 744
Unsigned number subtraction
Subtracting unsigned numbers involves the direct subtraction of one non-neg-
ative number from another. However, in computer systems, this process can
be streamlined by using complement systems, such as the r’s complement,
to simplify the operation, particularly when working with binary numbers.
This method involves taking the complement of the subtrahend and adding
it to the minuend. Subtraction using complement is explained below:
Subtraction using r’s Compliment
Example 1: subtract 0011 (3 in decimal) from 1010 (10 in decimal).
Steps:
1. Find the 2’s complement of the subtrahend (as explained above).
0011 -> 1101
2. Add the complement to the minuend.
(1010 + 1101) -> 10111
3. If there’s an overflow, discard it.
Discard 1 from leftmost (overflow)
Answer: 0111 i.e. 7
Example 2: subtract 256 from 734
Steps:
1. Find the 10’s complement of the subtrahend.
256 -> 744
66 PAGE
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
PAGE 67
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Notes
Format:
In fixed-point representation, a specific number of bits are allocated for
the integer part and the fractional part of a number. For example, in an
8-bit fixed-point format with 4 bits allocated for the integer part and 4
bits for the fractional part, the format might look like: IIII. FFFF.
68 PAGE
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Applications: Notes
Fixed-point representation is often used in applications where hardware
efficiency is crucial, such as in embedded systems and digital signal
processing (DSP). It allows for efficient implementation of arithmetic
operations using simpler hardware and less computational resources
compared to floating-point representation.
Advantages:
Fixed-point representation offers deterministic behavior in arithmetic
operations, predictable performance, and reduced hardware complexity
compared to floating-point arithmetic, making it suitable for real-time
systems and applications where precision within a specific range is suf-
ficient.
Challenges:
The main challenge with fixed-point representation is selecting an
appropriate format (number of integer and fractional bits) that balances
between range and precision for a given application. Improper selection
can lead to overflow (values exceeding the representable range) or loss
of precision.
The magnitude of the signed binary numbers can be described using three
methods are as follows:
PAGE 69
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Notes
Hence as depicted in the Figure 3.2 above +15 has only one representa-
tion but −15 can have 3 representations
70 PAGE
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Notes
Addition
The rule for adding two integers using signed 2’s compliment repre-
sentation only requires only addition and compliment. For addition we
need to add two numbers (in their signed 2’s compliment representation)
including sign bit and in case we have a carry we need to discard it as
shown below in example (taken from Ref 1).
PAGE 71
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Notes (including the sign bit in both cases), the carry generated out of sign
bit is discarded.
Example: Subtract (1010)2 from (1111)2 using 2’s complement method.
2’s complement of (1010)2
(1010)2 is (0110)2
Add (0110)2 to (1111)2
Answer: 0101
IN-TEXT QUESTIONS
5. Add the binary numbers 1011 and 1101.
6. Find the 2’s complement of the binary number 01101.
7. Subtract the binary number 101 from 110 using 2’s complement.
8. Convert the decimal number 255 to hexadecimal.
9. Convert the hexadecimal number 2A to binary.
10. Represent the decimal number −45 in sign-magnitude form using
8 bits.
In an overflow case, an error has occurred and the programmer or user Notes
has to be informed that this has happened. The CPU hardware recognizes
this circumstance and sets the “OVERFLOW” status bit. If the user is
interested, they can examine the OVERFLOW status bit to identify this
problem and take the appropriate action regarding the data handling.
3.11 Summary
This chapter gives the insight of binary, octal, hexadecimal, decimal number,
conversion from one number system to another representation of complement,
signed representation of positive and negative number. It also explains the
subtraction of unsigned numbers, arithmetic addition and overflow concepts.
PAGE 73
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
3.14 References
u Computer System Architecture by M. Morris Mano, Third edition,
1993, Prentice Hall of India.
u Computer System Architecture by M. Morris Mano, Third edition,
1993, Pearson Education.
74 PAGE
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
4
Basic Computer
Organization and Design
Dr. Reema Thareja
Assistant Professor
Department of Computer Science
School of Open Learning
University of Delhi
Email-Id: [email protected]
STRUCTURE
4.1 Learning Objectives
4.2 Introduction
4.3 Key Terminology
4.4 Structure of an Instruction Code
4.5 Stored Program Organization
4.6 Addressing Modes
4.7 Computer Registers
4.8 The Common Bus
4.9 Computer Instructions
4.10 Instruction-Set Completeness
4.11 Instruction Cycle
4.12 Type of Instruction and Addressing
4.13 Input Output and Interrupt
4.14 Interrupt Cycle
4.15 Summary
4.16 Answers to In-Text Questions
4.17 Self-Assessment Questions
4.18 References
4.19 Suggested Readings
PAGE 75
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Notes
4.1 Learning Objectives
After reading this chapter, you will understand the following concepts:
Difference between computer organization and its architecture.
Stored program organization.
Computer Instructions.
Interrupt Processing.
4.2 Introduction
The organization of a computer is defined by its internal registers, tim-
ing and control structure, and the set of instructions that it uses. It also
specifies the sequence of micro-operations it performs on data stored
in registers. But before going further let us understand the difference
between Computer Architecture and Computer Organization.
76 PAGE
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Notes
4.3 Key Terminology
Before delving into the details of Computer System Architecture, we need
to first understand the following terms.
Program: A program is a set of instructions that specify the operations,
operands and the sequence in which data has to be processed. They are
written using programming languages like C++, C, Python, etc. However,
a computer cannot execute programs directly because it understands
instructions written in binary language only (in the form of 0s and 1s).
Therefore, a computer first converts the high-level codes into binary
machine-executable codes and then performs the user-specified task.
Instruction Codes: An instruction code is a collection of bits that instruct
the computer to perform a particular task.
Operation Code (or Opcode): The Operation code of an instruction is
a collection of bits that specifies the operation that must be performed.
Operation can be addition, subtraction, shift, complement, etc. For exam-
ple, in the instruction ADD 457, ADD is the opcode.
Operand: An instruction also specifies the data or the operands on which
the operation will be performed. The operand may be a CPU registers
and/or a memory addresses.
IN-TEXT QUESTIONS
1. ________ is a set of instructions that specify the operations,
operands and the sequence in which data has to be processed.
2. Data on which the operation will be performed is also known
as ________.
3. ________ specifies the operation that needs to be performed.
Notes The address field contains the operand’s address. It can either be a
memory location or a CPU register. The address field of the instruction
specifies whether the operand is direct, indirect or immediate.
Notes
Register-reference format: This format starts with 0111 and is then fol- Notes
lowed by a 12 bit register instruction code.
Input-output format: This format starts with 1111 and is followed by a
12 bit input-output instruction code. Refer Figure 4.4 to understand how
the instruction format differs for each type of instruction.
PAGE 81
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Notes
4.11 Instruction Cycle
The instructions of a program are carried out by a process called the
instruction cycle (Figure 4.8). This cycle consists of these phases that are,
Fetch an instruction from memory
Decode the instruction
Read the effective address from memory if the operand has an
indirect address.
Execute the instruction.
The instruction cycle repeats until the halt instruction is executed.
PAGE 83
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Notes whether it is an indirect operand or not, we also need to check the indi-
rect field of the instruction code. So, we can write,
T2: D0, … D7 <- Decode IR(12-14), AR <- IR (0-11), I <- IR(15)
Memory-Reference Instructions
All memory-reference instructions are executed at T 4 irrespective of
whether it is a direct or indirect memory addressing instruction. Instruc-
tions like AND, ADD and LDA are performed in two steps because AC
can only be access data via DR. The control signals for these operations
can be given as,
PAGE 85
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
STA stores the contents of the AC, which can be applied directly to the
bus. The instruction is specified as, D3T4: M[AR] <- AC, SC <- 0
Branch Unconditionally (BUN) transfers control unconditionally to the
effective address. It is specified as,
D4T4: PC <- AR, SC <- 0.
Branch and Save Return Address (BSA) is used to branch to a sub-
program (or a function). As you know, this requires saving the return
address. Usually, the computer saves the return address at the operand’s
effective address and the subprogram starts one location after this address
in memory:
D5T4: M[AR] <- PC, AR <- AR + 1
D5T5: PC <- AR, SC <- 0
86 PAGE
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
ISZ skips the next instruction if the operand stored at the given effec- Notes
tive address is 0. This requires that the PC incremented, which cannot
be done directly:
D6T4: DR <- M[AR]
D6T5: DR <- DR + 1
D6T6: M[AR] <- DR, if (DR = 0) then (PC <- PC + 1), SC <- 0
IN-TEXT QUESTIONS
6. ________ stores the address of the instruction about to be executed.
7. All memory-reference instructions are executed at ________.
8. ________ skips the next instruction if the operand stored at the
effective address is 0.
PAGE 87
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Notes The 1-bit input flag, FGI is a control flip-flop which is automatically
set to 1 when information is available to be read by the input device.
It is again automatically cleared (set to 0) when the information is read
by the computer.
The OUTR (or the output register) works in the same fashion but in
the opposite direction. Initially, the output flag, FGO is set to 1. The
computer checks the value of FGO. If FGO = 1, the information from
AC is moved to or transferred to OUTR and FGO is cleared to 0. The
output device reads the information, prints it and again set the flag to 1.
The computer will not further load any character into OUTR until FGO
is 0. As long as FGO is cleared, it indicates that the output device is in
the process of printing the character.
Some basic I/O operations are specified in Figure 4.14. Note that here,
p = D7IT3.
Notes
The way the interrupt is handled by the computer can be explained using
a flow chart (Figure 4.16). An interrupt flip flop R is used. When R = 0;
computer executes an instruction cycle. While executing the instruction
cycle, IEN is checked by the control.
If IEN = 0, then it indicates that the programmer has disabled the
interrupt. So control executes another instruction cycle.
If IEN = 1; the control checks the flag bits-FGI and FGO. If
both of them are 0, then both INPR and OUTR are not ready for
transfer information. In this scenario, control continues with the
next instruction cycle.
If any of the two flags (FGI or FGO) is set to1 while IEN = 1
then R is set to 1.
After executing an instruction, the control checks the value of R. if
R = 1, then an interrupt cycle is initiated. Note that R can be set to 1 if
IEN = 1 and either the FGI or FGO are equal to 1. This can happen with
any clock transition except when timing signals T0, T1, T2 are active.
Therefore, the condition that sets R to 1 can be written as, T0ʹT1ʹT2ʹ
(IEN) (FGI + FGO): R ← 1.
PAGE 89
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Notes Here, symbol + between FGI and FGO designate a logic OR operation.
This is ANDed with IEN and T0ʹT1ʹT2ʹ.
IN-TEXT QUESTIONS
9. When R = 0; computer goes through an ________ cycle.
10. If either flag (FGI or FGO) is set to 1 while IEN = 1 then
flip-flop ________ is set to 1 to initiate an interrupt cycle.
Notes
Notes
92 PAGE
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Notes
4.15 Summary
Computer architecture is defined as those aspects of a system
that are visible to the user, such as data bits, instruction sets, and
addressing strategies, and that directly affect how a program is
executed logically.
Computer organization deals with how a system should be structured,
how its operational units and their linkages meet the architectural
standards, how the abstract model is realized, and how to execute
the system.
The operands are specified by indicating the registers and/or
memory locations in which they are stored. k bits can be used
to specify in which of the 2 k registers (or memory locations)
data is present.
Computer instructions are stored in consecutive memory locations
and are performed sequentially.
The instructions of a program are performed by a process called the
instruction cycle. The phases in this cycle are – Fetch-Decode-Execute.
All memory-reference instructions are executed at T4 irrespective
of whether it is a direct or indirect memory addressing instruction.
Once the execution phase is over, the control checks the value of
R. if R = 1, then an interrupt cycle is initiated.
PAGE 93
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Notes
4.16 Answers to In-Text Questions
1. Program
2. Operand
3. Opcode
4. 2k
5. Indirect
6. Program Counter
7. T4
8. ISZ
9. Instruction
10. R
94 PAGE
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
4.18 References
u Computer System Architecture by M. Morris Mano, Third edition,
1993, Prentice Hall of India.
u Computer System Architecture by M. Morris Mano, Third edition,
1993, Pearson Education.
PAGE 95
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
5
Addressing Modes
Dr. Reema Thareja
Assistant Professor
Department of Computer Science
School of Open Learning
University of Delhi
Email-Id: [email protected]
STRUCTURE
5.1 Learning Objectives
5.2 Introduction
5.3 Addressing Mode
5.4 Implied Mode
5.5 Immediate Addressing Mode
5.6 Register Mode
5.7 Register Indirect Mode
5.8 Auto Increment or Auto Decrement Addressing Mode
5.9 Direct Addressing Mode
5.10 Indirect Addressing Mode
5.11 Relative Address Mode
5.12 Indexed Addressing Mode
5.13 Base Register Addressing Mode
5.14 Numerical Example
5.15 Applications of Addressing Modes
5.16 Summary
5.17 Answers to In-Text Questions
5.18 Self-Assessment Questions
5.19 References
5.20 Suggested Readings
96 PAGE
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Notes
5.1 Learning Objectives
After reading the chapter, you will be able to understand the following
concepts:
Effective Address.
Computing effective address in case of different addressing modes.
Applications of addressing modes.
5.2 Introduction
These days, programmers write programs using high-level languages (like
C, C++, R, Python, Java, etc), as it is convenient for them to define
variables and specify operations. However, since computers understand
only binary language, these programs are compiled to generate the actual
machine code. A machine code includes low-level instructions.
In the previous chapter, we have seen that a machine instruction contains
an operation field, an address field, and a mode field. While the operation
field (opcode) indicates the operation to be performed (for example, addition,
subtraction, multiplication, etc), the mode field indicates how the memory
address of the operand (data on which the operation will be performed) is
determined. Computers can use the address field and the mode field to com-
pute the effective address of the operand in multiple ways. These different
ways are termed as addressing modes. But, before starting our discussion
on addressing modes, let us first recall the instruction cycle of a computer.
Fetch the instruction from the memory
Decode the instruction
Execute the instruction
Now, to fetch the instruction, we need to find the effective address and
the effective address (address of the operand or data specified in an
instruction). This address is calculated using an addressing mode. So let
us see in detail, what an addressing mode is.
Notes to program but also reduces the number of bits in the address part of the
instructions. The mode field indicates how to locate the operand and the
address part specifies either a memory address or a processor register.
The effective address of the operand may be stated using different address-
ing modes. Some of them are explained in the next section.
Notes
100 PAGE
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
instruction. The instruction will add the value stored at address (location) Notes
named COUNT with the value present in the accumulator.
In such instruction the effective address (EA) is equal to the address part of
the instruction. We can understand this addressing mode using the Figure 5.5.
PAGE 101
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Notes
5.11 Relative Address Mode
In this mode, the effective address is calculated by adding the value
stored in the address part of the instruction with the value stored in
the program counter (PC). For example, if the address field has value
850, and the program counter contains 20, then the operand is stored at
memory address, 850 + 20 = 870. Look at the Figure 5.7 to visualize
relative addressing mode.
IN-TEXT QUESTIONS
4. In ________ addressing mode, value stored in the register is the
address of the operand in the memory.
5. In ________ addressing mode, EA is the address stored at the
address part of the instruction.
6. In relative addressing mode, the effective address is calculated
by adding the value in the address part of the instruction with
the value stored in the ________.
102 PAGE
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Notes
5.12 Indexed Addressing Mode
In this mode, the effective address is obtained by adding the contents of
an index register (referred as XR) to the address part of the instruction.
This can be written as, Effective Address (EA) = XR + A
This addressing mode is useful when we have an array. In such a case,
the address field of the instruction has the starting address of the array.
The distance between the starting address and the operand is given by
the index, i. This index is stored in the index register. All values of the
array are thus stored in consecutive memory locations. Every value is
stored relative to the address of the first element in the array.
PAGE 103
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Notes
Solution:
Direct Addressing Mode: In this mode, the effective address is
specified as the address part of the instruction. Here, it is 500.
Since EA = 500, the operand to be loaded into AC is 800, that is
the value stored at address 500.
Immediate Addressing Mode: In this mode, the second word of the
instruction is taken as the operand rather than an address. Therefore,
according to the given instruction, 500 is the value that will be
loaded into AC. Since, address of value 500 is 201, the effective
address here is 201.
Indirect Addressing Mode: In this case, the effective address can
be obtained from the address part of the instruction. Since, address
104 PAGE
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
500 is given in the instruction, EA = 800, the value stored at 500. Notes
Now that EA = 800, the operand or the value to be loaded into
AC is 300.
Relative Mode: In this addressing mode, the effective address is
calculated as the sum of PC and address part of the instruction.
Therefore, in this case, EA = 500 + 202 = 702. Correspondingly, the
operand is 325. Thus, after the execution of this instruction AC will
have the value 325. Note that initially, PC was 200, after fetching
the current instruction, PC becomes 202 as it is the address of the
next instruction. Load To AC is a two word instruction consuming
addresses 200 and 201.
Index Addressing Mode: In this mode, the effective address is
calculated as the sum of index register and the address part of the
instruction. Therefore, EA = XR + 500 = 100 + 500 = 600 and the
operand is 900, that is, the value stored at address 600.
Register Mode: In the register mode, the operand is in the register.
Since, the register R1 has value 400, this is the operand and will
be loaded into AC. Note that there will be no effective address in
this case.
Register Indirect Mode: In this mode, the effective address is given
in the register. In this case, register, R1 has 400, so the effective
address is 400 and the operand is the value stored at 400, which
is 700 in this case. Therefore, 700 will be loaded into AC.
Auto-increment Mode: It is same as the register indirect mode
except that Rl is incremented after the execution of the instruction.
Therefore, RI = 401.
Auto-decrement Mode: It is same as the register indirect mode
except that it decrements Rl before executing the instruction. So,
in this case, the effective address is 399 and the operand loaded
into AC is 450.
The table given below summarizes the effective address and the operand
loaded into AC for all the addressing modes discussed above.
PAGE 105
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Notes
IN-TEXT QUESTIONS
7. In ______ addressing mode, the effective address is calculated by
adding the value of XR to the address part of the instruction.
8. The _________ addressing mode is used in computers to relocate
programs in memory.
106 PAGE
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Notes
5.16 Summary
Programmers write programs using high-level languages which are
then compiled to generate the actual machine code. A machine code
includes low-level instructions.
The addressing mode indicates the rules for calculating the address
field of the instruction before the operand is actually used.
In implied mode the operand is implied by the instruction itself.
In immediate mode, the operand is a part of the instruction.
In register mode, the instruction specifies a CPU register
In register indirect mode, the instruction specifies a CPU register.
Contents of this register specify the address of the operand in the
memory.
In auto increment or decrement addressing mode is same as register
indirect mode except that the register is incremented or decremented
before or after its value is used to access memory.
In direct addressing mode, the effective address is equal to the
address part of the instruction.
In indirect addressing mode, the address field of the instruction
specifies an address where the effective address is stored in memory.
In relative addressing mode, the effective address is calculated by
adding the value of the address part of the instruction with the
value stored in the Program Counter (PC).
In indexed addressing mode, the effective address is obtained by
adding the contents of an index register (referred as XR) to the
address part of the instruction.
In base register addressing mode, the effective address is calculated
by adding the value of the Base Register (BR) to the address part
of the instruction
PAGE 107
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Notes
3. Immediate addressing mode
4. Register indirect
5. Indirect
6. Program Counter (PC)
7. Indexed
8. Base register
108 PAGE
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Notes
5.19 References
u Computer System Architecture by M. Morris Mano, Third edition,
1993, Prentice Hall of India.
u Computer System Architecture by M. Morris Mano, Third edition,
1993, Pearson Education.
PAGE 109
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
6
Input Output Organization
Dr. Reema Thareja
Assistant Professor
Department of Computer Science
School of Open Learning
University of Delhi
Email-Id: [email protected]
STRUCTURE
6.1 Learning Objectives
6.2 Introduction
6.3 Peripheral Devices
6.4 ASCII (American Standard Code for Information Interchange)
6.5 Input-Output Interface
6.6 I/O BUS and Interface Module
6.7 I/O Bus Versus Memory Bus
6.8 Isolated I/O Bus Versus Memory Mapped I/O Bus
6.9 Mode of Transfer
6.10 Programmed I/O
6.11 Interrupt Driven I/O
6.12 Direct Memory Access (DMA)
6.13 Summary
6.14 Answers to In-Text Questions
6.15 Self-Assessment Questions
6.16 References
6.17 Suggested Readings
110 PAGE
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Notes
6.1 Learning Objectives
After studying this chapter, you will be able to:
Define peripheral devices.
Explain Input/Output (I/O) interfaces.
List the data transfer schemes.
Explain the concept of program control.
Describe interrupts.
Explain the concept of DMA transfer.
Define I/O Processors.
6.2 Introduction
We know that computer organization refers to operational units and their
interconnections that conform to the architecture specifications. A computer
is a complex system that consists of a large number of components. A com-
puter is of no use if it does not communicate with the external environment.
A user provides instructions to the computer through input devices, and
the input data from the user after processing is stored in the memory. The
results of processing are displayed to the user through an output device.
Though peripheral devices are not essential for the computer to perform
its basic tasks, they do add to user’s experience. So, we can say that,
peripheral devices are not a part of the core computer system architecture.
The term, peripheral, more loosely refers to a device that is external to
the computer case. In this section we will look into some of the periph-
eral devices that are commonly used by users these days.
Notes
Notes ASCII codes uses 7 bits to code 128 different characters. Out of these
128 characters, 94 are printable and 34 are non-printing characters used
for various control functions. Among 94 printable characters, 26 are
uppercase letters, 26 are lowercase letters, 10 are digits and 32 are spe-
cial characters.
The 34 control characters are used for routing and arranging the printed
text in a prescribed format. These characters are divided into three cat-
egories:
Format Effectors: These control characters control the layout of printing.
Examples of format effectors include BS- Back Space, HT- Horizontal
Tab, CR- Carriage Return.
Information Separators: These characters separate data into paragraphs
and pages. Examples include RS- Record Separator and FS- File Separator
Communication Control Characters: They are basically used for trans-
mission of text between remote terminals. Examples include STX-Start
of text, ETX-End of text.
114 PAGE
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Notes
6.6 I/O BUS and Interface Module
Refer figure given below which shows that the I/O interface module
provides a link between the processor and peripherals. The I/O Bus, on
the other hand, has data, address and control lines. The I/O bus from the
processor is connected to the interface of all the peripherals devices. To
communicate with a particular device, the processor puts the address on
the address lines. Each interface decodes and interprets the address as
well as the control signals received from the I/O bus.
The I/O bus also synchronizes the data flow and supervises data exchange
between peripheral and the processor. Each peripheral device connected
to the CPU has its own controller. For example, the printer controller
controls the paper motion, the print timing.
116 PAGE
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
from memory addresses. Moreover, for each of these, there are different Notes
input and output instructions. When CPU fetches and decodes the operation
code for an I/O instruction, it places an address for I/O interface on the
address line and either I/O Read or Write command on the control line.
Correspondingly, if the CPU fetches a memory instruction, it places
memory address on address lines and memory read/write command on
the control line.
118 PAGE
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Advantages: Notes
Easy to implement.
Less hardware support is required
CPU periodically checks the status bits.
Disadvantages:
The processor wastes a lot of time waiting for the I/O module to
transfer or receive data.
System’s performance is severely degraded.
Interrupt-initiated I/O: In the interrupt initiated IO, the interface is
commanded to send out an interrupt request signal whenever data is
available from IO device. This configuration extensively use interrupt
facility and certain commands to allow CPU to continue running any
other program in the interim. Meanwhile, the interface continues to
monitor the IO devices.
The IO device sends an interrupt request signal to the CPU whenever it
detects that it is ready to transfer data. On receiving the interrupt signal,
CPU temporarily suspends the program it was executing, and switches
to service the interrupting program to handle the I/O transfer. CPU then
resumes its work.
Advantages:
Faster and more efficient than Programmed I/O.
Less hardware support is required
CPU does not have to periodically check the status bits.
Disadvantages:
Comparatively difficult to implement.
Support required from underlying hardware and operating system
Direct Memory Access: The CPU’s speed limits the amount of data
that can move between a memory unit and a fast storage device like a
magnetic disk. Thus, we may do away with the CPU’s intervention and
enable peripherals to communicate directly with one another via memory
buses. Direct Memory Access, or DMA, is the term used to describe
this kind of data transfer method. The CPU is not in use and has no
control over the memory buses during DMA. In order to govern the
PAGE 119
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Notes direct transfer between the memory unit and the I/O devices, the DMA
controller assumes control of the buses.
DMA allows devices to exchange and receive data from a computer’s
main memory, including disk drives, external memory, graphics cards,
network cards, and sound cards. It allows the CPU to continue working
on other tasks while data is exchanged between memory and the disk.
Advantages:
I/O interfaces provide a standard way of communicating with
external devices. This allows different devices to be connected to
the computer using the same interface.
I/O interfaces facilitates adding/ removing different devices from
a computer without affecting the other components. This makes it
easier to replace a faulty device.
Datais transferred at a high speed between I/O interfaces and the
computer.
I/O interfaces are compatible with a number of devices. This allows
users to choose from a variety of devices for data transfer.
Disadvantages:
I/O interfaces are often expensive, especially if specialized hardware
is required to connect a particular device to a computer system.
Some I/O interfaces are difficult to configure especially when
specialized hardware is required to set up and maintain the system.
120 PAGE
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Though I/O interfaces are compatible with a wide range of devices, Notes
there can still be compatibility issues.
There can be a security risk if devices are not properly configured.
Hackers may exploit these vulnerabilities to gain unauthorized access
to a computer system or steal data.
PAGE 121
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
122 PAGE
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
the CPU relinquishes the control of busses and is placed in an idle state. Notes
Look at Figure 6.9 which summarizes the contrast between the three
modes of data transfer modes using a flowchart.
PAGE 123
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Notes The Bus Request control signal requests the DMA controller to ask the
CPU to relinquish (or leave) the control buses.
As the name suggests, the Bus Grant signal activated by the CPU informs
the DMA controller that CPU has relinquished the control of buses and
thus, DMA can take control of the control buses to directly transfer data
between memory and peripheral device. Once the control is taken, DMA
can transfer data either by cycle stealing or doing a burst transfer. Both
the techniques are explained below.
Burst Transfer: In this type of transfer, DMA will return the bus
control to the CPU after transferring the specified number of bytes
of data. A register is used as a byte count. After transferring every
byte, the value of the byte count register is decremented. Once the
value of byte count register becomes zero, the DMA Controller will
release the control of the buses so that CPU can take their control
and perform its operations. Note that while DMA transfer was being
done, the CPU was halted. Now that the data transfer is complete,
CPU can resume its operations.
Cyclic Stealing: In this method, the DMA controller transfers one
word at a time. After transferring a word, it returns the control
of the buses to the CPU. The advantage of this method is that
it delays CPU operations only for one memory cycle. Hence the
name. In this technique, DMA steals one memory cycle from CPU
to transfer data.
DMA Controller
A DMA (Direct Memory Access) controller as shown in Figure 6.11 is a
peripheral device in a computer system that allows data to be transferred
between peripheral devices and memory without involving the CPU. When
a peripheral device needs to transfer data to or from memory, it sends a
request to the DMA controller. If multiple devices are requesting DMA
access, the DMA controller determines the priority of the controller and
gives it access as per its priority.
Once granted access, the DMA controller takes control of the system bus
and transfers data directly between the peripheral device and memory,
bypassing the CPU. DMA controllers are particularly useful for high-speed
124 PAGE
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
data transfer operations because they offload the CPU from managing Notes
the data transfer, allowing it to focus on other tasks. As discussed, DMA
controllers can operate in different modes, including:
Single Transfer Mode: One-time data transfer between a peripheral
device and memory.
Block Transfer Mode: Multiple blocks of data are transferred between
the peripheral device and memory.
Burst Transfer Mode: Multiple data words are transferred in rapid suc-
cession without releasing the bus between transfers.
DMA controllers have multiple channels to facilitate multiple data trans-
fers simultaneously. Each channel typically has its own set of registers
and control logic. Some DMA controllers also include buffer memory
to temporarily store data during transfers. This ensures smooth transfer
between the peripheral device and memory.
PAGE 125
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Notes
Figure 6.12
Advantages of DMA Controller
It speeds up data transfer.
CPU need not intervene in data transfer process, releasing CPU for
other important tasks.
Data transfer is completed in fewer clock cycles.
DMA distributes workload very appropriately.
Disadvantages of DMA Controller
DMA is expensive because of additional operations.
DMA suffers from Cache-Coherence Problems.
Complexity of the system increases because of DMA.
IN-TEXT QUESTIONS
5. In the ________, the interface is commanded to send out an
interrupt request signal whenever data is available from IO
device
6. The CPU is not in use and has no control over the memory
buses during ________ operation.
7. The ________ signal requests the DMA controller to ask the
CPU to relinquish the control buses.
126 PAGE
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
6.13 Summary
An output device translates the digitized signals into a form that
can be read and interpreted by the user.
ASCII codes uses 7 bits to code 128 different characters.
I/O Interface helps to transfer information to and from the internal
storage and the external I/O devices.
Programmed I/O depends on how the computer program’s I/O
instructions are written.
In the interrupt initiated IO, the interface is commanded to send out
an interrupt request signal whenever data is available from IO device
The CPU is not in use and has no control over the memory buses
during DMA. In order to govern the direct transfer between the
memory unit and the I/O devices, the DMA controller assumes
control of the buses.
PAGE 127
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Notes
6.15 Self-Assessment Questions
1. Explain any three peripheral devices.
2. What do you understand by /O BUS and Interface Module
3. How does Input - Output Interface work?
4. Differentiate between:
(a) I/O Bus and Memory Bus
(b) Isolated I/O Bus and Memory Mapped I/O Bus
5. Explain the mode of data transfer in Programmed I/O technique.
6. How is Interrupt-initiated I/O better than Programmed I/O?
7. Write a short note on DMA.
6.16 References
u Computer System Architecture by M. Morris Mano, Third edition,
1993, Prentice Hall of India.
u Computer System Architecture by M. Morris Mano, Third edition,
1993, Pearson Education.
128 PAGE
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
PAGE 129
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Addressing Mode: Computers can use the address field and the mode field of the instruc-
tion to compute the effective address of the operand in multiple ways. These different
ways are termed as addressing modes.
Base (or Radix): The number of unique digits, including zero, used to represent numbers
in a positional numeral system. Examples include base-10 (decimal), base-2 (binary), base-8
(octal), and base-16 (hexadecimal).
Binary-Coded Decimal (BCD): A binary-encoded representation of integer values that
uses a 4-bit binary number to represent each digit of a decimal number.
Binary Number System (Base-2): A numeral system that uses only two digits, 0 and 1.
It is the foundational number system for digital electronics and computing.
Block Transfer Mode: Multiple blocks of data are transferred between the peripheral
device and memory.
Boolean Algebra: Boolean algebra is introduced as a mathematical framework for analyz-
ing and designing digital circuits. It operates with binary variables and logical operations.
Burst Transfer: In this type of transfer, DMA will return the bus control to the CPU after
transferring the specified number of bytes of data.
Burst Transfer Mode: Multiple data words are transferred in rapid succession without
releasing the bus between transfers.
Combinational Circuits: Output depends solely on current inputs; used in arithmetic
operations and data routing.
Computer Organization: It refers to operational units and their interconnections that
conform to the architecture specifications.
Cyclic Stealing: In this method, the DMA controller transfers one word at a time. After
transferring a word, it returns the control of the buses to the CPU.
Decimal Number System (Base-10): The most used number system, which uses ten digits
from 0 to 9.
Decoders: A device that converts binary information from the n coded inputs to a max-
imum of 2n unique outputs.
PAGE 131
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Notes Digit: A symbol used to represent numbers in each number system. For
example, in the decimal system, digits are 0 through 9.
Digital vs. Analog Systems: Digital systems use discrete values (usually
binary) to represent information, while analog systems use continuous
values. Advantages of digital systems include noise immunity, ease of
design, and accuracy.
Direct Memory Access Controller: A peripheral device in a computer
system that allows data to be transferred between peripheral devices and
memory without involving the CPU.
Direct Operand: Is an operand that is stored in the register or in the
memory location specified.
Effective Address: The location or the memory address of the operand
of the instruction.
Encoders: A device that converts information from 2 n inputs into an
n-bit code.
Flip-Flops: Basic memory elements used to store a single bit; fundamen-
tal in constructing more complex memory and sequential logic circuits.
Hexadecimal Number System (Base-16): A numeral system that uses
sixteen symbols: 0-9 and A-F, where A represents 10, B represents 11,
up to F which represents 15.
Immediate Operand: Is an operand whose value is directly specified
in the instruction.
Indirect Operand: Is an operand whose address is either stored in the
register or in the memory location specified.
Instruction Codes: An instruction code is a group of bits that instruct
the computer to perform a specific task.
K-map: Karnaugh Maps are a powerful tool for simplifying Boolean
expressions in digital logic design. They provide a visual method for
minimizing logic functions, making it easier to design efficient digital
circuits.
Logic Gates: Logic gates are the building blocks of digital circuits. Basic
gates include AND, OR, NOT, NAND, NOR, XOR, and XNOR.
Multiplexers (MUX): Selects one of several input signals and forwards
the selected input to a single output line.
132 PAGE
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi
Octal Number System (Base-8): A numeral system that uses eight digits, Notes
from 0 to 7.
Operand: An instruction also specifies the data or the operands on which
the operation will be performed. The operand may be a CPU registers
and/or a memory addresses.
Operation Code: It is a group of bits that specifies the operation that
needs to be performed. Operation can be addition, subtraction, shift,
complement, etc.
Overflow: A condition where a calculation exceeds the maximum limit
of the number system used. For instance, in an 8-bit system, any value
above 255 causes an overflow.
Program: A program is a set of instructions that specify the operations,
operands and the sequence in which data has to be processed.
Program Counter: A program counter is a special CPU register that
stores the memory address (location) of the next program instruction to
be executed.
RAM (Random Access Memory): Volatile memory used for temporary
storage while a computer is running.
ROM (Read-Only Memory): Non-volatile memory used to store firm-
ware or software that is rarely changed.
Sequential Circuits: Output depends on current inputs and past states;
used in counters, registers, and control units.
Sign-Magnitude Representation: A method of representing signed
numbers where the most significant bit (MSB) represents the sign (0 for
positive, 1 for negative) and the remaining bits represent the magnitude.
Single Transfer Mode: One-time data transfer between a peripheral
device and memory.
PAGE 133
Department of Distance & Continuing Education, Campus of Open Learning,
School of Open Learning, University of Delhi