Microprocessor 8086 Functional Units - Microprocessor

Explain the functional units of 8086 Microprocessor?

8086 Microprocessor is provided with two functional units, i.e., EU (Execution Unit) and BIU (Bus Interface Unit).

EU (Execution Unit)

Execution unit is a functional unit consists of CPU which helps in performing operations and arithmetical calculations instructed by the computer program. In machine language we could say that it decodes and executes instructions. Apart from other internal units it has its own control unit which helps to perform functions along with other basic internal units. The data which is required by the EU is fetched from the BIU thus maintaining interaction with the memory and input and output devices.

Let us now discuss the functional parts of 8086 microprocessors.

ALU

As we know ALU handles all arithmetic and logical operations, like +, −, ×, /, OR, AND, NOT operations.

Flag Register

Flag Register is a 16-bit register that looks like a flip-flop, i.e. with the result of data that is stored in the accumulator its status changes. It consists of 9 flags and they are divided into 2 groups − Conditional Flags and Control Flags.

Conditional Flags

It is determined with the result of the execution by the last arithmetic or logical instruction. Following is the list of conditional flags −

  • Carry flag − This flag indicates an overflow condition for arithmetic operations.
  • Auxiliary flag − When an operation is processed at ALU, it results in a carry/barrow from lower nibble (i.e. D0 – D3) to upper nibble (i.e. D4 – D7), then this flag is set, i.e. carry given by D3 bit to D4 is AF flag. The processor uses this flag to perform binary to BCD conversion.
  • Parity flag − This flag is used to indicate result of even and odd number sets of the parity, i.e. when the lower order 8-bits of the result contains even number of 1’s, then the Parity Flag is set. When the odd number of 1’s contains, the Parity Flag is reset.
  • Zero flag − This flag is set to 1 when the result of arithmetic or logical operation is said to be zero else it is set to 0.
  • Sign flag − This flag holds the sign of the result, i.e. when the result of the operation is negative, then the sign flag is set to 1 otherwise set to 0.
  • Overflow flag − This flag represents the result when the system capacity is exceeded.

Control Flags

Control flags controls the operations performed by the execution unit. Following is the list of control flags −

  • Trap flag − It is a single step process control that allows the user to execute single instruction at a time for debugging. If it is set, then the program could run in a single step mode.
  • Interrupt flag − It is an interrupt enable/disable flag, i.e. helps to allow/prohibit the interruption of a program. For interrupt enabled condition it is set to 1 and for interrupt disabled condition it is set to 0.
  • Direction flag − It is used in string operation, where the string bytes are set and accessed from the higher memory address to the lower memory address and vice-a-versa.

General purpose register

There are 8 general purpose registers, i.e., AH, AL, BH, BL, CH, CL, DH, and DL. These registers can be used individually when it is stored in 8-bit data and 16bit data is required to store in pairs. The valid register pairs are AH and AL, BH and BL, CH and CL, and DH and DL. It is referred to the AX, BX, CX, and DX respectively.

  • AX register − It is also known as accumulator register. It is used to store operands to perform arithmetic operations.
  • BX register − It is used as a base register. It is used to store the initial base address of the memory area within the data segment.
  • CX register − It is referred to as counter. It is used in loop instruction to store the loop counter.
  • DX register − This is a register which is used to hold I/O port address for I/O instruction.

Stack pointer register

It is known as a 16-bit register, which handles the last program address that was recently stored on the stack to the memory location.

BIU (Bus Interface Unit)

To increase the processing speed of the processor 8086 microprocessor has been divided into EU and BIU functional units. As we have mentioned above that the EU codes and decodes the data, BIU interacts with the memory, input and output devices in order to fetch the instructions and data thereby transfer of all data and addresses on the buses for the EU execution. This unit helps in sending addresses, fetching instructions from the memory, reading data from the ports and the memory as well as writing data to the ports and the memory. EU does not have any direct connection with System Buses so this is possible with the BIU. Fetching and execution works simultaneously to increase the performance of the microprocessor.

It has the following functional parts −

  • Instruction queue − BIU consists of the instruction queue. BIU holds upto 6 bytes of next executable instructions and stores them in the instruction queue. When execution of instructions happens by the EU and gets ready for its next instruction, then it simply reads the instruction from this instruction queue which results in increased performance of the microprocessor.
  • Execution of current instruction while the next instruction is being fetched is called pipelining.
  • Segment register − BIU has 4 segment buses, i.e. CS, DS, SS& ES. It holds the addresses of instructions and data in memory, which are later used by the processor in order to access memory locations. It also contains 1 pointer register IP, which holds the address of the next instruction that is executed by the EU.
    • CS − It stands for Code Segment used for addressing a memory location in the code segment of the memory, where the program ready to execute is to be stored.
    • DS − It stands for Data Segment. It contains data used by the program and is accessed in the data segment by an offset address i.e logical address or the content of other register that holds the offset address. Execution unit is responsible for offset address as it executes the program.
    • SS − It stands for Stack Segment. It holds memory to store data which helps in addressing during execution.
    • ES − It stands for Extra Segment. ES is additional data segment, which is used by the string to hold the extra processed destination data.
  • Instruction pointer − It is known as 16-bit register which handles the address of the immediate next executable instruction.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Microprocessor Topics