0% found this document useful (0 votes)
5 views27 pages

Microprocessor

The document outlines the functions of a microprocessor, including arithmetic, logical, data handling, control operations, instruction execution, interrupt handling, and power management. It also defines a microprocessor, describes its characteristics like clock speed and instruction set, and differentiates between microprocessors and CPUs, as well as RISC and CISC architectures. Additionally, it explains the internal architecture of the 8086 microprocessor, its general-purpose registers, and the functions of the flag register.

Uploaded by

niloydeb2002
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views27 pages

Microprocessor

The document outlines the functions of a microprocessor, including arithmetic, logical, data handling, control operations, instruction execution, interrupt handling, and power management. It also defines a microprocessor, describes its characteristics like clock speed and instruction set, and differentiates between microprocessors and CPUs, as well as RISC and CISC architectures. Additionally, it explains the internal architecture of the 8086 microprocessor, its general-purpose registers, and the functions of the flag register.

Uploaded by

niloydeb2002
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

1.​ Write down the functions of a microprocessor.

Ans: The major functions of a microprocessor are explained below with


examples.

1. Arithmetic Operations

Arithmetic operation is one of the most fundamental functions of a


microprocessor. A microprocessor performs basic mathematical calculations
such as addition, subtraction, multiplication, and division. These
operations are important in many computing tasks like solving mathematical
problems, performing financial calculations, and processing graphics.

Examples:

●​ Calculating the total of numbers in spreadsheets​

●​ Measuring distance in a GPS navigation system​

●​ Calculating interest rates in banking systems​

2. Logical Operations

Logical operations are another important function of a microprocessor. In


logical operations, the microprocessor compares two or more values and
makes decisions based on logical conditions. These operations include
functions like AND, OR, NOT, and comparison.

Examples:

●​ Verifying whether a password is correct during login​

●​ Sorting a list of items based on specific parameters​

●​ Filtering emails as spam, unread, or important based on keywords​

3. Data Handling

Data handling involves moving, storing, and retrieving data within the
computer system. The microprocessor transfers data between memory,
registers, and input/output devices to ensure proper functioning of the system.

Examples:
●​ Fetching data or webpages from a server​

●​ Saving documents, images, or other files​

●​ Copying photos or videos from a computer to a pen drive​

4. Control Operations

The microprocessor also performs control operations. It controls the


sequence of instructions and coordinates the activities of different
components of the computer system.

Examples:

●​ Controlling the speed of a laptop cooling fan depending on temperature​

●​ Regulating temperature in a microwave oven​

●​ Controlling the sequence of traffic lights based on traffic density​

5. Instruction Execution

Instruction execution is a fundamental function where the microprocessor


fetches, decodes, and executes instructions stored in memory to perform
specific tasks.

Examples:

●​ Opening software such as Microsoft Word​

●​ Editing or removing the background of an image​

●​ Scanning a computer using antivirus software​

6. Interrupt Handling

A microprocessor can also handle interrupts. Interrupts allow the processor to


temporarily stop the current task and handle urgent events first.

Examples:

●​ Pausing a video when the battery is low​


●​ Displaying a pop-up notification when a message is received​

●​ Stopping the printing process when the cancel button is pressed​

7. Power Management

Power management is another important function of modern microprocessors.


It helps reduce power consumption by controlling system components
when they are not in use.

Examples:

●​ Reducing processor and memory power when the computer is idle​

●​ Turning off the screen backlight after a period of inactivity​

●​ Reducing cooling fan speed when the device temperature is normal

2.​ What is microprocessor? Write down the characteristics of


microprocessor.

Ans:A microprocessor is an integrated circuit (IC) which incorporates core


functions of a computer’s central processing unit (CPU). It is a programmable
multipurpose silicon chip, clock driven, register based, accepts binary data as input
and provides output after processing it as per the instructions stored in the memory.

A Microprocessor’s performance depends on the following characteristics:

· Clock speed

· Instruction set
· Word size

a) Clock Speed:
Every microprocessor has an internal clock that regulates the speed at which it
executes instructions. The speed at which the microprocessor executes instructions
is called the clock speed. Clock speed is measured in MHz (Mega Hertz) or in GHz
(Giga Hertz).

b) Instruction Set:
A command which is given to a computer to perform an operation on data is called
an instruction. Basic set of machine level instructions that a microprocessor is
designed
to execute is called as an instruction set. This instruction set carries out the following
types of operations:

