0% found this document useful (0 votes)
23 views20 pages

Mircroprocessor Question Paper Answer

The document provides detailed explanations of various computer architecture concepts, including the program counter, types of interrupts, stack, A/D converter resolution, data transfer methods, instruction queues, memory-mapped vs isolated I/O, indexed addressing mode, programmable parallel interface ports, segmented memory, and the 8259 interrupt controller. It also discusses the differences between microprocessors and computer systems, addressing capabilities based on address lines, and the need for demultiplexing the bus in microprocessors. Each concept is explained with examples and advantages or disadvantages where applicable.
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)
23 views20 pages

Mircroprocessor Question Paper Answer

The document provides detailed explanations of various computer architecture concepts, including the program counter, types of interrupts, stack, A/D converter resolution, data transfer methods, instruction queues, memory-mapped vs isolated I/O, indexed addressing mode, programmable parallel interface ports, segmented memory, and the 8259 interrupt controller. It also discusses the differences between microprocessors and computer systems, addressing capabilities based on address lines, and the need for demultiplexing the bus in microprocessors. Each concept is explained with examples and advantages or disadvantages where applicable.
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
You are on page 1/ 20

Question -- What is Program Counter?

Answer -- A program counter is a register in a computer processor that contains the address (location) of
the instruction being executed at the current time. As each instruction gets fetched, the program counter
increases its stored value by 1. After each instruction is fetched, the program counter points to the next
instruction in the sequence. When the computer restarts or is reset, the program counter normally reverts to 0.
In computing, a program is a specific set of ordered operations for a computer to perform. An instruction is an
order given to a computer processor by a program. Within a computer, an address is a specific location
in memory or storage. A register is one of a small set of data holding places that the processor uses.
Question -- Differentiate between hardware and software interrupts ?
Answer -- 1. Hardware Interrupt : Hardware Interrupt is caused by some hardware device such as request to
start an I/O, a hardware failure or something similar. Hardware interrupts were introduced as a way to avoid
wasting the processor’s valuable time in polling loops, waiting for external events.
For example, when an I/O operation is completed such as reading some data into the computer from a tape
drive.
• An interrupt generated by a mouse when a button is clicked
• An interrupt generated by a network card when data is received
• An interrupt generated by a disk drive when a read or write operation is completed
2. Software Interrupt : Software Interrupt is invoked by the use of INT instruction. This event immediately
stops execution of the program and passes execution over to the INT handler. The INT handler is usually a
part of the operating system and determines the action to be taken. It occurs when an application program
terminates or requests certain services from the operating system.
For example, output to the screen, execute file etc.
• A system call to read or write data to a file
• A division by zero exception
• A page fault exception
Question -- What is a stack?
MN/MX is a pin on the 8086 processor that indicates what mode the processor should operate in12345. In
minimum mode, the 8086 itself generates all bus control signals, while in maximum mode, the three status
signals are to be decoded to generate all the bus control signals1. When MN/MX is high, the 8086 processor
operates at minimum mode, and when it is low, the 8086 processor operates at maximum mode of
operation23. The MN/MX pin is connected to the ground to operate the 8086 in maximum mode5.Answer --
The SHLD instruction is a mnemonic in the 8085 microprocessor instruction set. It stands for “Store HL pair
using Direct addressing in memory location”. Here’s how it works:
• The SHLD instruction is used to store the contents of the HL register pair in two consecutive memory
locations, starting at a specified 16-bit address (denoted as a16).
• The contents of the H and L registers, which are 8-bit registers, are stored in these two consecutive
memory locations, as each memory location can hold 8 bits of data.
• The instruction uses absolute addressing mode to specify the destination.
• It occupies 3 bytes in memory.
Question -- Define resolution of a A/D converter.
Answer -- The resolution of an Analog-to-Digital (A/D) converter refers to the number of distinct or discrete
values it can produce over the range of analog input values. It is often measured in bits, with a higher number
of bits indicating a higher resolution. The resolution plays a crucial role in determining the quantization error
and the signal-to-noise ratio of the conversion. The type and speed of the A/D converter can affect its
resolution. For instance, pipeline A/D converters are typically used for medium resolutions of 8 to 12 bits and
medium-to-high-speed conversions of 1 to 80 Msamples/s.
Question -- Differentiate between synchronous and asynchronous data transfer.
Answer -- Synchronous Transmission: In Synchronous Transmission, data is sent in form of blocks or frames.
This transmission is the full-duplex type. Between sender and receiver, synchronization is compulsory. In
Synchronous transmission, There is no gap present between data. It is more efficient and more reliable than
asynchronous transmission to transfer a large amount of data.
Example:Chat Rooms, Telephonic Conversations, Video Conferencing
Asynchronous Transmission: In Asynchronous Transmission, data is sent in form of byte or character. This
transmission is the half-duplex type transmission. In this transmission start bits and stop bits are added with
data. It does not require synchronization.
Example:Email, Forums, Letters
S.
No. Synchronous Transmission Asynchronous Transmission

In Synchronous transmission, data is sent in In Asynchronous transmission, data is sent in form


1. form of blocks or frames. of bytes or characters.

2. Synchronous transmission is fast. Asynchronous transmission is slow.

3. Synchronous transmission is costly. Asynchronous transmission is economical.

In Synchronous transmission, the time interval In Asynchronous transmission, the time interval of
4. of transmission is constant. transmission is not constant, it is random.

In this transmission, users have to wait till the Here, users do not have to wait for the completion
transmission is complete before getting a of transmission in order to get a response from the
5. response back from the server. server.

In Synchronous transmission, there is no gap In Asynchronous transmission, there is a gap present


6. present between data. between data.

While in Asynchronous transmission, the


Efficient use of transmission lines is done in
transmission line remains empty during a gap in
synchronous transmission.
7. character transmission.

The start and stop bits are not used in The start and stop bits are used in transmitting data
8. transmitting data. that imposes extra overhead.

Synchronous transmission needs precisely Asynchronous transmission does not need


synchronized clocks for the information of new synchronized clocks as parity bit is used in this
9. bytes. transmission for information of new bytes.

Errors are detected and corrected when the data is


Errors are detected and corrected in real time.
10. received.
S.
No. Synchronous Transmission Asynchronous Transmission

High latency due to processing time and waiting for


Low latency due to real-time communication.
11. data to become available.

Question -- What is the function of instruction queue in 8086?


