0% found this document useful (0 votes)
78 views37 pages

Computer Organization & Architecture

This document provides information about computer organization and architecture. It defines computer architecture as the interface between hardware and software, including attributes like instruction sets that impact program execution. Computer organization refers to how the architectural specification is implemented, including hardware details transparent to programmers. The document discusses concepts like register transfer language (RTL), which specifies operations between registers, and different types of microoperations including data transfers between registers and memory, arithmetic, logic, and shift operations.

Uploaded by

Hardik Darji
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
78 views37 pages

Computer Organization & Architecture

This document provides information about computer organization and architecture. It defines computer architecture as the interface between hardware and software, including attributes like instruction sets that impact program execution. Computer organization refers to how the architectural specification is implemented, including hardware details transparent to programmers. The document discusses concepts like register transfer language (RTL), which specifies operations between registers, and different types of microoperations including data transfers between registers and memory, arithmetic, logic, and shift operations.

Uploaded by

Hardik Darji
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 37

COMPUTER

ORGANIZATION &
ARCHITECTURE
Hardware
• This is a course about what’s inside the
box(computer).
• How does the hardware run the software?
• How do hardware design features impact
software execution?
• How does the software interface with the
hardware?
Computer Architecture – What is it?
• “The architecture of a computer is the interface
between the machine and the software
• Computer architecture refers to those attributes
of a system visible to a programmer and this
attributes that have a direct impact on the logical
execution of a program.
• Example: instuction set,number of bits used to
represent various data type(e.g
num,char,floting),i/o mechanism.
Architecture – the building
blocks
• Structure -static arrangement of the parts
(plan)
• Organization - dynamic interaction of
these parts and their management
(design)
• Implementation - the design of specific
building blocks (construction)
• Performance evaluation - the behavior
study of the system (decorative treatment)
Computer Organization – What is
it?
• “Computer organization refers to the operational
units and their interconnection that realize the
architecture specification” .
• Examples of organization attributes include
those hardware details transparent to the
programmer, such as control signals, interfaces
between the computer and peripherals, and the
memory technology used .
Architecture and Organization
• Architecture is the design of the system
visible to the assembly level programmer.
– How many registers
– What instructions
– Memory addressing scheme
• Organization is how the architecture is
• implemented.
– How much cache memory
– Microcode or direct hardware
– Implementation technology
UNIT 1
Overview of register transfer and micro
operations:
 register transfer language
 Bus and memory transfer
 Arithmetic microoperations
 Logic macro operations
 Shift Microoperations
 Arithmatic logic Shift Unit
What is RTL ?

RTL = Register Transfer Language


Introduction to Register Transfer
Systems
• RTL is a simple, human-oriented language to specify the
operations, register communication and timing of the
steps that take place within a CPU to carry out higher
level (user programmable) instructions.  
• Also,Parallel and Serial operations are possible in the
register transfer System.
• Parallel Operations: Place the operations on the same
line and separate with semicolons. 
Example : operation1; operation2;...
• Serial: Just sequence the operations on subsequent
lines. Each operation takes a clock cycle.
Example :
op1
op2
OP3
Register Transfer
• Data can move from register to register.
• Digital logic used to process data
for example: C  A + B
Register A Register B

Digital Logic
Circuits

Register C
Why Should We Care About RTL ?
A lot of work in the back-end depends on RTL. Like,
• loop dependence, common sub expression elimination,
etc
• Instruction scheduling
• Register Allocation
• Register Movement
RTL Objects
RTL objects are of the following types:
• Expressions
• Integers
• Wide Integers
• Strings
• Vectors
Bus and Memory transfer
What is bus?
Bus: A shared group of wires used for
communicating signals among devices.
• A bus, is a set of physical connections (cables,
printed circuits, etc.) which can be shared by multiple
hardware components in order to communicate with
one another.

The purpose of buses is to reduce the number of "pathways"


needed for communication between the components
Type of bus
– address bus: the device and the location within the
device that is being accessed

– data bus: The data bus transfers instructions


coming from or going to the processor. It is a
bidirectional bus.

– control bus: describes the action on the address


and data buses
BUS AND MEMORY TRANSFER
• Bus is a path of a (group of wires) over which information
is transferred,
• from any of several sources to any of several
destinations.
• From a register to bus: BUS <- R
Register A Register B Register c Register d

Bus lines
Bus Transfer
• The content of register C is placed on the bus, and the
content of the bus is loaded into register R1 by
activating its load control input

Bus
Bus  C , R1  Bus R1 Register C Register
R1  C n
MEMORY TRANSFERS
AR MEMORY Read
UNIT Write

DR

