0% found this document useful (0 votes)
9 views45 pages

4 Computer Architecture and Organization

The document covers the fundamentals of computer architecture and organization, focusing on the Von Neumann model, registers, and microoperations. It explains the structure and function of various components, including the CPU, memory, and control units, as well as the significance of registers and their classifications. Additionally, it introduces concepts like register transfer language (RTL) and the basic computer model for understanding processor organization.
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)
9 views45 pages

4 Computer Architecture and Organization

The document covers the fundamentals of computer architecture and organization, focusing on the Von Neumann model, registers, and microoperations. It explains the structure and function of various components, including the CPU, memory, and control units, as well as the significance of registers and their classifications. Additionally, it introduces concepts like register transfer language (RTL) and the basic computer model for understanding processor organization.
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/ 45

Computer Architecture and Organization

(CSE2003)

May 3, 2025 1
Contents
2

UNIT I: Introduction to Computer Architecture


 Organization of the Von Neumann machine
 Interconnection of components
 Introduction to Registers, RTL and register files

May 3, 2025 2
Session Objectives
3

After this session students will be able to:


 Understand Organization of the Von Neumann machine.
 Understand Register and RTL.

May 3, 2025 3
4
 Convert binary number 110011 to Decimal.

 In case of 8-bit numbers, the minimum and maximum number that can be stored in computer
is--------and----------(if we are working with natural numbers). Formula for the range of a
natural number is --------

 The basic operations like addition and subtract are implemented in computer using -----

May 3, 2025 4
4
Answers

 51

 In case of 8-bit numbers, the minimum and maximum number that can be stored in computer is
0 and 28-1=255 (if we are working with natural numbers). Formula for the range of a natural
number is 0 to 2n-1

 The basic operations like addition and subtract are implemented in computer using ALU.

May 3, 2025 5
5 Tutorial Solution

ALU

May 3, 2025 6
Von Neumann Model

Memory

MAR MDR

Input Output
Keyboard Monitor
Processing Unit Printer
Mouse
LED
Scanner Te m p Disk
Disk ALU

Control Unit

PC IR

May 3, 2025 7
Von Neumann Model
8

Explain the function of each component present in Von Neumann Model. Why Von Neumann
Architecture has advantage over other architectures? How does this architecture work?

May 3, 2025 8
7 The John von
Neumann
Architecture

May 3, 2025 9
Showing Single Bus structure
Common Bus Organization
8

Showing Internal view


of Single Bus structure

May 3, 2025 10
Simple Digital Systems
 Combinational and sequential circuits can be used to create simple digital systems.

 These are the low-level building blocks of a digital computer.


 Simple digital systems are frequently characterized in terms of
 the registers they contain, and
 the operations that they perform.
 Typically,
 What operations can be performed on the data in the registers ?
 What information can be passed between registers ?

May 3, 2025 11
Concept Behind Registers
10
 A register can be made using Flip Flop (a sequential circuit).

 A Flip Flop is capable to store 1 bit, so if you need to store n bits in a register that register
will have n Flip Flops.

 A Flip-Flop is also called a clock-controlled memory device.

 A Flip-flop is used to store one bit of information. By connecting several Flip-flops together,
it may store data that can represent the state of a sequencer, the value of a counter, an ASCII
character in a computer’s memory or any other piece of information.

May 3, 2025 12
Introduction To Register
11
 Register is a very fast computer memory, used to store data/instruction in-execution.

 A Register is a group of flip-flops with each flip-flop capable of storing one bit of information.

 An n-bit register has a group of n flip-flops and is capable of storing binary information of n-bits.

 A register consists of a group of flip-flops and gates. The flip-flops hold the binary information and
gates control when and how new information is transferred into a register.

 Various types of registers are available commercially. The simplest register is one that consists of
only flip-flops with no external gates.

May 3, 2025 13
Classification of Registers (Common CPU Registers)
12
 These are classified as given below.
 Accumulator:
 This is the most frequently used register used to store data taken from memory. It is in
different numbers in different microprocessors.
 Memory Address Registers (MAR):
 It holds the address of the location to be accessed from memory. MAR and MDR