Answer -- The instruction queue in the 8086 microprocessor is a type of buffer where instructions are pre-
fetched and stored. The purpose of this queue is to speed up the execution process by having the next
instructions ready for execution before they are needed. This is done by fetching up to six instruction bytes from
memory during any memory access cycle.
Question -- What is the role of pin MN/MX in 8086?
Answer --MN/MX is a pin on the 8086 processor that indicates what mode the processor should operate
in12345. In minimum mode, the 8086 itself generates all bus control signals, while in maximum mode, the three
status signals are to be decoded to generate all the bus control signals1. When MN/MX is high, the 8086
processor operates at minimum mode, and when it is low, the 8086 processor operates at maximum mode of
operation23. The MN/MX pin is connected to the ground to operate the 8086 in maximum mode5.
Question -- List two advantages and disadvantages of memory-mapped I/O and Isolated Memory .
Answer -- Advantages of Memory-Mapped I/O: Faster I/O Operations: Memory-mapped I/O allows the
CPU to access I/O devices at the same speed as it accesses memory. This means that I/O operations can be
performed much faster compared to isolated I/O.
Simplified Programming: Memory-mapped I/O simplifies programming as the same instructions can be used
to access memory and I/O devices. This means that software developers do not have to use specialized I/O
instructions, which can reduce programming complexity.
Efficient Use of Memory Space: Memory-mapped I/O is more memory-efficient as I/O devices share the
same address space as the memory. This means that the same memory address space can be used to access
both memory and I/O devices.
Disadvantages of Memory-Mapped I/O: Limited I/O Address Space: Memory-mapped I/O limits the I/O
address space as I/O devices share the same address space as the memory. This means that there may not
be enough address space available to address all I/O devices.
Slower Response Time: If an I/O device is slow to respond, it can delay the CPU’s access to memory. This
can lead to slower overall system performance.
Advantages of Isolated I/O:
Large I/O Address Space: Isolated I/O allows for a larger I/O address space compared to memory-mapped
I/O as I/O devices have their own separate address space.
Greater Flexibility: Isolated I/O provides greater flexibility as I/O devices can be added or removed from the
system without affecting the memory address space.
Improved Reliability: Isolated I/O provides better reliability as I/O devices do not share the same address
space as the memory. This means that if an I/O device fails, it does not affect the memory or other I/O
devices.
Disadvantages of Isolated I/O:
Slower I/O Operations: Isolated I/O can result in slower I/O operations compared to memory-mapped I/O
as it requires the use of specialized I/O instructions.
More Complex Programming: Isolated I/O requires specialized I/O instructions, which can lead to more
complex programming.
Question -- What is Indexed addressing mode? Explain with example
Answer -- In the indexed addressing mode, the content of a given index register gets added to an instruction’s
address part so as to obtain the effective address. Here, the index register refers to a special CPU register that
consists of an index value. An instruction’s address field defines the beginning address of any data array
present in memory. Consider the instruction given below, for instance:
Load R2, A
Load R3, (R2)
Load R4, 4(R2)
Load R5, 8(R2)
Load R6, 12(R2)
The instructions given above will load the R3, R4, R5, R6 registers, along with the contents that are present at
the successive memory addresses correspondingly from the memory location A.
Question -- Describe a programmable parallel Interface Port IC and its interfacing with the microprocessor.
Answer -- A Programmable Parallel Interface (PPI) is a versatile input-output device that can be used to
transfer data under various conditions, from simple input-output to interrupt input-output1. It’s a general-
purpose I/O device that can be used with almost any microprocessor12.The Intel 8255A is a commonly used
PPI1. It has 24 I/O pins that can be grouped into two 8-bit parallel ports: A and B, and an 8-bit port C12. Port C
can be further divided into two 4-bit ports12.The PPI operates in two modes: Bit Set Reset (BSR) mode and
Input/Output (I/O) mode12. In BSR mode, only Port C bits are used for set and reset12. In I/O mode, it is
further divided into three categories: Mode 0, Mode 1, and Mode 212.
To interface the PPI with a microprocessor, three steps are necessary: 1. Determine the addresses of Port
A, B, C, and Control register according to Chip Select Logic and the Address lines A0 and A11. 2. Write a
control word in the control register1. 3. Write I/O instructions to communicate with peripherals through port
A, B, C1.
The PPI can improve system performance by offloading I/O operations from the CPU, allowing the CPU to
focus on other tasks while the PPI handles the data transfer1. It’s flexible and can be easily programmed and
interfaced with other devices, making it suitable for a variety of applications1.
Question -- What is the concept of segmented memory? What are the advantages of it?
Answer -- Segmentation is the process in which the main memory of the computer is logically divided into
different segments and each segment has its own base address. It is basically used to enhance the speed of
execution of the computer system, so that the processor is able to fetch and execute the data from the
memory easily and fast.
Advantages of the Segmentation The main advantages of segmentation are as follows:
• 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.
Question -- Discuss 8259 and its interfacing with a microprocessor of your choice
Answer -- The Intel 8259 is a Programmable Interrupt Controller (PIC) designed for Intel 8085 and Intel 8086
microprocessors. It combines multiple interrupt input sources into a single interrupt output, thereby extending
the interrupt levels available in a system beyond the one or two levels found on the processor chip. When
interfacing a single PIC, it provides 8 interrupts inputs from IR0-IR71. For instance, interfacing of 8085 and 8259
increases the interrupt handling capability of the 8085 microprocessor from 5 to 8 interrupt levels. Let’s discuss
its interfacing with the 8085 microprocessor as an example:
1. The data lines of an 8259A are connected to the AD0-AD7 of the system data bus, RD and WR signals are
connected to the system RD and WR lines.
2. The interrupt request signal INT from the 8259A is connected to the INTR input of the 8085 and INTA
from the 8085 is connected to INTA of the 8259A.
3. As we are using a single 8259A in the system, SP/EN pin is tied high and CAS0-CAS2 lines are left open.
4. The eight IR inputs are available for interrupt signals. Unused IR inputs should be tied to ground so that
a noise pulse cannot accidentally cause an interrupt
Question -- What is difference between a microprocessor and a computer system?
Answer -- The main differences between a computer and a microprocessor are12345:
• A computer is a large machine, while a microprocessor is a small chip.
• Computers have their memory installed within them, but microprocessors need external memory.
• Computers have graphical user interfaces, while microprocessors do not.
• A CPU is the central processing unit of a computer, while a microprocessor is a smaller, more specialized
type of CPU used in embedded systems and other devices.
• A CPU can perform a wide range of tasks, while a microprocessor is designed to perform a specific set of
functions.
Question -- How many memory locations can be addressed by a microprocessor with 4 address lines?
Answer -- A microprocessor with 4 address lines can address 2^4 = **16 memory locations**. This is because
each address line can be either a 0 or a 1, and with 4 lines, there are 2^4 or 16 possible combinations. Each
combination corresponds to a unique memory location that the microprocessor can address.
Question -- Explain in brief the need of de-multiplexing the bus AD0-AD7?
Answer -- The 8085 microprocessor uses a multiplexed data bus and address bus, which means the lower
address bus (A7 – A0) and the data bus (D7 – D0) are available on the same pins AD7 – AD01. This multiplexing
is done to reduce the number of pins of 80851. However, external memory or I/O devices need the separate 16-
bit address A15 – A0 for decoding and selecting a device and separate D7 – D0 for data transfer1. So, the
multiplexed address-data bus must be demultiplexed so that the memory and I/O devices will have a separate
address bus A15 – A0 and data bus D7 – D0. The demultiplexing can be done with the help of the ALE signal
(Address Latch Enable) given out by the processor for this purpose. The lower byte of address (A0 – A7) is
available from AD0 – AD7 during the T1 of the machine cycle. But the lower byte of address (A0 – A7), along
with the upper byte A8 – A15, must be available during T2 and the rest of the machine cycle to access memory
location or I/O ports . Now, ALE signal goes high at the beginning of T1 of each machine cycle and goes low at
the end of T1 and remains low during the rest of the machine cycle. This high to low transition of ALE signal at
the end of T1 is used to latch the lower order address byte (A0 – A7) by the latch IC 74LS373 so that the lower
byte A0 – A7 is continued to be available till the end of the machine cycle.
Question -- Specify the 8085 signals that are used to enable an input port?
Answer -- The 8085 microprocessor uses several signals to enable an input port:
1. **Control Signals**: When the microprocessor wants to read data from an input device, it activates the buffer
by asserting the enable input of the buffer¹. This is done using control signals from the microprocessor¹. 2.
**Read Command (RD')**: The microprocessor initiates a read command to read this data¹. The RD' signal
controls the READ operation. When it is low, the selected memory or input-output device is read². 3.
**Address and Data Buses**: The address bus and data bus are also involved in enabling an input port. The
address bus carries the address for the input-output device or memory², and once the buffer is enabled, data
from the input device is available on the data bus¹. 4. **IO/M' Signal**: This is a status signal which
determines whether the address is for an input-output device or memory. When it is high (1), the address on
the address bus is for an input-output device².
Question -- List four categories of 8085 instructions that manipulate data.
Answer – 1. arithmatic instruction 2. logical instruction 3. data transfer instruction 4. branch instruction
Question -- What operation can be performed by using the instructions LXI? Specify the status of Z and CY.
Answer -- The LXI instruction in a microprocessor is used to load a 16-bit address into a register pair¹. This
instruction can be used to load data from a memory location using the memory address, which is stored in the
register pair¹. For example, if the instruction is LXI H, FE50, it means that the FE50 is loaded into the HL register
pair¹. The register pair can be BC, DE, HL or SP¹.
As for the status of Z (Zero) and CY (Carry) flags:
-The Zero flag (Z) becomes set (i.e., 1) after any arithmetical or logical operation if the result is 0 (00)H. Otherwise,
it becomes reset (i.e., 0)⁵.
- The Carry flag (CY) becomes set (i.e., 1) when performing n-bit operations and the result is more than n bits.
During subtraction (A-B), if A>B it becomes reset, and if A<B it becomes set⁵. Carry flag is also called the borrow
flag⁵.
Question -- List the operating modes of programmable peripheral interface.
Answer -- The Programmable Peripheral Interface (PPI) has several operating modes¹²³:
1. **Bit Set Reset (BSR) Mode**: In this mode, only port C bits are used for set or reset¹².
2. **Input-Output Mode**: This mode is further divided into three sub-modes¹²:
- **Mode 0 (Simple Input- Output Mode)**: In this mode, all the three ports (port A, B, C) can work as simple
input function or simple output function¹².
- **Mode 1 (Strobed I/O or I/O with Handshake)**: In this mode, either port A or port B can work as simple
input port or simple output port, and port C bits are used for handshake signals before actual data transmission¹².
- **Mode 2 (Bi-directional I/O)**: In this mode, only port A works, and port B can work either in mode 0 or
mode 1. 6 bits of port C are used as handshake signals¹².
These modes allow the PPI to interface the CPU with its outside world such as ADC, DAC, keyboard etc¹. We can
program it according to the given condition¹.
Question -- Specify the conditions to start the timer.
Answer -- In a microprocessor, the timer can be started under certain conditions. Here are the steps typically
involved in starting a timer:
1. **Selecting a Clock Source**: The timer needs a clock source or timebase. There are often several possible
clock sources and one is selected with a switch or multiplexer².
2. **Setting a Divide Factor for the Prescaler**: To increase the count range, the selected clock goes to a
"prescaler" which divides the clock before it goes to a main counter².
3. **Setting a Modulus Value**: The count range of the main counter is set by a "modulus" value (M) stored in
a register².
4. **Setting Various Control Bits**: Control bits are set as part of the initial configuration².
5. **Enabling a Processor Interrupt**: If used, a processor interrupt is enabled².
6. **Setting up Trigger Conditions**: If triggering a DMA operation or other peripheral, trigger conditions are
set up².
Question -- Draw the basics of computer systems and explain in brief the function of each block
Answer -- The basic components of a computer system are:
1. **Input Unit**: This unit receives data from input devices like keyboard, mouse etc.
2. **Central Processing Unit (CPU)**: This is the brain of the computer where all processing of data takes place.
It interprets and carries out the basic instructions that operate a computer.
3. **Output Unit**: This unit sends the processed data to output devices like monitor, printer etc.
4. **Arithmetic Logic Unit (ALU)**: This is where all arithmetic operations (like addition, subtraction,
multiplication etc.) and logical operations (like comparing numbers) take place.
5. **Control Unit**: This unit controls the flow of data between the CPU, memory, and input/output devices. It
manages and coordinates all the hardware components of a computer.
6. **Memory Unit**: This unit stores data, information and instructions. It is a fast storage area since it can be
accessed directly by the CPU

.
Question -- What are various types of memory used in computer system and their properties?
Answer -- Sure, here are the various types of memory used in a computer system:

1. **Primary Memory**: This is the main memory of the computer system. Access to primary memory is
typically faster, making it ideal for active programs. It's further divided into two types:
- **Random Access Memory (RAM)**: This is volatile memory, meaning it loses its contents when the
computer is powered off. It provides temporary storage for data that's being actively processed by the CPU.
- **Read Only Memory (ROM)**: This is non-volatile memory, meaning it retains its contents even when the
computer is switched off. ROM stores firmware or software that boots up the computer and performs
diagnostics.
2. **Secondary Memory**: This type of memory is used for long-term storage of data. It's non-volatile and can
retain stored information even without power. Examples include hard drives, SSDs, USB drives, etc.
3. **Cache Memory**: This is a small-sized type of volatile memory that provides high-speed data access to a
processor and stores frequently used computer programs, applications and data. Cache memory speeds up the
data transfer between RAM and the central processing unit (CPU).
4. **Virtual Memory**: This is a memory management technique that creates an illusion to users of a very large
(main) memory. It uses hardware and software to allow a computer to compensate for physical memory
shortages, by temporarily transferring data from RAM to disk storage.
Memory in a computer system has several properties, including:
1. **Volatility**: Memory can be either volatile or non-volatile. Volatile memory loses its stored information
when power is turned off. For example, RAM is volatile. Non-volatile memory retains its information even when
power is turned off. Examples include ROM and hard drives.
2. **Mutability**: Some types of memory are mutable (can be changed), while others are immutable (cannot
be changed). For example, data stored in RAM can be changed, while data stored in ROM cannot be changed
easily.
3. **Accessibility**: Memory can be randomly accessible, which means any byte of memory can be accessed
without touching the preceding bytes. RAM is an example of this. Other types of memory, like tapes or CDs, are
sequentially accessible.
4. **Addressability**: Each byte of memory in a computer system has a unique address. The CPU uses these
addresses to read data from and write data to memory.
5. **Capacity**: This refers to the amount of data that can be stored in memory. It's typically measured in bytes
or multiples thereof (KB, MB, GB, TB).
6. **Performance**: This refers to the speed at which data can be read from or written to memory. It's usually
measured in nanoseconds.
Question -- What is the word length of a microprocessor?
Answer -- The word length of a microprocessor is the maximum number of bits it can accept as input, process,
or deliver as output⁴⁵. It depends upon the width of the internal data bus, registers, ALU, etc³. For instance, an
8-bit microprocessor can process 8-bit data at a time³. The word length can range from 4 bits to 64 bits
depending upon the type of the microcomputer³. For example, the word length of 8085 is 8 bits and for 8086 it
is 16 bits⁴⁵.
Question -- What is the function of PUSH instruction in 8085?
Answer -- The `PUSH` instruction in 8085 microprocessor is used to save the contents of a register pair onto the
stack memory. This allows us to store a temporary copy of the data for later use. The `PUSH` instruction works
on PSW, B-C, D-E, and H-L register pairs. When we use `PUSH`, the stack pointer is decremented by two memory
locations. It's important to note that `PUSH` is a memory write operation, which is slower than a memory read
operation in 8085. This instruction can be very useful in situations where we need to temporarily store data
during the execution of a program.
Question -- What is the function of BIU of 8086 microprocessor?
Answer -- The Bus Interface Unit (BIU) of the 8086 microprocessor is responsible for performing several
functions:
1. **Fetching Instructions**: It retrieves instructions from the memory.
2. **Decoding Instructions**: It interprets the instructions that have been fetched.
3. **Managing Data Transfers**: It oversees the transfer of data between the microprocessor and memory or
I/O devices.
4. **Performing Read and Write Operations**: It carries out read and write operations on data in memory and
external devices.
5. **Sending Out Addresses**: It dispatches addresses.
6. **Accessing Memory**: It accesses memory by combining data information and address to generate a 20-bit
physical address.
7. **Transferring Data**: It transfers data from and to memory.
8. **Relocating Addresses of Operands**: It changes the addresses of operands.
Question -- State advantages and disadvantages of queue of 8086 microprocessor?
Answer -- Advantages of Queue:
1. A large amount of data can be managed efficiently with ease.
2. Operations such as insertion and deletion can be performed with ease as it follows the first in first out
rule.
3. Queues are useful when a particular service is used by multiple consumers.
4. Queues are fast in speed for data inter-process communication.
5. Queues can be used in the implementation of other data structures.
Disadvantages of Queue:
1. The operations such as insertion and deletion of elements from the middle are time consuming.
2. Limited Space.
3. In a classical queue, a new element can only be inserted when the existing elements are deleted from
the queue.
4. Searching an element takes O(N) time.
5. Maximum size of a queue must be defined prior.
Question -- List the index registers of 8086 microprocessor.
Answer -- The 8086 microprocessor has four index registers¹³:
1. **SI (Source Index)**: This is a 16-bit register used in the pointer addressing of data and as a source in some
string-related operations. Its offset is relative to the data segment¹.
2. **DI (Destination Index)**: This is a 16-bit register used in the pointer addressing of data and as a destination
in some string-related operations. Its offset is relative to the extra segment¹.
3. **BX (Base Register)**: This is a 16-bit register that can be used when computing the memory address of an
operand, which is the sum of this register and a displacement³.
4. **BP (Base Pointer)**: This is a 16-bit register that can also be used when computing the memory address of
an operand, which is the sum of this register and a displacement³.
Question -- How is pipelining implemented in 8086?
Answer -- Pipelining in the 8086 microprocessor is implemented through a mechanism known as the **prefetch
queue**.
1. The 8086 microprocessor has a **Bus Interface Unit (BIU)** that is responsible for performing all external bus
operations, such as instruction fetching and memory and I/O read/write operations.
2. The BIU fetches instructions from the memory while the Execution Unit (EU) is executing other instructions.
These fetched instructions are stored in a **6-byte prefetch queue**.
3. The prefetch queue operates on a **first-in-first-out (FIFO)** basis. This means that the first instruction that
enters the queue is the first one to be executed by the EU.
4. The BIU keeps the queue filled with instructions so that the EU can continuously pull instructions for execution.
The queue is refilled when at least 2 bytes are empty.
5. However, whenever a **branch instruction** (like JMP, JZ, etc.) is encountered, the prefetch queue is flushed
and refilled starting from the new instruction location specified by the branch instruction.
This mechanism allows the 8086 microprocessor to fetch the next instruction while executing the current
instruction, thereby increasing its execution speed and efficiency.
Question -- What is an assembler directive? Explain the following assembler directive with example :
a) PUBLIC b) PROC c) MACRO d) DB
Answer -- An **assembler directive** is an instruction that gives direction to the assembler to perform a certain
task during the assembly process¹. These directives control the organization of the program and provide
necessary information to the assembler to understand the assembly language programs to generate necessary
machine codes¹. They are also known as pseudo-instructions or pseudo-opcodes¹.
Here are the explanations and examples of the assembler directives you asked for:
1. **PUBLIC**: The PUBLIC directive is used to instruct the assembler that a specified name or label will be
accessed from other modules⁶. For example, `PUBLIC DIVISOR, DIVIDEND` makes the two variables DIVISOR and
DIVIDEND available to other assembly modules⁶.
2. **PROC**: The PROC directive is used to identify the start of a procedure⁶. For instance, `SMART PROC FAR`
identifies the start of a procedure named as SMART and instructs the assembler that the procedure is far⁶.
3. **MACRO**: The MACRO directive informs the assembler about the beginning of a macro along with defining
name and parameters[^10^]. The ENDM directive indicates the termination of macro¹. For example:
```
macroname MACRO argument1, argument2,...
; Macro body
ENDM
```
This defines a macro named `macroname` with arguments `argument1`, `argument2`, etc., and a body that
contains the code to be replaced wherever this macro is invoked.
4. **DB (Define Byte)**: The DB directive is used to declare a byte-type variable or to store a byte in memory
location¹³. For example, `PRICE DB 49h, 98h, 29h` declares an array of 3 bytes named as PRICE and initializes it
with specified values¹³.
Question -- What are the various specifications of A/D converter?
Answer --- The specifications of an Analog-to-Digital Converter (ADC) include¹:
1. **Resolution**: This refers to the smallest change in the signal which is accepted for conversion. It is given as
1/2n, where ‘n’ is the number of bits in the digital output word¹.
2. **Quantization error**: This is the uncertainty about the exact value of Vi when the output is a particular
binary combination. Its value is ± (1/2) LSB¹.
3. **Conversion time**: This is the total time required for an ADC to convert an analog signal to digital output.
It depends on the conversion technique and propagation delay of the circuit components¹.
4. **Analog error**: This error occurs due to variations in DC switching point of the comparator, resistors,
reference voltage source, ripples, and noises introduced by the circuit components¹.
5. **Linearity error**: This indicates the difference between the transitions for a minimum step of input voltage
change¹.
6. **Differential Non-Linearity (DNL) Error**: The deviation from this 1 LSB value is called as DNL error¹.
7. **Integral Non-Linearity (INL) Error**: The deviation of characteristics of an ADC due to missing codes causes
INL error¹.
8. **Input Voltage Range**¹.
Question -- What are the various modes of 8259A?
Answer -- The 8259A Programmable Interrupt Controller operates in several modes:
1. **Interrupt drive mode**: In this mode, 8259 interrupts the processor with the INT pin whenever it gets an
interrupt.
2. **Polled mode**: In this mode, the INT output is not used. The microprocessor checks the status of the
interrupt request by issuing the poll command.
3. **Fully nested mode**: This mode allows the comparison of IDs of different 8259s cascaded together.
4. **Special fully nested mode (SFNM)**: This is a variation of the fully nested mode.
5. **Rotating priority mode**: This mode allows the priority of the interrupts to be rotated.
6. **Special mask mode**: This mode allows the masking of interrupts.
Question -- What are the functions of ALE, HOLD and HLDA Signals?
Answer -- The functions of HOLD, and HLDA signals in a microprocessor are as follows:
- **HOLD**: It indicates when another device is requesting the use of address and data bus (like a DMA
controller). After receiving a HOLD request, the microprocessor will relinquish the use of the buses as soon as
the current machine cycle is completed
- **HLDA (Hold Acknowledge)**: It indicates that a HOLD request has been received by the microprocessor. After
the removal of HOLD request, the HLDA goes low
Question -- Give the difference between features of 8085 and 8086 microprocessors
Answer --
8085 microprocessor 8086 microprocessor

