0% found this document useful (0 votes)
16 views97 pages

COA Notes

The document outlines the course contents for CSL245 - Computer Architecture, covering basic computer organization, programming, memory organization, I/O organization, and parallel processing. It details register transfer language, microoperations, arithmetic and logic operations, instruction codes, and the structure of computer systems. The course emphasizes the interaction of hardware components and the design of control units, CPU architecture, and memory hierarchies.

Uploaded by

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

COA Notes

The document outlines the course contents for CSL245 - Computer Architecture, covering basic computer organization, programming, memory organization, I/O organization, and parallel processing. It details register transfer language, microoperations, arithmetic and logic operations, instruction codes, and the structure of computer systems. The course emphasizes the interaction of hardware components and the design of control units, CPU architecture, and memory hierarchies.

Uploaded by

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

CSL245– COMPUTER

ARCHITECTURE

Morris Mano: Computer System Architecture, PHI.


Course Contents
• SECTION–A
Basic computer Organisation and design: Register Transfer language & operations, various
Arithmetic, Logic & Shift microoperations instructions, codes, computer registers,
instructions, timing & control, instruction cycle, design of a complete basic computer &it’s
working.
• SECTION–B
Programming & controlling the basic computer: Machine & Assembly Language, hardwired
& Microprogrammed control, Design of a control unit.
CPU Architecture: General register & stack organization, instruction formats and addressing
modes, ALU & Control unit architecture.
• SECTION–C
Memory Organisation: Memory hierarchy, main, auxiliary, cache memory, virtual
memory paging and segmentation.
I/O Organization: Peripheral Devices, input-output interface, Modes of data transfer
programmed & interrupt initiated I/O, DMA, I/O Processors.
• SECTION–D
Parallel & Multiprocessing Environment: Introduction to parallel processing, pipelining,
RISC Architecture, vector & array processing, Multiprocessing concepts, memory & resource
sharing, interprocessor communication & synchronization.
SECTION–A
Basic computer Organisation and design

• Computer architecture is concerned with the


structure and behavior of the various functional
modules of the computer and how they interact to
provide the processing needs of the user.
• Computer organization is concerned with the way
the hardware components are connected together to
form a computer system.
• Computer design is concerned with the development
of the hardware for the computer taking into
consideration a given set of specifications.
Register Transfer and Microoperations
• A digital system is an interconnection of digital
hardware modules that accomplished a specific
information-processing task.
 size and complexity.
 a few integrated circuits to a complex of inter-
connected and interacting.
 a modular approach.
 such digital components as registers, decoders,
arithmetic elements, and control logic.
Microoperations
• A microoperation is an elementary operation
performed on the information stored in one or
more registers.
• Result->same register or other register.
• shift, clear, load etc.
The internal hardware organization of a digital
computer is best defined by specifying:
1. The set of registers it contains and their
function.
2. The sequence of microoperations performed
on the binary information stored in the
registers.
3. The control that initiates the sequence of
microoperations.
Register Transfer Language
• The symbolic notation used to describe the
microoperation transfers among registers is
called a register transfer language (RTL).
• Convenient tool.
• As simple.
Registers
• Denoted by capital letters (sometimes
followed by numerals).
1. Memory Address Register (MAR)
2. Instruction Register (IR)
3. R1 (processor registers)
4. Flip-flops
Block diagram of Register
• Information transfer from one register to
another (by replacement operator)

• Transfer to occur only under a predetermined


condition (if-then)
Block diagram (transfer R1 to R2)
Basic symbols for Register Transfers
Bus and Memory Transfers
• Common bus system(efficient scheme for
transferring information between registers in a
multiple-register configuration).
• Set of common lines (one for each bit of a
register).
• Control signals(which register is selected)
Construction of a common bus
1. By Multiplexers

Counting of MUXs=size of Registers, Configuration of MUXs (4X1)=No. of registers


Bus Selection
2. Three-State Bus Buffers
• Three-state gate (0,1,high-impedence)
• High-Impedence like an open circuit, the
output is disconnected and does not have a
logic significance).
• Perform any conventional logic.
Memory Transfer
• Memory Read
the address register, symbolized by AR.
The data are transferred to another register, called the
data register, symbolized by DR.
The read operation can be stated as follows:

