Computer Organization and Assembly Language
Lecture 2
Introduction to Microprocessors
THE BRAIN OF THE COMPUTER
CIIT Department of Computer Science, Wah Campus 1
Computer Organization and Assembly Language
Mechanical Computing
The abacus circa 500 B.C. – the first
calculator
Blaise Pascal – the first modern
mechanical adder
Charles Babbage – the first true computer
Herman Hollerith – the punched card
system and founder of IBM
CIIT Department of Computer Science, Wah Campus 2
Computer Organization and Assembly Language
Early electronic computers
Konrad Zuse – Z3 (relay logic at 5.33 Hz)
Alan Turing – Colossus
University of Pennsylvania - ENIAC
CIIT Department of Computer Science, Wah Campus 3
Computer Organization and Assembly Language
Early milestones
1948 – the transistor at Bell Labs
1958 – the integrated circuit
1961 – RTL digital logic
1971 – the microprocessor (4004)
CIIT Department of Computer Science, Wah Campus 4
Computer Organization and Assembly Language
MICROPROCESSORS HISTORY
The Intel 4004 (Nov 1971 )
was originally designed for use in a Busicom scientific
calculator, but Intel engineers realized the design of the
chip afforded multi-purpose use - thus the
microprocessor was born.
•The 4004 contains 2000 TRANSISTORS and is a 4-bit
microprocessor capable of processing 4 bits of
information at a time at a rate of about 0.06 MHz.
•45 instruction set
•50 kilo instructions per second
The original 4004 was a silicon-based chip measuring 1/8th of an inch long by
1/16th of an inch wide, containing
It had about the same amount of computing power as the original ENIAC
which weighed 30 tons, occupied 3,000 cubic feet of space and used
18,000 vacuum tubes.
being used on the Pioneer 10 spacecraft launched in 1972
CIIT Department of Computer Science, Wah Campus 5
Computer Organization and Assembly Language
MICROPROCESSORS HISTORY
The Intel 4004
Micron View
Microns is the width, in microns, of the smallest wire on the chip. For
comparison, a human hair is 100 microns thick.
CIIT Department of Computer Science, Wah Campus 6
Computer Organization and Assembly Language
MICROPROCESSORS HISTORY
The Intel 8080 (April 1974)
16 bit address bus and an 8 bit data bus
Internally it had seven 8 bit registers
The 8080 was used in the Altair 8800, the first widely-known personal computer
MC6800 BY MOTOROLA CORPORATION
RELEASED 6 MONTH AFTER INTEL 8080
SOON, Other companies began to introduce their own
version of 8-bit microprocessors
Manufacturer Part No.
Intel 8080
MOS Technology 6502
Motorola MC6800
National Semiconductor IMP-8
Rockwell pps-8
Zilog Z-8
CIIT Department of Computer Science, Wah Campus 7
Computer Organization and Assembly Language
The Zilog Z-80 - End of an 8-bit line (July 1976)
designed by ex-Intel engineers
The Z-80 was intended to be an improved 8080
included 80 more, instructions than 8080
The register set was doubled
Clock speeds ranged from the original Z-80 2.5MHz to the Z80-H (later called
Z80-C) at 8MHz, and later a CMOS version at 10MHz.
Of theses early microprocessors only Intel and Motorola
continue successfully to create newer and improved version
of microprocessors
CIIT Department of Computer Science, Wah Campus 8
Computer Organization and Assembly Language
MICROPROCESSORS HISTORY
The modern microprocessors
16 bit microprocessors
"Because of the success of Zilog's 8-bit processor, we were
sure they were cooking up some super processors for 16 bits
and beyond," says Peter Stohl, 8086 lead engineer.
"We knew we had to beat them to the punch. We were scared
and moving fast."
8086 (1978)
16 bit microprocessors
Executed instructions in as little as 400ns(2.5 MIPS)
1 MB of memory (16 times more than that of 8085)
Also called CISC(complex instruction set computers)
4-6 byte instruction cache
CIIT Department of Computer Science, Wah Campus 9
Computer Organization and Assembly Language
MICROPROCESSORS HISTORY
Transistor Clock Data
Name Date Microns MIPS
s speed width
8080 1974 6,000 6 2 MHz 8 bits 0.64
16 bits
8088 1979 29,000 3 5 MHz 0.33
8-bit bus
80286 1982 134,000 1.5 6 MHz 16 bits 1
80386 1985 275,000 1.5 16 MHz 32 bits 5
80486 1989 1,200,000 1 25 MHz 32 bits 20
32 bits
Pentium 1993 3,100,000 0.8 60 MHz 100
64-bit bus
32 bits
Pentium II 1997 7,500,000 0.35 233 MHz ~300
64-bit bus
Pentium 32 bits
1999 9,500,000 0.25 450 MHz ~510
III 64-bit bus
42,000,00 32 bits
Pentium 4 2000 0.18 1.5 GHz ~1,700
0 64-bit bus
Pentium 4 125,000,0 32 bits
2004 0.09 3.6 GHz ~7,000
"Prescott" 00 64-bit bus
CIIT Department of Computer Science, Wah Campus 10
Computer Organization and Assembly Language
MICROPROCESSORS HISTORY
Microprocessors used in super computers
THE IBM POWER3 MICROPROCESSOR WITH 15 MILLION TRANSISTORS
AND THE ABILITY TO PERFORM UP TO TWO BILLION OPERATIONS PER
SECOND POWERS THE RS/6000 SP SUPERCOMPUTER
The system will have a peak performance capability of more than 3 teraflops, or 3
trillion calculations per second.
CIIT Department of Computer Science, Wah Campus 11
Computer Organization and Assembly Language
MICROPROCESSORS WORKING and ARCHITECTURE
Microprocessors perform three main tasks for the computer systems
1. Data transfer between itself and the memory or I/O systems
2. Simple arithmetic and logic operations
3. Program flow via simple decisions
The term microprocessor typically refers to the central processing unit (CPU)
The microprocessor contains
1. the arithmetic logic unit (ALU)
2. the control unit for a microcomputer.
CIIT Department of Computer Science, Wah Campus 12
Computer Organization and Assembly Language
MICROPROCESSORS WORKING and ARCHITECTURE
Control Unit of Microprocessor
The control unit of a microprocessor directs the
operation of the other units by providing timing and control
signals.
The descriptive words "fetch" and "execute" are used to
describe the actions of the control unit.
It fetches an instruction by sending and address and a
read command to the memory unit. The instruction at that
memory address is transferred to the control unit for
decoding. It then generates the necessary signals to
execute the instruction.
Microprocessor is connected to memory and I/O by buses which carry
information between the units.
CIIT Department of Computer Science, Wah Campus 13
Computer Organization and Assembly Language
MICROPROCESSORS WORKING and ARCHITECTURE
Arithmetic Logic Unit
All the arithmetic operations of a microprocessor take place in the
arithmetic logic unit (ALU).
The operation to be performed is specified by signals from the control
unit.
The data upon which operations are performed can come from
memory or an external input.
CIIT Department of Computer Science, Wah Campus 14
Computer Organization and Assembly Language
CIIT Department of Computer Science, Wah Campus 15
Computer Organization and Assembly Language
Early programming
Countess of Lovelace (1823) wrote
programs for the Analytical Engine
Machine Language then Assembly
Language
Grace Hopper (1957) develops FLOW-
MATIC
FORTRAN, ALGOL, and RPG
COBOL
CIIT Department of Computer Science, Wah Campus 16
Computer Organization and Assembly Language
Modern programming
Visual BASIC (most common business)
Visual C/C++ (most common technical)
JAVA (most common web)
ADA and PASCAL
C# (gaining on web)
CIIT Department of Computer Science, Wah Campus 17
Computer Organization and Assembly Language
Cache Memory
A temporary high speed memory that buffers the
slower DRAM from the higher speed
microprocessor.
Usages in bursts of 4 memory-sized chunks of
data (today 4, 64-bit numbers)
Level 1 (small cache for local high-speed
storage)
Level 2 (larger cache for local high-speed
storage.
Level 3 (large cache on Pentium 4 chip)
CIIT Department of Computer Science, Wah Campus 18
Computer Organization and Assembly Language
Memory Organization
Memory is organized in byte-sized (wide) chunks
of data
Memory is numbered in bytes
Memory is number in hexadecimal addresses or
locations
Modern memory is 64-bits wide containing 8
bytes per memory physical location.
Modern DRAM is SLOW! (40 ns per a random
access)
Buffering and double clock edge transfers can
speed memory access times to about 25 MHz
CIIT Department of Computer Science, Wah Campus 19
Computer Organization and Assembly Language
Microprocessor Internals
CIIT Department of Computer Science, Wah Campus 20
Computer Organization and Assembly Language
Computer Block Diagram
CIIT Department of Computer Science, Wah Campus 21
Computer Organization and Assembly Language
Computer System Functions
CPU (microprocessor) – performs
arithmetic and logic operations
data transfers (to memory or i/o)
program flow via simple decisions
Memory – stores program and data
I/O – communicates to humans and
machines
CIIT Department of Computer Science, Wah Campus 22
Computer Organization and Assembly Language
I/O Space
Port0000H to ffffH (64K 8-bit i/o devices)
Two major sections
System devices (motherboard, etc)
Reserved for expansion
Various I/O devices that control the system are
not directly addressed. System BIOS Rom
addresses these devices.
Access made through OS or BIOS function calls
to maintain compatibility from one computer
system to another
CIIT Department of Computer Science, Wah Campus 23
Computer Organization and Assembly Language
DOS Memory System
Transient program area
CIIT Department of Computer Science, Wah Campus 24
Computer Organization and Assembly Language
Windows Memory Map
CIIT Department of Computer Science, Wah Campus 25
Computer Organization and Assembly Language
DOS vs. Windows Memory
1M memory system for DOS
4G memory system for Windows
DOS is a 16-bit system
Windows is a 32-bit system
DOS TPA is 640K bytes
Windows TPA is 2G bytes (or with a
modification to the registry, 3G bytes)
CIIT Department of Computer Science, Wah Campus 26
Computer Organization and Assembly Language
Computer Structure
CIIT Department of Computer Science, Wah Campus 27
Computer Organization and Assembly Language
Buses
Address Bus – selects a location in the
memory or a specific I/O device
Data Bus – transfers data between the
microprocessor and the memory or I/O
Control Bus – selects I/O or memory and
causes a read or a write
CIIT Department of Computer Science, Wah Campus 28
Computer Organization and Assembly Language
Memory Organization
8086/8088 – 8- or 16-bits in width
80286 – 16-bits in width
80386/80486 – 32-bits in width
Pentium/Pentium 4 – 64-bits in width
CIIT Department of Computer Science, Wah Campus 29
Computer Organization and Assembly Language
8-bit Data
CIIT Department of Computer Science, Wah Campus 30
Computer Organization and Assembly Language
8-bit Data Formats
In the assembler use:
DATA1 DB 10H
• In C++
char Data1 = 0x10;
or
unsigned char Data2 = 3;
CIIT Department of Computer Science, Wah Campus 31
Computer Organization and Assembly Language
16-bit Data
CIIT Department of Computer Science, Wah Campus 32
Computer Organization and Assembly Language
16-bit Data Formats
In the assembler
Data3 DW 1000H
In C++
short Data3 = 0x1000;
or
unsigned short Data5 = 4;
CIIT Department of Computer Science, Wah Campus 33
Computer Organization and Assembly Language
32-bit Data
CIIT Department of Computer Science, Wah Campus 34
Computer Organization and Assembly Language
32-bit Data Formats
In the assembler
DATA6 DD 10002345H
In C++
int Data6 = 0x10002345;
or
unsigned int Data7 = 34566;
or
UINT Data8 = 344;
CIIT Department of Computer Science, Wah Campus 35
Computer Organization and Assembly Language
Floating-point Data
CIIT Department of Computer Science, Wah Campus 36
Computer Organization and Assembly Language
Floating-Point Formats
In the assembler
DATAA DD 23.4
DATAB DQ -345.0
DATAR DQ 3.5E2
In C++
float DataC = 23.4;
double DataD = -345;
double DataE = 3.5e2;
CIIT Department of Computer Science, Wah Campus 37