The data bus is 8 bits. The data bus is 16 bits.

The address bus is 16 bits. The address bus is 20 bits.

The memory capacity is 64 KB. Also, 8085 Can


Perform Operation Up to 28 i.e. 256 numbers. A The memory capacity is 1 MB. Also, 8086 Can
number greater than this is to be taken multiple Perform operations up to 216 i.e. 65,536 numbers.
times in an 8-bit data bus.

The input/output port addresses are 8 bits. The input/output port addresses are 16 bits.
8085 microprocessor 8086 microprocessor

The operating frequency is 5 MHz, 8 MHz, and 10


The operating frequency is 3.2 MHz.
MHz.

8086 MP has Two Modes Of Operation. 1.


8085 MP has a Single Mode Of Operation. Minimum Mode = Single CPU PROCESSOR 2.
Maximum Mode = Multiple CPU PROCESSOR.

It does not have multiplication and division


It has multiplication and division instructions.
instructions.

It does not support an instruction queue. It supports an instruction queue.

Memory space is not segmented. Memory space is segmented.

It consists of 9 flags(Overflow Flag, Direction Flag,


It consists of 5 flags(Sign Flag, Zero Flag, Auxiliary
Interrupt Flag, Trap Flag, Sign Flag, Zero Flag,
Carry Flag, Parity Flag, and Carry Flag).
Auxiliary Carry Flag, Parity Flag, and Carry Flag).

