Microprocessors and Microcontrollers Interview Questions & Answers

Posted On:February 5, 2019, Posted By: Latest Interview Questions, Views: 5759, Rating :

Best Microprocessors and Microcontrollers Interview Questions and Answers

Dear Readers, Welcome to Microprocessors and Microcontrollers Interview Questions and Answers have been designed specially to get you acquainted with the nature of questions you may encounter during your Job interview for the subject of Microprocessors and Microcontrollers. These Microprocessors and Microcontrollers Questions are very important for campus placement test and job interviews. As per my experience good interviewers hardly plan to ask any particular questions during your Job interview and these model questions are asked in the online technical test and interview of many IT & Non IT Industries.

1. What is a Microprocessor? 

• Microprocessor is a CPU fabricated on a single chip, program-controlled device, which fetches the instructions from memory, decodes and executes the instructions.

Interview Questions on Microprocessors and Microcontrollers

2. What are the basic units of a microprocessor ? 

• The basic units or blocks of a microprocessor are ALU, an array of registers and control unit.


3. What is Software and Hardware? 

• The Software is a set of instructions or commands needed for performing a specific task by a programmable device or a computing machine. 

• The Hardware refers to the components or devices used to form computing machine in which the software can be run and tested. Without software the Hardware is an idle machine.


4. What are the features of Intel 8086 ? 

Released by Intel in 1978 Produced from 1978 to 1990s A 16-bit microprocessor chip. Max. CPU clock rate:5 MHz to 10 MHz Instruction set: x86-16 Package: 40 pin DIP 16-bit Arithmetic Logic Unit 16-bit data bus (8088 has 8-bit data bus) 20-bit address bus - 220 = 1,048,576 = 1 meg The address refers to a byte in memory. In the 8088, these bytes come in on the 8-bit data bus. In the 8086, bytes at even addresses come in on the low half of the data bus (bits 0-7) and bytes at odd addresses come in on the upper half of the data bus (bits 8-15). • The 8086 can read a 16-bit word at an even address in one operation and at an odd address in two operations. The 8088 needs two operations in either case. • The least significant byte of a word on an 8086 family microprocessor is at the lower address.


5. What is the disadvantage of microprocessor? 

• It has limitations on size of data. Most Microprocessor does not support floatingpoint operations.


6. What is the difference between microprocessor and microcontroller? 

• In Microprocessor more op-codes, few bit handling instructions. But in Microcontroller: fewer op-codes, more bit handling Instructions, and also it is defined as a device that includes micro processor, memory, & input output signal lines on a single chip.


7. What is Instruction Set? 

• It is the set of the instructions that the Microprocessor can execute


9. What is an instruction 

• An instruction is an order given to a computer processor by a computer program.At the lowest level, each instruction is a sequence of 0s and 1s that describes a physical operation the computer is to perform (such as "Add") and, depending on the particular instruction type, the specification of special storage areas called registers that may contain data to be used in carrying out the instruction, or the location in computer memory of data.


10. What is Instruction cycle? 

• The sequence of operations that a processor has to carry out whileexecuting the instruction is called Instruction cycle. Each instruction cycle of a processor indium consists of a number of machine cycles.


11. Explain the function of CPU in Microprocessor 

• A microprocessor controls all functions of the CPU, or central processing unit, of a computer or other digital device. The microprocessor is programmed to give and receive instructions from other components of the device. The system can control everything from small devices such as calculators and mobile phones, to large automobiles.


12. Distinguish between Microprocessor & Microcontroller. 

• The microprocessor is a digital integrated circuit device that can be programmed with a series of instructions to perform specified functions on data. 

• But micro controller is a computer on a chip which has memory, input,ouput on the chip itself. 

• So, micro processor can perform only few functions but micro controller can perform so many functions.


13. What is a register 

• In computer architecture, a processor register (or general purpose register) is a small amount of storage available on the CPU whose contents can be accessed more quickly than storage available elsewhere. Typically, this specialized storage is not considered part of the normal memory range for the machine. Processor registers are at the top of the memory hierarchy, and provide the fastest way for a CPU to access data.


14. What is nibble, byte and word ?

