Upload
others
View
12
Download
0
Embed Size (px)
Citation preview
Computer Structure
Unit 1. Introduction to computers
Departamento de InformáticaGrupo de Arquitectura de Computadores, Comunicaciones y Sistemas
UNIVERSIDAD CARLOS III DE MADRID
Content
1. What is a computer?2. Concept of computer structure and computer architecture3. Main elements of a computer4. Von Neumann architecture5. Machine instructions. Programming6. Execution steps of an instruction
Computer Structure
6. Execution steps of an instruction7. Main characteristic parameters of a computer8. Historic evolution
2ARCOS
What is a computer?
Computer Structure
?3ARCOS
What is a computer?
Computer Structure 4ARCOS
Semiconductor industry
Computer Structure
Source: embedded.com
5ARCOS
Types of processors
� Processors: 2% of the semiconductor industry
Computer Structure
Source : embedded.com
semiconductor industry� Processors for PC: 2 % of the
processors� A typical car has more than 12
microprocessors� BMW 7 has more than 65
6ARCOS
What is a computer?
ProcessorData
Instructions
Results
Computer Structure
Instructions
� Machine that processes data
7ARCOS
What is a computer?
Processordata
Instructions
results
Computer Structure
Instructions
� From a mathematical point of view is an abstract machine that evaluates:
}{ }{ mnf 1,01,0: →
8ARCOS
Structure and Architecture
� Structure� Components of a computer� Organization of the components
� Architecture: visible attributes for programmers� Instruction set
Computer Structure
� Instruction set� Types and data formats of the computer� Number and size of the registers� Input/output techniques� Memory addressing techniques
� Technology: how the components are built
9ARCOS
Concepts to review
� Binary system� Constructive elements of a computer
� Transistors� Logic gates� Combinational elements� Combinational elements� Sequential elements
Computer Structure 10ARCOS
Binary system
� BinaryX = 1 0 1 0 0 1 0 1
... 27 26 25 24 23 22 21 20
� d31d30 ... d1d0 : nº of 32 bits (binary digits)� Value= d31× 231 + d30 × 230 + ... + d1 × 21 + d0 × 20
� Hexadecimal� HexadecimalY = 0x F 1 F A 8 0
... 165 164 163 162 161 160
� From binary to hexadecimal:� Join each 4 bits, from rigth to left� Each 4 bits represents a hexadecimal value� Ex: 1 0 1 0 0 1 0 1
Computer Structure
0x A 5
11ARCOS
Question?
� How many different codes can be coded with 8 bits?
� How many bits are needed to represent 512 codes?
Computer Structure 12ARCOS
Transistor
E
A
E
A N-MOS P-MOS
Computer Structure
B B
E Behavior
1 Connect A to B (open circuit)
0 Does not connect A to B (closed circuit)
E Behavior
0 Connect A to B (open circuit)
0 Does not connect A to B (closed circuit)
(logical values)
13ARCOS
Logic gates. Inverter (NOT)
E S
V3,3
E S E S
3.3 0 1 0
Computer Structure
E S
0 3.3 0 1
14ARCOS
Logic gates. NOR
A B C
0 0 1
0 1 0
1 0 0
1 1 0
Computer Structure 15ARCOS
Logic gates. OR
A B C
0 0 0
0 1 1
1 0 1
1 1 1
Computer Structure 16ARCOS
Logic gates. NAND
A B C
0 0 1
0 1 1
1 0 1
1 1 0
Computer Structure 17ARCOS
Logic gates. AND
A B C
0 0 0
0 1 0
1 0 0
1 1 1
Computer Structure 18ARCOS
Constructive blocks
� Combinational circuits� Output depends on input values� Without state
� Sequential circuits� Output depends on input and current state
Computer Structure
� Output depends on input and current state� Store information
19ARCOS
Decoder
� N inputs, 2N outputs
Computer Structure 20ARCOS
Multiplexor
� Select with n bits, one from 2n inputs
A B C D
Computer Structure
A B C D
MUX S1S0
S
21ARCOS
Memory elements
Flip-flop R-S
� Element that stores a bit
Computer Structure 22ARCOS
Memory elements
Flip-flop D
� Element that stores a bit
Computer Structure
Q
Q
C
D Q
C
23ARCOS
Memory elements
register
� Element that stores a set of bits
Computer Structure 24ARCOS
Register model
Register
Input
load
Computer Structure
Register load
Output
25ARCOS
Memory
••••••••
k = 2n
location
Address Space:Number of locations
Computer Structure
••••••••••••
location
m bits
Number of locations
Size of each location:Number of bits per location
26ARCOS
Components of a computer
Computer Structure
Processor Main memory
I/O module I/O module
Device Device
Control busData bus
Address bus
27ARCOS
Von Neumann computer
� Machine that executes a set of instructions: machine instructions� Instructions are stored in a
memory� Fetched � Fetched � Executed
Computer Structure 28ARCOS
Von Neumann architecture
Processor Main memory
Data bus
Address bus
Computer Structure 29ARCOS
I/O module
Peripheral
I/O module
Peripheral
I/O module
Peripheral
Address bus
Control bus
Main memory
Memory Store:
� instructions
� data
Processor
Data bus
Address bus
Computer Structure 30ARCOS
I/O module
Peripheral
I/O module
Peripheral
I/O module
Peripheral
Address bus
Control bus
Memory
Memory
Address Data/instruction
00001001110001101010111101011000
10101111010110000000100111000110
11000110101011110101100000001001
01011000000010011100011010101111
MAR MBR
Computer Structure
Memory
R W
MAR MBR
Memory address register Memory buffer register
31ARCOS
Processor
A register stores a set ob bits
Execute the operations
Execute the instructions ALU Registers
Control unit
Processor
Computer Structure 32ARCOS
Main memory
I/O module
Peripheral
I/O module
Peripheral
I/O module
Peripheral
Data bus
Address bus
Control bus
Control unit
Special registers
PC: program counter
IR: instruction register
ALU Registers
Control unit
Processor
Computer Structure 33ARCOS
Main memory
I/O module
Peripheral
I/O module
Peripheral
I/O module
Peripheral
Data bus
Address bus
Control bus
Control unit
Arithmetic Logic Unit
� Do elemental operations on data:� Arithmetic operations� Logical operations
Computer Structure 34ARCOS
Program
� Consecutive sequence of machine instructions
00001001110001101010111101011000
10101111010110000000100111000110
11000110101011110101100000001001
01011000000010011100011010101111
Computer Structure 35ARCOS
Program
� Consecutive sequence of machine instructions
00001001110001101010111101011000
10101111010110000000100111000110
11000110101011110101100000001001
01011000000010011100011010101111
temp = v[k];
v[k] = v[k+1];
v[k+1] = temp;
Computer Structure 36ARCOS
Program execution
Disk
Main memory
Computer Structure
Executable file
00001001110001101010111101011000
10101111010110000000100111000110
11000110101011110101100000001001
01011000000010011100011010101111
Processor
PCIR
37ARCOS
Program execution
00001001110001101010111101011000
10101111010110000000100111000110
11000110101011110101100000001001
01011000000010011100011010101111
Disk
Main memory
Computer Structure
Executable file
00001001110001101010111101011000
10101111010110000000100111000110
11000110101011110101100000001001
01011000000010011100011010101111
Processor
PCIR
38ARCOS
Program execution
00001001110001101010111101011000
10101111010110000000100111000110
11000110101011110101100000001001
01011000000010011100011010101111
Disk
Main memory
Computer Structure
Executable file
00001001110001101010111101011000
10101111010110000000100111000110
11000110101011110101100000001001
01011000000010011100011010101111
Processor
PCIR
39ARCOS
Program execution
00001001110001101010111101011000
10101111010110000000100111000110
11000110101011110101100000001001
01011000000010011100011010101111
Disk
Main memory
Computer Structure
Executable file
00001001110001101010111101011000
10101111010110000000100111000110
11000110101011110101100000001001
01011000000010011100011010101111
Processor
PCIR 00001001110
40ARCOS
Example
� Instructions set with the following features:� Memory address location: 16 bits� Instruction size: 16 bits� Operation code: 3 bits
� How many different instructions can execute this computer?
Computer Structure
� How many different instructions can execute this computer?� Number of general purpose registers: 4� Symbolic labels:
� R0 � R1 � R2 � R3
� How many bits are needed to represent 4 registers?
41ARCOS
Example
� Instructions set with the following features:� Memory address location: 16 bits� Instruction size: 16 bits� Operation code: 3 bits
� How many different instructions can execute this computer?
Computer Structure
� How many different instructions can execute this computer? (8 instructions)
� Number of general purpose registers: 4� Symbolic labels:
� R0 � R1 � R2 � R3
� How many bits are needed to represent 4 registers? (2 bits)
42ARCOS
Example. Instructions set
Instruction Description
000EFABCDXXXXXXX Adds the registers AB to CD and stores the result in EF
001AB00000000101 Stores in register AB the value 00000000101
010AB00000001001 Stores in register AB the value stored in the memory address 00000001001address 00000001001
011AB00000001001 Stores in the memory address 00000001001 the content of the register AB
1000000000001001 Jump to execute the instruction stored in the memory address 0000000001001
101ABCD000001001 Jump to execute the instruction sorted in memory address 000001001 if AB is equal to CD
Computer Structure
With A,B, C, D, E, F = 0 o 1
43ARCOS
Format of a machine instruction
001 AB 00000000101
Computer Structure 44ARCOS
Format of a machine instruction
001 AB 00000000101
Computer Structure
Operation code
45ARCOS
Format of a machine instruction
001 AB 00000000101
Computer Structure
Operation code
operandsRegisters
Memory address
Numbers
46ARCOS
Example. Instructions set
Instruction Description
000EFABCDXXXXXXX Adds the register AB to CD and stores the result in EF
001AB00000000101 Stores in register AB the value 00000000101
010AB00000001001 Stores in register AB the value stored in the memory address 00000001001address 00000001001
011AB00000001001 Stores in the memory address 00000001001 the content of the register AB
1000000000001001 Jump to execute the instruction stored in the memory address 0000000001001
101ABCD000001001 Jump to execute the instruction sorted in memory address 000001001 if AB is equal to CD
Computer Structure
With A,B, C, D, E, F = 0 o 1
47ARCOS
Examples
� Instruction that stores the value 5 in register 00
� Instruction that stores the value 7 in register 01� Instruction that stores the value 7 in register 01
� Instructions that adds the register 00 to 01 and stores the result in register 10
� Instruction that stores the above result in the memory address 1027 (in decimal)
Computer Structure 48ARCOS
Examples
� Instruction that storess the value 5 in register 00
� Instruction that store the value 7 in register 01
Instruction Description
000EFABCDXXXXXXX Adds the register AB to CD and stores the result result in EF
001AB00000000101 Stores in register AB the value 00000000101
010AB00000001001 Stores in register AB the value stored in the memory address 00000001001
011AB00000001001 Stores in the memory address 00000001001 the content of the register AB
1000000000001001 Jump to execute the instruction stored in the memory address 0000000001001
101ABCD000001001 Jump to execute the instruction sorted in memory address 000001001 if AB is equal to CD
� Instruction that store the value 7 in register 01
� Instructions that adds the register 00 to 01 and store the result in register 10
� Instruction that stores the above result in the memory address 1027 (in decimal)
Computer Structure 49ARCOS
Examples. Solution
� Instruction that stores the value 5 in register 00� 0010000000000101
� Instruction that stores the value 7 in register 01� 0010100000000111
� Instructions that adds the register 00 to 01 and store the result � Instructions that adds the register 00 to 01 and store the result in register 10� 000100001XXXXXXX
� Instruction that stores the above result in the memory address 1027 (in decimal)� 0111010000000011
Computer Structure 50ARCOS
Example of program
000100
000101
000110
000111
0010000000000000
0010100000000100
0011000000000001
0011100000000000
Address Content
Computer Structure
000111
001000
001001
001010
001011
001100
0011100000000000
1010001000001100
0001111100000000
0000000100000000
1000000000001000
0111100000100000
51ARCOS
Program execution start
PC
IR
0001
000100
?
?
000100
000101
000110
000111
0010000000000000
0010100000000100
0011000000000001
0011100000000000
?
Address Content
Computer Structure
011011
?
?
?
000111
001000
001001
001010
001011
001100
0011100000000000
1010001000001100
0001111100000000
0000000100000000
1000000000001000
0111100000100000
52ARCOS
Steps to execute an instruction
� Instruction fetch� MAR PC� Read� MBR Memory� PC PC + 1� RI MBR
PC
MAR MBR
RI
000100
Computer Structure
� RI MBR
� Instruction Decoding
� Execution� Jump to fetch
000100 0010000000000000
Address Content
Memory
53ARCOS
Steps to execute an instruction
� Instruction fetch� MAR PC� Read� MBR Memory� PC PC + 1� RI MBR
PC
MAR MBR
IR
000100
000100
Computer Structure
� RI MBR
� Instruction Decoding
� Execution� Jump to fetch
000100 0010000000000000
54ARCOS
Address Content
Memory
Steps to execute an instruction
� Instruction fetch� MAR PC� Read� MBR Memory� PC PC + 1� RI MBR
PC
MAR MBR
IR
000100
000100
Computer Structure
� RI MBR
� Instruction Decoding
� Execution� Jump to fetch
000100 0010000000000000
55ARCOS
Address Content
Memory
Steps to execute an instruction
� Instruction fetch� MAR PC� Read� MBR Memory� PC PC + 1� RI MBR
PC
MAR MBR
IR
000100
000100 0010000000000000
Computer Structure
� RI MBR
� Instruction Decoding
� Execution� Jump to fetch
000100 0010000000000000
56ARCOS
Address Content
Memory
Steps to execute an instruction
� Instruction fetch� MAR PC� Read� MBR Memory� PC PC + 1� RI MBR
PC
MAR MBR
IR
000101
000100 0010000000000000
Computer Structure
� RI MBR
� Instruction Decoding
� Execution� Jump to fetch
000100 0010000000000000
57ARCOS
Address Content
Memory
Steps to execute an instruction
� Instruction fetch� MAR PC� Read� MBR Memory� PC PC + 1� RI MBR
PC
MAR MBR
IR
000101
000100 0010000000000000
0010000000000000
Computer Structure
� RI MBR
� Instruction Decoding
� Execution� Jump to fetch
000100 0010000000000000
58ARCOS
Address Content
Memory
Steps to execute an instruction
� Instruction fetch� MAR PC� Read� MBR Memory� PC PC + 1� RI MBR
PC
MAR MBR
IR
000101
000100 0010000000000000
0010000000000000
Computer Structure
� RI MBR
� Instruction Decoding
� Execution� Jump to fetch
000100 0010000000000000
59ARCOS
Address Content
Memory
Steps to execute an instruction
� Instruction fetch� MAR PC� Read� MBR Memory� PC PC + 1� RI MBR
PC
MAR MBR
IR
000101
000100 0010000000000000
0010000000000000
Computer Structure
� RI MBR
� Instruction Decoding
� Execution� Jump to fetch
000100 0010000000000000
60ARCOS
Address Content
Memory
Execution
0010000000000000 RI
R0 0000000000
Computer Structure
Store in R0 the value 0
61ARCOS
Execution
0100100000001001 RI
R1 MP[00000001001]
Computer Structure
00000001001 0000000000000101
Address Content
Store in R1 the content of the memory address00000001001
62ARCOS
Execution
1000000000001000 RI
PC 0000000001000
Computer Structure
Modify PC with the memory0000000001000 toexecute the instruction stored in the memory address0000000001000
63ARCOS
Steps to execute an instruction
� Instruction fetch� MAR PC� Read� MBR Memory� PC PC + 1� RI MBR
PC
MAR MBR
IR
000101
000100 0010000000000000
0010000000000000
Computer Structure
� RI MBR
� Instruction Decoding
� Execution� Jump to fetch
000100 0010000000000000
Address Content
64ARCOS
Memory
Steps to execute an instruction
� Instruction fetch� MAR PC� Read� MBR Memory� PC PC + 1� RI MBR
PC
MAR MBR
IR
000101
000100 0010000000000000
0010000000000000
Computer Structure
� RI MBR
� Instruction Decoding
� Execution� Jump to fetch
000100 0010000000000000
Address Content
65ARCOS
Memory
Program execution
PC
IR
0001
000100
?
?
000100
000101
000110
000111
0010000000000000
0010100000000100
0011000000000001
0011100000000000
?
Address Content
Computer Structure
011011
?
?
?
000111
001000
001001
001010
001011
001100
0011100000000000
1010001000001100
0001111100000000
0000000100000000
1000000000001000
0111100000100000
Fetch
66ARCOS
Program execution
PC
IR
0001
000100
?
?
000100
000101
000110
000111
0010000000000000
0010100000000100
0011000000000001
0011100000000000
0010000000000000
Address Content
Computer Structure
011011
?
?
?
000111
001000
001001
001010
001011
001100
0011100000000000
1010001000001100
0001111100000000
0000000100000000
1000000000001000
0111100000100000
Fetch
67ARCOS
Program execution
PC
IR
0001
000101
?
?
000100
000101
000110
000111
0010000000000000
0010100000000100
0011000000000001
0011100000000000
0010000000000000
Address Content
Computer Structure
011011
?
?
?
000111
001000
001001
001010
001011
001100
0011100000000000
1010001000001100
0001111100000000
0000000100000000
1000000000001000
0111100000100000
Fetch
PC PC + 1
68ARCOS
Program execution
PC
IR
0001
000101
?
?
000100
000101
000110
000111
0010000000000000
0010100000000100
0011000000000001
0011100000000000
0010000000000000
Address Content
Computer Structure
011011
?
?
?
000111
001000
001001
001010
001011
001100
0011100000000000
1010001000001100
0001111100000000
0000000100000000
1000000000001000
0111100000100000
Decoding
69ARCOS
Program execution
PC
IR
0001
000101
?
000100
000101
000110
000111
0010000000000000
0010100000000100
0011000000000001
0011100000000000
0010000000000000
00000000000
Address Content
Computer Structure
011011
?
?
?
000111
001000
001001
001010
001011
001100
0011100000000000
1010001000001100
0001111100000000
0000000100000000
1000000000001000
0111100000100000
Execution
R0 00000000000
70ARCOS
Program execution
PC
IR
0001
000101
?
000100
000101
000110
000111
0010000000000000
0010100000000100
0011000000000001
0011100000000000
0010000000000000
00000000000
Address Content
Computer Structure
011011
?
?
?
000111
001000
001001
001010
001011
001100
0011100000000000
1010001000001100
0001111100000000
0000000100000000
1000000000001000
0111100000100000
Fetch
71ARCOS
Program execution
PC
IR
0001
000101
?
000100
000101
000110
000111
0010000000000000
0010100000000100
0011000000000001
0011100000000000
0010100000000100
00000000000
Address Content
Computer Structure
011011
?
?
?
000111
001000
001001
001010
001011
001100
0011100000000000
1010001000001100
0001111100000000
0000000100000000
1000000000001000
0111100000100000
Fetch
72ARCOS
Program execution
PC
IR
0001
000110
?
000100
000101
000110
000111
0010000000000000
0010100000000100
0011000000000001
0011100000000000
0010100000000100
00000000000
Address Content
Computer Structure
011011
?
?
?
000111
001000
001001
001010
001011
001100
0011100000000000
1010001000001100
0001111100000000
0000000100000000
1000000000001000
0111100000100000
Fetch
PC PC +1
73ARCOS
Program execution
PC
IR
0001
000110
?
000100
000101
000110
000111
0010000000000000
0010100000000100
0011000000000001
0011100000000000
0010100000000100
00000000000
Address Content
Computer Structure
011011
?
?
?
000111
001000
001001
001010
001011
001100
0011100000000000
1010001000001100
0001111100000000
0000000100000000
1000000000001000
0111100000100000
Decoding
74ARCOS
Program execution
PC
IR
0001
000110
00000000100
000100
000101
000110
000111
0010000000000000
0010100000000100
0011000000000001
0011100000000000
0010100000000100
00000000000
Address Content
Computer Structure
011011
00000000100
?
?
000111
001000
001001
001010
001011
001100
0011100000000000
1010001000001100
0001111100000000
0000000100000000
1000000000001000
0111100000100000
Execution
R1 00000000100
75ARCOS
Program execution
PC
IR
0001
000110
00000000100
000100
000101
000110
000111
0010000000000000
0010100000000100
0011000000000001
0011100000000000
0010100000000100
00000000000
Address Content
Computer Structure
011011
00000000100
?
?
000111
001000
001001
001010
001011
001100
0011100000000000
1010001000001100
0001111100000000
0000000100000000
1000000000001000
0111100000100000
Fetch
76ARCOS
Program execution
PC
IR
0001
000110
00000000100
000100
000101
000110
000111
0010000000000000
0010100000000100
0011000000000001
0011100000000000
0011000000000001
00000000000
Address Content
Computer Structure
011011
00000000100
?
?
000111
001000
001001
001010
001011
001100
0011100000000000
1010001000001100
0001111100000000
0000000100000000
1000000000001000
0111100000100000
Fetch
77ARCOS
Program execution
PC
IR
0001
000111
00000000100
000100
000101
000110
000111
0010000000000000
0010100000000100
0011000000000001
0011100000000000
0011000000000001
00000000000
Address Content
Computer Structure
011011
00000000100
?
?
000111
001000
001001
001010
001011
001100
0011100000000000
1010001000001100
0001111100000000
0000000100000000
1000000000001000
0111100000100000
Fetch
PC PC +1
78ARCOS
Program execution
PC
IR
0001
000111
00000000100
000100
000101
000110
000111
0010000000000000
0010100000000100
0011000000000001
0011100000000000
0011000000000001
00000000000
Address Content
Computer Structure
011011
00000000100
?
?
000111
001000
001001
001010
001011
001100
0011100000000000
1010001000001100
0001111100000000
0000000100000000
1000000000001000
0111100000100000
Decoding
79ARCOS
Program execution
PC
IR
0001
000111
00000000100
000100
000101
000110
000111
0010000000000000
0010100000000100
0011000000000001
0011100000000000
0011000000000001
00000000000
Address Content
Computer Structure
011011
00000000100
00000000001
?
000111
001000
001001
001010
001011
001100
0011100000000000
1010001000001100
0001111100000000
0000000100000000
1000000000001000
0111100000100000
Execution
R2 00000000001
80ARCOS
Program execution
PC
IR
0001
000111
00000000100
000100
000101
000110
000111
0010000000000000
0010100000000100
0011000000000001
0011100000000000
0011000000000001
00000000000
Address Content
Computer Structure
011011
00000000100
00000000001
?
000111
001000
001001
001010
001011
001100
0011100000000000
1010001000001100
0001111100000000
0000000100000000
1000000000001000
0111100000100000
Fetch
81ARCOS
Program execution
PC
IR
0001
000111
00000000100
000100
000101
000110
000111
0010000000000000
0010100000000100
0011000000000001
0011100000000000
0011100000000000
00000000000
Address Content
Computer Structure
011011
00000000100
00000000001
?
000111
001000
001001
001010
001011
001100
0011100000000000
1010001000001100
0001111100000000
0000000100000000
1000000000001000
0111100000100000
Fetch
82ARCOS
Program execution
PC
IR
0001
001000
00000000100
000100
000101
000110
000111
0010000000000000
0010100000000100
0011000000000001
0011100000000000
0011100000000000
00000000000
Address Content
Computer Structure
011011
00000000100
00000000001
?
000111
001000
001001
001010
001011
001100
0011100000000000
1010001000001100
0001111100000000
0000000100000000
1000000000001000
0111100000100000
Fetch
PC PC +1
83ARCOS
Program execution
PC
IR
0001
001000
00000000100
000100
000101
000110
000111
0010000000000000
0010100000000100
0011000000000001
0011100000000000
0011100000000000
00000000000
Address Content
Computer Structure
011011
00000000100
00000000001
?
000111
001000
001001
001010
001011
001100
0011100000000000
1010001000001100
0001111100000000
0000000100000000
1000000000001000
0111100000100000
Decoding
84ARCOS
Program execution
PC
IR
0001
001000
00000000100
000100
000101
000110
000111
0010000000000000
0010100000000100
0011000000000001
0011100000000000
0011100000000000
00000000000
Address Content
Computer Structure
011011
00000000100
00000000001
00000000000
000111
001000
001001
001010
001011
001100
0011100000000000
1010001000001100
0001111100000000
0000000100000000
1000000000001000
0111100000100000
Execution
R3 00000000000
85ARCOS
Program execution
PC
IR
0001
001000
00000000100
000100
000101
000110
000111
0010000000000000
0010100000000100
0011000000000001
0011100000000000
0011100000000000
00000000000
Address Content
Computer Structure
011011
00000000100
00000000001
00000000000
000111
001000
001001
001010
001011
001100
0011100000000000
1010001000001100
0001111100000000
0000000100000000
1000000000001000
0111100000100000
Fetch
86ARCOS
Program execution
PC
IR
0001
001000
00000000100
000100
000101
000110
000111
0010000000000000
0010100000000100
0011000000000001
0011100000000000
00000000000
1010001000001100
Address Content
Computer Structure
011011
00000000100
00000000001
00000000000
000111
001000
001001
001010
001011
001100
0011100000000000
1010001000001100
0001111100000000
0000000100000000
1000000000001000
0111100000100000
Fetch
87ARCOS
Program execution
PC
IR
0001
001001
00000000100
000100
000101
000110
000111
0010000000000000
0010100000000100
0011000000000001
0011100000000000
00000000000
1010001000001100
Address Content
Computer Structure
011011
00000000100
00000000001
00000000000
000111
001000
001001
001010
001011
001100
0011100000000000
1010001000001100
0001111100000000
0000000100000000
1000000000001000
0111100000100000
Fetch
PC PC +1
88ARCOS
Program execution
PC
IR
0001
001001
00000000100
000100
000101
000110
000111
0010000000000000
0010100000000100
0011000000000001
0011100000000000
00000000000
1010001000001100
Address Content
Computer Structure
011011
00000000100
00000000001
00000000000
000111
001000
001001
001010
001011
001100
0011100000000000
1010001000001100
0001111100000000
0000000100000000
1000000000001000
0111100000100000
Decoding
89ARCOS
Program execution
PC
IR
0001
001001
00000000100
000100
000101
000110
000111
0010000000000000
0010100000000100
0011000000000001
0011100000000000
00000000000
1010001000001100
Address Content
Computer Structure
011011
00000000100
00000000001
00000000000
000111
001000
001001
001010
001011
001100
0011100000000000
1010001000001100
0001111100000000
0000000100000000
1000000000001000
0111100000100000
ExecutionIf reigster01 is equal to register00
jump to execute the instructionstored in 000001100
90ARCOS
Program execution
PC
IR
0001
001001
00000000100
000100
000101
000110
000111
0010000000000000
0010100000000100
0011000000000001
0011100000000000
00000000000
1010001000001100
Address Content
Computer Structure
011011
00000000100
00000000001
00000000000
000111
001000
001001
001010
001011
001100
0011100000000000
1010001000001100
0001111100000000
0000000100000000
1000000000001000
0111100000100000
Fetch
91ARCOS
Program execution
PC
IR
0001
001001
00000000100
000100
000101
000110
000111
0010000000000000
0010100000000100
0011000000000001
0011100000000000
00000000000
0001111100000000
Address Content
Computer Structure
011011
00000000100
00000000001
00000000000
000111
001000
001001
001010
001011
001100
0011100000000000
1010001000001100
0001111100000000
0000000100000000
1000000000001000
0111100000100000
Fetch
92ARCOS
Program execution
PC
IR
0001
001010
00000000100
000100
000101
000110
000111
0010000000000000
0010100000000100
0011000000000001
0011100000000000
00000000000
0001111100000000
Address Content
Computer Structure
011011
00000000100
00000000001
00000000000
000111
001000
001001
001010
001011
001100
0011100000000000
1010001000001100
0001111100000000
0000000100000000
1000000000001000
0111100000100000
Fetch
PC PC + 1
93ARCOS
Program execution
PC
IR
0001
001010
00000000100
000100
000101
000110
000111
0010000000000000
0010100000000100
0011000000000001
0011100000000000
00000000000
0001111100000000
Address Content
Computer Structure
011011
00000000100
00000000001
00000000000
000111
001000
001001
001010
001011
001100
0011100000000000
1010001000001100
0001111100000000
0000000100000000
1000000000001000
0111100000100000
Decoding
94ARCOS
Program execution
PC
IR
0001
001010
00000000100
000100
000101
000110
000111
0010000000000000
0010100000000100
0011000000000001
0011100000000000
00000000000
0001111100000000
Address Content
Computer Structure
011011
00000000100
00000000001
00000000001
000111
001000
001001
001010
001011
001100
0011100000000000
1010001000001100
0001111100000000
0000000100000000
1000000000001000
0111100000100000
Execution
R3 R3 + R2
95ARCOS
Program execution
PC
IR
0001
001010
00000000100
000100
000101
000110
000111
0010000000000000
0010100000000100
0011000000000001
0011100000000000
00000000000
0001111100000000
Address Content
Computer Structure
011011
00000000100
00000000001
00000000001
000111
001000
001001
001010
001011
001100
0011100000000000
1010001000001100
0001111100000000
0000000100000000
1000000000001000
0111100000100000
Fetch
96ARCOS
Program execution
PC
IR
0001
001010
00000000100
000100
000101
000110
000111
0010000000000000
0010100000000100
0011000000000001
0011100000000000
00000000000
0000000100000000
Address Content
Computer Structure
011011
00000000100
00000000001
00000000001
000111
001000
001001
001010
001011
001100
0011100000000000
1010001000001100
0001111100000000
0000000100000000
1000000000001000
0111100000100000
Fetch
97ARCOS
Program execution
PC
IR
0001
001011
00000000100
000100
000101
000110
000111
0010000000000000
0010100000000100
0011000000000001
0011100000000000
00000000000
0000000100000000
Address Content
Computer Structure
011011
00000000100
00000000001
00000000001
000111
001000
001001
001010
001011
001100
0011100000000000
1010001000001100
0001111100000000
0000000100000000
1000000000001000
0111100000100000
Fetch
PC PC +1
98ARCOS
Program execution
PC
IR
0001
001011
00000000100
000100
000101
000110
000111
0010000000000000
0010100000000100
0011000000000001
0011100000000000
00000000000
0000000100000000
Address Content
Computer Structure
011011
00000000100
00000000001
00000000001
000111
001000
001001
001010
001011
001100
0011100000000000
1010001000001100
0001111100000000
0000000100000000
1000000000001000
0111100000100000
Decoding
99ARCOS
Program execution
PC
IR
0001
001011
00000000100
000100
000101
000110
000111
0010000000000000
0010100000000100
0011000000000001
0011100000000000
00000000001
0000000100000000
Address Content
Computer Structure
011011
00000000100
00000000001
00000000001
000111
001000
001001
001010
001011
001100
0011100000000000
1010001000001100
0001111100000000
0000000100000000
1000000000001000
0111100000100000
Execution
R0 R0 + R2
100ARCOS
Program execution
PC
IR
0001
001011
00000000100
000100
000101
000110
000111
0010000000000000
0010100000000100
0011000000000001
0011100000000000
00000000001
0000000100000000
Address Content
Computer Structure
011011
00000000100
00000000001
00000000001
000111
001000
001001
001010
001011
001100
0011100000000000
1010001000001100
0001111100000000
0000000100000000
1000000000001000
0111100000100000
Fetch
101ARCOS
Program execution
PC
IR
0001
001011
00000000100
000100
000101
000110
000111
0010000000000000
0010100000000100
0011000000000001
0011100000000000
00000000001
1000000000001000
Address Content
Computer Structure
011011
00000000100
00000000001
00000000001
000111
001000
001001
001010
001011
001100
0011100000000000
1010001000001100
0001111100000000
0000000100000000
1000000000001000
0111100000100000
Fetch
102ARCOS
Program execution
PC
IR
0001
001100
00000000100
000100
000101
000110
000111
0010000000000000
0010100000000100
0011000000000001
0011100000000000
00000000001
1000000000001000
Address Content
Computer Structure
011011
00000000100
00000000001
00000000001
000111
001000
001001
001010
001011
001100
0011100000000000
1010001000001100
0001111100000000
0000000100000000
1000000000001000
0111100000100000
Fetch
PC PC +1
103ARCOS
Program execution
PC
IR
0001
001100
00000000100
000100
000101
000110
000111
0010000000000000
0010100000000100
0011000000000001
0011100000000000
00000000001
1000000000001000
Address Content
Computer Structure
011011
00000000100
00000000001
00000000001
000111
001000
001001
001010
001011
001100
0011100000000000
1010001000001100
0001111100000000
0000000100000000
1000000000001000
0111100000100000
Decoding
104ARCOS
Program execution
PC
IR
0001
001100
00000000100
000100
000101
000110
000111
0010000000000000
0010100000000100
0011000000000001
0011100000000000
00000000001
1000000000001000
Address Content
Computer Structure
011011
00000000100
00000000001
00000000001
000111
001000
001001
001010
001011
001100
0011100000000000
1010001000001100
0001111100000000
0000000100000000
1000000000001000
0111100000100000
ExecutionJump to execute the instruction stored in
0000000001000
105ARCOS
Program execution
PC
IR
0001
0001000
00000000100
000100
000101
000110
000111
0010000000000000
0010100000000100
0011000000000001
0011100000000000
00000000001
1000000000001000
Address Content
Computer Structure
011011
00000000100
00000000001
00000000001
000111
001000
001001
001010
001011
001100
0011100000000000
1010001000001100
0001111100000000
0000000100000000
1000000000001000
0111100000100000
ExecutionPC 0000000001000
106ARCOS
Program execution
PC
IR
0001
0001000 000100
000101
000110
000111
0010000000000000
0010100000000100
0011000000000001
0011100000000000
Address Content
1000000000001000
00000000001
00000000100
Computer Structure
011011
000111
001000
001001
001010
001011
001100
0011100000000000
1010001000001100
0001111100000000
0000000100000000
1000000000001000
0111100000100000
Continue the execution
00000000100
00000000001
00000000001
107ARCOS
Algorithm of the previous program
i=0;s = 0;while (i < 4){s = s + 1;i = i + 1;
Computer Structure
i = i + 1;}
The program stores in the memory address00000100000
the value : 1 + 1 + 1 + 1
108ARCOS
Assembly language
li R0, 0li R1, 4li R2, 1li R3, 0
loop: beq R0, R1, end
Computer Structure
loop: beq R0, R1, endadd R3, R3, R2add R0, R0, R2b loop
end: sw R3, 100000
109ARCOS
Steps to execute instructions
Computer Structure
Instruction fetch
Start
Stop
DecodingExecution
110ARCOS
Microprocessor
� A microprocessorincorporates the functions of a computer’s central processing unit (CPU) on a single integrated circuit
Computer Structure 111ARCOS
Moore’s law
Computer Structure 112ARCOS
Moore’s law
� Double the density implies to reduce the dimensions the 30%
� In 1971 the 4004 Intel had 2300 transistors of 10 micrometers
� Nowadays there are microprocessors with less than
Computer Structure
� Nowadays there are microprocessors with less than30 nanometers
� Moore’s law need technology with a price that double every 4.4 years
113ARCOS
Fabrication process
Computer Structure 114ARCOS
Evolution of Intel microprocessors
Computer Structure
Source: Communications of the ACM
115ARCOS
Memory performance
Computer Structure
Source: Communications of the ACM
116ARCOS
Memory performance
Computer Structure
Source: Communications of the ACM
117ARCOS
Caches evolution
Computer Structure
Source: Communications of the ACM
118ARCOS
Processors performance
Computer Structure
Source: Communications of the ACM
119ARCOS
Processors power
Computer Structure
Source: Communications of the ACM
120ARCOS
Multicore architectures
Computer Structure
Source: Communications of the ACM
121ARCOS
Data movement and power consumption
Computer Structure
Source: Communications of the ACM
122ARCOS
Energy efficiency
Computer Structure
Fuente: Communications of the ACM
123ARCOS
Technology improvements
� Memory� DRAM capacity: 2x / 2 years (since 96);
64x in the last decade� Processor
� Speed: 2x / 1.5 years (since 85); � Speed: 2x / 1.5 years (since 85); 100X in the last decade.
� Disks� Capacity: 2x / 1 year (since 97)
250X in the last decade
Computer Structure 124ARCOS
Characteristic parameters of a computer
� Word and word size� Main memory� Auxiliary memory� Bandwidth� Bandwidth� MIPS� MFLOPS
Computer Structure 125ARCOS
Prefix
Name Abr Factor IS
Kilo K 210 = 1,024 103 = 1,000
Mega M 220 = 1,048,576 106 = 1,000,000
Giga G 230 = 1,073,741,824 109 = 1,000,000,000
Tera T 240 = 1,099,511,627,776 1012 = 1,000,000,000,000
Peta P 250 = 1,125,899,906,842,624 1015 = 1,000,000,000,000,000
Exa E 260 = 1,152,921,504,606,846,976 1018 = 1,000,000,000,000,000,000
Computer Structure
Exa E 2 = 1,152,921,504,606,846,976 10 = 1,000,000,000,000,000,000
Zetta Z 270 = 1,180,591,620,717,411,303,424 1021 = 1,000,000,000,000,000,000,000
Yotta Y 280 = 1,208,925,819,614,629,174,706,176
1024 = 1,000,000,000,000,000,000,000,000
126ARCOS
Exercise
� How many bytes does store a disk drive of 250 GB?
Computer Structure 127ARCOS
Prefix
Name Abr Factor IS
Kilo K 210 = 1,024 103 = 1,000
Mega M 220 = 1,048,576 106 = 1,000,000
Giga G 230 = 1,073,741,824 109 = 1,000,000,000
Tera T 240 = 1,099,511,627,776 1012 = 1,000,000,000,000
Peta P 250 = 1,125,899,906,842,624 1015 = 1,000,000,000,000,000
Exa E 260 = 1,152,921,504,606,846,976 1018 = 1,000,000,000,000,000,000
Computer Structure
� 1 KB = 1024 bytes, but in International System is 1000 bytes� Manufactures of disk drives and telecommunications use IS
� A disk drive with GB stores 30 x 109 bytes� A network of 1 Mbit/s transfers 106 bps.
Exa E 2 = 1,152,921,504,606,846,976 10 = 1,000,000,000,000,000,000
Zetta Z 270 = 1,180,591,620,717,411,303,424 1021 = 1,000,000,000,000,000,000,000
Yotta Y 280 = 1,208,925,819,614,629,174,706,176
1024 = 1,000,000,000,000,000,000,000,000
128ARCOS
Historic evolution
� http://history.sandiego.edu/GEN/recording/computer1.html� http://www.computerhope.com/history/� http://www.computerhistory.org/� http://www.computersciencelab.com/ComputerHistory/History
.htm
Computer Structure
.htm� Museos de informática� Look for in google: “Computer history”
129ARCOS