• Data transfer

• Arithmetic operations

• Logical operations

• Control flow

• Input/output

c) Word Size:
The number of bits that can be processed by a processor in a single instruction is
called its word size. Word size determines the amount of RAM that can be accessed
by a
microprocessor at one time and the total number of pins on the microprocessor. Total
number of input and output pins in turn determines the architecture of the
microprocessor.

3.​ Differentiate between Microprocessor and CPU.


Ans:

Basis Microprocessor CPU

Definition A microprocessor is an A CPU (Central Processing Unit) is


integrated circuit that contains the main unit of a computer that
the CPU functions on a single performs processing and controls
chip. system operations.

Structure It is a single chip that includes It is the central part of the computer
ALU, control unit, and that may consist of multiple
registers. components including the
microprocessor.

Function It executes instructions and It manages and controls all operations


performs arithmetic, logical, of the computer system.
and control operations.

Usage Commonly used in embedded Used in computers, laptops, and


systems, calculators, and servers as the main processing unit.
small electronic devices.

Relationship A microprocessor acts as the CPU is the functional unit, while the
CPU of a computer when microprocessor is the hardware
implemented on a single chip. implementation of it.

4.​ Distinguish between RISC and CISC processors.


Ans:
Difference between RISC and CISC processors in tabular form:

Basis RISC (Reduced Instruction Set CISC (Complex Instruction


Computer) Set Computer)

Instruction Uses a small and simple set of Uses a large and complex set of
Set instructions instructions

Execution Most instructions are executed in a Instructions may take multiple


Time single clock cycle clock cycles to execute

Instruction Instructions are usually fixed in Instructions are variable in


Format length length

Complexity Simpler design and easier to More complex design


implement

Memory Requires more instructions to Requires fewer instructions to


Usage perform complex tasks perform complex tasks

Speed Generally faster due to simple Usually slower compared to


instructions and pipelining RISC
Examples ARM, MIPS, SPARC x86, Intel processors

5.​ Differentiate between Register-based and Accumulator-based


microprocessor.
Ans:

6.​ What is an instruction?.


Ans:An instruction is a command given to a computer or microprocessor to
perform a specific operation.

It tells the processor what task to perform and how to perform it. Instructions are
stored in the computer's memory and are executed by the processor one by one.

7.​ Mention different types of data transfer operations.


Ans: Data transfer operation is the process of moving data from one location to
another location within a computer or microprocessor system.

It allows the microprocessor to transfer data between registers, memory, and


input/output devices without changing the data.

The different types of data transfer operations are listed below:

a. Register to Register Transfer

In this operation, data is transferred from one register to another register inside the
processor.
Example:
MOV A, B → Data from register B is moved to register A.

b. Register to Memory Transfer

In this type, data is transferred from a register to a memory location.

Example:
MOV M, A → Data from register A is stored in a memory location.

c. Memory to Register Transfer

Here, data is transferred from memory to a register.

Example:
MOV A, M → Data from memory location M is moved to register A.

d. Immediate Data Transfer

In this operation, data is transferred directly from the instruction to a register or


memory location.

Example:
MVI A, 25H → The value 25H is loaded directly into register A.

e. Input/Output Data Transfer

This operation involves transferring data between the microprocessor and


input/output devices.

Example:
IN and OUT instructions used for communication with peripherals.

8.​ Draw and explain the internal architecture of 8086.


Ans: The 8086 microprocessor is an 8-bit/16-bit microprocessor designed by
Intel in the late 1970s. It is the first member of the x86 family of microprocessors,
which includes many popular CPUs used in personal computers.
Internal Architecture of 8086:

i. Bus Interface Unit (BIU)

The BIU is responsible for all communication between the microprocessor and
memory or I/O devices.

Functions of BIU:

●​ Fetches instructions from memory.​

●​ Sends addresses to memory and I/O devices.​

●​ Transfers data between memory and processor.​

●​ Stores instructions in the instruction queue for faster execution.​

Components of BIU:

●​ Segment Registers: CS, DS, SS, ES (used to store segment addresses).​

●​ Instruction Pointer (IP): Holds the address of the next instruction.​

●​ Instruction Queue: A 6-byte queue used for prefetching instructions.​

●​ Address Generation Unit: Calculates the physical address.​