It is a low-cost Microprocessor It is a comparatively High-cost Microprocessor.

There are 5 Addressing Modes. There are 11 addressing modes.

There is no concurrency in Fetching, Decoding, and There is Concurrency in Fetching, Decoding, and
execution. Execution because of the instruction queue.

It has almost 6500 transistors. It has almost 29000 transistors.

It is General Purpose Registers(GPR) based


It is Accumulator based Microprocessor because
microprocessor because there is no specific
Accumulator contains major activity in ALU
Accumulator attached to the input of ALU. all GPRs
Operations in store and updating calculations.
are connected with it via Bus.

It needed more external hardware. Because here


more than 1 processor works and an additional
It needed less external hardware.
external processor can also be employed as per
requirements.

Question -- What is the function of LDA and STA instruction?


Answer -- LDA and STA instructions are used to move data between memory and the accumulator. LDA is used
to load the accumulator from the memory. It copies the memory word denoted by the effective address to the
register. STA is used to store the accumulator value to the memory location. It saves the content of the register
into the memory word that is defined by the effective address.
Question -- Define Machine cycle, T state and instruction cycle
Answer --- **Machine Cycle**: This is the time required to complete one operation of accessing memory, I/O,
or acknowledging an external request. This cycle includes several T-states.
- **T-State**: This is one subdivision of the operation performed in one clock period. It is the time corresponding
to one clock period. A machine cycle consists of three to six T-states.
- **Instruction Cycle**: This is the time required to complete the execution of an instruction. It may consist of
several machine cycles.
Question -- What are the functions of flags in microprocessors?
Answer -- Flags in microprocessors serve several important functions:
1. **Indicate the status of operations**: Flags are used to indicate the status of the arithmetic and logic
operations performed by the processor. For example, if an operation results in a zero, the zero flag is set.
2. **Control flow of program**: Certain flags can control the flow of the program. For example, a jump
instruction may be executed if a certain flag is set.
3. **Error detection**: Flags can also be used for error detection. For example, an overflow flag is set when an
arithmetic operation results in a value that is too large to be represented by the processor.
4. **Enable processor to make decisions**: Flags can enable the processor to make decisions based on the
outcome of the operations. For example, based on the status of the carry flag, the processor may decide to
execute certain instructions.
Question -- What is the difference between bi-directional I/O and strobed I/O?
Answer -- Bi-directional I/O and strobed I/O are two different modes of operation for interfacing with peripheral
devices.
Bi-directional I/O (Mode 2):
- This mode allows communication with a peripheral device on a single 8-bit I/O data bus in both directions, i.e.,
for both transmitting and receiving data.
- It uses more handshake lines than the uni-directional mode, which is the strobed I/O.
- It is beneficial when the microprocessor sometimes receives information and sometimes sends information to
the Input Output device.
- An example of this can be the communication process with a floppy disk controller card.
Strobed I/O (Mode 1):
- In this mode, a port works as either an input port or an output port.
- It is uni-directional and uses fewer handshake lines than the bi-directional mode.
In summary, the main difference lies in the direction of data flow. Bi-directional I/O allows for two-way
communication, while strobed I/O is uni-directional.
Question -- Differentiate memory mapped I/O and peripheral mapped I/O in case of 8085 microprocessor.
Answer -- In the 8085 microprocessor, there are two methods of interfacing input/output (I/O) devices: memory-
mapped I/O and peripheral (I/O) mapped I/O².
**Memory-Mapped I/O**:
- I/O devices are treated as memory locations and not any separate I/O peripherals⁵.
- They are assigned with 16-bit address values².
- The same bus and control signals used for memory access are used for I/O access as well².
- Data transfer can occur between any microprocessor register and I/O¹.
- Instructions like LDA, STA, etc. are used².
- More hardware is needed to decode 16 Bit address¹.
**Peripheral (I/O) Mapped I/O**:
- I/O devices are mapped to a separate I/O address space that is different from the memory address space².
- They are assigned with 8-bit address values².
- The microprocessor uses special instructions to access the I/O devices using specific I/O address signals, which
are separate from the memory address signals².
- Data transfer can only occur between I/O and accumulator¹.
- Instructions like IN, OUT are used².
- Less hardware is needed to decode 8 Bit address¹.