• Memory Write
The write operation transfers the content of a data
register to a memory word M selected by the address.
Write: M[AR] DR
Types of Microoperations
1. Register transfer microoperations
2. Arithmetic Microoperations
3. Logic Microoperations
4. Shift Microoperations

Only register transfer microoperations does not


change the information.
Rest three categories change the information.
Arithmetic Microoperations (add,
subtract, increment, decrement)
Binary Adder
• The digital circuit that generates the arithmetic sum of two binary numbers of any
length is called a binary adder.
• An n-bit binary adder requires n full-adders. The output carry from each full-adder
is connected to the input carry of the next-high-order full-adder.
• The n data bits for the A inputs come from one register (such as R1), and the n
data bits for the B inputs come from another register (such as R2).
• The sum can be transferred to a third register or to one of the source registers (R 1
or R2), replacing its previous content.
Binary Adder-Subtractor
• When M = 0 the circuit is an adder and when M = 1
the circuit becomes a subtractor.
• For unsigned numbers, this gives A - B if A>= B or the
2's complement of (B - A) if A < B. For signed numbers,
the result is A - B provided that there is no overflow.
Binary lncrementer
Arithmetic Circuit

D =A+ Y + Cin
Addition
• When S1S0 = 00, the value of B is applied to
the Y inputs of the adder.
• If Cin = O, the output D =A+ B.
• If Cin = 1, output D =A+ B + 1.
• Both cases perform the add microoperation
with or without adding the input carry.
Subtraction
• When S1S0 = 01, the complement of B is
applied to the Y inputs of the adder.
• If Cin = 1, then D =A + B + 1. This produces A
plus the 2's complement of B, which is
equivalent to a subtraction of A-B.
• When Cin = 0, then D = A + B. This is equivalent
to a subtract with borrow, that is, A - B - 1.
Increment
• When S1S0 = 10, the inputs from B are
neglected, and instead, all O's are inserted into
the Y inputs. The output becomes D = A + 0 + Cin·
• This gives D = A when Cin = 0 and D = A + 1 when
Cin = 1.
• In the first case we have a direct transfer from
input A to output D.
• In the second case, the value of A is
incremented by 1.
Decrement, Transfer
• When S1So = 11, all 1' s are inserted into the Y inputs of
the adder to produce the decrement operation D = A - 1
when Cin = 0. This is because a number with all 1's is equal
to the 2's complement of 1 (the 2's complement of binary
0001 is 1111). Adding a number A to the 2's complement
of 1 produces F =A + 2's complement of 1 = A - 1.
• When Cin = 1, then D =A - 1 + 1 = A, which causes a direct
transfer from input A to output D.
• Note that the microoperation D = A is generated twice,
so there are only seven distinct microoperations in the
arithmetic circuit.
Logic Microoperations
• Logic microoperations specify binary
operations for strings of bits stored in
registers. These operations consider each bit
of the register separately and treat them as
binary variables.
AND (^), OR(v), COMPLEMENT(-)
Hardware Implementation
Some Applications of Logic microoperations

1. Selective-set
The selective-set operation sets to 1 the bits
in register A where there are corresponding
1's in register B. It does not affect bit
positions that have 0's in B.
2. Selective-complement
• The selective-complement operation
complements bits in A where there are
corresponding 1's in B. It does not affect bit
positions that have D's in B.
3. Selective-clear
• The selective-clear operation clears to 0 the
bits in A only where there are corresponding
1's in B.
4. Mask operation
• The mask operation is similar to the selective-
clear operation except that the bits of A are
cleared only where there are corresponding
0's in B.
5. Insert operation
• The insert operation inserts a new value into a group of bits.
This is done by first masking the bits and then ORing them
with the required value. For example, suppose that an A
register contains eight bits, 0110 1010. To replace the four
leftmost bits by the value 1001 we first mask the four
unwanted bits:

• and then insert the new value:

• The mask operation is an AND microoperation and the insert