ii. Execution Unit (EU)


The EU is responsible for executing instructions fetched by the BIU.

Functions of EU:

●​ Decodes instructions.​

●​ Performs arithmetic and logical operations.​

●​ Controls execution of instructions.​

Components of EU:

●​ Arithmetic Logic Unit (ALU): Performs arithmetic and logical operations.​

●​ General Purpose Registers: AX, BX, CX, DX used for data operations.​

●​ Pointer and Index Registers: SP, BP, SI, DI used for memory addressing.​

●​ Flag Register: Indicates status of operations (zero, carry, sign, etc.).​

●​ Instruction Decoder: Decodes instructions before execution.

9.​ Explain why 8086 architecture is divided into BIU and EU.
Ans:The architecture of 8086 is divided into two functional parts i.e.
(i) Execution unit (EU)
(ii) Bus interface unit (BIU)
These two units work asynchronously.
Functional division of architecture speeds up the processing, since BIU and EU
operate parallel and independently i.e., EU executes the instructions and BIU fetches
another instruction from the memory simultaneously. As the whole architecture is
divided into two independent functional parts and both the subsystem’s operations
can be overlapped, hence the architecture is PIPELINING type of architecture.

The execution unit informs the BIU of the processor regarding from where to fetch
the instructions from and then executes these instructions. The BIU handles transfer
of data and address between the processor and memory /I /O devices by computing
address (Physical/ Effective address) and send the computed address to memory / I/
0 and fetches instruction codes then stores them in FIFO register set called Queue
register. The BIU also relocates the addresses of the un relocated operands and
reads/writes data from/to memory / I/ O devices.
10.​ Describe the general purpose registers of 8086.
Ans: There are 8 general-purpose registers in the 8086 microprocessor.

1. AX:This is the accumulator. It is of 16 bits and is divided into two 8-bit registers AH
and AL to also perform 8-bit instructions. It is generally used for arithmetical and
logical instructions but in 8086 microprocessor it is not mandatory to have an
accumulator as the destination operand.

●​ Type: 16-bit
●​ Divided into: AH (high byte) and AL (low byte)
●​ Primary Use: Arithmetic, logic operations, and I/O operations.
●​ Example:

MOV AX, 2000H ; Load 2000H into AX​


ADD AX, AX ; AX = AX + AX (4000H)

Explanation: The accumulator can store temporary results of calculations and is


optimized for arithmetic instructions.

2. BX: This is the base register. It is of 16 bits and is divided into two 8-bit registers
BH and BL to also perform 8-bit instructions. It is used to store the value of the
offset.

●​ Type: 16-bit
●​ Divided into: BH (high) and BL (low)
●​ Primary Use: Stores offsets for memory addressing.
●​ Example:

MOV BX, 500H ; Load 500H into BX​


MOV AL, [BX] ; Move the byte at memory offset 500H into AL

Explanation: BX can point to memory locations, making it useful for accessing data
arrays and tables.
3. CX: This is the counter register. It is of 16 bits and is divided into two 8-bit
registers CH and CL to also perform 8-bit instructions. It is used in looping and
rotation.

●​ Type: 16-bit
●​ Divided into: CH (high) and CL (low)
●​ Primary Use: Loop counters, string operations, and rotations.
●​ Example:

MOV CX, 5​
LOOP_START:​
; Some operation​
LOOP LOOP_START ; Decrements CX and jumps if CX ≠ 0

Explanation: CX automatically decrements in loop instructions, making it ideal for


controlling repetitive operations.

4. DX: This is the data register. It is of 16 bits and is divided into two 8-bit registers
DH and DL to also perform 8-bit instructions. It is used in the multiplication and
input/output port addressing.

●​ Type: 16-bit
●​ Divided into: DH (high) and DL (low)
●​ Primary Use: Multiplication/division, I/O port addressing, extended
arithmetic.
●​ Example:

MOV AX, 10​


MOV BX, 20​
MUL BX ; AX * BX -> DX:AX

Explanation: DX stores the high-order part of the result in multiplication or division,


and it can address I/O ports for input/output instructions.
5. SP: This is the stack pointer. It is of 16 bits. It points to the topmost item of the
stack. If the stack is empty the stack pointer will be (FFFE)H. Its offset address is
relative to the stack segment. It is AB and manage the present position of the top of
the stack.

