Microprocessor Tutorial

8085 Microprocessor

8086 Microprocessor

Difference between

8086 Microprocessor Architecture

Architecture Diagram of 8086

8086 microprocessor architecture

The given block diagram has been divided into two logical units, namely, the Bus Interface Unit (BIU) and Execution Unit (EU)

The Execution Unit


  • arithmetic and logic unit
  • the control unit
  • an internal bus
  • registers

Let's understand each unit in detail

General Purpose registers

They are also known as Scratchpad registers because they are used for temporary storage.

  • 8086 has 4 16-bit general purpose registers (AX, BX, CX, DX).
  • Each register can be used as two sepearte 8-bit registers.

  • AX
  • It is 16-bit data register
  • Also used as two seperate 8-bit registers AH and AL
  • AL/AX is sometimes known as accumulator
  • Used to store operands for arithmetic operation.

  • BX
  • It is 16-bit data register
  • Also used as two seperate 8-bit registers BH and BL
  • Used as a base register

  • CX
  • It is 16-bit data register
  • Also used as two seperate 8-bit registers CH and CL
  • Used as a counter in many instructions, known as Counting register

  • DX
  • It is 16-bit data register
  • Also used as two seperate 8-bit registers DH and DL
  • Data register used in I/O instructions as a pointer to data by storing the address of the I/O port.

  • BP, SP, SI and DI are address registers, and can only be used as 16-bit register

    Flag register

  • It is 16-bit register, of which 7 bits are unused.
  • 6 bits are used as conditional flags and others are control flags
  • Behaves like a flip-flop, i.e. change its status according to result in accumulator.

  • Conditional Flags

  • Carry flag (CF) : It get set if there is a carry out from the most significant bit during a calculation.

  • Zero flag (ZF) : It get set if the result of an arithmetic or logic operation is zero.

  • Parity flag (PF) : The setting of this flag indicates the presence of an even number of '1' bits in the least significant byte (lower 8 bits).

  • Sign flag (SF) : If the result of an arithmetic or logical is negative then the sign flag is set else reset.

  • Auxiliary Carry flag (AF) : Similar to carry flag, except that the overflow is from bit D3 into D4. Indicates carry from lower 8-bits.

  • Overflow flag (OF) : The flag indicates that the result of a signed operation is too large, causing higher bit to overflow.

  • Control Flags

  • Trap flag (TF) : It is set to perform step by step execution.

  • Interrupt flag (IF) : It is set to enable interrupts.

  • Direction flag (DF) : It is used in string operation.When it is set then string bytes are accessed from the higher memory address to the lower memory address and vice-versa.

  • ALU

    ALU performs all arithmetic and logic computations.

    Bus Interface Unit

    This unit is responsible for address calculations, pre-fetching instructions for the queue and sequencing instructions one by one.

    Instruction queue

  • This queue fetches the instructions ahead of the execution time and places them in a 6-byte FIFO queue.
  • Pre-fetching is done when buses are free
  • It increases execution speed.
  • When both execution and fetching takes place at the same time, is known as Pipelining.

  • Segment registers

  • These registers are 16-bit in size.
  • Use to store addresses of the instructions, each registers stores the base address of the corresponding segment

  • Code segment (CS) : Code Segment is the area of memory where only code is stored. CS contains the address of that memory segment. The offsets within code segment are referenced using IP (instruction pointer). Therefore the logical address is of type CS:IP (20-bit address).

  • Stack segment (SS) : It is an area used in a special way. It handles memory to store data and addresses during execution.

  • Data segment (DS) : It is used to store data used by program.

  • Extra segment (ES) : It is used to store the upper 16-bits of the base address of the extra segment,

  • Instruction Pointer (IP)

    It is used to store the next instruction to be executed.