operation is an OR microoperation.
6. Clear operation
• The clear operation compares the words in A
and B and produces an all 0' s result if the two
numbers are equal. This operation is achieved
by an exclusive-OR microoperation.
3. Shift Microoperations
• Shift microoperations are used for serial
transfer of data.
• They are also used in conjunction with
arithmetic, logic, and other data-processing
operations. The contents of a register can be
shifted to the left or the right.
• There are three types of shifts: logical,
circular, and arithmetic.
1. Logical shift
• A logical shift is one that transfers 0 through the serial input.
• the symbols shl and shr for logical shift-left and shift-right
microoperations.

• are two microoperations that specify a 1-bit shift to the left of


the content of register R 1 and a 1-bit shift to the right of the
content of register R2.
• The register symbol must be the same on both sides of the
arrow.
• The bit transferred to the end position through the serial input
is assumed to be 0 during a logical shift.
2. Circular shift
• The circular shift (also known as a rotate
operation) circulates the bits of the register
around the two ends without loss of
information.
• This is accomplished by connecting the serial
output of the shift register to its serial input.
• the symbols cil and cir for the circular shift left
and right, respectively.
3. Arithmetic shift
• An arithmetic shift is a microoperation that
shifts a signed binary number to the left or
right.
• An arithmetic shift-left multiplies a signed
binary number by 2.
• An arithmetic shift-right divides the number
by 2.
• The leftmost bit in a register holds the sign bit, and the
remaining bits hold the number.
• The sign bit is 0 for positive and 1 for negative.
• Negative numbers are in 2's complement form.
• Rn-1 in the leftmost position holds the sign bit.
• Rn-2 is the most significant bit of the number and R0 is the
least significant bit.
• The arithmetic shift-right leaves the sign bit unchanged and
shifts the number (including the sign bit) to the right.
• Thus Rn-1 remains the same, Rn-2 receives the bit from Rn-1
and so on for the other bits in the register. The bit in R0 is lost.
• The arithmetic shift-left inserts a 0 into R0, and shifts all
other bits to the left.
• The initial bit of Rn-1 is lost and replaced by the bit from
Rn-2.
• A sign reversal occurs if the bit in Rn-1 changes in value
after the shift. This happens if the multiplication by 2
causes an overflow.
• An overflow occurs after an arithmetic shift left if initially,
before the shift, Rn-1 is not equal to Rn-2.
• An overflow flip-flop Vs, can be used to detect an
arithmetic shift-left overflow.
• If Vs = 0, there is no overflow,
• but if Vs = 1, there is an overflow and a sign
reversal after the shift.
Hardware Implementation
• A combinational circuit shifter can be constructed with multiplexers as
shown in Fig. 4-12.
• The 4-bit shifter has four data inputs, A0 through A,, and four data outputs,
H0 through H3.
• There are two serial inputs, one for shift left (I L) and the other for shift right
(IR).
• When the selection input S = 0, the input data are shifted right (down in the
diagram).
• When S = 1, the input data are shifted left (up in the diagram).
• The function table in Fig. 4-12 shows which input goes to each output after
the shift.
• A shifter with n data inputs and outputs requires n multiplexers.
• The two serial inputs can be controlled by another multiplexer to provide
the three possible types of shifts.
Arithmetic Logic Shift Unit
Instruction Code
• A program is a set of instructions that specify
the operations, and the sequence by which
processing has to occur.
• A computer instruction is a binary code that
specifies a sequence of microoperations for
the computer.
• Instruction codes together with data are
stored in memory.
• An instruction code is a group of bits that instruct the computer
to perform a specific operation.
• It is usually divided into parts, each having its own particular
interpretation.
• The most basic part of an instruction code is its operation part.
• The operation code of an instruction is a group of bits that define
such operations as add, subtract, multiply, shift, and complement.
• The operation code must consist of at least n bits for a given 2^n
(or less) distinct operations.
• 64 distinct operations, one of them being an ADD operation.
• The operation code consists of six bits, with a bit configuration
110010 assigned to the ADD operation .
Stored Program Organization
• The simplest way to organize a computer is to have
one processor register and an instruction code format
with two parts.
• The first part specifies the operation to be performed
• and the second specifies an address. The memory
address tells the control where to find an operand in
memory.
• This operand is read from memory and used as the
data to be operated on together with the data stored
in the processor register.
• For a memory
unit with 4096
words we need 12
bits to specify an
address since
2^12 = 4096.
• 16-bit operand .
• clear AC,
complement AC,
and increment AC
Indirect Address
• When the second part of an instruction code specifies an
operand, the instruction is said to have an immediate
operand.
• When the second part specifies the address of an operand,
the instruction is said to have a direct address.
• This is in contrast to a third possibility called indirect
address, where the bits in the second part of the
instruction designate an address of a memory word in
which the address of the operand is found.
• One bit of the instruction code can be used to distinguish
between a direct and an indirect address.
Effective Address
• The effective address to be the address of the
operand in a computation-type instruction or
the target address in a branch-type
instruction.
• Thus the effective address in the instruction of
Fig. 5-2(b) is 457 and in the instruction of Fig
5-2( c) is 1350.
Computer Registers
Common Bus System

