Central Processing Unit
Central Processing Unit
Chapter – 2
Central Processing Unit
The part of the computer that performs the bulk of data processing operations is called the
Central Processing Unit (CPU) and is the central component of a digital computer. Its purpose is
np
to interpret instruction cycles received from memory and perform arithmetic, logic and control
operations with data stored in internal register, memory words and I/O interface units. A CPU is
usually divided into two parts namely processor unit (Register Unit and Arithmetic Logic Unit)
u.
and control unit.
. ed
es
ot
Fig: Components of CPU
en
io
Processor Unit:
The processor unit consists of arithmetic unit, logic unit, a number of registers and internal buses
m
that provides data path for transfer of information between register and arithmetic logic unit. The
block diagram of processor unit is shown in figure below where all registers are connected
fro
through common buses. The registers communicate each other not only for direct data transfer
but also while performing various micro-operations.
Here two sets of multiplexers select register which perform input data for ALU. A decoder
d
selects destination register by enabling its load input. The function select in ALU determines the
de
4. Decoder destination selector (SELD): to transfer the content of the output bus into R3.
ow
D
Compiled By: Er. Hari Aryal [haryal4@gmail.com] References: W. Stalling & M. Mano | 1
Computer Organization and Architecture Chapter 2 : Central Processing Unit
np
u.
. ed
es
ot
Control unit:
Fig: Processor Unit
en
io
The control unit is the heart of CPU. It consists of a program counter, instruction register, timing
and control logic. The control logic may be either hardwired or micro-programmed. If it is a
hardwired, register decodes and a set of gates are connected to provide the logic that determines
m
the action required to execute various instructions. A micro-programmed control unit uses a
control memory to store micro instructions and a sequence to determine the order by which the
fro
The control unit decides what the instructions mean and directs the necessary data to be moved
d
from memory to ALU. Control unit must communicate with both ALU and main memory and
coordinates all activities of processor unit, peripheral devices and storage devices. It can be
de
Determining the function that the control unit must perform to cause the micro-operations
to be performed.
nl
Control unit must have inputs that allow determining the state of system and outputs that allow
controlling the behavior of system.
ow
Flag: flags are headed to determine the status of processor and outcome of previous ALU
D
operation.
Compiled By: Er. Hari Aryal [haryal4@gmail.com] References: W. Stalling & M. Mano | 2
Computer Organization and Architecture Chapter 2 : Central Processing Unit
Clock: All micro-operations are performed within each clock pulse. This clock pulse is
also called as processor cycle time or clock cycle time.
np
Control signal from control bus: The control bus portion of system bus provides interrupt,
acknowledgement signals to control unit.
u.
The outputs from control unit are:
ed
Control signal within processor: These signals causes data transfer between registers,
activate ALU functions.
.
es
Control signal to control bus: These are signals to memory and I/O module. All these
control signals are applied directly as binary inputs to individual logic gate.
ot
en
io
m
fro
d
de
- Interpret Instructions
- Fetch Data
- Process Data
D
- Write Data
Compiled By: Er. Hari Aryal [haryal4@gmail.com] References: W. Stalling & M. Mano | 3
Computer Organization and Architecture Chapter 2 : Central Processing Unit
np
u.
. ed
es
Fig: The CPU with the System Bus
A small amount of internal memory, called the registers, is needed by the CPU to fulfill
these requirements
ot
en
io
m
fro
d
de
- Control Unit (CU): controls the movement of data and instructions into and out of
the CPU and controls the operation of the ALU.
ow
Register Organization
Registers are at top of the memory hierarchy. They serve two functions:
D
Compiled By: Er. Hari Aryal [haryal4@gmail.com] References: W. Stalling & M. Mano | 4
Computer Organization and Architecture Chapter 2 : Central Processing Unit
np
- Segment pointers - hold base address of the segment in use
- Index registers - used for indexed addressing and may be auto indexed
- Stack Pointer - a dedicated register that points to top of a stack. Push, pop, and
u.
other stack instructions need not contain an explicit stack operand.
- Condition Codes (flags)
ed
Design Issues
Completely general-purpose registers or specialized use?
.
- Specialized registers save bits in instructions because their use can be implicit
es
- General-purpose registers are more flexible
- Trend is toward use of specialized registers
ot
Number of registers provided?
- More registers require more operand specifier bits in instructions
-
en
8 to 32 registers appears optimum (RISC systems use hundreds, but are a
completely different approach)
Register Length?
io
- Address registers must be long enough to hold the largest address
- Data registers should be able to hold values of most data types
- Some machines allow two contiguous registers for double-length values
m
- Saving condition code registers may be automatic upon call instruction, or may be
manual
of bus
- Memory Buffer Register (MBR) - usually connected directly to data lines of bus
Program Status Word (PSW) - also essential, common fields or flags contained
nl
include:
- Sign - sign bit of last arithmetic operation
ow
np
- I/O registers
Design issues
- Operating system support in CPU
u.
- How to divide allocation of control information between CPU registers and first
part of main memory (usual tradeoffs apply)
. ed
es
ot
en
io
m
fro
d
de
Compiled By: Er. Hari Aryal [haryal4@gmail.com] References: W. Stalling & M. Mano | 6
Computer Organization and Architecture Chapter 2 : Central Processing Unit
np
u.
ed
Fig: Instruction Cycles
.
es
ot
en
io
m
fro
Compiled By: Er. Hari Aryal [haryal4@gmail.com] References: W. Stalling & M. Mano | 7
Computer Organization and Architecture Chapter 2 : Central Processing Unit
Data Flow
- Exact sequence depends on CPU design
- We can indicate sequence in general terms, assuming CPU employs:
a memory address register (MAR)
a memory buffer register (MBR)
a program counter (PC)
np
an instruction register (IR)
Fetch cycle data flow
- PC contains address of next instruction to be fetched
u.
- This address is moved to MAR and placed on address bus
- Control unit requests a memory read
ed
- Result is
placed on data bus
result copied to MBR
.
es
then moved to IR
- Meanwhile, PC is incremented
ot
en
io
m
fro
d
de
- Control unit requests a memory read, to get the desired operand address into the
MBR
Compiled By: Er. Hari Aryal [haryal4@gmail.com] References: W. Stalling & M. Mano | 8
Computer Organization and Architecture Chapter 2 : Central Processing Unit
np
u.
. ed
es
Fig: Data Flow, Indirect Cycle
ot
Execute cycle data flow
-
-
Not simple and predictable, like other cycles
en
Takes many forms, since form depends on which of the various machine instructions
is in the IR
io
- May involve
transferring data among registers
read or write from memory or I/O
m
- PC is loaded with address of interrupt routine (so next instruction cycle will begin by
fetching appropriate instruction)
t1: MBR (PC)
nl
Routine_address
t3: Memory (MBR)
D
Compiled By: Er. Hari Aryal [haryal4@gmail.com] References: W. Stalling & M. Mano | 9
Computer Organization and Architecture Chapter 2 : Central Processing Unit
np
u.
ed
Fig: Data Flow, Interrupt Cycle
.
es
2.2 Arithmetic and Logic Unit
ALU is the combinational circuit of that part of computer that actually performs arithmetic and
logical operations on data. All of the other elements of computer system- control unit, registers,
ot
memory, I/O are their mainly to bring data into the ALU for it to process and then to take the
result back out. An ALU & indeed all electronic components in computer are based on the use of
en
simple digital logic device that can store binary digit and perform simple Boolean logic function.
Figure indicates in general in general term how ALU is interconnected with rest of the processor.
io
m
fro
Data are presented to ALU in register and the result of operation is stored in register. These
registers are temporarily storage location within the processor that are connected by signal path
d
to the ALU. The ALU may also set flags as the result of an operation. The flags values are also
stored in registers within the processor. The control unit provides signals that control the
de
Compiled By: Er. Hari Aryal [haryal4@gmail.com] References: W. Stalling & M. Mano | 10
Computer Organization and Architecture Chapter 2 : Central Processing Unit
np
u.
Fig: Block diagram of Arithmetic Unit
ed
Functional table for arithmetic unit:
Select Input Output Microoperation
S1 S0 Y Cin = 0 Cin = 1 Cin = 0 Cin = 1
.
0 0 0 A A+1 Transfer A Increment A
es
0 1 B A+B A+B+1 Addition Addition with
ot
carry
1 0 B’ A+B’ A+B’+1 Subtraction with Subtraction
The basic components of logical circuit are AND, OR, XOR and NOT gate circuits
connected accordingly. Below figure shows a circuit that generates four basic logic
fro
Ai
de
Bi
oa
4X1
Ei
nl
MUX
ow
D
S0 S1
Compiled By: Er. Hari Aryal [haryal4@gmail.com] References: W. Stalling & M. Mano | 11
Computer Organization and Architecture Chapter 2 : Central Processing Unit
np
3. Combine these 2 sections to form the ALU
Below figure shows a combined circuit of ALU where n data input from A are combined
u.
with n data input from B to generate the result of an operation at the G output line. ALU
has a number of selection lines used to determine the operation to be performed. The
ed
selection lines are decoded with the ALU so that selection lines can specify distinct
operations. The mode select S2 differentiate between arithmetic and logical operations.
The two functions select S1 and S0 specify the particular arithmetic and logic operations
.
es
to be performed. With three selection lines, it is possible to specify arithmetic operation
with S2 at 0 and logical operation with S2 at 1.
ot
en
io
m
fro
d
Compiled By: Er. Hari Aryal [haryal4@gmail.com] References: W. Stalling & M. Mano | 12
Computer Organization and Architecture Chapter 2 : Central Processing Unit
Example: Design a 2-bit ALU that can perform addition, AND, OR, & XOR.
Cin
np
A0
B0 FA
A1
u.
B1
ed
Cout
.
es
4X1
Result0
MUX
ot
S1 S0
en 4X1
io
Result1
MUX
m
fro
d
de
complete the task. The collection of such ordered steps forms a ‘program’ of a computer. These
ordered steps are the instructions. Computer instructions are stored in central memory locations
nl
and are executed sequentially one at a time. The control reads an instruction from a specific
address in memory and executes it. It then continues by reading the next instruction in sequence
ow
A computer usually has a variety of Instruction Code Formats. It is the function of the control
unit within the CPU to interpret each instruction code and provide the necessary control
D
functions needed to process the instruction. An n bit instruction that k bits in the address field
and m bits in the operation code field come addressed 2k location directly and specify 2m
different operation.
Compiled By: Er. Hari Aryal [haryal4@gmail.com] References: W. Stalling & M. Mano | 13
Computer Organization and Architecture Chapter 2 : Central Processing Unit
The bits of the instruction are divided into groups called fields.
The most common fields in instruction formats are:
o An Operation code field that specifies the operation to be performed.
o An Address field that designates a memory address or a processor
register.
np
o A Mode field that specifies the way the operand or the effective address is
determined.
u.
ed
n-1 m-1 k-1 0
Fig: Instruction format with mode field
The operation code field (Opcode) of an instruction is a group of bits that define various
.
processor operations such as add, subtract, complement, shift etcetera. The bits that define the
es
mode field of an instruction code specify a variety of alternatives for choosing the operands from
the given address. Operation specified by an instruction is executed on some data stored in the
processor register or in the memory location. Operands residing in memory are specified by their
ot
memory address. Operands residing in processor register are specified with a register address.
Types of Instruction
en
Computers may have instructions of several different lengths containing varying
number of addresses.
io
The number of address fields in the instruction format of a computer depends on
the internal organization of its registers.
Most computers fall into one of 3 types of CPU organizations:
m
fro
General register organization:- The instruction format in this type of computer needs
three register address fields. For example: ADD R1,R2,R3
de
with no address field. This operation has the effect of popping the 2 top numbers from the
stack, operating the numbers and pushing the sum into the stack. For example: ADD
nl
Computers may have instructions of several different lengths containing varying number of
addresses. Following are the types of instructions.
ow
alter any of the operand location. The three address instruction format requires a very
complex design to hold the three address references.
Format: Op X, Y, Z; X Y Op Z
Compiled By: Er. Hari Aryal [haryal4@gmail.com] References: W. Stalling & M. Mano | 14
Computer Organization and Architecture Chapter 2 : Central Processing Unit
Example: ADD X, Y, Z; X Y + Z
ADVANTAGE: It results in short programs when evaluating arithmetic
expressions.
DISADVANTAGE: The instructions requires too many bits to specify 3
addresses.
np
2. Two address instruction
Two-address instructions are the most common in commercial computers. Here again
each address field can specify either a processor register, or a memory word. One address
u.
must do double duty as both operand and result. The two address instruction format
reduces the space requirement. To avoid altering the value of an operand, a MOV
ed
instruction is used to move one of the values to a result or temporary location T, before
performing the operation.
Format: Op X, Y; X X Op Y
.
Example: SUB X, Y; X X - Y
es
3. One address Instruction
ot
It was generally used in earlier machine with the implied address been a CPU register
known as accumulator. The accumulator contains one of the operand and is used to store
en
the result. One-address instruction uses an implied accumulator (Ac) register for all data
manipulation. All operations are done between the AC register and a memory operand.
We use LOAD and STORE instruction for transfer to and from memory and Ac register.
io
Format: Op X; Ac Ac Op X
Example: MUL X; Ac Ac * X
m
PUSH and POP instructions, however, need an address field to specify the operand that
communicates with the stack. The name “Zero” address is given because of the absence
of an address field in the computational instruction.
Format: Op; TOS TOS Op (TOS – 1)
d
Example: To illustrate the influence of the number of address on computer programs, we will
evaluate the arithmetic statement X=(A+B)*(C+D) using Zero, one, two, or three address
oa
instructions.
1. Three-Address Instructions:
nl
2. Two-Address Instructions:
MOV R1, A; R1 M[A]
ADD R1, B; R1 R1 + M[B]
Compiled By: Er. Hari Aryal [haryal4@gmail.com] References: W. Stalling & M. Mano | 15
Computer Organization and Architecture Chapter 2 : Central Processing Unit
3. One-Address Instruction:
np
LOAD A; Ac M[A]
ADD B; Ac Ac + M[B]
STORE T; M[T] Ac
u.
LOAD C; Ac M[C]
ADD D; Ac Ac + M[D]
ed
MUL T; Ac Ac * M[T]
STORE X; M[X] Ac
Here, T is the temporary memory location required for storing the intermediate result.
.
es
4. Zero-Address Instructions:
PUSH A; TOS A
ot
PUSH B; TOS B
ADD; TOS (A + B)
TOS C
PUSH C;
PUSH D;
ADD;
TOS D
TOS (C + D)
en
io
MUL; TOS (C + D) * (A + B)
POP X ; M[X] TOS
m
pointers to memory, counters for loop control, indexing of data and various other
de
purposes.
o To reduce the number of bits in the addressing field of the instructions.
Other computers use a single binary for operation & Address mode.
oa
modes).
ow
Compiled By: Er. Hari Aryal [haryal4@gmail.com] References: W. Stalling & M. Mano | 16
Computer Organization and Architecture Chapter 2 : Central Processing Unit
np
Direct Addressing Mode
Indirect Addressing Mode
Displacement Address Addressing Mode
u.
Relative Addressing Mode
Index Addressing Mode
ed
Stack Addressing Mode
.
Implied Addressing Mode:
es
In this mode the operands are specified implicitly in the definition of the instruction.
For example:- CMA - “complement accumulator” is an implied-mode instruction because
the operand in the accumulator register is implied in the definition of the instruction. In
ot
fact, all register reference instructions that use an accumulator are implied-mode
instructions.
Instruction
Opcode
en
io
Advantage: no memory reference. Disadvantage: limited operand
In this mode the operand is specified in the instruction itself. In other words, an
immediate-mode instruction has an operand field rather than an address field.
fro
This instruction has an operand field rather than an address field. The operand field
contains the actual operand to be used in conjunction with the operation specified in the
instruction.
These instructions are useful for initializing register to a constant value;
d
Instruction
Opcode Operand
oa
It was mentioned previously that the address field of an instruction may specify either a memory
word or a processor register. When the address field specifies a processor register, the instruction
is said to be in register-mode.
nl
Compiled By: Er. Hari Aryal [haryal4@gmail.com] References: W. Stalling & M. Mano | 17
Computer Organization and Architecture Chapter 2 : Central Processing Unit
Instruction
Opcode Register Register
Operand
np
Effective Address (EA) = R
Advantage: no memory reference. Disadvantage: limited address space
u.
Register indirect addressing mode:
In this mode the instruction specifies a register in the CPU whose contents give the
ed
address of the operand in the memory.
In other words, the selected register contains the address of the operand rather than the
.
operand itself.
es
Before using a register indirect mode instruction, the programmer must ensure that the
memory address of the operand is placed in the processor register with a previous
instruction.
ot
For example LDAX B
Instruction
Opcode Register Register
en Memory
io
Operand
m
When the address stored in the registers refers to a table of data in memory, it is
necessary to increment or decrement the registers after every access to the table.
This can be achieved by using the increment or decrement instruction. In some computers
nl
it is automatically accessed.
The address field of an instruction is used by the control unit in the CPU to obtain the
ow
Compiled By: Er. Hari Aryal [haryal4@gmail.com] References: W. Stalling & M. Mano | 18
Computer Organization and Architecture Chapter 2 : Central Processing Unit
np
Opcode Address Memory
u.
Operand
ed
Effective Address (EA) = A
Advantage: Simple. Disadvantage: limited address field
.
es
Indirect Addressing Mode
In this mode the address field of the instruction gives the address where the effective
address is stored in memory.
ot
Control unit fetches the instruction from the memory and uses its address part to access
memory again to read the effective address.
Instruction
Opcode Address Memory en
io
Operand
m
The address field of instruction is added to the content of specific register in the CPU.
Instruction
Opcode R A
oa
Register Memory
nl
+
ow
Operand
Compiled By: Er. Hari Aryal [haryal4@gmail.com] References: W. Stalling & M. Mano | 19
Computer Organization and Architecture Chapter 2 : Central Processing Unit
np
effective address whose position in memory is relative to the address of the next
instruction.
Effective Address (EA) = PC + A
u.
Indexed Addressing Mode
ed
In this mode the content of an index register (XR) is added to the address part of the
instruction to obtain the effective address.
The index register is a special CPU register that contains an index value.
.
es
Note: If an index-type instruction does not include an address field in its format, the
instruction is automatically converted to the register indirect mode of operation.
Effective Address (EA) = XR + A
ot
Base Register Addressing Mode
This is similar to the indexed addressing mode except that the register is now called a
io
base register instead of the index register.
The base register addressing mode is used in computers to facilitate the relocation of
m
programs in memory i.e. when programs and data are moved from one segment of
memory to another.
Effective Address (EA) = BR + A
fro
last in First out (LIFO) queue. The stack pointer is maintained in register.
de
Instruction
oa
Implicit
Top of Stack
nl
Compiled By: Er. Hari Aryal [haryal4@gmail.com] References: W. Stalling & M. Mano | 20
Computer Organization and Architecture Chapter 2 : Central Processing Unit
np
u.
. ed
es
Fig: Numerical Example for Addressing Modes
ot
en
io
m
fro
Compiled By: Er. Hari Aryal [haryal4@gmail.com] References: W. Stalling & M. Mano | 21
Computer Organization and Architecture Chapter 2 : Central Processing Unit
np
Typical Data Transfer Instructions
u.
. ed
es
ot
Data manipulation Instructions
Data manipulation instructions perform operations on data and provide the computational
en
capabilities for the computer. These instructions perform arithmetic, logic and shift
operations.
io
Arithmetic Instructions
m
fro
d
de
oa
nl
ow
D
Compiled By: Er. Hari Aryal [haryal4@gmail.com] References: W. Stalling & M. Mano | 22
Computer Organization and Architecture Chapter 2 : Central Processing Unit
np
u.
. ed
es
Shift Instructions
ot
en
io
m
fro
conditions for altering the content of the program counter. The change in value of
program counter as a result of execution of program control instruction causes a break in
de
Compiled By: Er. Hari Aryal [haryal4@gmail.com] References: W. Stalling & M. Mano | 23
Computer Organization and Architecture Chapter 2 : Central Processing Unit
np
to return.
Control is transferred to the beginning of the subroutine.
The last instruction of every subroutine, commonly called return from subroutine;
u.
transfer the return address from the temporary location into the program counter. This
results in a transfer of program control to the instruction where address was originally
ed
stored in the temporary location.
Interrupt
.
es
The interrupt procedure is, in principle, quite similar to a subroutine call except for three
variations:
The interrupt is usually initiated by an external or internal signal rather than from
ot
execution of an instruction.
The address of the interrupt service program is determined by the hardware rather
en
than from the address field of an instruction.
An interrupt procedure usually stores all the information necessary to define the
state of the CPU rather than storing only the program counter.
io
2.6 RISC and CISC
Important aspect of computer – design of the instruction set for processor.
m
Instruction set – determines the way that machine language programs are
constructed.
fro
Early computers – simple and small instruction set, need to minimize the
hardware used.
Advent of IC – cheaper digital software, instructions intended to increase both in
d
number of complexity.
Many computers – more than 100 or 200 instructions, variety of data types and
de
Compiled By: Er. Hari Aryal [haryal4@gmail.com] References: W. Stalling & M. Mano | 24
Computer Organization and Architecture Chapter 2 : Central Processing Unit
np
A large number of instructions– typically from 100 to 250 instructions
Some instructions that perform specialized tasks and are used infrequently
A large variety of addressing modes—typically from 5 to 20 different modes
u.
Variable-length instruction formats
Instructions that manipulate operands in memory
ed
Reduced speed due to memory read/write operations
Use of microprogram – special program in control memory of a computer to
.
perform the timing and sequencing of the microoperations – fetch, decode,
es
execute etc.
Major complexity in the design of microprogram
No large number of registers – single register set of general purpose and low cost
ot
Reduced Instruction Set Computers (RISC)
en
A computer uses fewer instructions with simple constructs so they can be executed much
faster within the CPU without having to use memory as often. It is classified as a reduced
instruction set computer (RISC).
io
RISC concept – an attempt to reduce the execution cycle by simplifying the
instruction set
m
Each operand – brought into register using load instruction, computations are
done among data in registers and results transferred to memory using store
instruction
Simplify instruction set and encourages the optimization of register
d
manipulation
de
Compiled By: Er. Hari Aryal [haryal4@gmail.com] References: W. Stalling & M. Mano | 25
Computer Organization and Architecture Chapter 2 : Central Processing Unit
np
Studies that show improved performance for RISC architecture do not
differentiate between the effects of the reduced instruction set and the effects of a
large register file.
u.
A large number of registers in the processing unit are sometimes associated with
RISC processors.
ed
RISC processors often achieve 2 to 4 times the performance of CISC processors.
RISC uses much less chip space; extra functions like memory management unit or
.
floating point arithmetic unit can also be placed on same chip. Smaller chips
es
allow a semiconductor mfg. to place more parts on a single silicon wafer, which
can lower the per chip cost dramatically.
RISC processors are simpler than corresponding CISC processors, they can be
ot
designed more quickly.
Compiled By: Er. Hari Aryal [haryal4@gmail.com] References: W. Stalling & M. Mano | 26
Computer Organization and Architecture Chapter 2 : Central Processing Unit
np
provide the passing of parameters and avoid the need for saving and restoring register
values.
The concept of overlapped register windows is illustrated in below figure.
u.
In general, the organization of register windows will have the following relationships:
Number of global registers = G
ed
Number of local registers in each window = L
Number of registers common to two windows = C
Number of windows = W
.
es
The number of registers available for each window is calculated as followed:
Window size = L + 2C + G
The total number of registers needed in the processor is
ot
Register file = (L + C)W + G
en
io
m
fro
d
de
oa
nl
Compiled By: Er. Hari Aryal [haryal4@gmail.com] References: W. Stalling & M. Mano | 27
Computer Organization and Architecture Chapter 2 : Central Processing Unit
Berkeley RISC I
The Berkeley RISC I is a 32-bit integrated circuit CPU.
o It supports 32-bit address and either 8-, 16-, or 32-bit data.
o It has a 32-bit instruction format and a total of 31 instructions.
o There are three basic addressing modes: Register addressing, immediate operand,
and relative to PC addressing for branch instructions.
np
o It has a register file of 138 registers; 10 global register and 8 windows of 32
registers in each
o The 32 registers in each window have an organization similar to overlapped
u.
register window.
. ed
es
ot
en
io
m
o The 5-bit Rd field select one of the 32 registers as a destination for the result of
de
the operation
o The operation is performed with the data specified in fields Rs and S2.
o Thus the instruction has a three-address format, but the second source may be
oa
o S2 to specify an offset
o Register R0 contains all 0’s, so it can be used in any field to specify a zero
ow
quantity
The third instruction format combines the last three fields to form a 19-bit relative
address Y and is used primarily with the jump and call instructions.
D
o The COND field replaces the Rd field for jump instructions and is used to specify
one of 16 possible branch conditions.
Compiled By: Er. Hari Aryal [haryal4@gmail.com] References: W. Stalling & M. Mano | 28
Computer Organization and Architecture Chapter 2 : Central Processing Unit
np
u.
. ed
64-bit processors have 64-bit ALUs, 64-bit registers, and 64-bit buses.
es
A 64-bit register can address up to 264 bytes of logical address.
64-bit processors have been with us since 1992.
ot
Eg: 64-bit AMD processor.
en
io
m
Internal Architecture
fro
The internal logic design of microprocessor which determines how and when various
operations are performed.
The various function performed by the microprocessor can be classified as:
o Microprocessor initiated operations
d
o Internal operations
de
o Peripheral operations
Microprocessor initiated operations mainly deal with memory and I/O read and write
operations.
oa
Internal operations determines how and what operations can be performed with the
data.The operations include:
nl
1. storing
2. performing arithmetic and logical operations
ow
Compiled By: Er. Hari Aryal [haryal4@gmail.com] References: W. Stalling & M. Mano | 29
Computer Organization and Architecture Chapter 2 : Central Processing Unit
np
u.
. ed
es
ot
en
io
m
fro
d
de
Architecture Elements
oa
Addressing Modes
General Purpose Registers
Non-modal and modal Instructions
nl
Addressing modes
This addressing mode determines the working environment. i.e 24,32 or 64 bit mode
D
Compiled By: Er. Hari Aryal [haryal4@gmail.com] References: W. Stalling & M. Mano | 30
Computer Organization and Architecture Chapter 2 : Central Processing Unit
01=32 bit-mode
11=64 bit-mode
np
u.
ed
The register is treated as 32-bits for:
o Address generation in 24/32-bit mode.
.
es
New instructions in 64-bit:
Load Reversed - LRV, LRVR
Multiply Logical - ML, MLR
ot
Divide Logical - DL, DLR
Add Logical w/ Carry - ALC
Subtract Logical w/ Borrow - SLB
Store Reversed - STRV
Rotate Left Single Logical – RLL
en
io
New immediate Instructions
Load Logical Immediate
m
OR Immediate
Test Under Mask (High/Low)
d
Can address max 2^32(4 GB) of data whereas 64 bit can address 2^64(18 billion GB).
Speed and execution is both fast in 64-bit processors.
oa
64-bit processors can drive 32-bit applications even faster, by handling more data per
clock cycle than a 32-bit processor.
The table shows the basic difference between two:
nl
ow
D
Compiled By: Er. Hari Aryal [haryal4@gmail.com] References: W. Stalling & M. Mano | 31
Computer Organization and Architecture Chapter 2 : Central Processing Unit
np
u.
. ed
es
ot
Advantages and disadvantages:
advantages
Previous processors can have
en
Disadvantages
Compatibility difficulty with existing software as
io
max 4 Gb of physical memory they are mostly developed to the 32-bit processors.
but 64-bit can handle more. 64-bit OS must have 64-bit drivers, for working
m
processors.
Significant increase in speed
due to wider data bus and
processing is fast.
d
de
oa
nl
ow
D
Compiled By: Er. Hari Aryal [haryal4@gmail.com] References: W. Stalling & M. Mano | 32