(Memory Data Register) together facilitate the communication of the CPU and the main
memory.
 Memory Data Registers (MDR):
 It contains data to be written into or to be read out from the addressed location.

May 3, 2025 14
Classification of Registers (Common CPU Registers)
12
 General Purpose Registers:
 These are numbered as R0, R1, R2….Rn, and used to store temporary data during any
ongoing operation. Its content can be accessed by assembly language programming.
 Program Counter (PC):
 Program counter (PC) is used to keep the track of execution of the program. It contains the
memory address of the next instruction to be fetched. PC points to the address of the next
instruction to be fetched from the main memory when the previous instruction has been
successfully completed.
 Program counter (PC) also functions to count the number of instructions.
 Instruction Register (IR):
 It is the register which holds the instruction which is currently been executed.

May 3, 2025 15
Classification of Memory
12

May 3, 2025 16
Register Transfer and Microoperations
13

Register Transfer

 The term register transfer means the availability of hardware logic circuits that can perform a
stated micro-operation and transfer the result of the operation to the same or another register.

 Microoperations

May 3, 2025 17
Microoperations
 The operations on the data in registers are called microoperations.
 The functions built into registers are examples of microoperations
 Shift
 Load: The transfer of new information into a register is referred to as loading the
register.
 Clear
 Increment
 Complement, etc.

May 3, 2025 18
Microoperations
 An elementary operation can be performed (during one clock pulse), on the information
stored in one or more registers.

Registers ALU 1 clock cycle


(R) (f)

Ri → f(Ri, Rj)

f: Shift, Load, Clear, Increment, Add, Subtract, Complement, AND, OR, XOR, etc.
May 3, 2025 19
Organization of a Digital System
16
 Definition of the (internal) organization of a computer.

 Set of registers and their functions.

 Microoperations set.

 Set of possible microoperations provided by the computer organization.

 Control signals that initiate the sequence of microoperations (to perform the functions).

May 3, 2025 20
Register Transfer Level

 This prospective of a computer, or any digital system is called the register transfer level.

 This is because we’re focusing on


 The system’s registers.
 The data transformations in them, and
 The data transfers between them.

May 3, 2025 21
Register Transfer Language
 Rather than specifying a digital system in words, a specific notation is used, called register transfer
language.
 For any function of the computer, the register transfer language can be used to describe the
(sequence of) microoperations.

 Register Transfer Language (RTL)


 The symbolic notation used to describe the microoperation transfers between registers is
called Register Transfer Language. or
 Register Transfer Language is:
 A symbolic language.
 A convenient tool for describing the internal organization of digital computers.
 It can also be used to facilitate the design process of digital systems.

May 3, 2025 22
Designation of Registers
 Registers are designated by capital letters, sometimes followed by numbers (e.g., A, B,… R1, R2,… IR,
PC, AC).
 Often the names indicate function:
 MAR - memory address register
 IR - instruction register
 PC - program counter
 Registers and their contents can be viewed and represented in various ways.
 A register can be viewed as a single entity:

 Registers may also be represented by showing the data bits it contains.

May 3, 2025 23
Designation of Registers
 Designation of a register
 a register
 portion of a register
 a bit of a register

 Common ways of drawing the block diagram of a register.

Register
Showing individual bits

R1 7 6 5 4 3 2 1 0
15 8 7 0
15 0 PC(H) PC(L)
Numbering of bits Subfields

R2
May 3, 2025 24
Register Transfer

 Copying the contents of one register to another register is a register transfer.

 A register transfer is indicated as


 R2 ← R1
 In this case the contents of register R1 are copied (loaded) into register R2.
 A simultaneous transfer of all bits from the source R1 to the destination register R2, during one
clock pulse.
 Note that this is a non-destructive; i.e. the contents of R1 are not altered by copying
(loading) them to R2.

May 3, 2025 25
Register Transfer
 A register transfer such as

 R3 ← R5

Implies that the digital system has

 the data lines from the source register R5 to the destination register R3.
 Parallel load in the destination register R3.
 Control lines to perform the action.

