Unit1
Unit1
Digital Systems
Functional Units & their
Interconnections
by
Upendra Mishra
CSE
KIET Group of Institutions
Delhi-NCR-Ghaziabad
Computer Organization
Computer Organization comes after the decide of Computer
Architecture first. Computer Organization is how operational attribute
are linked together and contribute to realize the architectural
specification. Computer Organization deals with structural relationship.
Its clear that it deals with high-level design its also clear that it deals with low-level
issue. design issue.
Microphones
Cameras
Output Units
The primary function of the output unit is to send the
processed results to the user. Output devices display
information in a way that the user can understand.
For example The most common example of an output device is
a monitor.
Some units, such as graphic displays, provide both an output
function, showing text and graphics, and an input function,
through touchscreen capability. The dual role of such units is
the reason for using the single name input/output (I/O) unit in
many cases.
Arithmetic & Logic Unit
Most computer operations are executed in the
arithmetic and logic unit (ALU) of the processor.
Any arithmetic or logic operation, such as
addition, subtraction, multiplication, division, or
comparison of numbers, is initiated by bringing
the required operands into the processor, where
the operation is performed by the ALU.
Control Unit
The memory, arithmetic and logic, and I/O
units store and process information and
perform input and output operations. The
operation of these units must be coordinated in
some way.
This is the responsibility of the control unit.
The control unit acts as the nerve center that
sends control signals to other units and senses
their states.
A large set of control lines (wires) carries the
signals used for timing and synchronization of
events in all units.
Control Unit
• The control unit is a component of a computer's central
processing unit that coordinates the operation of the
processor. It tells the computer's memory, arithmetic/logic
unit and input and output devices how to respond to a
program's instructions.
• The control unit is also known as the nerve center of a
computer system.
• Let's us consider an example of addition of two operands by
the instruction given as Add LOCA, RO. This instruction adds
the memory location LOCA to the operand in the register RO
and places the sum in the register RO. This instruction
internally performs several steps.
Memory Unit
Registers
Cache
Siz
st
e
Co
d
Main Memory
ee
Sp
Secondary Memory
Auxiliary Memory
Upendra Mishra
COMPUTER ORGANISATION AND
ARCHITECTURE
BUS, ITS ARCHITECTURE, AND TYPES
12/21/2024 28
BUS
12/21/2024 29
• On any bus lines can be classified into three function groups:
i. Data Bus
ii. Address Bus
iii. Control Bus.
12/21/2024 30
12/21/2024 31
Data Bus:
1.Data bus carry the data.
2.Data lines provides path for moving data between components.
3.Width of databus is number of lines in databus.
4.Each line can carry only one bit at a time.
5.Data bus is a bidirectional bus.
6.Data bus fetch the instructions from memory.
7.Data bus used to store the result of an instruction into memory.
8.Data bus carry commands to an I/O device controller or port.
12/21/2024 32
Address lines
• These lines indicate the Location (e.g. in memory) that the data should
be either read from or written to.
• Address bus carry the memory address while reading from writing
into memory.
Control Bus
• The control bus holds the control and timing signals needed to
coordinate all of the computer’s activities.
12/21/2024 33
Different types of control signals are used in a bus:
1.Memory Read: This signal, is issued by the CPU or DMA
controller when performing a read operation with the memory.
2.Memory Write: This signal is issued by the CPU or DMA controller
when performing a write operation with the memory.
3.I/O Read: This signal is issued by the CPU when it is reading from
an input port.
4.I/O Write: This signal is issued by the CPU when writing into an
output port.
12/21/2024 34
• Following are the three components of a bus: –
• The address bus, a one-way pathway that allows
information to pass in one direction only, carries
information about where data is stored in memory.
• The data bus is a two-way pathway carrying the actual
data (information) to and from the main memory.
• The control bus holds the control and timing signals
needed to coordinate all of the computer’s activities.
12/21/2024 35
12/21/2024 36
12/21/2024 37
12/21/2024 38
12/21/2024 39
12/21/2024 40
TYPES OF BUSES
Dedicated and Multiplexed Bus
Types of Bus Dedicated Bus Multiplexed Bus
Explanation A dedicated bus is permanently Common bus used for both data and address
assigned either to a particular transmission. Address and data information may be
function or to a physical subset of transmitted over the same set of lines using an Address
computer components. Valid control lines.
Functional Dedication means a
separate bus for each different
function.
Physical Dedication means use of
separate buses connecting different
system components (same
functionality).
Advantages High Throughput and Less Waiting Use of fewer lines -> Less Cost and Space
Time
Disadvantages More Cost (Larger Bus Size) Reduced Performance-> More Complex Circuit
12/21/2024 41
12/21/2024 42
Computer Organization
and Architecture
Topic: Registers
by
Upendra Mishra
(M. Tech., Ph.D.*)
KIET Group of Institutions
Quick recap to Memory Hierarchy
Flip Smaller in size,
flops Faster in operation
and
Register costlier
Cache
Larger in size,
Main Memory Slower in operation
and
cheaper
Secondary Memory
Introduction to Register
Register is a digital device that is very fast memory unit that may
accept, store and transfer data or instruction.
Registers is a group of flip-flops.
Question: What is flip-flop?:
Flip flop is able to store 1 bit of data/information.
This means n-bit register have n-flip flops
Two broad categories of Register
Special Purpose Registers General purpose register
Users do not access Special Purpose General purpose register is used to
registers. These registers are for store data intermediate results
processor internal processing. during program execution. It can be
Examples: Program Counter, accessed via assembly
Memory Address Register, programming.
Memory Data Register , Examples: Accumulator, Data Register
Instruction Register, Flag register
Computer components:
Top-Level View
Brief Description of Important Register
PC(Program Counter): Contains the address of the next instruction to be fetched
from memory.
MBR(Memory Buffer Register): Contains a word to be stored in memory or sent to
the I/O unit, or is used to receive a word from memory or from the I/O unit.
MAR(Memory Address Register): Specifies the address in memory of the word to
be written from or read into the MBR.
MDR(Memory Data Register ): It contains the data to be stored in the computer
storage (e.g. RAM), or the data after a fetch from the
computer storage.
Brief Description(contd.)
IR(Instruction Register): Contains the instruction most recently fetched.
Flag register: Depending upon the value of result after any arithmetic and logical operation
the flag bits become set (1) or reset (0).
AC(Accumulator): Employed to hold temporarily operands and results of ALU operations.
Data Register: A register used in microcomputers to temporarily store data being
transmitted to or from a peripheral device.
Index Register: These are used for indexed addressing and may be
auto indexed
Topic: Register Transfer and
Memory Transfer
Register Recap
Register is a digital device that is very fast memory unit that may
accept, store and transfer data or instruction.
It is made of Flip flops.
Microoperations
The operations executed on data stored in registers are called MICROOPERATIONS.
A Microoperations is an elementary operation performed on the information stored
in one or more registers.
The result of the operation may replace the previous binary information of a
register or may be transferred to another register.
Example, Counter, increment and load, bidirectional shift
Register Transfer
Register Transfer Language
Register Transfer Language
implies the availability of hardware logic is borrowed from programmers, who
circuits that can perform a stated apply this term to programming
microoperation and transfer the result of languages.
the operation to the same or another
register.
Register Transfer Language
Expresses the symbolic form the
microoperation sequences among the
registers of a digital module.
Block representation of Register
Computer registers are designated by capital letters.
PC: Program Counter IR: Instruction Register
R1: Processor Register MAR: Memory Address Register
N – bit Register -> n number of flip flops
For Example: 8 - bit Register
R1 7 6 5 4 3 2 1 0
15 0 15 8 7 0
PC PC(H) PC(L)
Information Transfer
• R2 R1 : denotes a transfer of the content of register R1 into register R2.
• Normally, we want the transfer to occur only under a predetermined control condition.
This can be shown by means of an if-then statement.
If (P = 1) then (R2 R1)
where, P is a control signal which results in Boolean value 0 or 1.
P: R2 R1
• It symbolizes the requirement that the transfer operation be
executed by the hardware only if P = 1 .
P: R2 R1
Block Diagram
Clock pulse is
a time varying
voltage signal
applied to
control
operation of a
flip flop.
Timing Diagram
Memory Transfer
The transfer of information from a memory word to the outside environment is called a
READ
operation.
Read: DR M[AR]
The transfer of new information to be stored into the memory is called a WRITE
operation.
Write: M[AR] DR
A memory word will be symbolized by the letter M.
M[AR]: to specify the address of M when writing memory transfer
operations, address is enclosed in square brackets.(here, AR is
address register)
Arithmetic Microoperations
Symbolic Representation Description
• In this method ,the device which is “physically closer” to the bus controller/arbitor
will be allowed to use the bus first.
• Three control signals are use here:
• i) Bus Request: Used by devices to make request for the bus.
• ii) Bus Busy: Used to show that bus is already used by other devices.
• iii)Bus Grant : Used to allow a device to grant access of bus.
• It is a simple and cheaper method where all the bus masters use the same line for
making bus requests. The bus grant signal serially propagates through each
master until it encounters the first one that is requesting access to the bus. This
master blocks the propagation of the bus grant signal, therefore any other
requesting module will not receive the grant signal and hence cannot access the
bus.
During any bus cycle, the bus master may be any device – the processor or any
DMA controller unit, connected to the bus.
Polling or Rotating Priority
method
• In this, the controller is used to generate the address for
the master(unique priority), the number of address lines
required depends on the number of masters connected in
the system. The controller generates a sequence of master
addresses. When the requesting master recognizes its
address, it activates the busy line and begins to use the
bus.
R1 7 6 5 4 3 2 1 0
15 0 15 8 7 0
PC PC(H) PC(L)
Information Transfer
• R2 R1 : denotes a transfer of the content of register R1 into register R2.
• Normally, we want the transfer to occur only under a predetermined control condition. This
can be shown by means of an if-then statement.
If (P = 1) then (R2 R1)
where, P is a control signal which results in Boolean value 0 or 1.
P: R2 R1
• It symbolizes the requirement that the transfer operation be
executed by the hardware only if P = 1 .
P: R2 R1
Block Diagram
Clock pulse is
a time varying
voltage signal
applied to
control
operation of a
flip flop.
Timing Diagram
P: R2 R1
Basic Symbols for Register Transfer
Memory Transfer
The transfer of information from a memory word to the outside environment is called a READ
operation.
Read: DR M[AR]
The transfer of new information to be stored into the memory is called a WRITE operation.
Write: M[AR] DR
A memory word will be symbolized by the letter M.
M[AR]: to specify the address of M when writing memory transfer
operations, address is enclosed in square brackets.(here, AR is address
register)
Arithmetic Microoperations
Symbolic Representation Description
R1 7 6 5 4 3 2 1 0
15 0 15 8 7 0
PC PC(H) PC(L)
Information Transfer
• R2 R1 : denotes a transfer of the content of register R1 into register R2.
• Normally, we want the transfer to occur only under a predetermined control condition. This
can be shown by means of an if-then statement.
If (P = 1) then (R2 R1)
where, P is a control signal which results in Boolean value 0 or 1.
P: R2 R1
• It symbolizes the requirement that the transfer operation be
executed by the hardware only if P = 1 .
P: R2 R1
Block Diagram
Clock pulse is
a time varying
voltage signal
applied to
control
operation of a
flip flop.
Timing Diagram
P: R2 R1
Basic Symbols for Register Transfer
Memory Transfer
The transfer of information from a memory word to the outside environment is called a READ
operation.
Read: DR M[AR]
The transfer of new information to be stored into the memory is called a WRITE operation.
Write: M[AR] DR
A memory word will be symbolized by the letter M.
M[AR]: to specify the address of M when writing memory transfer
operations, address is enclosed in square brackets.(here, AR is address
register)
Arithmetic Microoperations
Symbolic Representation Description
A bus organization
for seven CPU R1 A
R2
registers. R3
R1 R2+R3 R4
B
R5
1. MUX A selector (SELA): R6
to place the content of R2 R7
into bus A . Load
2 . MUX B selector (7 lines)
(SELB): to place the SELA { MUX MUX } SELB
119
Thank
You
Computer
Organization and
Architecture
BUS SYSTEM USING
MULTIPLEXER
by
Upendra Mishra
(B.Tech., M.Tech. PhD.(P))
KIET Group of Institutions
Contents
MULTIPLEXER
BUS SYSTEM USING MULTIPLEXER
MULTIPLEXER(MUX)
•
Multiplexer
Multiplexer is a combinational circuit that has maximum of 2n data inputs, ‘n’ selection
Example: 8x1 Multiplexer
lines and single output line. Input: 8 -> pow(2,3)
2x1 Multiplexer 4x1 Multiplexer 8x1 Multiplexer Selection lines: 3
Output: 1
16x1 Multiplexer …….
Inputs
8x1 Outputs
Mux
A Select
B
C lines
D
A typical digital computer has many registers, and paths must be provided
to transfer information from one register to another.
The number of wires will be excessive if separate lines are used between
each register and all other registers in the system.
A more efficient scheme for transferring information between registers in
a multiple-register configuration is a common bus system.
BUS SYSTEM USING MULTIPLEXER
A bus structure consists of a set of common lines, one for each bit of a
register, through which binary information is transferred one at a time.
Control signals determine which register is selected by the bus during
each particular register transfer.
One way of constructing a common bus system is with multiplexers.
The multiplexers select the source register whose binary information is
then placed on the bus.
Bus System for Four Registers
Bus System for Four
Registers
1.Number of Multiplexer Required= Number of bits in each register
2. Size of Multiplexer = Number of register used
Bus System for Four Registers
Each register has four bits, numbered 0 through 3.
The bus consists of four 4X1 multiplexers each having four data inputs, 0
through 3, and two selection inputs, S1 and S0.
For example, output 1 of register A is connected to input 0 of Mux 1 because
this input is labelled A1.
The MUX 0 multiplexes the four 0 bits of the registers, MUX 1 multiplexes the
four 1 bits of the registers, and similarly for the other two bits.
Bus System for Four Registers
The two selection lines S1 and S0 are connected to the selection inputs of all
four multiplexers.
The selection lines choose the four bits of one register and transfer them into
the four-line common bus. When S1S0=00, the 0 data inputs of all four
multiplexers are selected and applied to the outputs that form the bus.
This causes the bus lines to receive the content of register A since the outputs
of this register are connected to the 0 data inputs of the multiplexers. Similarly,
register B is selected if S1S0=01, and so on.
Bus System for Four Registers
In general, a bus system will multiplex k registers of n bits each to produce an n-
line common bus.
The number of multiplexers needed to construct the bus is equal to n, the
number of bits in each register.
The size of each multiplexer must be k X 1 since it multiplexes k data lines.
Bus System for Four Registers
The transfer of information from a bus into one of many destination registers
can be accomplished by connecting the bus lines to the inputs of all destination
registers and activating the load control of the particular destination register
selected.
GENERAL REGISTER ORGANIZATION Input
Clock
A bus organization
for seven CPU R1 A
R2
registers. R3
R1 R2+R3 R4
B
R5
1. MUX A selector (SELA): R6
to place the content of R2 R7
into bus A . Load
2 . MUX B selector (7 lines)
(SELB): to place the SELA { MUX MUX } SELB
The outputs of four buffers are connected together to form a single bus line.
(It must be realized that this type of connection cannot be done with gates
that don't have three-state outputs.)
The control inputs to the buffers determine which of the four normal inputs
will communicate with the bus line. No more than one buffer may be in the
active state at any given time. The connected buffers must be controlled so
that only one three-state buffer has access to the bus line while all other
buffers are maintained in a high-impedance state.
Bus System with Tri-State Buffers
One way to ensure that no more than one control input is active at any
given time is to use a decoder.
When the enable input of the decoder is 0, all of its four outputs are 0, and
the bus line is in a high-impedance state because all four buffers are
disabled.
When the enable input is active, one of the three-state buffers will be
active, depending on the binary value in the select inputs of the decoder.
Bus System with Tri-State Buffers
To construct a common bus for four registers of n bits each using three-state
buffers, we need n circuits with four buffers in each as shown in last figure .
Each group of four buffers receives one significant bit from the four
registers. Each common output produces one of the lines for the common
bus for a total of n lines. Only one decoder is necessary to select between
the four registers.
Points to Remember:
• In common to construct a common bus for 4 registers of n bits &
each using three state buffers, then we need n circuits with four
buffers.
• Each group of four buffers receives one significant bit from the four
registers.
• Each common output produces one of the lines for the common bus
for a total of n lines.
• Only one decoder is necessary to select between the four registers.
References
• A register is used to store the address of the topmost element of the stack
which is known as Stack pointer (SP).
• The stack pointer register SP contains a binary number whose value is equal to
the address of the word that is currently on top of the stack.
Register Stack:
• A stack can be placed in a portion of a large
memory or it can be organized as a collection
of a finite number of memory words or
registers.
EMPTY =0 (Stack is Not empty) • EMPTY is also a one-bit flag register for showing
the status of stack whether it is Empty
EMPTY = 1 (Stack is Empty) (containing no element) or not
Push an
element:
SP= SP+1 =
1+1 =2
M[SP]
DR ( M[2]=B)
If (SP==0)
No
EMPTY=0
Add an element C to the Stack
• Given
FULL=0
EMPTY=0
SP=2
Push an
element:
SP= SP+1 =
2+1 =3
M[SP] DR (
M[3]=C)
If (SP==0)
No
EMPTY=0
Removing an element from the
stack
• POP operation: • The top item is read from the
• DR← M [SP] (Read item from the top of stack) stack into DR.
• SP ← SP-1 Decrement stack Pointer
• If ( SP==0) then (Empty ← 1) Check if stack • The stack pointer is then
is empty decremented.
• FULL ← 0 (Mark the stack not full)
• If its value reaches zero, the
stack is empty, so Empty is set to
1.
Removing the top element from
the stack
Given
Full = 0
Empty= 0
SP=3
Pop an item
DR← M [SP] DR=
M[3]= C
SP= SP-1 SP=3-1= 2
If (SP==0) then (Empty 1)
FULL=0
000000
- 1
111111
Important Point
• The first item stored in the stack is at address 1.
• The second last (or prior to last) item stored in the stack is at
address 63.
Direct address mode: the operand is located at the specified address given
Indirect address mode:
Register Addressing mode
Register Indirect Addressing
Relative Addressing Mode.
Immediate Addressing Mode
Index Register Addressing Mode
Base Register Addressing Mode
Implied Addressing Mode
Autoincrement Addressing Mode
Auto-decrement Addressing Mode
Problem
•An instruction is stored at location 300 with its address fields at location 301. The
address field has the value 400. A processor register RI contain the number 200.