3. What isWhat is Computer ArchitectureComputer Architecture??
β’ Set of data types, Operations, and features are
call its architecture
β’ It deals with those aspects that are visible to
user of that level
β’ Study of how to design those parts a computer
is called Computer Architecture
3Computer System Architecture2011
4. WhyWhy Computer ArchitectureComputer Architecture
β’ Maximum overall performance of system
keeping within cost constraints
β’ Bridge performance gap between slowest and
fastest component in a computer
β’ Architecture design
β Search the space of possible design
β Evaluate the performance of design choose
β Identify bottlenecks, redesign and repeat process
4Computer System Architecture2011
7. CPU β Central Processing UnitCPU β Central Processing Unit
β’ Is the βBrainβ
β’ It Execute the program and stored in the main
memory
β’ Composes with several parts
β Control Unit
β Arithmetic and Logic Units
β Registers
7Computer System Architecture2011
8. RegistersRegisters
β’ High-speed memory
β’ Top of the memory hierarchy, and provide the
fastest way to access data
β’ Store temporary results
β’ Some useful registers
β PC β Program counters
β’ Point to the next instructions
β IR - Instruction Register
β’ Hold instruction currently being execute
8Computer System Architecture2011
9. Registers moreβ¦Registers moreβ¦
β’ Types
β User-accessible Registers
β Data registers
β Address registers
β General purpose registers
β Special purpose registers
β Etc.
9Computer System Architecture2011
10. InstructionInstruction
β’ Types
β Data handling and Memory operations
β’ Set, Move, Read, Write
β Arithmetic and Logic
β’ Add, subtract, multiply, or divide
β’ Compare
β Control flow
β’ Complex instructions
β Take many instructions on other computers
β’ saving many registers on the stack at once
β’ moving large blocks of memory
10Computer System Architecture2011
11. Parts of an instructionParts of an instruction
β’ Opcode
β Specifies the operation to be performed
β’ Operands
β Register values,
β Values in the stack,
β Other memory values,
β I/O ports
11Computer System Architecture2011
12. Type of the operationType of the operation
β’ Register-Register Operation
β Add, subtract, compare, and logical operations
β’ Memory Reference
β All loads from memory
β’ Multi Cycle Instructions
β Integer multiply and divide and all floating-point
operations
12Computer System Architecture2011
13. Fetch-Decode execute circleFetch-Decode execute circle
β’ Instruction fetch
β 32-bit instruction was fetched from the cache
β’ Decode
β’ Execute
β’ Memory Access
β’ Write back
13Computer System Architecture2011
15. MIcroprocessorsMIcroprocessors
β’ Processors can be identify by two main
parameters
β Speed (MHz/ GHz)
β Processor with
β’ Data bus
β’ Address bus
β’ Internal registers
15Computer System Architecture2011
16. Data busData bus
β’ Known as Front side bus, CPU bus and
Processor side bus
β’ Use between CPU and main chipset
β’ Define a size of memory
β 32 bit
β 64 bit etc.
16Computer System Architecture2011
18. I/O Ports with data transfer ratesI/O Ports with data transfer rates
Controller Port / Device
Typical Data
Transfer Rate
Super I/O
PS/2 (keyboard / mouse) 2 KB/s
Serial Port 25 KB/s
Floppy Disk 125 KB/s
Parallel Port 200 KB/s
Southbridge
Integrated Audio 1 MB/s
Integrated LAN 12 MB/s
USB 60 MB/s
Integrated Video 133 MB/s
IDE (HDD, DVD) 133 MB/s
SATA (HDD, DVD) 300 MB/s
18Computer System Architecture2011
19. Address BusAddress Bus
β’ Carries addressing information
β’ Each wire carries a single bit
β’ Width indicates maximum amount of RAM
the processor can handle
β’ Data bus and address bus are independent
19Computer System Architecture2011
20. How CPU works?How CPU works?
β’ A Simple CPU
β 4 Bit Address bus
β Registers A, B and C (4 Bit)
β 8 Bit Program ( 4 BIT Instruction, 4 BIT Data)
20Computer System Architecture2011
21. How CPU works?How CPU works?
2011 Computer System Architecture 21
A B
C
IP
Instruction SET
0000 Sleep
0001 LOAD M β A
0010 LOAD M β B
0101 SET A β M
0110 SET B β M
1000 ADD A + B β C
1111 MOVE
1001 RESET
IC
ALUALU
Register CRegister C
Instruction CounterInstruction Counter
22. How CPU works?How CPU works?
2011 Computer System Architecture 22
A B
C
C
0 0 0 0
Instruction SET
0000 Sleep
0001 LOAD M β A
0010 LOAD M β B
0101 SET A β M
0110 SET B β M
0111 SET C β M
1000 ADD A + B β C
1 0 0 0 0 0 0 0 0
2 0 0 0 1 0 0 1 0
3 0 0 1 0 0 1 0 1
4 1 0 0 0 0 0 0 0
5 0 1 1 1 0 0 0 0
6
IC
01
23. How CPU works?How CPU works?
2011 Computer System Architecture 23
A B
C
C
0 0 0 1
Instruction SET
0000 Sleep
0001 LOAD M β A
0010 LOAD M β B
0101 SET A β M
0110 SET B β M
0111 SET C β M
1000 ADD A + B β C
1 0 0 0 0 0 0 0 0
2 0 0 0 1 0 0 1 0
3 0 0 1 0 0 1 0 1
4 1 0 0 0 0 0 0 0
5 0 1 1 1 0 0 0 0
6
0 0 1 0
IC
02
24. How CPU works?How CPU works?
2011 Computer System Architecture 24
A
0 0 1 0
B
C
C
0 0 1 0
Instruction SET
0000 Sleep
0001 LOAD M β A
0010 LOAD M β B
0101 SET A β M
0110 SET B β M
0111 SET C β M
1000 ADD A + B β C
1 0 0 0 0 0 0 0 0
2 0 0 0 1 0 0 1 0
3 0 0 1 0 0 1 0 1
4 1 0 0 0 0 0 0 0
5 0 1 1 1 0 0 0 0
6
0 1 0 1IC
03
25. How CPU works?How CPU works?
2011 Computer System Architecture 25
A
0 0 1 0
B
0 1 0 1
C
0 1 1 1
C
1 0 0 0
Instruction SET
0000 Sleep
0001 LOAD M β A
0010 LOAD M β B
0101 SET A β M
0110 SET B β M
0111 SET C β M
1000 ADD A + B β C
1 0 0 0 0 0 0 0 0
2 0 0 0 1 0 0 1 0
3 0 0 1 0 0 1 0 1
4 1 0 0 0 0 0 0 0
5 0 1 1 1 0 0 0 0
6 1 0 0 1 0 0 0 0
7 1 1 1 1 0 0 0 1
8
IC
04
26. How CPU works?How CPU works?
2011 Computer System Architecture 26
A
0 0 1 0
B
0 1 0 1
C
0 1 1 1
C
0 1 1 1
Instruction SET
0000 Sleep
1111 MOVE
1001 RESET
0101 SET A β M
0110 SET B β M
0111 SET C β M
1000 ADD A + B β C
1 0 0 0 0 0 0 0 0
2 0 0 0 1 0 0 1 0
3 0 0 1 0 0 1 0 1
4 1 0 0 0 0 0 0 0
5 0 1 1 1 1 1 1 1
6 1 0 0 1 0 0 0 0
7 1 1 1 1 0 0 0 1
8
0 1 1 1
IC
05
27. How CPU works?How CPU works?
2011 Computer System Architecture 27
A
0 0 1 0
B
0 1 0 1
C
0 1 1 1
C
1 0 0 1
Instruction SET
0000 Sleep
1111 MOVE
1001 RESET
0101 SET A β M
0110 SET B β M
0111 SET C β M
1000 ADD A + B β C
1 0 0 0 0 0 0 0 0
2 0 0 0 1 0 0 1 0
3 0 0 1 0 0 1 0 1
4 1 0 0 0 0 0 0 0
5 0 1 1 1 1 1 1 1
6 1 0 0 1 0 0 0 0
7 1 1 1 1 0 0 0 1
8 0 1 1 1
IC
06
28. How CPU works?How CPU works?
2011 Computer System Architecture 28
A
0 0 0 0
B
0 0 0 0
C
0 0 0 0
C
0 0 0 0
Instruction SET
0000 Sleep
1111 MOVE
1001 RESET
0101 SET A β M
0110 SET B β M
0111 SET C β M
1000 ADD A + B β C
1 0 0 0 0 0 0 0 0
2 0 0 0 1 0 0 1 0
3 0 0 1 0 0 1 0 1
4 1 0 0 0 0 0 0 0
5 0 1 1 1 1 1 1 1
6 1 0 0 1 0 0 0 0
7 1 1 1 1 0 0 0 1
8
IC
06
29. How CPU works?How CPU works?
2011 Computer System Architecture 29
A
0 0 0 0
B
0 0 0 0
C
0 0 0 0
C
1 1 1 1
Instruction SET
0000 Sleep
1111 MOVE
1001 RESET
0101 SET A β M
0110 SET B β M
0111 SET C β M
1000 ADD A + B β C
1 0 0 0 0 0 0 0 0
2 0 0 0 1 0 0 1 0
3 0 0 1 0 0 1 0 1
4 1 0 0 0 0 0 0 0
5 0 1 1 1 1 1 1 1
6 1 0 0 1 0 0 0 0
7 1 1 1 1 0 0 0 1
8
IC
07
30. How CPU works?How CPU works?
2011 Computer System Architecture 30
A
0 0 0 0
B
0 0 0 0
C
0 0 0 0
C
0 0 0 0
Instruction SET
0000 Sleep
1111 MOVE
1001 RESET
0101 SET A β M
0110 SET B β M
0111 SET C β M
1000 ADD A + B β C
1 0 0 0 0 0 0 0 0
2 0 0 0 1 0 0 1 0
3 0 0 1 0 0 1 0 1
4 1 0 0 0 0 0 0 0
5 0 1 1 1 1 1 1 1
6 1 0 0 1 0 0 0 0
7 1 1 1 1 0 0 0 1
8
IC
01
31. How BUS System works?How BUS System works?
2011 Computer System Architecture 31
DATA BUS
CPU
Device ADevice A Device BDevice B Device CDevice C
ADDRESS BUSADDRESS BUS
CONTROL BUSCONTROL BUS
32. How BUS System worksHow BUS System works
2011 Computer System Architecture 32
DATA BUS
ADDRESS BUSADDRESS BUS
CONTROL BUSCONTROL BUS
33. How BUS System worksHow BUS System works
2011 Computer System Architecture 33
DATA BUS
CPU
Device ADevice A Device BDevice B Device CDevice C
ADDRESS BUSADDRESS BUS
CONTROL BUSCONTROL BUS
ADDRESS BUS 4 BIT
DATA BUS 4 BIT
CONTROL BUS 2 BIT
34. How BUS System worksHow BUS System works
2011 Computer System Architecture 34
DATA BUS
ADDRESS BUSADDRESS BUS
CONTROL BUSCONTROL BUS
CONTROL 2 BIT
01 β READ,
10 β Write
ADDRESS 0100
CONTROL 2 BIT
01 β READ,
10 β Write
ADDRESS 0010
CONTROL 2 BIT
01 β READ,
10 β Write
ADDRESS 0001
35. How BUS System worksHow BUS System works
2011 Computer System Architecture 35
DATA BUS
ADDRESS BUSADDRESS BUS
CONTROL BUSCONTROL BUS
CONTROL 2 BIT
01 β READ,
10 β Write
ADDRESS 0100
CONTROL 2 BIT
01 β READ,
10 β Write
ADDRESS 0010
CONTROL 2 BIT
01 β READ,
10 β Write
ADDRESS 0001
0 0 0 00 0 0 00 0 0 0 0 00 0
36. How BUS System worksHow BUS System works
2011 Computer System Architecture 36
DATA BUS
ADDRESS BUSADDRESS BUS
CONTROL BUSCONTROL BUS
CONTROL 2 BIT
01 β READ,
10 β Write
ADDRESS 0100
CONTROL 2 BIT
01 β READ,
10 β Write
ADDRESS 0010
CONTROL 2 BIT
01 β READ,
10 β Write
ADDRESS 0001
0 1 0 00 1 0 00 0 0 0 0 00 0
37. How BUS System worksHow BUS System works
2011 Computer System Architecture 37
DATA BUS
ADDRESS BUSADDRESS BUS
CONTROL BUSCONTROL BUS
CONTROL 2 BIT
01 β READ,
10 β Write
ADDRESS 0100
CONTROL 2 BIT
01 β READ,
10 β Write
ADDRESS 0010
CONTROL 2 BIT
01 β READ,
10 β Write
ADDRESS 0001
0 1 0 00 1 0 01 01 0 1 01 0
38. How BUS System worksHow BUS System works
2011 Computer System Architecture 38
DATA BUS
ADDRESS BUSADDRESS BUS
CONTROL BUSCONTROL BUS
CONTROL 2 BIT
01 β READ,
10 β Write
ADDRESS 0100
CONTROL 2 BIT
01 β READ,
10 β Write
ADDRESS 0010
CONTROL 2 BIT
01 β READ,
10 β Write
ADDRESS 0001
0 0 1 00 0 1 01 01 0 0 00 0
39. How BUS System worksHow BUS System works
2011 Computer System Architecture 39
DATA BUS
ADDRESS BUSADDRESS BUS
CONTROL BUSCONTROL BUS
CONTROL 2 BIT
01 β READ,
10 β Write
ADDRESS 0100
CONTROL 2 BIT
01 β READ,
10 β Write
ADDRESS 0010
CONTROL 2 BIT
01 β READ,
10 β Write
ADDRESS 0001
0 0 1 00 0 1 01 01 0 0 10 1