John Carlo B. Sibayan 4CPE: Bus Interface Unit (BIU)
John Carlo B. Sibayan 4CPE: Bus Interface Unit (BIU)
Sibayan 4CPE
Instruction Queue
1. To increase the execution speed, BIU fetches as many as six instruction bytes ahead to time from
memory.
2. All six bytes are then held in first in first out 6 byte register called instruction queue.
3. Then all bytes have to be given to EU one by one.
John Carlo B. Sibayan 4CPE
4. This pre fetching operation of BIU may be in parallel with execution operation of EU, which
improves the speed execution of the instruction.
Segment Registers
Additional registers called segment registers generate memory address when combined with other in the
microprocessor. In 8086 microprocessor, memory is divided into 4 segments as follow:
John Carlo B. Sibayan 4CPE
1. Code Segment (CS): The CS register is used for addressing a memory location in the Code
Segment of the memory, where the executable program is stored.
2. Data Segment (DS): The DS contains most data used by program. Data are accessed in the Data
Segment by an offset address or the content of other register that holds the offset address.
3. Stack Segment (SS): SS defined the area of memory used for the stack.
4. Extra Segment (ES): ES is additional data segment that is used by some of the string to hold the
destination data.
Conditional Flags
Conditional flags represent result of last arithmetic or logical instruction executed. Conditional flags
are as follows:
Carry Flag (CF): This flag indicates an overflow condition for unsigned integer arithmetic. It is also
used in multiple-precision arithmetic.
Auxiliary Flag (AF): If an operation performed in ALU generates a carry/barrow from lower
nibble (i.e. D0 D3) to upper nibble (i.e. D4 D7), the AF flag is set i.e. carry given by D3 bit to
D4 is AF flag. This is not a general-purpose flag, it is used internally by the processor to perform
Binary to BCD conversion.
Parity Flag (PF): This flag is used to indicate the parity of result. If lower order 8-bits of the result
contains even number of 1s, the Parity Flag is set and for odd number of 1s, the Parity Flag is
reset.
Zero Flag (ZF): It is set; if the result of arithmetic or logical operation is zero else it is reset.
Sign Flag (SF): In sign magnitude format the sign of number is indicated by MSB bit. If the result
of operation is negative, sign flag is set.
Overflow Flag (OF): It occurs when signed numbers are added or subtracted. An OF indicates
that the result has exceeded the capacity of machine.
John Carlo B. Sibayan 4CPE
Control Flags
Control flags are set or reset deliberately to control the operations of the execution unit. Control flags are as follows: