0% found this document useful (0 votes)
5 views55 pages

Understanding Computer Architecture Basics

The document provides an overview of computer architecture and organization, detailing the roles of the CPU, its components, and the functions of registers. It explains microoperations, including arithmetic, logic, and shift operations, and introduces concepts like Register Transfer Language and bus systems for data transfer. Additionally, it outlines the structure and function of various registers and memory operations within a basic computer system.

Uploaded by

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

Understanding Computer Architecture Basics

The document provides an overview of computer architecture and organization, detailing the roles of the CPU, its components, and the functions of registers. It explains microoperations, including arithmetic, logic, and shift operations, and introduces concepts like Register Transfer Language and bus systems for data transfer. Additionally, it outlines the structure and function of various registers and memory operations within a basic computer system.

Uploaded by

deepanshu Yadav
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Name of Institution

Amity School of Engineering &


Technology
[Link]. CSE, Semester V
Computer Architecture

1
Introduction: Computer Architecture Name of Institution

Computer Architecture:
Computer Architecture is a functional description of requirements
and design implementation for the various parts of computer. It
deals with functional behavior of computer system.
▪ Computer Architecture basically describes what the computer
does. It indicates its hardware.
✓ It comprises logical functions such as instruction sets,
registers, data types and addressing modes.

2
Introduction: Computer Architecture Name of Institution

Computer Organization:
Computer Organization comes after the decide of Computer
Architecture. It deals with structural relationship.
▪ Computer Organization describes how it does it. It indicates its
performance.

✓ Computer Organization consists of physical units like circuit


designs, peripherals and adders.

3
Central Processing Unit(CPU) Name of Institution

✓ A CPU is an electronics circuit that fetches the input


instructions or commands from the memory unit, performs
arithmetic and logic operations and stores this processed
data back to memory.

✓ A CPU or Central Processing Unit is the heart of a


computer and is install in socket specified on a
motherboard.

4
Components of CPU Name of Institution

Register

5
Name of Institution

Arithmetic Logic Unit

ALU is an internal electronic circuitry of a CPU that performs all


the arithmetic and logical operations in a computer.

The ALU receives three types of inputs.


1. Control signal from CU ( Control Unit )
2. Data(operands) to be operated
3. Status information from operations done previously.

When all the instructions have been executed, the output that
consists of data is stored in memory and a status information is
stored in internal registers of a CPU.
6
Name of Institution

Control Unit
The Control Unit is an internal part of a CPU that co-ordinates
the instructions and data flow between CPU and other
component of computer.

✓ Control Unit directs the operations of a central processing


unit by sending timing and control signals.

Register
Registers are a type of computer memory used to quickly
accept, store, and transfer data and instructions that a being
used immediately by the CPU.

It hold an instruction, a storage address, or any data (such as bit


sequence or individual characters). 7
Name of Institution

The computer needs processor registers for manipulating data


and a register for holding a memory address.

The register holding the memory location is used to calculate


the address of the next instruction after the execution of the
current instruction is completed.

➢The detailed list of some of the most common registers


used in a basic computer is mentioned in the next slide.

8
Name of Institution

Register Symbol Number of bits Function

Data register DR 16 Holds memory operand

Address register AR 12 Holds address for the memory

Accumulator AC 16 Processor register

Instruction register IR 16 Holds instruction code

Program counter PC 12 Holds address of the instruction

Temporary register TR 16 Holds temporary data

Input register INPR 8 Carries input character

Output register OUTR 8 Carries output character


9
Name of Institution

It shows the register and memory configuration for a basic computer.

10
Name of Institution

• The Memory unit has a capacity of 4096 words, and each word contains 16
bits.
• The Data Register (DR) contains 16 bits which hold the operand read from
the memory location.
• The Memory Address Register (MAR) contains 12 bits which hold the
address for the memory location.
• The Program Counter (PC) also contains 12 bits which hold the address of
the next instruction to be read from memory after the current instruction is
executed.
• The Accumulator (AC) register is a general purpose processing register.
• The instruction read from memory is placed in the Instruction register (IR).
• The Temporary Register (TR) is used for holding the temporary data during
the processing.
• The Input Registers (IR) holds the input characters given by the user.
• The Output Registers (OR) holds the output after processing the input data.
11
Instruction register (IR) Name of Institution

• The basic computer has 16-bit instruction register (IR).

• These instructions refer to memory address as an operand.

• The other operand is always accumulator.

• It specifies 12-bit address, 3-bit opcode (other than 111) and


1-bit addressing mode {for direct addressing (0) or indirect
addressing (1)}.

12
Organization of a Digital Computer
Name of Institution

Definition of the (internal) organization of a computer:

➢ Set of registers and their functions


➢ Microoperations set
➢ Set of allowable microoperations provided by the
organization of the computer.
➢ Control signals that initiate the sequence of
microoperations (to perform the functions).

13
Name of Institution

This process of analyzing a digital computer system’s architecture


is called Register Transfer Language.

Because we’re focusing on:

1. The system’s registers

2. The data transformations in them, and

