Hardware

The 8086 Microprocessor


Hey everyone, in this section we will learn about the 8086 microprocessor, its registers and their sizes. We will also learn how does the concept of pipelining work with the 8086 microprocessor.

The 8086 is a 16-bit microprocessor,meaning that is microprocessor can work with a maximum of 16 bits of data at a time. It has 20 bit address lines and 16 bit data lines that provides up to 1MB storage of data. The 8086 consists of a total 29,000 transistors and 133 instructions.

The 8086 can be operated in two modes,

  • Minimum mode.
  • Maximum mode.

In minimum mode the system is called as a uniprocessor system. This mode is suitable for system having a single processor.

In maximum mode the system is called as a multiprocessor system. This mode is suitable for system having multiple processor.

The 8086 has an instruction queue, which is capable of storing 6 instruction bytes, hence the ALU does not have to wait for the instructions to be fetched from the memory. The instructions are fetched ahead of execution unit from the memory and are queued up resulting in faster processing which is referred as Pipelining.

There are two ways in which we can make CPU process information faster:

  • Increasing the working frequency of the CPU.
  • Changing internal architecture of CPU.

The first option is technology dependent, meaning that the designer must use whatever technology is available to increase the speed of the processor. Whereas, the second options deals more with the internal working of the CPU. The earlier versions of microprocessors could either fetch or execute instructions at a given time, But in 8086 using the idea of pipelining which allows the CPU to fetch and execute at the same time as shown in the figure below where the instruction 2 is fetched while the instruction 1 still being executed and so on.

Pipelining

Architecture of 8086 microprocessor

The internal structure of 8086 is split into two sections: the execution unit (EU) and the bus interface unit (BIU). The BIU is the interface to the memory and peripherals, and in EU the execution of instructions take place, where the ALU performs all the logical and arithmetic operations. The BIU and EU sections work simultaneously.

Internal Block Diagram of the 8086 CPU

Different registers of 8086 microprocessor

Registers are used to store information temporarily. That information can be one byte (8-bit) or two byte (16-bit) to be processed or the address of data. There are totally fourteen 16-bit registers available in the 8086. All these fourteen registers fall into the six categories as mentioned below,

  • General Purpose Registers (4) : AX, BX, CX, DX.
  • Segment Registers (4) : CS (code segment), DS (data segment), SS (stack segment), ES (extra segment).
  • Pointer (2) : SP (stack pointer), BP (base pointer).
  • Index (2) : SI (source index), DI (destination index).
  • Instruction (1) : IP (instruction pointer).
  • Flag (1) : FR (flag register).

The general purpose registers are used to store data temporarily and which can be manipulated using simple machine instructions.

The segment registers are the offset in memory of the current segment. These can be used with the general purpose registers to perform operations.

The pointers are used whenever we are dealing with stacks. SP points to the top of stack and BP to the bottom of stack.

The index registers are usually used as offsets into data spaces. By default, SI is offset from data segment and DI is offset to the extra segment.

The instruction pointer is the default pointer from the code segment, this points to the next instruction to be executed.

The flag registers show the current status of the processor

All the four 16-bit general purpose registers can be split into two 8-bit registers each as shown below,

Different registers in 8086 are used for different functions, and some instructions use only specific registers to perform their tasks. The first letter of each general register indicates its use. AX is used for the accumulator, BX as a base addressing register, CX as a counter to perform loop operation, and DX to point to the data in I/O operations.

In the next section we will learn some of the instruction set related to the 8086 microprocessor.


Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.