• NIBBLE:-In computing, a nibble is a four-bit aggregation or half an octet. As a nibble contains 4 bits. 


• BYTE:-The byte (pronounced /' ba?t/) is a unit of digital information in computing and telecommunications. The size of a byte is typically hardware dependent, but the modern de facto standard is 8 bits, as this is a convenient power of 2. 


• WORD:- The most common microprocessors used in personal computers (for instance, the Intel Pentiums and AMD Athlons) are an example of this; their IA-32 architecture is an extension of the original Intel 8086 design which had a word size of 16 bits.


15. Which microprocessor accepts the program written for 8086 without any changes? 

• 8088


16. What is cache memory? 

• Cache memory is a small high-speed memory. It is used for temporary storage of data & information between the main memory and the CPU (center processing unit). The cache memory is RAM.


17. What is flag? 

• Flag is a flip-flop used to store the information about the status of a processor and the status of the instruction executed most recently.


18. How many instructions can be executed per second in 8086/88? 

• 2.5 million


19. What is Logical Address:? 

• A memory address on the 8086 consists of two numbers, usually written in hexadecimal and separated by a colon, representing the segment and the offset. This combination of segment and offset is referred to as a logical address • Logical address=segment: offset


20. What is The Effective Address: 

• In general, memory accesses take the form of the following example: 

• Mov ax, [baseReg + indexReg + constant] 

• This example copies a word sized value into the register AX. 

• Combined, the three parameters in brackets determine what is called the effective address, which is simply the offset referenced by the instruction


21. What is a bus? 

• Bus is a group of conducting lines that carries data, address and control signals.


22. Why data bus is bi-directional? 

• The microprocessor has to fetch (read) the data from memory or input device for processing and after processing, it has to store (write) the data to memory or output device. Hence the data bus is bi-directional.


23. Why address bus is unidirectional? 

• The address is an identification number used by the microprocessor to identify or access a memory location or I / O device. It is an output signal from the processor. Hence the address bus is unidirectional.


24. What is the data and address size in 8086? 

• The 8086 can operate on either 8-bit or 16-bit data. The 8086 uses 20 bit address to access memory and 16-bit address to access 1/0 devices.

25. Write the flags of 8086. 

• The 8086 has nine flags and they are 1. Carry Flag (CF) 6. Overflow Flag (OF) 2. Parity Flag (PF) 7. Trace Flag (TF) 3. Auxiliary carry Flag (AF) 8. Interrupt Flag (IF) 4. Zero Flag (ZF) 9. Direction Flag (DF) 5. Sign Flag (SF)


26. Explain the function of M/IO in 8086. 

• The signal M/IO is used to differentiate memory address and 1/0 address When the processor is accessing memory locations MI 10 is asserted high and when it is accessing 1/0 mapped devices it is asserted low.


27. What are the functions of BIU? 

• The BIU contains the circuit for physical address calculations and a pre - coding instruction byte queue & it makes the bus signals available for external interfacing of the devices


28. What are the functions of EU? 

• The EU contains the register set of 8086 except segment registers and IP. It has a 16-bit ALU, able to perform arithmetic and Logic operations.


29. What is the size of instruction queue in 8086? 

• The queue length depends on the fetching speed and the execution speed. Sometime queue may be restricted due to the space available on the CPU chip.


30. What is called .Scratch pad of computer.? 

• Cache Memory is scratch pad of computer.


31. Why does microprocessor contain ROM chips? 

• Microprocessor contain ROM chip because it contain instructions to execute data.


32. What is meant by LATCH? 

• Latch is a D- type flip-flop used as a temporary storage device controlled by a timing signal, which can store 0 or 1. The primary function of a Latch is data storage. It is used in output devices such as LED, to hold the data for display.


33. Difference between static and dynamic RAM? 

• Static RAM: No refreshing, 6 to 8 MOS transistors are required to form one memory cell, Information stored as voltage level in a flip flop. Dynamic RAM: Refreshed periodically, 3 to 4 transistors are required to form one memory cell, Information is stored as a charge in the gate to substrate capacitance.


34. What are the interrupts of 8086? 

• The interrupts of 8085 are INTR and NMI. The INTR is general maskable interrupt and NMI is non-maskable interrupt.


35. What is Software interrupts? 

• The Software interrupts are program instructions. These instructionsare inserted at desired locations in a program. While running a program, if software interrupt instruction is encountered then the processor executes an interrupt service routine.


36. What is Hardware interrupt? 

• If an interrupt is initiated in a processor by an appropriate signal at theinterrupt pin, then the interrupt is called Hardware interrupt.


37. What is the position of the Stack Pointer after the PUSH instruction? 

• - The address is 02 less than the earlier value.


38. What is the position of the Stack Pointer after the POP instruction? 

• The address is 02 greater than the earlier value.


39. Logic calculations are done in which type of registers? 

• Accumulator is the register in which Arithmetic and Logic calculations are done.


40. List some of the features of INTEL 8259 (Programmable Interrupt Controller) 

• It manage eight interrupt request 

• The interrupt vector addresses are programmable. 

• The priorities of interrupts are programmable. 

• The interrupt can be masked or unmasked individually.


41. Why crystal is a preferred clock source? 

• Because of high stability, large Q (Quality Factor) & the frequency that doesn’t drift with aging. Crystal is used as a clock source most of the times.


42. What is Program counter? 

• Program counter holds the address of either the first byte of the next instruction to be fetched for execution or the address of the next byte of a multi byte instruction, which has not been completely fetched. In both the cases it gets incremented automatically one by one as the instruction bytes get fetched. Also Program register keeps the address of the next instruction.


43. What is Tri-state logic? 

• Three Logic Levels are used and they are High, Low, High impedance state. The high and low are normal logic levels & high impedance state is electrical open circuit conditions. 

• Tri-state logic has a third line called enable line.


44. What happens when HLT instruction is executed in processor? 

• The Micro Processor enters into Halt-State and the buses are tri-stated.


45. How clock signal is generated in 8086? What is the maximum internal clock frequency of 8086? 

• The 8086 does not have on-chip clock generation circuit. Hence the clock generator chip, 8284 is connected to the CLK pin of8086. The clock signal supplied by 8284 is divided by three for internal use. The maximum internal clock frequency of8086 is 5MHz.


46. What is PSW. Give its structure The current state of the processor is stored in a register called ProcessorStatus

Word(PSW).The PSW contains bits which indicate such things as whether the previous arithmetic operations produced a positive,negative or zero result. If a subtract instruction is followed by a "branch on zero" instruction ,then the branch will be taken if the PSW indicates that the subtraction resulted in a zero. Most loops,such as DO-WHILE,FOR,etc involve incrementing or decrementing a counter and repeating the loop until the counter reaches the limit.Each time the counter is changed,the result is compared with the limit,the PSW is set accordingly,and branch is taken or not depending on the contents of the PSW. The 8086 microprocessor has a 16-bit PSW.


47. Explain the difference between a JMP and CALL instruction? 

• A JMP instruction permantely changes the program counter. 

• A CALL instruction leaves information on the stack so that the original program execution sequence can be resumed.


48. Explain CALL and RETURN? 

• It calls 16-bit memory address of a subroutine. It is a 3-byte instruction that transfers the program sequence to a subroutine Saves the content of the PC (Program Counter16-bit register), the address of the next instruction , on the stack. Decrements the stack pointer register by 2. Jumps unconditionally to the memory location specified by the 2nd and 3rd bytes. This instruction is accompanied by a return instruction in the subroutine. The return instruction is used either to return a function value or to terminate the execution of a function. The exit may be from anywhere within the function body, including loops or nested blocks. If the function returns a value, the return instruction is required


49. Explain about "LEA"? 

• LEA(Load Effective Address) is used for initializing a register with an offset address. 

• A common use for LEA is to intialize an offset in BX, DI or SI for indexing an address in memory. 

• An equivalent operation to LEA is MOV with the OFFSET operator, which generates slightly shorter machine code


50. What is the use of HLDA 

• HLDA is the acknowledgment signal for HOLD. It indicates whether the HOLD signal is received or not. • HOLD and HLDA are used as the control signals for DMA operations.


51. Define Pipelining? 

• In 8086,to speedup the execution program,the instructions fetching and execution of instructions are overlapped each other.this is known as Pipelining.


52. Difference between "Shift" and "Rotate". 

• Shift and Rotate commands are used to convert a number to another form where some bits are shifted or rotated. 

• A rotate instruction is a closed loop instruction.That is,the data moved out at one end is put back in at the other end. 

• The shift instruction loses the data that is moved out of the last bit locations. • Basic difference between shift and rotate is shift command makes "fall of " bits at the end of the register. 

• Where rotate command makes "wrap around" at the end of the register.


53. What is the main use of ready pin? 

• READY is used by the microprocessor to check whether a peripheral is ready to accept or transfer data. 

• A peripheral may be a LCD display or analog to digital converter or any other. 

• These peripherals are connected to microprocessor using the READY pin. 

• If READY is high then the periphery is ready for data transfer. If not the microprocessor waits until READY goes high.


54. Explain about Direction Flag? 

• This is used by string manipulation instructions. 

• If this flag bit is 0 , the string is processed beginning from the lowest to the highest address,i.e.,.Autoincrement mode. 

• Otherwise,the string is processed from the highest towards the lowest address,i.e.,.Autodecrementing mode.


55. What is the need for timing diagram? 

• The timing diagram provides information regarding the status of various signals, when a machine cycle is executed. The knowledge of timing diagram is essential for system designer to select matched peripheral devices like memories, latches, ports, etc., to form a microprocessor system.


56. Why status signals are provided in microprocessor? 

• The status signals can be used by the system designer to track theinternal operations of the processor. Also, it can be used for memory expansion (by providing separate memory banks for program & data and selecting the bank using status signals).


57. What is a programmable peripheral device ? 

• If the functions performed by a peripheral device can be altered or changed by a program instruction then the peripheral device is called programmable device. Usually the programmable devices will have control registers. The device can be programmed by sending control word in the prescribed format to the control register.


58. Explain the working of a handshake output port 

• In handshake output operation, the processor will load a data to port. When the port receives the data, it will inform the output device to collect the data. Once the output device accepts the data, the port will inform the processor that it is empty. Now the processor can load another data to port and the above process is repeated.


59. What are the internal devices of 8255 

• The internal devices of 8255 are port-A, portB and port-C. The ports can be programmed for either input or output function in different operating modes.


60. What is baud rate? 

• The baud rate is the rate at which the serial data are transmitted. Baudrate is defined as l (The time for a bit cell). In some systems one bit cell has one data bit, then the baud rate and bits/sec are same.


61. What is USART? 

• The device which can be programmed to perform Synchronous orAsynchronous serial communication is called USART (Universal Synchronous Asynchronous Receiver Transmitter). The INTEL 8251Ais an example of USART.


62. Define machine cycle. 

• Machine cycle is defined as the time required to complete one operation of accessing memory, I/O, or acknowledging an external request. This cycle may consist of three to six T-states.


63. What are the tasks involved in keyboard interface? 

• The task involved in keyboard interfacing are sensing a key actuation, Debouncing the key and Generating key codes (Decoding the key). These task are performed software if the keyboard is interfaced through ports and they are performed by hardware if the keyboard is interfaced through 8279.


64. Define T-State 

• T-State is defined as one subdivision of the operation performed in one clock period. These subdivisions are internal states synchronized with the system clock, and each T-State is precisely equal to one clock period.


65. List the components of microprocessor (single board microcomputer) based system 

• The microprocessor based system consist of microprocessor as CPU,semiconductor memories like EPROM and RAM, input device, output device and interfacing devices.


66. What is the difference between instructions MUL & IMUL? 

• MUL: the instruction is used for unsigned multiplication. This inst multiplies bytes or words. • IMUL (integers multiply): the inst is used for signed multiplication.


67. Why interfacing is needed for 1/0 devices? 

• Generally I/O devices are slow devices. Therefore the speed of I/O devices does not match with the speed of microprocessor. And so an interface is provided between system bus and I/O devices.


68. What is the difference between CPU bus and system bus? 

• The CPU bus has multiplexed lines but the system bus has separate lines for each signal. (The multiplexed CPU lines are demultiplexed by the CPU interface circuit to form system bus).


69. What is fetch and execute cycle? 

• In general, the instruction cycle of an instruction can be divided intofetch and execute cycles. The fetch cycle is executed to fetch the opcode from memory. The execute cycle is executed to decode the instruction and to perform the work instructed by the instruction.


70. Name the special registers available in 8086? 

• IP, CS, DS, SS, ES


71. Name the flags available in 8086? 

• Control flags . Direction, Interrupt, Trap ; • Condition flags . CY, AC, S, Z, P, OV


72. What does memory-mapping mean? 

• he memory mapping is the process of interfacing memories to microprocessor and allocating addresses to each memory locations.


73. What is the drawback in memory mapped I/0? 

• When I/O devices are memory mapped, some of the addresses are allotted to I/O devices and so the full address space cannot be used for addressing memory (i.e., physical memory address space will be reduced). Hence memory mapping is useful only for small systems, where the memory requirement is less.


74. What are the address lines for the software interrupts? 

• RST 0 0000 H RST1 0008 H RST2 0010 H RST3 0018 H RST4 0020 H RST5 0028 H RST6 0030 H RST7 0038 H


75. Explain What is SIM and RIM instructions? 

• SIM is Set Interrupt Mask. Used to mask the hardware interrupts. RIM is Read Interrupt Mask. Used to check whether the interrupt is Masked or not.


76. how many types memory mgt can divided? 

• they are two types. they are two types.they are big endian and little endian. memory is divided into two bank, 1:even bank 2:odd bank. •


77. What is the need for Port? 

• The I/O devices are generally slow devices and their timing characteristics do not match with processor timings. Hence the I/O devices are connected to system bus through the ports.


78. What is DMA? 

• The direct data transfer between I/O device and memory is called DMA.


79. How DMA is initiated? 

• When the I/O device needs a DMA transfer, it will send a DMA request signal to DMA controller. The DMA controller in turn sends a HOLD request to the processor. When the processor receives a HOLD request, it will drive its tri-stated pins to high impedance state at the end of current instruction execution and send an acknowledge signal to DMA controller. Now the DMA controller will perform DMA transfer.


80. What is a stack 

• A stack is a last in, first out (LIFO) abstract data type and data structure. A stack can have any abstract data type as an element, but is characterized by only two fundamental operations: push and pop.


81. What is linking and relocation 

• A linker is a program used to join together several object files into one large object file. The linker produces a link file which contains the binary codes for all the combined modules. It also produces a link map which contains the address information about the link files. The linker does not assign absolute addresses but only relative address starting from zero, so the programs are relocatable & can be put anywhere in memory to be run.


82. What are the advantages of modular programming 

• Modular programming can be used to break up a large program into manageable units, or to create code that can be easily re-used. Reduce problem to smaller, simpler, humanly comprehensible problems


83. Define two pass assembler 

• A two pass assembler does two passes over the source file ( the second pass can be over a file generated in the first pass ). In the first pass all it does is looks for label definitions and introduces them in the symbol table. In the second pass, after the symbol table is complete, it does the actual assembly by translating the operations and so on.


84. Define assembly process 

• A microprocessor executes a collection of machine instructions that tell the processor what to do is known as assembly process.


85. What are directives 

• Assembler directives are instructions to the assembler concerning the program being assembled.


86. What do you mean by assembler directives? 

• There are some instructions in the assembly language program which r not a part of processor instruction set. These instructions are instructions to the assembler, linker and loader. They are referred as assembler directives. The assembler directives enable us to control the way in which a program assembles and lists. They acts during the assembly of program and do not generate any executable machine • code. E.g .CODE, .data


87. What are Mnemonics? 

• Mnemonics are instructions or commands to perform a particular operation given by user to microprocessor. E.g. MOV, ADD, SUB, • etc.


88. What is a compiler? 

• Compiler is used to translate the high-level language program into machine code.

89. What is Piconet? 

• A collection of devices connected through Bluetooth technology in an ad hoc fashion.


90. What is meant by cross-compiler? 

• A program runs on one machine and executes on another is called as cross-compiler