Memory r micro-op: DR <- M ( DR <- M[AR] )


Memory write micro-op: M <- DR ( M[AR] <- DR )
Summary of Register Transfer Micro
operations
A¬ B Transfer content of reg. B into reg. A
AR ¬ DR(AD) Transfer content of AD portion of reg. DR into
reg. AR
A ¬ constant Transfer a binary constant into reg. A
ABUS ¬ R1, Transfer content of R1 into bus A and, at the same time,
R2 ¬ ABUS transfer content of bus A into R2
AR Address register
DR Data register
M[R] Memory word specified by reg. R
M Equivalent to M[AR]
DR ¬ M Memory rea operation: transfers content of
• memory word specified by AR into DR
MICROOPERATION
An elementary operation performed during
one clock pulse, on the information stored
in one or more registers.
• R ¬ f(R, R)
• f: shift, count, clear, load, add,...
Types of Micro Operations

• Computer system microoperations are of


four types:
- Register transfer micro operations
- Arithmetic micro operations
- Logic micro operations
- Shift micro operations
ARITHMETIC MICRO
OPERATIONS

The basic arithmetic microoperations are
     1. Addition
     2. Subtraction
     3. Increment
     4. Decrement
ARITHMETIC
MICROOPERATIONS
• Summary of Typical Arithmetic Micro-Operations:-

R3 <-- R1 + R2             Contents of R1 plus R2


• transferred to R3
R3 <-- R1 - R2              Contents of R1 minus R2
• transferred to R3
R2 <-- R2’                     Complement the contents of R2 
R2 <-- R2’+ 1 2's          Complement the contents of R2
• (negate)
R3 <-- R1 + R2’+ 1        Subtraction
R1 <-- R1 + 1                Increment
R1 <-- R1 - 1                 Decrement
• The arithmetic micro operations of multiply and divide
are not included in the basic arithmetic micro operations.
• They are implemented by means of a combinational
circuit.
• The multiplication operation is implemented with
sequence of add and shift micro operations.

• Division operation is implemented with the sequence of


subtraction and shift micro operations.
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.
Example
P: R1 R1 R2
• Assume that each register has four bits. Let the content
of R1 be 1010 and the content of R2 be 1100.
• The exclusive-OR microoperation stated above
Symbolizes the following logic computation:

1010 Content of R1
1100 Content of R2
0110 Content of R1
Type of LOGIC MICROOPERATIONS
x0011 Boolean
y0101 Micr
Function
Logic Micr
0000 F0 = 0 F <- 0 Clear
0001 F1 = xy F <- A Ù B AND
0010 F2 = xy’ F <- A Ù B’
0011 F3 = x F <- A Transfer A
0100 F4 = x'y F <- A’Ù B
0101 F5 = y F <- B Transfer B
0110 F6 = x Å y F <- A Å B Exclusive-OR
0111 F7 = x + y F <- A Ú B OR
1000 F8 = (x + y)‘ F <- (A Ú B)’ NOR
1001 F9 = (x Å y)‘ F <- (A Å B)’ Exclusive-NOR
1010 F10 = y‘ F <- B’ Complement B
1011 F11 = x + y‘ F <- A Ú B
1100 F12 = x' F <- A’ Complement A
1101 F13 = x' + y F <- A’Ú B
1110 F14 = (xy)' F <- (A Ù B)’ NAND
Shift micro operations
Shift micro operations
• Shift micro operations 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.
• At the same time that the bits are shifted, the first flip-flop
receives its binary information from the serial input.
• During a shift-right operation the serial input transfers
a bit into the leftmost position. The information
transferred through the serial input determines the
type of shift
There are three types of shifts:
a) logical

b) circular

c)arithmetic.
Logical shifts
• A logical shift is one that transfers 0 through the serial
input.
• We will adopt the symbols shl and shr for logical shift-left
and shift-right micro operations.
For example:
• R1 shl R1 …Specify a 1-bit shift to the left of the content
of register .
• R2 shr R2 specify a 1-bit shift to the right of the content of
register R2.

R1  shl R1 0 0
R 2  shr R 2
Circular Shift(Rotate)

• The circular shift circulates the bits of the register


around the two ends without loss of information.
• We will use the symbols cil and cir for the circular shift
left and right, respectively.

R1  cil R1
R 2  cir R 2
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
Shift Microoperations

Symbolic designation Description


R ← shl R Shift-left register R
R ← shr R Shift-right register R
R ← cil R Circular shift-left register R
R ← cir R Circular shift-right register R
R ← ashl R Arithmetic shift-left R
R ← ashr R Arithmetic shift-right R

You might also like