Mircroprocessor Question Paper Answer
Mircroprocessor Question Paper Answer
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, 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.
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.
.
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 input/output port addresses are 8 bits. The input/output port addresses are 16 bits.
8085 microprocessor 8086 microprocessor
There is no concurrency in Fetching, Decoding, and There is Concurrency in Fetching, Decoding, and
execution. Execution because of the instruction queue.
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⁷.