In summary, the main difference lies in how the I/O devices are addressed and accessed by the microprocessor.
Memory-mapped I/O treats I/O devices as memory locations, while peripheral mapped I/O treats them as
separate entities with their own address space.
Question -- What do you mean by directives? Discuss any three assembler directives.
Answer -- Assembler directives are instructions used by the assembler during the assembly of a source program.
They are commands or instructions that control the operation of the assembler¹. These instructions are provided
to the assembler, not the processor, as the processor has nothing to do with these instructions¹. They are also
known as pseudo-instructions or pseudo-opcodes¹.
Here are three examples of assembler directives:
1. **DB (Define Byte)**: This directive is used for allocating and initializing single or multiple data bytes. For
example, if a memory name AREA has three consecutive locations where 30H, 52H, and 35H are to be stored,
the DB directive would be used¹.
2. **DW (Define Word)**: It is used for initializing single or multiple data words (16-bit). For instance, if two 16-
bit data 1020H and 4216H are to be stored at four consecutive locations in the memory MARK, the DW directive
would be used¹.
3. **END**: This directive is used at the time of program termination. It tells the assembler that this is the end
of the program module³.
These directives help in controlling the generation of machine codes from assembly language¹. However,
machine codes are only generated for the program that must be provided to the processor and not for assembler
directives because they do not belong to the actual program¹.
Question – Discuss the significance of Accumulator in 8085
Answer -- The accumulator in the 8085 microprocessor is of great significance due to its multiple roles in the
operation of the processor. Here are some key points:
1. Arithmetic and Logical Operations: The accumulator is primarily used to perform arithmetic and logical
operations. This includes addition, subtraction, and bitwise operations.
2. Temporary Storage: The accumulator also serves as a temporary storage location for data. This is
particularly useful when data needs to be manipulated or transformed before being used in
computations.
3. Data Input/Output: Any data input/output to/from the microprocessor takes place via the accumulator.
This makes it a crucial component in the communication between the microprocessor and other devices
or components.
4. Efficiency: Using the accumulator for these tasks contributes to the efficiency of the microprocessor’s
operation. It allows for quicker computations and data manipulation, which can significantly enhance
the performance of the microprocessor.
In summary, the accumulator is a vital part of the 8085 microprocessor due to its central role in computations,
data storage, and communication.
Question – Evaluate the role of temporary registers in 8085.
Answer -- The temporary registers in the 8085 microprocessor play a crucial role in its operation. They are used
internally by the 8085 to hold temporary data during the execution of some instructions. Here’s a brief overview
of their roles:
1. Temporary Data Register: This register is used to hold immediate data during the execution of certain
instructions. For example, when an instruction like MVI A, 32H is executed, the immediate data 32H is
first loaded into the temporary data register and then moved to the accumulator.
2. W and Z Registers: These are two 8-bit registers that can be paired together as a 16-bit register pair (WZ).
They are used for temporary storage during the execution of program instructions. For example, during
a CALL instruction, the return address is stored in the WZ register pair before it’s pushed onto the stack.
These registers are not accessible to the programmer directly but are instrumental in ensuring smooth and
efficient operation of the 8085 microprocessor. They help in performing various operations like data transfer,
arithmetic and logical operations, branching operations, etc., thereby enhancing the overall performance of the
microprocessor.
Question – Differentiate between microprocessor and microcontroller.
Answer -- Sure, here are the key differences between a microprocessor and a microcontroller:
**Microprocessor**¹²:
- A microprocessor is an integrated circuit that contains the processing unit of a computer, executing instructions
and performing calculations³.
- It consists of only a Central Processing Unit².
- It is used in Personal Computers².
- It uses an external bus to interface to RAM, ROM, and other peripherals².
- Microprocessors are based on Von Neumann model².
- It is complicated and expensive, with a large number of instructions to process².
- It requires a combination of timers, controllers memory chips¹.
- Its size is larger¹.
- It is a general purpose device which is called a CPU¹.
- It has advantages of versatility such that designer can decide the amount of RAM, ROM, I/O port as needed¹.
- Its processing power is higher¹.
- It uses Von Neumann Architecture¹.
- Its system cost is high¹.
**Microcontroller**¹²:
- A microcontroller is a type of microprocessor that also integrates additional components like memory,
input/output interfaces, and timers, used in embedded systems³.
- A microcontroller contains a CPU, Memory, I/O all integrated into one chip².
- It is used in an embedded system².
- Microcontroller uses an internal controlling bus².
- Microcontrollers are based on Harvard architecture².
- Microcontroller is inexpensive and straightforward with fewer instructions to process².
- It contains CPU, RAM, ROM, Registers, Timer and input/output ports¹.
- Its size is smaller¹.
- It is a chip which is called single chip computer¹.
- Microcontroller have no advantage of designing RAM, ROM, I/O port¹.
- Its microprocessors processing power is lower than microprocessor¹.
- It uses Harvard Architecture¹.
- Its system cost is low¹.
Question – Evaluate the functions of ALU in microprocessor.
Answer -- The Arithmetic Logic Unit (ALU) is a fundamental part of a microprocessor and performs a variety of
functions:
1. **Arithmetic Operations**: The ALU performs basic arithmetic operations such as addition, subtraction,
multiplication, and division¹.
2. **Logical Operations**: It carries out logical operations like OR, AND, NOT, etc¹. The inclusion of inverters on
the inputs enables the same ALU hardware to perform the subtraction operation (adding an inverted operand),
and the operations NAND and NOR³.
3. **Decision Making**: The ALU has the ability to compare two numbers to determine if the first number is
smaller than, equal to, or greater than the second number and to take appropriate action based on the result
of the comparison¹.
4. **Data Processing**: The ALU is also referred to as the computer’s calculator⁴. It processes data that are
copied from memory and placed in registers for processing¹. Upon completion of the arithmetic operation, the
result can be transferred from the Accumulator to memory¹.
5. **Bit-shifting Operations**: The ALU can perform bit-shifting operations².
Question – Describe the different flags available in 8051 Program Status Word.
Answer -- The Program Status Word (PSW) register of the 8051 microcontroller has several flags that indicate
the status of the microcontroller after an instruction is executed. Here's a brief description of each:
1. **Carry Flag (C, PSW.7)**: This flag is set (1) if there was a carry from D7 to D8 during an 8-bit operation, or
if there was a carry from D15 to D16 during a 16-bit operation. It is cleared (0) if there was no such carry.
2. **Auxiliary Carry Flag (AC, PSW.6)**: This flag is set (1) if there was a carry from D3 to D4 during an operation.
It is cleared (0) if there was no such carry.
3. **Parity Flag (P, PSW.0)**: This flag is set (1) if the accumulator contains an odd number of 1s. It is cleared
(0) if the accumulator contains an even number of 1s.
4. **Overflow Flag (OV, PSW.2)**: This flag is set (1) if there was an overflow in signed operations, meaning the
result was too large or too small to fit in the destination register. It is cleared (0) if there was no such overflow.
The bits PSW.3 and PSW.4 are designated as RS0 and RS1 register selection bits and are used to change the bank
register.
Question – List all the interrupts available in 8051.
Answer -- The 8051 microcontroller has five interrupt sources:
1. **External Interrupt 0 (INT0)**: This is an edge-triggered interrupt.
2. **Timer 0 Overflow (TF0)**: This interrupt is triggered when Timer 0 overflows (i.e., when it counts beyond
its maximum limit).
3. **External Interrupt 1 (INT1)**: This is also an edge-triggered interrupt.
4. **Timer 1 Overflow (TF1)**: This interrupt is triggered when Timer 1 overflows.
5. **Serial Communication (RI/TI)**: This interrupt is triggered during serial communication when reception is
complete (RI) or when transmission of the serial data is complete (TI).
Question – Mention the three ways to disable 8085 vector interrupts
Answer -- There are three ways to disable vector interrupts in the 8085 microprocessor:
1. **Resetting the Processor**: All the hardware interrupts, except TRAP, are disabled when the processor is
reset⁴.
2. **DI Instruction**: The DI (Disable Interrupt) instruction can be used to disable non-maskable interrupts³⁵.
This is a one-byte instruction³⁵.
3. **SIM Instruction**: The SIM (Set Interrupt Mask) instruction can also be used to disable interrupts².
Question – What is the need of interrupt controller?
Answer -- The need for an interrupt controller arises from the necessity to manage multiple interrupt requests
in a system. Here are some reasons why an interrupt controller is important:
1. **Prioritization of Interrupts**: In a system with multiple devices, some interrupts might be more urgent
than others. An interrupt controller can prioritize these interrupts and ensure that higher priority interrupts
are handled before lower priority ones.
2. **Handling Simultaneous Interrupts**: If two or more devices send an interrupt signal at the same time,
the interrupt controller can handle this situation by queuing the interrupts and sending them to the processor
one by one.
3. **Efficient Use of Processor Time**: By managing interrupts, the interrupt controller allows the processor
to spend more time executing regular instructions rather than checking for and handling interrupts.
4. **Simplifying Software Development**: With an interrupt controller, software developers can write
simpler, more straightforward code because they don't have to include complex logic to handle interrupts.
Question – What is the function of segment override prefix.
Answer -- The Segment Override Prefix is a feature of the 8086 microprocessor that allows us to use a
different segment register than the default one for a particular code¹. This can be done by mentioning the
segment to be used before the address location or the offset register containing that address¹.
Question – What are the common features of Intel 8255 IC?
Answer – The Intel 8255 IC, also known as the Programmable Peripheral Interface (PPI), has the following
common features¹²⁴⁵:
- It consists of **40 pins** and operates in **+5V regulated power supply**⁴.
- The 8255 provides **24 parallel input/output lines** with a variety of programmable operating modes¹.
- These 24 input/output lines are divided into **three 8-bit ports (A, B, C)**¹²⁴. Port C can be further divided
into two 4-bit ports².
- It is a member of the MCS-85 family of chips, designed by Intel for use with their 8085 and 8086
microprocessors and their descendants¹.
- It was first available in a **40-pin DIP** and later a **44-pin PLCC packages**¹.
- It is **TTL compatible** and has improved DC driving capability⁵.
- It can be used to transfer data under various conditions from simple input-output to interrupt input-output².
- The functionality of the 8255 is now mostly embedded in larger VLSI processing chips as a sub-function¹.
It's worth noting that the 8255 IC is widely used in many microcomputer/microcontroller systems and home
computers¹.
Question – Name some applications of the 8253
Answer -- The Intel 8253 is a programmable counter/timer chip designed for use as an Intel μC peripheral.
Here are some of its applications:
1. **Interrupting a time-sharing operating system** at evenly spaced intervals so that it can switch a program.
2. Serving as a **programmable one-shot generator**.
3. Serving as a **programmable baud rate generator**.
4. **Binary counting**.
5. **Generation of accurate time delay**.
6. **Generation of square wave**.
7. **Rate generation**.
8. **Hardware/software triggered strobe signal**.
9. **One-shot signal of desired width**.
These features make the 8253 a versatile component in many electronic systems.
Question – Describe the difference between the instruction MOV AX, 2437H and MOV [2437H] in 8086.
Answer -- The two instructions you mentioned are used in 8086 assembly language programming and they
serve different purposes:
1. mov ax, 2437h: This instruction moves the hexadecimal value 2437h directly into the ax register. After
this instruction, the ax register will contain the value 2437h.
2. mov ax, [2437h]: This instruction is a little different. The brackets around 2437h indicate that it is a
memory address. So this instruction moves the value stored at memory address 2437h into the ax
register. After this instruction, the ax register will contain whatever value was stored at memory
address 2437h.
In summary, the first instruction deals with a direct value, while the second deals with a value stored at a
specific memory location.
Question – List the sequence of operations carried out in DMA
Answer -- The sequence of operations performed by a DMA during a data transfer is as follows:
1. The device sends a DMA request (DRQ) to the DMA controller.
2. The DMA controller sends a Hold request (HRQ) to the CPU and waits for the CPU to assert the HLDA signal.
3. The CPU initializes the DMA controller with the number of words to transfer and the memory address to
use.
4. The CPU commands the peripheral device to begin data transfer.
5. The DMA transfer is performed through the DREQ line.
Question –Describe the function of general purpose and special purpose registers of 8086?
Answer -- Sure, I’d be happy to explain!
General Purpose Registers: The 8086 microprocessor has eight general purpose registers, each of 8 bits. They
are AH, AL, BH, BL, CH, CL, DH, and DL. These registers are primarily used for arithmetic and logical
instructions. They can also be combined to form 16-bit registers: AX (AH and AL), BX (BH and BL), CX (CH and
CL), and DX (DH and DL).
Special Purpose Registers: Special purpose registers in the 8086 microprocessor include:
1. Accumulator (AX): This is the main register used for arithmetic, logic and data transfer operations.
2. Base Register (BX): This register is often used as a base pointer for memory operations because it can
be used to hold the starting base address of a memory region.
3. Counter Register (CX): This register is primarily used in loop instruction to store the loop counter.
4. Data Register (DX): This register is used in multiplication and division operations and also used with AX
register for I/O operations.
5. Stack Pointer (SP): This register always points to the top of the stack. It is automatically incremented or
decremented by push, pop, call, or ret instructions.
6. Base Pointer (BP): This register is used as a base pointer for memory operations. It is used for based,
based indexed or register indirect addressing.
7. Source Index (SI): This register is used as a source index for string operations.
8. Destination Index (DI): This register is used as a destination index for string operations.
Question – Explain mode 1 operation and BSR mode of operation of 8255 using examples
Answer -- The 8255 microprocessor is an input/output (I/O) device that can be used to interface with various
peripheral devices. It has three operating modes: mode 0, mode 1, and mode 2¹.
**Mode 1 Operation (Strobed Input/Output Mode)**¹²:
In this mode, either port A or B can work and port C bits are used to provide handshaking¹. The outputs as well
as inputs are latched¹. It has interrupt handling capability¹. Before actual data transfer there is transmission of
signal to match speed of CPU and printer¹. For example, when CPU wants to send data to a slow peripheral
device like a printer, it will send a handshaking signal to the printer to tell whether it is ready or not to transfer
the data. When the printer is ready it will send one acknowledgement to CPU then there will be transfer of
data through data bus¹.
**Bit Set Reset (BSR) Mode**¹⁵⁶:
This mode is used to set or reset the bits of port C only, and selected when the most significant bit (D7) in the
control register is 0¹⁵. This mode affects only one bit of port C at a time because, as user set the bit, it remains
set until and unless user changes it¹. User needs to load the bit pattern in control register to change the bit¹.
For example, if you want to set bit 3 of port C, you would load a control word with D7=0 (for BSR mode), D3=1,
D2=1, D1=0 (for selecting bit 3), and D0=1 (for setting the bit). This would result in a control word of 00011001
(in binary), which would set bit 3 of port C.
Question – Discuss 8051 addressing modes with suitable example?
Answer –
1. Immediate Addressing: In this mode, the data is directly put into a register. The data is specified in the
instruction itself. For example, MOV A, #30H means that the Accumulator is loaded with 30
(hexadecimal).
2. Register Addressing: In this mode, both the source and destination of the instruction are registers. For
example, MOV A, R1 means that the content of Register R1 is moved to the Accumulator.
3. Direct Addressing: In this mode, the address of the operand is directly given in the instruction. For
example, MOV A, 30H means that the content at address location 30H is moved to the Accumulator.
4. Indirect Addressing: In this mode, the address of the operand is stored in a register. For example, MOV
A, @R0 means that the content at an address location which is in Register R0 is moved to the
Accumulator.
5. Indexed Addressing: In this mode, the address of the operand is calculated by adding the contents of a
register to the address given in the instruction. This mode is used with instructions that use data
pointers like DPTR and PC (Program Counter). For example, MOVC A,@A+DPTR means that the content
at an address which is sum of DPTR and Accumulator is moved to Accumulator.
Question – Define Macros in 8086.
Answer -- A Macro is a set of instructions grouped under a single unit. It is another method for implementing
modular programming in the 8086 microprocessors (The first one was using Procedures).
The Macro is different from the Procedure in a way that unlike calling and returning the control as in
procedures, the processor generates the code in the program every time whenever and wherever a call to
the Macro is made.
A Macro can be defined in a program using the following assembler directives: MACRO (used after the name
of Macro before starting the body of the Macro) and ENDM (at the end of the Macro). All the instructions that
belong to the Macro lie within these two assembler directives.
Question – What are the parameters on which selection of a particular microprocessor depends?
Answer -- The selection of a microprocessor depends on several parameters:
1. **Hardware Requirements**: Before purchasing, you need to first identify what you need².
2. **Software Requirements**: After determining your hardware, you'll need to consider the software
portion².
3. **Architecture**: The architecture of the microcontroller and microprocessor is also a crucial factor².
4. **Cost and Power Rating**: The cost of the microprocessor and its power rating are also important
considerations².
5. **Memory**: The memory requirements of your application will also influence your choice of
microprocessor².
6. **Power Efficiency**: There is a trade-off between processing performance and power consumption¹.
7. **Temperature Tolerance**: Depending on the environment in which your microprocessors operate, you
may want devices that withstand extreme temperatures¹.
8. **Security**: With the rise in hacking targeting IoT devices, it's important to consider the security features
of the microprocessor¹.
Question – Why handshaking is required? Explain.
Answer -- Handshaking is a crucial process in microprocessors and is used as an I/O control method to
synchronize I/O devices with the microprocessor¹²⁴⁵. This is necessary because many I/O devices accept or
release data at a much slower rate than the microprocessor¹²⁴⁵. The handshaking technique controls the
microprocessor to operate with an I/O device at the I/O device's data transfer rate¹²⁴⁵. This ensures that data
is not lost or corrupted during transfer, and it allows for efficient communication between the microprocessor
and the I/O device.
There are two types of handshaking processes: Source Initiated Handshaking and Destination Initiated
Handshaking².
1) **Source Initiated Handshaking**: In this process, the source initiates the process of establishing the
connection. After sending valid data, the receiver sends an acknowledgment that the data has been received.
Hence, the signals 'DATA VALID' is sent by the sender before sending the data and the signal 'DATA ACCEPTED'
is sent by the receiver after getting the data².
2) **Destination Initiated Handshaking**: In this process, the process of establishing the connection is
initiated by the destination. The receiver first sends a request signal to the source channel. After that, the
source sends the 'DATA VALID' signal before sending the data and the receiver then again sends a signal 'DATA
ACCEPTED' after the data is received by it².
In both cases, this handshaking process ensures that both sender and receiver are ready for data transfer, thus
preventing any loss or corruption of data.
Question – What do you mean by CPU timing? Explain
Answer -- CPU time, also known as processor time, is a measure of the amount of time that a central
processing unit (CPU) spends executing instructions of a computer program. It’s the time during which the CPU
is actively working on a certain task.In a multitasking environment, multiple processes run concurrently, but
only one process can be executed by the CPU at any given moment. The operating system manages these
processes and allocates CPU time to each one based on their priority and other factors. This is done through a
process known as context switching.
CPU time is usually measured in clock ticks or seconds. It includes user time and system time. User time is the
CPU time spent in user-mode code (outside the kernel) within the process, while system time is the CPU time
spent in the kernel within the process.
This measurement is crucial in systems where billing is dependent on process usage of CPU time. It’s also used
in performance testing and system tuning to determine how CPU-intensive a program is.
Question – How microprocessor differentiate between data and instruction code? Explain
Answer -- A microprocessor differentiates between data and instruction code by using a process called fetch-
decode-execute. Here’s how it works:
1. Fetch: The microprocessor fetches the instruction from memory. The location of this instruction is
determined by the program counter, which stores the address of the next instruction to be executed.
2. Decode: Once the instruction is fetched, it’s decoded in the instruction register. The microprocessor
recognizes the number of bytes required to fetch the entire instruction when the first machine code of
an instruction is fetched and decoded.
3. Execute: The microprocessor then executes the instruction. If the instruction involves data (like MVI A,
Data), the second byte is always considered as data.
When a program is compiled, the generated executable file contains information that specifies which parts are
code (instructions) and which parts are data. This allows the microprocessor to correctly interpret and execute
the program.
Question – List the advantages of higher level languages.
Answer -- Here are some advantages of using high-level languages in microprocessors:
1. **Programmer Friendly**: High-level languages are similar to human language, making them easy to code,
debug, and maintain¹⁴.
2. **Abstraction**: They provide a higher level of abstraction from machine language¹².
3. **Machine Independence**: High-level languages are machine-independent, meaning the same program
can run on different platforms and operating systems¹.
4. **Easy to Learn**: These languages are easier to learn as they use command words and syntax similar to
everyday language².
5. **Less Error Prone**: High-level programming is less error-prone and it's easier to find and debug errors¹⁴.
6. **Better Programming Productivity**: High-level programming results in better programming
productivity¹⁴.
7. **Portability**: Programs written in high-level languages can be executed on any standard³.
8. **Complex Mathematical Computation**: Complex mathematical computation is possible in these
languages³.
However, it's important to note that high-level languages require compilers or interpreters to translate source
code to machine language¹. Also, they cannot communicate directly with the hardware¹. Despite these
limitations, high-level languages have revolutionized the way we develop software applications².
Question – Microprocessor and Microprocessor development systems
Answer – A **microprocessor** is a computer processor where the data processing logic and control is
included on a single integrated circuit (IC), or a small number of ICs². It is a programmable device that takes in
input, performs some arithmetic and logical operations over it, and produces the desired output¹. In simple
words, a Microprocessor is a digital device on a chip that can fetch instructions from memory, decode and
execute them, and give results¹. It performs some basic operations like addition, subtraction, multiplication,
division, and some logical operations using its Arithmetic and Logical Unit (ALU)¹.
A **Microprocessor Development System (MDS)** is a software breadboard that facilitates the
'interconnection' of binary patterns in memory, and the running and testing of the interaction of these
sequences with the computer hardware⁶. It is typically used by microprocessor or integrated circuit designers
and software programmers to debug software code or hardware for a new microprocessor being developed⁸.
A microprocessor development board is a printed circuit board containing a microprocessor and the minimal
support logic needed for an electronic engineer or any person who wants to become acquainted with the
microprocessor on the board and to learn to program it⁷.

You might also like