3. The data transfers between them.

14
Name of Institution

For any function of the computer, the Register Transfer Language


can be used to describe the (sequence of) microoperations.

What is Register transfer language?

o A symbolic language
o A convenient tool for describing the internal organization
of digital computers.
o Can also be used to facilitate the design process of digital
systems.

15
Representation of RegistersName of Institution
Registers are represented by capital letters, sometimes followed by numbers
(e.g., A, R13, IR)

Often the names indicate function:


MAR - memory address register
ACC - Accumulator
PC - program counter
IR - instruction register

16
Name of Institution

Registers and their contents can be viewed and represented in various


ways:
1. as a single entity - MAR

2. showing the bits of data they contain - 8 bit reg.


76543210

3. Numbering of bits - 15 0
15 . . . .4 3 2 1 0

15 8 7 0
4. Subfields - PC(H) PC(L)

Program Counter (PC) is a multi-byte register.


"PC(H)" and "PC(L)" refer to the high and low bytes. 17
Register Transfer Name of Institution

18
Control Function Name of Institution

19
Implementation of Controlled Register
Name of Institution

Control P Load
R2 Clock
Circuit
n
R1

t t+1
Clock

Load
Transfer occurs here

20
Simultaneous Transfer Operation
Name of Institution

Microoperation: The operations on the data in registers are called


microoperations. (during one clock pulse)
E.g.- Shift, Load, Clear, Add, Subtract, AND, OR….

21
Symbols for Register Transfer
Name of Institution

Symbols Description Examples


Capital letters & Denotes a register
numerals
Parentheses () Denotes a part of a
register
Arrow  Denotes transfer of
information
Colon : Denotes termination P:
of control function
Comma , Separates two micro- A  B, B  A
operations

22
Bus and Memory TransfersName of Institution

A digital computer can have many register, so paths must be provided to


transfer data from one to another register for different operations.

The number of wires will be large, if separate lines are used in between
the registers.

So, efficient and widely used method for transferring data in between
multiple registers is common bus line system.

23
Bus and Memory TransfersName of Institution

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

▪ From bus to a Bus lines

register : R  BUS Load


Reg. R0 Reg. R1 Reg. R2 Reg. R3

D0 D1 D2 D3
z E (enable)
Select 2x4
w
Decoder
24
Bus and Memory TransfersName of Institution

25
Memory Transfers Name of Institution

Transfer of information/data from a memory word to outside is called


Read operation.
Memory Read
AR unit
Write

DR

Transfer of new information to be stored into the memory is called


write operation.

Memory word is indicated by enclosing the address in square bracket


following the letter M.

Memory read micro-op: DR  M ( DR  M[AR] )


Memory write micro-op: M  DR ( M[AR]  DR )
26
Bus and Memory TransfersName of Institution
Summary of Register Transfer Microoperations

AB Transfer content of reg. B into reg. A


AR  DR(N) Transfer content of N bits portion of reg.
DR into reg. AR
A  constant Transfer a binary constant into reg. A
ABUS  R1, R2  ABUS Transfer content of R1 into bus A and, at the
same time, transfer content of bus A into R2
AR Address register
DR Data register
M[AR] Memory word specified by reg. AR
DR  M[AR] Memory read operation: transfers content of
memory word specified by AR into DR
M[AR]  DR Memory write operation: transfers content
of DR into memory word specified by AR
27
Micro-operation Name of Institution

A microoperation is an elementary operation performed


with data stored in register.

Micro-operations are classified into:


1. Register transfer microoperation
2. Arithmetic microoperation
3. Logic microoperation
4. Shift microoperation
28
Arithmetic Microoperation
Name of Institution

Arithmetic Micro-operation are done on numeric data


contained in the registers.

The basic arithmetic microoperations are;


Addition
Subtraction
Complement
Increment
Decrement 29
Arithmetic Microoperation
Name of Institution

Add Micro-Operation

R1 + R2 = R3

The value/contents in register R1 is added to the value


in the register R2 and then the sum is transferred into
register R3.

30
Arithmetic Microoperation
Name of Institution

Subtract Micro-Operation

R3  R1 + R2′ + 1

Subtraction is implemented through complementation


and addition instead of using minus operator.

R3  R1 + R2′ + 1 is equivalent to R1-R2.


31
Arithmetic Microoperation
Name of Institution

Increment/Decrement Micro-Operation
It is commonly implemented by adding and removing
1 from the register, accordingly.

R1 → R1 + 1
R1 → R1 – 1

Plus one and minus one operations represent increment


and decrement micro-operations, respectively. 32
Logic MicrooperationName of Institution

• Logic Micro-operation 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: the exclusive-OR microoperation with the


contents of two registers R1 and R2 is symbolized
by the statement P: R1 ← R1 ⊕ R2.
33
Logic MicrooperationName of Institution
It specifies a logic microoperation to be executed on
the individual bits of the registers provided that the
control variable P = 1.
Lets assume that each register has four bits;

The content of R1, after the execution of the microoperation,


