Lec Architecture 8086
Lec Architecture 8086
Lec Architecture 8086
Microprocessor
Clock Speed
Also called clock rate, the speed at which a microprocessor
executes instructions.
The CPU requires a fixed number of clock ticks (or clock cycles) to
execute each instruction.
The faster the clock, the more instructions the CPU can execute per
second.
Clock speeds are expressed in megahertz (MHz) or gigahertz (GHz
).
• Every computer contains an internal clock that regulates the rate at
which instructions are executed and synchronizes all the various
computer components.
• A computer with a clock speed of 800MHz is running 800,000,000
cycles per second, while a 2.4GHz computer is running
2,400,000,000 cycles per second.
Uses of transistors in computer
It is a 16-bit μp.
8086 has a 20 bit address bus can access up to
220 memory locations (1 MB).
It has multiplexed address and data bus AD0-
AD15 and A16 – A19.
It requires +5V power supply.
• Control Circuitry
• Flag Register
Instruction Decoder
Translates instructions fetched from memory into a
series of actions which EU carries out
Control Circuitry
Generates timing and control signals to perform
the internal operations of the microprocessor
8 bits 8 bits
AH AL Accumulator
AX
BX
BH BL Base
CX
CH CL Count
DX DH DL
Data
SP Stack Pointer
Pointer
BP Base Pointer
SI Source Index
Index
DI Destination Index
20
General Purpose Registers
EU has four 16-bit AH AL AX
general purpose
registers BH BL BX
Each of them can be
CH CL CX
used two independent
8-bit registers. DH DL DX
Two registers can also
be combined to form
16-bit registers
The valid register pairs
are – AX, BX, CX, DX
General Purpose Registers
AX/AL register is also called Accumulator
1. CF CARRY FLAG
Conditional Flags
2. PF PARITY FLAG
3. AF AUXILIARY CARRY
4. ZF ZERO FLAG
5. SF SIGN FLAG
6. OF OVERFLOW FLAG
7. TF TRAP FLAG
Control Flags
8. IF INTERRUPT FLAG
9. DF DIRECTION FLAG
Flag Register
Flag Purpose
Carry (CF) Holds the carry after addition or the borrow after subtraction.
Parity (PF) PF=0; if the result has odd parity, PF=1;even parity.
Auxiliary (AF) is set(AF=1) if there is a carry from low nibble to high nibble
or a borrow from a high nibble to low nibble of the low order
8-bit of a 16-bit number.(for example, in BCD addition or
subtraction.)
Zero (ZF) Shows the result of the arithmetic or logic operation.
Z=1; result is zero. Z=0; The result is not 0
Sign (SF) Holds the sign of the result after an arithmetic/logic
instruction
execution. S=1; negative(MSB=1), S=0
28
Flag Purpose
A control flag.
Trap (TF) Enables the trapping through an on-chip debugging
Feature(if TF=1).
A control flag.
Interrupt (IF) Controls the operation of the INTR (interrupt request)
IF=0; INTR pin disabled. IF=1; INTR pin enabled.
A control flag.
Direction (DF) It selects either the increment or decrement mode for DI
and /or SI registers during the string instructions.
If DF=1 SI/DI auto-decremented if DF=0 auto-incremented
Overflow occurs (OF=1) when signed numbers are added
Overflow (OF) or subtracted. An overflow indicates the result has
exceeded the capacity of the Machine
29
Execution unit – Flag Register
Addition of two numbers:
0101 0100 0011 1001
0100 0101 0110 1010
1001 1001 1010 0011
CF 0
PF 1
AF 1
ZF 0
SF 1
30