Professional Documents
Culture Documents
1. The Intel 8086 16-bit processor, which is fabricated using HMOS(High-speed Metal Oxide
Semiconductor) technology and it has 40 pins, packaged in DIP (Dual Inline Package).
2. 8086 has a 20 bit address bus can access up to 220 memory locations (1MB).
3. It has multiplexed address and data bus AD0-AD15 and A16 – A19
4. It can support up to 64K I/O ports.
5. The 8086 provides fourteen 16-bit registers.
6. The 8086 requires clock with a 33% duty cycle to provide optimized internal.
7. The 8086 microprocessor available in three clock rates: Operating clock frequencies 5MHz,
8MHz, 10MHz.
8. The Intel 8086 is designed to operate in two modes: minimum mode and maximum mode.
9. An interesting feature of the 8086 is that it fetches up to 6 instruction bytes from memory and
queue stores them in order to speed up instruction execution.
10. It requires +5V single power supply.
PIN DESCRIPTIONS
8086 PIN Diagram:
Q. Draw the pin diagram of 8086. (4M)
Pin description of 8086 Microprocessor
VCC – Pin number 40 – At this pin, the external power supply of + 5V is provided to the processor.
VSS – Pin number 1 and 20 – These two pins acts as the ground. This pin directs the extra current of
the microprocessor to ground.
AD0 – AD15 – Pin number 2 to 16 and 39 – These are the multiplexed address and data bus.
We know that the 8086 microprocessor has 20-bit address bus and 16-bit data bus. So, the 16 lines of
the address and data bus are multiplexed together so as to reduce the number of lines inside the IC.
We are aware of the fact that at a time either address or data will be transmitted by the bus. So, at a
particular time only either the address or the data bus will be enabled from the multiplexed buses.
A16/S3, A17/S4, A18/S5 and A19S6 – Pin number 35 to 38 – Out of 20 address bits, 4 are present in the
multiplexed form with the status signals. In the case of memory operations, these pins act as an address
bus and contain the memory address of any particular instruction or data.
However, from I/O operations these pins are low that shows the status of the processor.
Basically, the signal at S3 and S4 show that which segment is currently accessed by the microprocessor
among the four segments present in it.
Also, S5, when enabled, shows the presence of an interrupts in the microprocessor. So, basically, it
serves as an interrupt flag.
The signal at S6 shows the status of the bus master for the current operation. More simply we can say,
whether the 8086 is the bus master or any other proficient device is acting as the bus master.
When 0 is present as the signal at this pin then it indicates the 8086 is holding the access of the bus
otherwise it is high i.e., 1.
BHE / S7 – Pin number 34 – BHE is an acronym for Bus High Enable. The combination of the BHE
signal and S7 status informs about the existence of the data on the bus. Also, different combinations
show whether the bus is containing overall 16 bit, upper byte or lower byte of the data.
The table below represents the status for the signal at this pin:
̅̅̅̅̅BHE S7 Indication
0 0 Whole word (16-bits)
0 1 High byte to/from odd address
1 0 Low byte to/from even address
1 1 No selection
MN/MX – Pin number 33 –The status at this particular pin shows whether the processor is operating
in the minimum mode or maximum mode.
A signal 0 at this pin informs that the 8086 is operating in maximum mode i.e., multiple processors.
While signal 1 shows the operation under minimum mode i.e., single processor.
RD – Pin number 32 – An active low signal at this pin shows that the microprocessor is performing
read operation with either memory or I/O devices.
CLK – Pin number 19 – A signal at this pin provides the timing to the internal operations that are
being executed inside the microprocessor.
NMI – Pin number 17 – NMI is Non-maskable interrupt. These are basically uncontrollable interrupts
generated inside the processor. When an NMI occurs, then an interrupt service routine is generated by
the interrupt vector table.
TEST – Pin number 23 – This input is examined by the Wait instruction. If this is low, execution
continues otherwise processor waits in idle state.
INTR – Pin number 18 – INTR stands for an interrupt request. The processor after each clock cycle
samples the INTR and if the signal at this pin is found to be high then the processor controls that
interrupts internally.
READY – Pin number 22 – This signal is used by the peripherals and memory devices in order to
show the readiness for the next operation.
RESET – Pin number 21 – Whenever this pin is enabled then it resets the processor and other devices
connected to the system by immediately terminating the recent task.
INTA – Pin number 24 – It is an interrupt acknowledge pin. Whenever an INTR signal is generated,
then the microprocessor generates INTA signal, as a response to that interrupt.
ALE – Pin number 25 – ALE is an abbreviation for address latch enable. Whenever an address is
present in the multiplexed address and data bus, then the microprocessor enables this pin.
This is done to inform the peripherals and memory devices about fetching of the data or instruction at
that memory location.
DEN – Pin number 26 – DEN is used for data enable. This is an active low pin that means whenever a
0 is present at this pin then the transceiver gets enabled and it separates the data from the multiplexed
address and data bus.
DT/R – Pin number 27 – This pin is used to show whether the data is getting transmitted or is
received. It is used to control the direction of data flow through the transceiver 8286 or 74LS245.When
the processor sends the data out, this signal is high and when this signal is low the data is received.
M/IO – Pin number 28 – This pin indicates whether the processor is performing an operation with
memory or I/O devices. Whenever a high is present at this pin then it shows the operation is carried out
through the memory. While a low signal shows operation through I/O devices.
WR – Pin number 29 – An active low signal at this pin indicates that the processor is performing write
operation from either memory or I/O devices.
HOLD – Pin number 31 – When an external device enables this pin then the processor stops accessing
the buses immediately after the recent task get over.
HLDA – Pin number 30 – This pin is used as a response pin for the hold request. Once request for
accessing the buses is produced by an external entity. Then the microprocessor acknowledges the
device that its request will be considered once it gets over by the current operation.
Q. State all the control signals generated by S0, S1, S2 with their functions.
S0 , S1 and S2 – Pin number 26 to 28 – These are basically 3 status pins and they are active low. This
means that if the status at all the 3 pins is 0 then it shows that multiple interrupts are to be handled in
maximum mode.
The table below is representing the status of the processor in different combinations:
Status
S0 ̅̅̅̅̅S1 ̅̅̅̅̅S2
0 0 0 INTA
0 0 1 I/O Read
0 1 0 I/O Write
0 1 1 Halt
1 0 0 Opcode Fetch
1 0 1 Memory Read
1 1 0 Memory Write
1 1 1 Passive/None
QS0 and QS1 – Pin number 24 and 25 – These two pins indicate the status of the 6-byte pre-fetch
queue present in the architecture of 8086.
QSI QS0 Status
0 0 No Operation
LOCK – Pin number 29 –This pin is involved in maximum mode operation. So, basically, when a
single processor is accessing the buses and peripherals then it locks the resources being used by it. So,
that no other entity can access it until the recent processor frees it.
RQ / GT0 and RQ / GT1 – Pin number 30 and 31 – Due to the involvement of multiple processors,
these pins indicate the request and grant permission for accessing the buses, memory and peripherals.
This is all about the pin diagram and description of the 8086 microprocessor.
Q. Draw architectural block diagram of 8086 and describe its register organization.
Q. Write any four important functions of any two units of 8086 microprocessor.
(Any four functions from BIU and EU may be considered, Each Function - ½
Marks) [Note: Any other function related to individual unit can be considered]
Ans:
8086 has two blocks BIU (Bus Interface Unit) and EU (Execution Unit).
Functions of Bus Interface Unit
• The BIU performs all bus operations such as instruction fetching, reading and writing
operands for memory and calculating the addresses of the memory operands.
• The instruction bytes are transferred to the instruction queue.
• BIU contains Instruction queue, Segment registers, Instruction pointer, and Address adder.
• It provides a full 16 bit bidirectional data bus and 20 bit address bus.
• The bus interface unit is responsible for performing all external bus operations.
• Instruction fetch, Instruction queuing, Operand fetch and storage, Address relocation and Bus
control are the operations performed by BIU
• The BIU uses a mechanism known as an instruction stream queue to implement a pipeline
architecture.
Pointer and Index Group Registers : There are two 16 bit pointer registers:
Stack Pointer (SP) and Base Pointer (BP)
BP – Base Pointer
BP – This is the base pointer. It is of 16 bits.
It is primary used in accessing parameters passed by the stack. It’s offset address relative to stack
segment.
SP – Stack Pointer
SP – This is the stack pointer. It is of 16 bits.
It points to the topmost item of the stack. Contains the offset of the top of the stack. It’s offset
address relative to stack segment.
SI and DI : During the execution of string related instructions, register SI is used to store the offset of
source data/string in data segment while the register DI is used to store the offset of destination in
Data/Extra Segment.
IP Instruction Pointer – Instruction Pointer – contains the offset of the next instruction to be executed.
The Instruction Pointer always points to the next instruction to be carried out from the program
memory. It is 16-bit register.
Flag Register – Individual bit positions within register show status of CPU or results of arithmetic
operations.
The 16-bit flag register of 8086 contains 9 active flags (six conditional & 3 control), other 7
flags are undefined.
Conditional Flags: indicate certain condition that arises during the execution. They are
controlled by the processor.
Control Flags: control certain operations of the processor. They are deliberately set/reset by the
user.
Other Registers:
Segment Registers- SS, DS, CS and ES, the pointer and index registers -BP, SP, SI and DI.
CS – Code Segment – holds base address for all executable instructions in a program
SS - Base address of the stack
DS – Data Segment – default base address for variables
ES – Extra Segment – additional base address for memory variables in extra segment.
Address generator: - This unit is used to generate 20 bit physical address by adding 16 bit logical
address displacement with base address.
Instruction Decoder:- This unit is used convert or decode the instructions and provides signals to
various units in the EU.
FLAG REGISTER
Q. List the names of flags in flag register of 8085 microprocessor.
(All Correct – 2 Marks)
Ans: Zero (Z), Carry (CY), Sign (S), Parity (P), and Auxiliary Carry (AC) flags.
Q. Draw the flag register format of microprocessor 8086 and explain any two flags. Ans.: (2
Mark for format, 2 Mark for explanation)
1. Carry flag: This flag is set when there is a carry out of MSB in case of addition or a borrow in
case of subtraction.
2. Parity flag: This flag is set to 1if the lower byte of the result contains even numbers of 1s
3. Auxiliary carry flag : this is set if there is a carry from the lowest nibble, i.e. bit three during
addition or borrow for the lowest nibble i.e. bit three during subtraction.
4. Zero flag: This flag is set if the result of the computation or comparison performed by previous
instruction is zero.
5. Sign flag: This flag is set when the result of any computation is negative. For signed
computations the sign flag equals the MSB of the result.
6. Trap flag: If this flag is set the processor enters the single step execution mode.
7. Interrupt flag: If this flag is set the maskable interrupts are recognized by the cpu, otherwise
they are ignored.
8. Direction flag: This flag is used by string manipulation instructions. If this flag bit is ‘0’ the
string is processed beginning from the lowest address to the highest address, otherwise the
string is processed from the highest address towards lowest address.
9. Overflow flag: This flag is set if an overflow occurs.
Q. Define pipelining. What is the size of instruction prefetch queue in 8086 microprocessor?
(Definition -1 Mark, prefetch queue size – 1 Mark)
Ans: In 8086, pipelining is the technique of overlapping instruction fetch and execution mechanism.
o This will speed up the execution of program.
o The size of instruction preftech queue in 8086 is 6 bytes.
- The technique used to enable an instruction to complete with each clock cycle is called as
Pipelining
- Normally, on a non-pipelined processor, nine clock cycles are required for fetch, decode and
execute cycles for the 3 instructions (a)
- But on a pipelined processor, the fetch, decode and execute operations are performed in parallel
only five clock cycles are required to execute the same 3 instructions (b)
Pipelined execution of three instructions
- Feature of fetching the next instruction while the current instruction is executing is called
pipelining which will reduce the execution time. So pipelining improves the execution speed of
the processor.
- In pipelined processor fetch, decode and execute operation are performed simultaneously or in
parallel.
- In 8086, pipelining is implemented by providing 6 byte queue where 6 one byte instructions
can be stored well in advance and then one by one instruction goes for decoding and execution.
- In this way 8086 perform fetch, decode and execute operation in parallel.
Advantages of Pipelining:
1) Pipelining enables many instructions to be executed at the same time
2) It allows execution to be done in fewer cycles.
3) Speed up the execution speed of the processor.
4) More efficient use of Processor.
Definition:
Process of fetching the next instruction while the current instruction is executing is called
pipelining which will reduce the execution time.
In 8086, pipelining is the technique of overlapping instruction fetch and execution mechanism.
To speed up program execution, the BIU fetches as many as six instruction bytes ahead of time
frommemory. The size of instruction prefetch queue in 8086 is 6 bytes.
While executing one instruction other instruction can be fetched. Thus it avoids the waiting time
for execution unit to receive other instruction.
BIU stores the fetched instructions in a 6 byte FIFO queue. The BIU can be fetching
instructions bytes while the EU is decoding an instruction or executing an instruction which
does not require use of the buses.
When the EU is ready for its next instruction, it simply reads the instruction from the queue in
the BIU.
This is much faster than sending out an address to the system memory and waiting for memory
to send back the next instruction byte or bytes.
This improves overall speed of the processor.
Q. Describe memory segmentation in 8086 microprocessor and list its four advantages.
(Description: 2 Marks, Any 4 Advantages : ½ Mark each)
Q. Explain memory segmentation in 8086 and list its advantages.(any two)
(Explanation: 2 Marks, Any 2 Advantages : 2 Mark)
Ans :
Description:
- Data segment is used to hold data, Code segment for the executable program, Extra segment
also holds data specifically in strings and stack segment is used to store stack data.
- Each segment is 64Kbytes & addressed by one segment register.
- The 16 bit segment register holds the starting address of the segment.
- The offset address to this segment address is specified as a 16-bit displacement (offset) between
0000H - FFFFH.
- Since the memory size of 8086 is 1Mbytes, total 16 segments are possible with each having
64Kbytes.
PHYSICAL MEMORY ADDRESS GENERATION
- The address associated with any instruction or data byte is only 16-bit called as Effective
Address /Offset/Displacement/Logical Address.
- The logical addresses are used to calculate physical address
- The address generated by BIU is 20-bit called as Physical address
Q. Describe the physical memory address generation process in 8086 microprocessor. If, CS =
69FAH & IP = 834CH, calculate the physical address generated.
(Description – 2 Marks, Calculation - 2 Marks)
Ans: The 8086 addresses a segmented memory. The complete physical address which is 20-bits long
is generated using segment and offset registers each of the size 16-bit.The content of a segment
register also called as segment address, and content of an offset register also called as offset
address. To get total physical address, put the lower nibble 0H to segment address and add
offset address. The figure shows formation of 20-bit physical address.
+
1000 0011 0100 1100
7 2 2 E C
= 722EC H
Q. Define logical and effective address. Describe physical address generation process in 8086. If
DS=345AH and SI=13DCH. Calculate physical address.
(Define each Term :1M. Physical Address Generation. Description: 2 M & Calculation 2 M)
Ans: A logical address is the address at which an item (memory cell, storage element) appears to
reside from the perspective of an executing application program. A logical address may be different
from the physical address due to the operation of an address translator or mapping function.
Effective Address or Offset Address: The offset for a memory operand is called the operand's
effective address or EA. It is an unassigned 16 bit number that expresses the operand's distance in bytes
from the beginning of the segment in which it resides. In 8086 we have base registers and index
registers.
Generation of 20 bit physical address in 8086:-
- Segment registers carry 16 bit data, which is also known as base address.
- BIU appends four 0 bits to LSB of the base address. This address becomes 20-bit address.
- Any base/pointer or index register carries 16 bit offset.
- Offset address is added into 20-bit base address which finally forms 20 bit physical address of
memory location
= 345A0+13DC
= 3597CH
Q. Explain how 20-bit physical address is generated by 8086 microprocessor. Calculate the
physical address if CS=2308H and IP=76A9H
Ans: (Description: 2 Marks, Example: 2 Marks)
Ans.:
1) Segment address ---- 1200H ------ 0001 0010 0000 0000
Offset address ------ DE00H ----- 1101 1110 0000 0000
Segment address shifted by 4 bit position- 0001 0010 0000 0000 0000
+ 1101 1110 0000 0000
-----------------------------------------------------------
Physical address----- 0001 1111 1110 0000 0000
1 F E 0 0
2) Segment address ---- 1F00H ------ 0001 1111 0000 0000
Offset address ------ 1A00H ----- 0001 1010 0000 0000
Segment address shifted by 4 bit position- 0001 1111 0000 0000 0000
+ 0001 1010 0000 0000
-----------------------------------------------------------
Physical address ----- 0010 0000 1010 0000 0000
2 0 A 0 0
Q. Describe how 20 bit physical address is generated in 8086 microprocessor. Give one example.
(Description – 2 Marks , Example – 2 Marks)
Ans: Formation of a physical address:- Segment registers carry 16 bit data, which is also
known as base address. BIU attaches 0 as LSB of the base address. So now this address
becomes 20-bit address. Any base/pointer or index register carry 16 bit offset. Offset address is
added into 20-bit base address which finally forms 20 bit physical address of memory location.