May 3, 2025 26
Control Functions
 Often actions need to occur only if a certain condition is true.
 This is similar to an “if” statement in a programming language.
 In digital systems, this is often done via a control signal, called a control function.
 If the control signal is 1, the action takes place.
 This is represented as:
P: R2 ← R1
Which means "if P = 1, then load the contents of register R1 into register R2”, i.e., if (P = 1) then
(R2 ← R1)

May 3, 2025 27
Hardware Implementation of Controlled
Transfers
24
Implementation of controlled transfer
P: R2 ← R1
Control P Load
R2
Circuit Clock
n
R1
Block Diagram
Clock t t+1

Load
Timing Diagram

Transfer occurs here


The same clock controls the circuits that generate the control function and the destination
register.
 Registers are assumed to use positive-edge-triggered flip-flops.
May 3, 2025 28
Simultaneous Operations
25
 If two or more operations are to occur simultaneously, they are separated with commas.

P: R3← R5, MAR← IR

 Here, if the control function P = 1, it will load the contents of R5 into R3, and at the same
time (clock), it will load the contents of register IR into register MAR.

 Logic Microoperations.
P: R1 ← R1 Ф R2

May 3, 2025 29
Basic Symbols For Register Transfers

Symbols Description Examples


Capital letters with
Denotes a register. MAR, R2
numerals.

Parentheses ()
Denotes a part of a register. R2(0-7), R2(L)
Arrow ←
Denotes transfer of information.
Colon : R2 ← R1
Denotes termination of control function.
Comma , P : A ← B,
Separates two micro-operations
B ← A, C ← A

May 3, 2025 30
27

May 3, 2025 31
RTL Questions
28

1. Following is the list of register transfer microoperations.


 They are originally written so that they can be executed from top to bottom in sequential order.
R2 ← R1
R3 ← R5
R4 ← R1
R1 ← R5
R5 ← R6
 Suppose each register is connected to single three state bus via bi-directional I/O lines.
Execute above 5 operations in no more than 3 cycles.
Answer:
R2 ← R1; R4 ← R1
R3 ← R5; R1 ← R5
R5 ← R6
May 3, 2025 32
29

2. Represent the following conditional control statement by two register transfer statements
with control functions.
 If (P = 1) then (R1 ← R2) else if (Q = 1) then (R1 ← R3)

Answer:
P: R1 ← R2
P’Q: R1 ← R3

May 3, 2025 33
Connecting Registers
 In a digital system with many registers, it is impractical to have data and control lines to directly
allow each register to be loaded with the contents of every possible other registers.

 To completely connect n registers → n(n-1) lines


 O(n2) cost
 This is not a realistic approach to use in a large digital system

 Instead, take a different approach


 Have one centralized set of circuits for data transfer. The Bus
 Have control circuits to select which register is a source, and which is a
destination.

May 3, 2025 34
Introduction
 Every different processor type has its own design (different registers, buses, microoperations,
machine instructions, etc).
 Modern processor is a very complex device.
 It contains
 Many registers.
 Multiple arithmetic units, for both integer and floating point calculations.
 The ability to pipeline several consecutive instructions to speed execution.
 Etc.
 However, to understand how processors work, we will start with a simplified processor model.
 This is similar to what real processors were like ~ 25 years ago.
 M. Morris Mano introduces a simple processor model he calls the Basic Computer.
 We will use this to introduce processor organization and the relationship of the RTL model to the
higher level computer processor.

May 3, 2025 35
The Basic Computer
 The Basic Computer has two components, a processor and memory.
 The memory has 4096 words in it.
 4096 = 212, so it takes 12 bits to select a word in memory.
 Each word is 16 bits long.

CPU 0

RAM

15 0 4095

May 3, 2025 36
Instructions
 Program
 A sequence of (machine) instructions.
 (Machine) Instruction
 A group of bits that tell the computer to perform a specific operation (a sequence of
micro-operation)
 The instructions of a program, along with any needed data are stored in memory.
 The CPU reads the next instruction from memory. This task is done by PC.
 It is placed in an Instruction Register (IR).
 Control circuitry in control unit then translates the instruction into the sequence of