DR<-AC and AC<- DR


Computer Instructions
• Instruction format
Instruction Set Completeness
The set of instructions are said to be complete if
the computer includes a sufficient number of
instructions in each of the following categories:
1. Arithmetic, logical, and shift instructions
2. Instructions for moving information to and from
memory and processor registers
3. Program control instructions together with
instructions that check status conditions
4. Input and output instructions
Instruction Cycle
• A program residing in the memory unit of the computer consists
of a sequence of instructions. The program is executed in the
computer by going through a cycle for each instruction.
• Each instruction cycle in turn is subdivided into a sequence of
subcycles or phases. In the basic computer each instruction
cycle consists of the following phases:
1. Fetch an instruction from memory.
2. Decode the instruction.
3. Read the effective address from memory if the instruction has
an indirect address.
4. Execute the instruction.
Fetch and Decode
Determine the Type of Instruction
Register-Reference Instructions
• D7 = 1 and I = 0
Memory-Reference Instructions
AND to AC
• This is an instruction that performs the AND
logic operation on pairs of bits in AC and the
memory word specified by the effective
address. The result of the operation is
transferred to AC.
ADD to AC
• This instruction adds the content of the
memory word specified by the effective
address to the value of AC.
• The sum is transferred into AC and the output
carry Cout, is transferred to the E (extended
accumulator) flip-flop.
LDA: Load to AC
• This instruction transfers the memory word
specified by the effective address to AC.
STA: Store AC
• This instruction stores the content of AC into
the memory word specified by the effective
address.
BUN: Branch Unconditionally
• This instruction transfers the program to the instruction
specified by the effective address.
• PC holds the address of the instruction to be read from
memory in the next instruction cycle.
• PC is incremented at time T1 to prepare it for the address of
the next instruction in the program sequence.
• The BUN instruction allows the programmer to specify an
instruction out of sequence and we say that the program
branches (or jumps) unconditionally.
BSA: Branch and Save Return Address
• This instruction is useful for branching to a portion of the
program called a subroutine or procedure.
• When executed, the BSA instruction stores the address of
the next instruction in sequence (which is available in PC)
into a memory location specified by the effective address.
• The effective address plus one is then transferred to PC to
serve as the address of the first instruction in the
subroutine.
ISZ: Increment and Skip if Zero
• This instruction increments the word specified
by the effective address, and if the
incremented value is equal to 0, PC is
incremented by 1.
Control Flowchart
Input-Output and Interrupt
• Input-Output Configuration
Input-Output Instructions
Program Interrupt
Interrupt Cycle
Complete Computer Description
Design of Basic Computer
Control logic gates
Control of registers and memory
Control of single flip-flops
Control of common bus
Design of Accumulator Logic
Control of AC register
Adder and logic circuits
Timing and Control
• Clock pulses
• There are two major types of control organization:
• hardwired control and microprogrammed control.
• Hardwired organization, the control logic is implemented with gates,
flip-flops, decoders, and other digital circuits. It has the advantage that
it can be optimized to produce a fast mode of operation. A hardwired
control, as the name implies, requires changes in the wiring among
the various components if the design has to be modified or changed.
• Microprogrammed organization, the control information is stored in a
control memory. The control memory is programmed to initiate the
required sequence of microoperations. In the microprogrammed
control, any required changes or modifications can be done by
updating the microprogram in control memory.
Block diagram of the control unit

You might also like