●​ Type: 16-bit
●​ Primary Use: Points to the top of the stack in memory.
●​ Example:

PUSH AX ; Decrement SP and store AX​


POP BX ; Retrieve value from stack into BX

Explanation: SP automatically changes during stack operations to keep track of the


stack’s top, allowing efficient function calls and local storage.

6. BP:This is the base pointer. It is of 16 bits. It is primarily used in accessing


parameters passed by the stack. Its offset address is relative to the stack segment.

●​ Type: 16-bit
●​ Primary Use: Access parameters passed through the stack (especially in
function calls).
●​ Example:

MOV AX, [BP+4] ; Access parameter passed to function

Explanation: BP is used to reference function parameters or local variables stored on


the stack, making it essential for structured programming in assembly.

7. SI:This is the source index register. It is of 16 bits. It is used in the pointer


addressing of data and as a source in some string-related operations. Its offset is
relative to the data segment.

●​ Type: 16-bit
●​ Primary Use: Pointer to source data in memory for string and array
operations.
●​ Example:

MOV SI, 2000H​


MOV AL, [SI] ; Load value from source address pointed by SI into AL

Explanation: SI is commonly used in string manipulation instructions, such as


MOVSB or LODSB, to point to the source.

[Link]:This is the destination index register. It is of 16 bits. It is used in the pointer


addressing of data and as a destination in some string-related operations. Its offset
is relative to the extra segment.

●​ Type: 16-bit
●​ Primary Use: Pointer to destination memory for string and array
operations.
●​ Example:

MOV DI, 3000H​


MOV [DI], AL ; Store value of AL into memory at DI

Explanation: DI works with string instructions to store data at destination memory


locations efficiently.

11.​ Write down the functions of the flag register.


Ans: The Flag register is a Special Purpose Register. Depending upon the value of result
after any arithmetic and logical operation the flag bits become set (1) or reset (0).
There are total 9 flags in 8086 and the flag register is divided into two types;
Figure: 8086 flag register formal
Status Flags: There are 6 flag registers in 8086 microprocessor which become set(1) or
reset(0) depending upon condition after either 8-bit or 16-bit operation. These flags are
conditional/status flags. 5 of these flags are same as in case of 8085 microprocessor and their
working is also same as in 8085 microprocessor. The sixth one is the overflow flag.

(i) Zero Flag (Z): After any arithmetical or logical operation if the result is 0 (00) H, the zero
flag becomes set i.e. 1, otherwise it becomes reset i.e. 0. 00H zero flag is 1.
from 01 H to FFH zero flag is 0.
1 zero result
0 non-zero result

(ii) Auxiliary Cary Flag (AC): This flag is used in BCD number system (0-9). If after any
arithmetic or logical operation D(3) generates any carry and passes on to B(4) this flag
becomes set i.e. 1, otherwise it becomes reset i.e. 0. This is the only flag register which is not
accessible by the programmer 1-carry out from bit 3 on addition or borrow into bit 3 on
subtraction 0 otherwise.

(iii) Parity Flag (P): If after any arithmetic or logical operation the result has even parity, an
even number of 1 bits the parity register becomes set i.e.1, otherwise it becomes reset i.e. 0, 1
accumulator has even number of 1 bits 0-accumulatorhas odd parity.

(iv) Carry Flag (CY): Carry is generated when performing n bit operations and the result is
more than n bits, then this flag becomes set i.e. 1, otherwise it becomes reset i.e. 0.
During subtraction (A-B), if A > B it becomes reset and if (A < B) it becomes set.
Carry flag is also called borrow flag. 1-carry out from MSB bit, on addition or borrow into
MSB bit on subtraction.
0 - no carry out or borrow into MSB bit.

(v) Overflow Flag (O): This flag will be set (1) if the result of a signed operation is too large
min in the number of bits available to represent it, otherwise reset (0). After any operation, if
D [6] generates any carry and passes to D [7] OR if D [6] does not generates carry but D [7]
generates, overflow flag becomes set, i.e., 1. If D [6] and D [7] both generate carry or both do
not generate any carry, then overflow flag becomes reset, i.e., 0.

Control Flags: The control flags enable or disable certain operations of the microprocessor.
There are 3 control flags in 8086 microprocessor and these are:

(i) Directional Flag (D): This flag is specifically used in string instructions. If directional
flag is set (1), then access the string data from higher memory location towards lower
memory location. If directional flag is reset (0), their access the string data from lower
memory location towards higher memory location.
(ii) Interrupt Flag (I): This flag is for interrupts.
If interrupt flag is set (1), the microprocessor will recognize interrupt requests from the
peripherals if interrupt flag is reset (0), the microprocessor will not recognize any interrupt
requests and will ignore them.

(iii) Trap Flag (T): This flag is used for on-chip debugging. Setting trap flag puts the
microprocessor into single step mode for debugging. In single stepping the microprocessor
executes a instruction and enters into single step ISR. If trap flag is set (1), the CPU
automatically generates an internal interrupt after each instruction, allowing a program to be
inspected as it executes instruction by instruction.

If trap flag is reset (0), no function is performed.

12.​ Discuss the Instruction Pointer (IP) of 8086.


Ans: The Instruction Pointer (IP) is a 16-bit register in the 8086 microprocessor.
It is used to store the offset address of the next instruction that is to be executed in
the program. The Instruction Pointer always works together with the Code Segment
(CS) register.

The Code Segment register holds the base address of the code segment, where the
program instructions are stored, while the Instruction Pointer contains the offset
address of the next instruction within that segment. By combining the values of CS
and IP, the processor can determine the exact physical address of the instruction in
memory.

The physical address of the instruction is calculated using the formula:

Physical Address = CS × 10H + IP

During program execution, the microprocessor fetches instructions from memory.


After each instruction byte is fetched, the Instruction Pointer is automatically
incremented so that it points to the next instruction to be executed. If a branch, jump,
call, or interrupt instruction occurs, the value of the Instruction Pointer is updated
with a new offset address.

For example, if CS = 4321H and IP = 1000H, then the physical address is calculated
as:

CS × 10H = 43210H
Physical Address = 43210H + 1000H = 44210H

Thus, the Instruction Pointer plays an important role in controlling the sequence of
instruction execution in the 8086 microprocessor.
13.​ Describe the status register of 8086.
Ans: The Status Register in the 8086 microprocessor is a part of the 16-bit Flag
Register. It contains flags that indicate the status of the result after arithmetic and
logical operations performed by the processor. These flags help the processor make
decisions during program execution.

The status register consists of six status flags.

1. Carry Flag (CF)

The Carry Flag indicates whether a carry or borrow occurs during arithmetic
operations. It is set to 1 when a carry is generated from the most significant bit,
otherwise it is reset to 0.

2. Parity Flag (PF)

The Parity Flag indicates whether the number of 1s in the result is even or odd. The
flag is set when the result contains even parity.

3. Auxiliary Carry Flag (AF)

The Auxiliary Carry Flag indicates a carry from bit 3 to bit 4 during arithmetic
operations. It is mainly used in BCD (Binary Coded Decimal) arithmetic operations.

4. Zero Flag (ZF)

The Zero Flag is set when the result of an operation becomes zero. If the result is
not zero, the flag is cleared.

5. Sign Flag (SF)

The Sign Flag indicates the sign of the result. It is set when the result is negative and
cleared when the result is positive.

6. Overflow Flag (OF)

The Overflow Flag indicates that the result of a signed arithmetic operation exceeds
the capacity of the register.

Conclusion

Thus, the status register helps the microprocessor identify the result of arithmetic
and logical operations and control program execution based on these conditions.
14.​ Discuss A-bus, B-bus and C-bus in 8086.
Ans:

In the 8086 microprocessor, internal data transfer between registers and the
Arithmetic Logic Unit (ALU) is carried out through three internal buses called A-Bus,
B-Bus, and C-Bus. These buses help in performing arithmetic and logical operations
efficiently.

i. A-Bus

The A-Bus is used to transfer data from one of the registers to the first input of the
ALU. It carries one operand required for arithmetic or logical operations.

Function:

●​ Transfers data from registers to the ALU as the first operand.​

ii. B-Bus

The B-Bus transfers data from another register to the second input of the ALU. It
provides the second operand needed for the operation.
Function:

●​ Transfers data from registers to the ALU as the second operand.​

iii. C-Bus

The C-Bus is used to transfer the result produced by the ALU back to the registers.

Function:

●​ Transfers the result of arithmetic or logical operations from the ALU to the
destination register.​

Conclusion