is equal to the bit-by-bit exclusive-OR operation on pairs of
bits in R2 and previous values of R1.
34
Logic MicrooperationName of Institution

Special Symbols used for logic operations:


• ∧ - AND
• ∨ - OR
• ⊕ - XOR

This bitwise approach allows for a total of 16 distinct


logic operations that can be performed.

35
Logic MicrooperationName of Institution

36
Logic MicrooperationName of Institution

37
Logic MicrooperationName of Institution
Let’s take a look:
Clear: This logic micro-operation sets all bits in the register to 0.
AND: It performs a bitwise AND between corresponding bits of
two registers.
Transfer A: It copies the contents of register A directly to the
output.
Transfer B: It copies the contents of register B directly to the
output.
Exclusive OR: It performs a bitwise comparison between two
registers.
OR: It performs a bitwise OR between corresponding bits of two
registers.
NOR: It performs a bitwise OR operation followed by negation.

38
Logic MicrooperationName of Institution
Let’s take a look:
Exclusive NOR: It performs a bitwise comparison between two
registers.
Complement B: It inverts all the bits in register B.
Complement A: It inverts all the bits in register A.
NAND: It performs a bitwise AND operation between two
registers and then negates the result.
Set to all 1’s: operation sets all the bits in a register to 1. This is
used to initialize a register.

39
Shift Micro-operationName of Institution
Shift micro-operations are used for serial transfer of data.
It can be combined with arithmetic and logic operations for
efficient data processing.
There are three main types of shift micro-operations:
1. Logical Shift
2. Circular Shift
3. Arithmetic Shift
It is used in situations where rotation of bits is required, such as
in encryption algorithms.
40
Shift Microoperation Name of Institution

41
Shift Microoperation Name of Institution

There are two main types of logical shift micro-operations:

1. Logical Left Shift

• Before Shift: 01010011 (83 in decimal)


• After Logical Shift Left: 10100110 (166 in decimal)

42
Shift Microoperation Name of Institution

There are two main types of logical shift micro-operations:

2. Logical Right Shift

• Before Shift: 01010011 (83 in decimal)


• After Logical Shift Right: 00101001 (41 in decimal)

43
Shift Microoperation Name of Institution

Circular Shift

1. Circular Left Shift

2. Circular Right Shift

44
Shift Microoperation Name of Institution

Arithmetic Shift microoperation:


Shifts a signed binary no.: to left or to right position.

➢ For shift left the content of the register is multiplied by 2.


➢ For shift right the content of the register is divided by 2.
➢ The arithmetic shift must leave the sign bit unchanged.

Arithmetic Shift is of two types:

1. Arithmetic Left Shift


2. Arithmetic Right Shift

45
Shift Microoperation Name of Institution
1. Arithmetic Left Shift: Every bit gets shifted towards left.
The left most bit (MSB) represents the sign hence it doesn't
participate in shifting process.

Before Shift: 14 10

After Shift: 011100 2 = 28 10

46
Shift Microoperation Name of Institution

Before Shift: −14 10


Now, we will calculate 2'S complement of (-14) and then shift it.

After Shift: 100100 2 is in 2′ s complement and equal to


−28 10
47
Shift Microoperation Name of Institution
2. Arithmetic Right Shift: Every bit gets shifted towards right.
The right most bit (LSB) gets lost and the sign bit is copied to
the MSB-1 position..

Before Shift: 13 10

After Shift: 000110 2 = 6 10 or {13/2}

48
Shift Microoperation Name of Institution

Before Shift: −13 10


Now, we will calculate 2'S complement of (+13) and then
shift it.

After Shift: 111001 2 is in 2′ s complement and equal to


−7 10 49
Arithmetic Logic Shift Microoperation
Name of Institution

Instead of having individual registers performing the


microoperations directly, computer systems employ a number
of storage registers connected to a common operational unit
called an arithmetic logic unit, abbreviated ALU.

To perform a microoperation, the contents of specified


registers are placed in the inputs of the common ALU.

The ALU performs an operation and the result of the


operation is then transferred to a destination register.

50
Arithmetic Logic Shift Microoperation
Name of Institution

The ALU is a combinational circuit so that the entire register


transfer operation from the source registers through the ALU
and into the destination register can be performed during one
clock pulse period.

The shift microoperations are often performed in a separate


unit, but sometimes the shift unit is made part of the ALU.

The arithmetic, logic, and shift circuits can be combined into


one ALU with common selection variables.

One stage of an arithmetic logic shift unit (ALU) is shown in


Fig. (next slide).
51
Arithmetic Logic Shift Microoperation
Name of Institution

52
Arithmetic Logic Shift Microoperation
Name of Institution

53
Arithmetic Logic Shift Microoperation
Name of Institution

The previous table shows 14 operations of ALU(Arithmetic


Logical Unit).

[Link] first eight are arithmetic operations( where S3S2=0).

[Link] next four operations are logical and are selected with
S3S2=01.

[Link] final two operations are shift operations, selected with


S3S2=10 and 11.

54
Name of Institution

Thank You!

55

You might also like