Microprocessor introduction
Microprocessor introduction
2
This presentation slide only contains the
overview of the related topics. Students are
advised to take decent class-notes and read
thoroughly from the prescribed text
books.
3
Programming Language
✔A computer program is a collection of instructions that
performs a specific task when executed by a computer.
✔A programming language is a formal constructed language
designed to communicate instructions to a machine,
particularly a computer.
✔Simply, writing a program is called programming and the
language used are called programming language.
Language
Machine Assembly
language language
4
Programming
• Low-level Language…
language
❑a medium of communication that is machine dependent or
specific to a given computer.
❑Machine & Assembly languages of a computer considered
low-level languages.
❑Program does not transferable.
• High level language
❑a medium of communication that is machine independent.
❑programs written in English like word.
❑executed on a machine using a translator.
❑e.g. BASIC, PASCAL, C,C+, FORTRAN
❑easy to learn
5
Programming Language…
• Machine language
❑a type of MP programming language
that uses
binary or hexadecimal numbers.
❑It was constructed of ones and
zeros using binary codes.
❑ e.g. 0000 0010 1100 1010
❑All programs are converted into
machine language before they can be
executed.
• Assembly language
❑Uses symbolic operation code to
represent the machine operation code.
❑ Specific to a given computer. 6
Programming Language…
• Assembler
❑A computer program that translates assembly language
program from mnemonics to binary machine code.
• Compiler
❑A program that translates English like words of a high
level language into machine language.
❑Reads a given program (source code)
in its entirely, translates program Into
machine language(object code).
• Interpreter
❑A program that translates English like statements of a
high level language into machine language.
❑translates one statement at a time from source code to
7
an object code.
Programming Language…
Source Object
Compiler
Code Code
• Source code
❑a program written either in mnemonics of an
assembly language or in English-like statements of
high level language.
• Object code
❑the binary (M/C) code into which a source program is
translated by a compiler, assembler or interpreter.
8
Programming Language…
• Firmware
❑permanently stored, unalterable program
instructions contained in ROM section of computer
memory.
• Hardware
❑the physical electronic circuit &
electromechanical devices that makes up computer
system.
• Software
❑Group of instructions or Program In a computer.
9
The Microprocessor
• Microprocessor, the heart of the microprocessor-based
computer system is an IC.
• Microprocessor is the controlling element in a computer
system.
• It controls memory and I/O devices through buses and
transfer instructions and data between microprocessor
and memory or I/O device.
10
Evolution of the Microprocessor
11
Evolution of the Microprocessor
• 1st Microprocessor
⮚ 1971, INTEL corp., 4004
⮚ 4-bit microprocessor
⮚ 4-bit memory, contain only 45 instructions
⮚ Fabricated with P-channel MOSFET
⮚ Execute instructions at the slow rate of 50 KIPs (Kilo-
instructions per second)
• 2nd Microprocessor
⮚ Later in 1971, INTEL corp., 8008
⮚ 8-bit microprocessor
⮚ 16kB memory, contain only 48 instructions,
⮚ Execution time 20 micro-seconds
12
Evolution of the Microprocessor
• …
3rd Microprocessor (1st modern microprocessor)
⮚ 1973, INTEL 8080
⮚ 8-bit microprocessor
⮚ 64kB memory
⮚ TTL technology
⮚ Execution time 2 micro-seconds
• The 8085 Microprocessor
⮚ 1977, Intel 8085
⮚ 8-bit microprocessor (Data bus 8 bits, address bus 8 bits)
⮚ 64kB memory
⮚ Execution time 1.3 micro-seconds
Advantage 1. internal clock generator
: 2. Internal system controller
3. Higher clock frequency
(3MHz) 13
Evolution of the Microprocessor
• The…8086 Microprocessor
⮚ 1978, Intel 8086
⮚ 16-bit microprocessor (Data bus 16 bits, address bus 20 bits)
⮚ 1MB memory
⮚ Execution time 400 nano-seconds
⮚Clock frequency 5MHz
⮚Cache or queue memory 6 byte
• The 8088 Microprocessor
⮚ 1979, Intel 8088
⮚ Same as 8086 but speedy than 8086
14
Evolution of the Microprocessor
• …80286 Microprocessor
The
⮚ 1983, INTEL 80286
⮚ 16-bit microprocessor
⮚ 16MB memory
⮚ Execution time 250 nano-seconds
⮚ Clock frequency 8MHz
• The 80386 Microprocessor (1st practical 32-bit MP)
⮚ 1986, Intel 80386
⮚ 32-bit microprocessor (Data bus 32 bits, address bus 32
bits)
⮚ 4GB memory
⮚ Cache or queue memory 8kB
⮚ Have few modified version (80386SX, 80386SL/
80386SLC,
80386EX 15
Evolution of the Microprocessor
…
• The 80486 Microprocessor
⮚ 1989, INTEL 80486
⮚ Same as 80386
⮚ Execution time 25 nano-seconds
⮚ Clock frequency 50MHz
Evolution of the Microprocessor
•
…
The Intel Pentium Microprocessor
⮚ 1993
⮚ 64-bit microprocessor
⮚ 4GB memory
⮚ Cache or queue memory 16kB
⮚ Pentium contained 8KB instruction cache & 8KB data cache
⮚ Execute instructions at the rate of 110 MIPs
⮚ two version of Pentium operated with a clocking frequency
of 60MHz & 66MHz
⮚ Double-clock Pentium, operating at 120MHz & 133MHz also
available
Evolution of the Microprocessor
• The …
Future of the Microprocessors
⮚ No one can really make accurate Predictions.
⮚ Beginning in late 2002, 64 bits in width, 128 bit data bus, code
name Merced, joint venture called EPIC(Explicitly Parallel
Instruction Computing) of Intel & Hewlett-Packard.
Main tasks of Microprocessor
The microprocessor performs three main
tasks for the computer system:
1. Data transfer between microprocessor and memory or
I/O devices.
2. Simple arithmetic and logic operations.
3. Program flow via simple decisions.
Undefined/unused
flags
Special-purpose Registers (FLAGS register…)
1) C (Carry) Flag
❑ It holds the carry after addition or
the borrow after subtraction.
FF 1111 1111
+ H 1111 1111
FF
FEH 1 1111 1110
H
6) T (Trap/Trace) Flag
❑ It enable trapping through an on-chip debugging
(checking error) facility.
❑ T =1, Debugging enable
❑ T = 0, Debugging disable
Special-purpose Registers (FLAGS register…)
7) I (Interrupt) Flag
❑ The interrupt flag controls the operations of the INTR
(Interrupt request) input pin.
❖ If I =1, the INTR pin is enabled;
❖ if I =0, the INTR pin is disabled.
8) D (Direction) Flag
❑ The D flag selects either the increment or decrement mode
for DI and/or SI registers during string instructions.
❖ If D=1 the registers are automatically decremented;
❖ if D=0 the registers are automatically incremented.
❑ Decrement mode indicates Set direction and write with STD
(set direction) instruction.
❑ Increment mode indicates Clear direction and write with
cleared with the CLD (clear direction) instruction.
Special-purpose Registers (FLAGS register…)
9) O (Overflow) Flag
❑ An overflow indicates that the result has exceeded the
capacity of the machine.
❑ Overflow occurs when signed numbers are added or
subtracted.
❑ Mainly occurs during multiplication operation.
❖ If O=1, Overflow occurs;
❖ if O=0, No overflow.
Segment Registers
Segment Registers are additional registers, generate memory
addresses when combined with other registers in the
microprocessor.
In a word, segment registers are section of memory.
CS CODE Segment
DS DATA Segment
ES EXTRA Segment
SS STACK Segment
Segment Registers…
1) Code segment (CS)
❑ The code segment is a section of memory that holds the
code (programs and procedures) used by the
microprocessor.
❑ The code segment (CS) register defines the starting
address of the section of memory holding code.
❑ The code segment size is limited to max 64KB.
String destination
ES DI ES:DI
address
54