Thus, the A-Bus and B-Bus supply input data to the ALU, while the C-Bus transfers
the result from the ALU back to the registers, enabling efficient data processing
inside the 8086 microprocessor.

15.​ Discuss A-bus, B-bus and C-bus in 8086.


Ans: A bus: A bus is the internal 16-bit ALU data bus.

B bus: B-bus has no true name but the function of the adder ALU is to
add the shifted 16-bits (Starting Address of 64 Kbyte segment) CS
(Code Segment) to the 16-bits IP(Instruction Pointer Offset into CS for
next instruction) to get the 20-bit Physical Address. The right side of
both diagrams allows the segment registers to be accessed B-bus’s
name would be offset bus.

C bus: C-Bus is the internal 20-bit address bus, 16-bit data bus, and
possibly control
lines of the BIU [Link] bus is bidirectional, because same bus is
used for data transmission from microprocessor to memory location or
input/output device and vice-versa.

16.​ Draw the pin diagram of 8086.


Ans:Let us now discuss the signals in detail −
Power supply and frequency signals

It uses 5V DC supply at VCC pin 40, and uses ground at VSS pin 1 and 20
for its operation.
Clock signal

Clock signal is provided through Pin-19. It provides timing to the


processor for operations. Its frequency is different for different versions,
i.e. 5MHz, 8MHz and 10MHz.

Address/data bus

AD0-AD15. These are 16 address/data bus. AD0-AD7 carries low order


byte data and AD8AD15 carries higher order byte data. During the first
clock cycle, it carries 16-bit address and after that it carries 16-bit data.

Address/status bus

A16-A19/S3-S6. These are the 4 address/status buses. During the first


clock cycle, it carries 4-bit address and later it carries status signals.

S7/BHE

BHE stands for Bus High Enable. It is available at pin 34 and used to
indicate the transfer of data using data bus D8-D15. This signal is low
during the first clock cycle, thereafter it is active.

Read(RD):

It is available at pin 32 and is used to read signal for Read operation.

Ready:

It is available at pin 22. It is an acknowledgement signal from I/O devices


that data is transferred. It is an active high signal. When it is high, it
indicates that the device is ready to transfer data. When it is low, it
indicates wait state.

RESET:

It is available at pin 21 and is used to restart the execution. It causes the


processor to immediately terminate its present activity. This signal is
active high for the first 4 clock cycles to RESET the microprocessor.

INTR:

It is available at pin 18. It is an interrupt request signal, which is sampled


during the last clock cycle of each instruction to determine if the
processor considered this as an interrupt or not.
NMI:

It stands for non-maskable interrupt and is available at pin 17. It is an


edge triggered input, which causes an interrupt request to the
microprocessor.

TEST:

This signal is like wait state and is available at pin 23. When this signal is
high, then the processor has to wait for IDLE state, else the execution
continues.

MN/MX:

It stands for Minimum/Maximum and is available at pin 33. It indicates


what mode the processor is to operate in; when it is high, it works in the
minimum mode and vice-aversa.

INTA:

It is an interrupt acknowledgement signal and id available at pin 24.


When the microprocessor receives this signal, it acknowledges the
interrupt.

ALE:

It stands for address enable latch and is available at pin 25. A positive
pulse is generated each time the processor begins any operation. This
signal indicates the availability of a valid address on the address/data
lines.

DEN:

It stands for Data Enable and is available at pin 26. It is used to enable
Transreceiver 8286. The transreceiver is a device used to separate data
from the address/data bus.

DT/R:

It stands for Data Transmit/Receive signal and is available at pin 27. It


decides the direction of data flow through the transreceiver. When it is
high, data is transmitted out and vice-a-versa.

M/IO:
This signal is used to distinguish between memory and I/O operations.
When it is high, it indicates I/O operation and when it is low indicates the
memory operation. It is available at pin 28.

WR:

It stands for write signal and is available at pin 29. It is used to write the
data into the memory or the output device depending on the status of
M/IO signal.

HLDA:

It stands for Hold Acknowledgement signal and is available at pin 30. This
signal acknowledges the HOLD signal.

HOLD:

This signal indicates to the processor that external devices are requesting
to access the address/data buses. It is available at pin 31.

QS1 and QS0:

These are queue status signals and are available at pin 24 and 25. These
signals provide the status of instruction queue. Their conditions are shown
in the following table −