microoperations necessary to implement it.

May 3, 2025 37
Instruction Format
 A computer instruction is often divided into two parts.
 An opcode (Operation Code) that specifies the operation for that instruction.
 An address that specifies the registers and/or locations in memory to use for that operation.
 In the Basic Computer, since the memory contains 4096 (=2 12) words, we needs 12 bit to
specify which memory address this instruction will use.
 In the Basic Computer, bit 15 of the instruction specifies the addressing mode (0: direct
addressing, 1: indirect addressing).
 Since the memory words, and hence the instructions, are 16 bits long, that leaves 3 bits for
the instruction’s opcode.
Instruction Format
15 14 12 11
0 Address
I Opcode

Addressing mode

May 3, 2025 38
Addressing Modes
The address field of an instruction can represent either:
 Direct address: the address in memory of the data to use (the address of the operand), or
 Indirect address: the address in memory of the address in memory of the data to use.
Direct addressing Indirect addressing

22 0 ADD 35 1 A D D 300
457
300 1350
457 Operand
1350 Operand

+ +

 Effective Address (EA) AC AC


 The address, that can be directly used without modification to access an operand for a computation-
type instruction, or as the target address for branch type instructions.
May 3, 2025 39
Processor Registers
 A processor has many registers to hold instructions, addresses, data, etc.
 The processor has a register called Program Counter (PC) that holds the memory address of
the next instruction to be executed.
 Since the memory in the Basic Computer only has 4096 locations, the PC only needs 12 bits.
 In a direct or indirect addressing, the processor needs to keep track of what locations in memory
it is addressing: The Address Register (AR) is used for this.
 The AR is a 12 bit register in the Basic Computer.
 When an operand is found, using either direct or indirect addressing, it is placed in the Data
Register (DR). The processor then uses this value as data for its operation.
 The Basic Computer has a single general purpose register - the Accumulator (AC).

May 3, 2025 40
Processor Registers
37
 The significance of a general purpose register is that it can be referred to in instructions. For
example:
 load AC with the contents of a specific memory location.
 store the contents of AC into a specified memory location.
 Often a processor will need a scratch register to store intermediate results or other temporary
data; in the Basic Computer this is the Temporary Register (TR).
 The Basic Computer uses a very simple model of input/output (I/O) operations.
 Input devices are considered to send 8 bits of character data to the processor.
 The processor can send 8 bits of character data to output devices.
 The Input Register (INPR) holds an 8 bit character gotten from an input device.
 The Output Register (OUTR) holds an 8 bit character to be send to an output device.

May 3, 2025 41
Basic Computer Registers
Registers in the Basic Computer

11
PC
0 Memory
11 4096 x 16
AR
0
15 0
IR CPU
15 0 15 0
TR DR

7 0 7 0 15 0
OUTR INPR AC

List of Basic Registers


DR 16 Data Register Holds memory operand
AR 12 Address Register Holds address for memory
AC 16 Accumulator Processor register: Results of operations go to this register
IR 16 Instruction Register Holds instruction code
PC 12 Program Counter Holds address of instruction
TR 16 Temporary Register Holds temporary data
INPR 8 Input Register Holds input character
OUTR 8 Output Register Hold output register
May 3, 2025 42
Common Bus System
39

 The registers in the Basic Computer are connected using a bus.


 This gives a savings in circuitry over complete connections between registers.

May 3, 2025 43
40

 The maximum size of main memory that can be used in any computer is determined
by the addressing scheme.
 A computer that generates 16-bit address is capable of addressing upto 216 which is
equal to 64K memory location.
 Similarly, for 32 bit addresses, the total capacity will be…..which is equal to……
memory location.

May 3, 2025 44
Computer Architecture
42

 Computer Architecture concerns Machine Organization, interfaces, application, technology,


measurement & simulation that includes:
 Instruction set
 Data formats
 Principle of Operation (formal description of every operation).
 Features (organization of programmable storage, registers used, interrupts mechanism, etc.).
 In short, it is the combination of Instruction Set Architecture, Machine Organization and the
related hardware.

May 3, 2025 45

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy