Past exam question: 2082 Chaitra (Regular), Q5(b)
Open in the Padhaiko appExplain each unit of 8086 microprocessor.
Solution
Bus Interface Unit (BIU): The BIU handles all interactions between the microprocessor and external memory/IO devices:
- Instruction Fetching & Prefetch Queue: The BIU continuously prefetches up to 6 bytes of upcoming instruction stream into a First-In-First-Out (FIFO) queue whenever at least 2 bytes in the queue become empty.
- Segment Registers (16-bit):
CS(Code Segment): Holds base address of the code segment containing program instructions.DS(Data Segment): Holds base address of the default data segment.SS(Stack Segment): Holds base address of the stack segment.ES(Extra Segment): Holds base address of destination segment for string operations.
- Instruction Pointer (IP): 16-bit register holding the offset of the next instruction code byte to be fetched from the code segment.
- 20-bit Dedicated Address Adder: Calculates 20-bit physical addresses using the formula:
Physical Address = (Segment Base * 16) + Offset.
Execution Unit (EU): The EU is responsible for decoding and executing instructions supplied by the BIU queue:
- Instruction Decoder: Translates fetched opcode bytes from the queue into internal execution control signals.
- Arithmetic Logic Unit (ALU): 16-bit unit capable of performing addition, subtraction, multiplication, division, AND, OR, XOR, NOT, increment, decrement, and shift/rotate operations on 8-bit or 16-bit operands.
- General Purpose Registers (16-bit):
AX(Accumulator: AH/AL): Default register for I/O, arithmetic, logic, and multiply/divide.BX(Base Register: BH/BL): Base register used for base addressing.CX(Count Register: CH/CL): Loop counter and string shift/rotate counter.DX(Data Register: DH/DL): Used for 32-bit arithmetic results and indirect I/O port addressing.
- Pointer and Index Registers (16-bit):
SP(Stack Pointer): Offset pointing to current top of stack in SS.BP(Base Pointer): Facilitates accessing parameters and local variables on stack.SI(Source Index) &DI(Destination Index): Used for indexed addressing and string operations.
- Flag Register (16-bit): Contains 6 status flags (CF, PF, AF, ZF, SF, OF) and 3 control flags (TF, IF, DF).
Instruction Pipelining Operation: Because the BIU and EU operate concurrently and independently, the BIU prefetches instruction bytes while the EU is busy executing previously decoded instructions. This overlaps fetch and execute cycles, virtually eliminating memory latency for instruction fetches and maximizing processor throughput.
The BIU manages bus transfers, instruction prefetching into a 6-byte FIFO queue, and 20-bit physical address generation. The EU receives opcodes from the queue, decodes them, performs arithmetic and logic via its 16-bit ALU and register file, and updates flags.