QS0 QS1 Status

0 0 No operation

0 1 First byte of opcode from the queue

1 0 Empty the queue

1 1 Subsequent byte from the queue


S0, S1, S2

These are the status signals that provide the status of operation, which is
used by the Bus Controller 8288 to generate memory & I/O control
signals. These are available at pin 26, 27, and 28. Following is the table
showing their status −

S2 S1 S0 Status
0 0 0 Interrupt acknowledgement

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
LOCK:

When this signal is active, it indicates to the other processors not to ask
the CPU to leave the system bus. It is activated using the LOCK prefix on
any instruction and is available at pin 29.

RQ/GT1 and RQ/GT0:

These are the Request/Grant signals used by the other processors


requesting the CPU to release the system bus. When the signal is received
by CPU, then it sends acknowledgment. RQ/GT0 has a higher priority than
RQ/GT1.

17.​ Explain the concept of segmented memory.


Ans: Segmented memory is a system of addressing computer memory, which
may be physical or
virtual and may be operating in real or protected mode.

The segmented memory system was used to expand the 64KB limit on
first-generation flat address space. Computers made prior to segmented memory
used a flat addressing system based on a four-digit hexadecimal code. With
hexadecimal, the highest 4-digit number you can create
is FFFF (or 65535), which equals 64KB.

Advantages of Memory Segmentation

●​ It provides a powerful memory management mechanism.


●​ Data related or stack related operations can be performed in different
segments.
●​ Code related operation can be done in separate code segments.
●​ It allows to processes to easily share data.
●​ It allows to extend the address ability of the processor, i.e. segmentation
allows the use of 16
●​ bit registers to give an addressing capability of 1 Megabytes. Without
segmentation, it would require 20 bit registers.
●​ It is possible to enhance the memory size of code data or stack segments
beyond 64 KB by allotting more than one segment for each area.

18.​ Define logical address, segment address and physical


address.
Ans:

Logical Address: A logical address is generated by the CPU while a program runs.
It represents the address from the process’s perspective and does not exist
physically, hence it is also called a virtual address.

Physical Address: A physical address is the real location in main memory (RAM)
where data or instructions are stored. The physical address space consists of all
physical addresses corresponding to logical addresses.

Segment address:Segment address defines the beginning address of any 64K-byte


memory segment offset address selects any location within the 64K byte memory
segment. Page 2. Linear and S. Linear and Segmented Memory.

[Link] is addressing mode? Describe all addressing modes with


example.
Ans: The different ways in which a source operand is denoted in an instruction is
known as addressing modes. There are 8 different addressing modes in 8086
programming −
Immediate addressing mode
The addressing mode in which the data operand is a part of the instruction itself is
known as immediate addressing mode.

Example
MOV CX, 4929 H, ADD AX, 2387 H, MOV AL, FFH
Register addressing mode:
It means that the register is the source of an operand for an instruction.
Example:
MOV CX, AX ;
copies the contents of the 16-bit AX register into;
the 16-bit CX register),
ADD BX, AX

Direct addressing mode:


The addressing mode in which the effective address of the memory location is
written directly in the instruction.
Example
MOV AX, [1592H], MOV AL, [0300H]

Register indirect addressing mode:


This addressing mode allows data to be addressed at any memory location through
an offset address held in any of the following registers: BP, BX, DI & SI.

Example
MOV AX, [BX]; suppose the register BX contains 4895H, then the contents; 4895H
are moved to AX
ADD CX, {BX}

Based addressing mode:


In this addressing mode, the offset address of the operand is given by the sum of
contents of the BX/BP registers and 8-bit/16-bit displacement.

Example
MOV DX, [BX+04], ADD CL, [BX+08]

Indexed addressing mode


In this addressing mode, the operands offset address is found by adding the
contents of SI or DI register and 8-bit/16-bit displacements.

Example
MOV BX, [SI+16], ADD AL, [DI+16]

Based-index addressing mode:


In this addressing mode, the offset address of the operand is computed by summing
the base register to the contents of an Index register.
Example
ADD CX, [AX+SI], MOV AX, [AX+DI]
Based indexed with displacement mode
In this addressing mode, the operands offset is computed by adding the base
register contents. An Index registers contents and 8 or 16-bit displacement.
Example
MOV AX, [BX+DI+08], ADD CX, [BX+SI+16].

You might also like