0% found this document useful (0 votes)
57 views

Microprocessors Lab Viva Questions and Answers

Uploaded by

moosaem91
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views

Microprocessors Lab Viva Questions and Answers

Uploaded by

moosaem91
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

MES COLLEGE OF ENGINEERING AND TECHNOLOGY KUNNUKARA

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

Microprocessors Lab Viva Questions and Answers

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.

2. What is Instruction Set?


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

3. What is Bandwidth?
The number of bits processed by the processor in a single instruction.

4. What is Clock Speed?


Clock speed is measured in the MHz and it determines that how many instructions a
processor can processed. The speed of the microprocessor is measured in the MHz
or GHz.

5. What are the features of Intel 8086?


Features:
· 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.

6. 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

7. 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

8. What is Physical Address?


Physical memory address pointed by SEGMENT:OFFSET pair is calculated as:

Physical address = (<Segment Addr> * 10) + <Offset Addr>

9.What are the flags in 8086?


In 8086 Carry flag, Parity flag, Auxiliary carry flag, Zero flag, Overflow flag, Trace
flag, Interrupt flag, Direction flag, and Sign flag.

10.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.

11.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.

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


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

13.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.

14.What is 1st / 2nd / 3rd / 4th generation processor?


The processor made of PMOS / NMOS / HMOS / HCMOS technology is called 1st
/ 2nd / 3rd / 4th generation processor, and it is made up of 4 / 8 / 16 / 32 bits.
15.Name the processor lines of two major manufacturers?
High-end: Intel - Pentium (II, III, 4), AMD - Athlon. Low-end: Intel - Celeron,
AMD - Duron. 64-bit: Intel - Itanium 2, AMD - Opteron.

16.How many bit combinations are there in a byte?


Byte contains 8 combinations of bits.

17.Have you studied buses? What types?


There are three types of buses.
Address bus: This is used to carry the Address to the memory to fetch either
Instruction or Data.
Data bus : This is used to carry the Data from the memory.
Control bus : This is used to carry the Control signals like RD/WR, Select etc.

18.What is the Maximum clock frequency in 8086?


5 Mhz is the Maximum clock frequency in 8086.

19.What is meant by Maskable interrupts?


An interrupt that can be turned off by the programmer is known as Maskable
interrupt.

20.What is Non-Maskable interrupts?


An interrupt which can be never be turned off (ie. disabled) is known as Non-
Maskable interrupt

21.What are the different functional units in 8086?


Bus Interface Unit and Execution unit, are the two different functional units in
8086.

22.What are the various segment registers in 8086?


Code, Data, Stack, Extra Segment registers in 8086.

23.What does EU do?


Execution Unit receives program instruction codes and data from BIU, executes
these instructions and store the result in general registers.

24.Which Stack is used in 8086? k is used in 8086?


FIFO (First In First Out) stack is used in 8086.In this type of Stack the first stored
information is retrieved first.

25.What are the flags in 8086?


In 8086 Carry flag, Parity flag, Auxiliary carry flag, Zero flag, Overflow flag, Trace
flag, Interrupt flag, Direction flag, and Sign flag.

26.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.

27.What are the different types of Addressing Modes?


A:- There are 12 different types of Addressing Modes.They are:-
<1> Immediate:-The Immediate data is a part of instruction, and appears in the form
of successive bytes.

<2> Direct:-A 16-bit memory address(offset) is directly specified in the instruction


as a part of it.

<3> Register:-Data is stored in a register and it is referred using the particular


register (except IP).

<4> Register Indirect:-The address of the memory location which contains data or
operand is determined in an indirect way.

<5> Indexed:-offset of the operand is stored in one of the index registers.

<6> Register Relative:-The data is available at an effective address formed by


adding an 8-bit or 16-bit displacement with the content of any one of the registers
BX,BP,SI and DI in the default (either DS or ES) segment.

<7> Based Indexed:-The effective address of the data is formed, in this addressing
mode, by adding content of a base register to the content of an index register.
<8> Relative Based Indexed:- The effective address is formed by adding an 8 or 16-
bit displacement with the sum of contents of any one of the base registers and any
one of the index registers, in the default segment.

<9> Intrasegment Direct Mode:-In this mode, the address to which the control is to
be transferred lies in the segment in which the control transfer instruction lies and
appears directly in the instruction as an immediate displacement value.

<10> Intrasegment Indirect Mode:-In this mode, the displacement to which the
control is to be transferred, is in the same segment in which the control transfer
instruction lies, but it is passed to the instruction indirectly.

<11> Intersegment Direct:-In this mode, the address to which the control is to be
transferred is in a different segment.
<12> Intersegment Indirect:-In this mode, the address to which the control is to be
transferred lies in a different segment and it is passed to the instruction indirectly
sequentially.

28.What are the General Data Registers & their uses?


A:- The Registers AX,BX,CX,DX are the general Purpose 16-bit registers.AX
register as 16-bit accumulator.BX register is used as an offset Storage.CX register is
used as default or implied counter.Dx register is used as an implicit operand or
destination in case of a few instructions.

29.What are Segment Registers & their uses?


A:-There are 4 Segment Registers Code Segment(CS),Data Segment(DS),Extra
Segment(ES) & Stack Segment(SS) registers.CS is used for addressing memory
location in code.DS is used to points the data.ES refers to a segment which is
essentially in another data segment.SS is used for addressing stack segment of
memory.

30.What are Flag registers?


A:-Divided into 2 parts:-Condition code or status flags and machine control flags.
S-Sign Flag:-Is to set when the result of any computation is negative.
Z-Zero Flag:-Is to set if the result of the computation or comparison performed by
the previous instruction is zero.
C-Carry Flag:-Is set when there is carry out of MSB in case of addition or a borrow
in case of subtraction.
T-Trap Flag:-Is set, the processor enters the single step execution mode.
I-Interrupt Flag:-Is set, the maskable interrupts are recognised by the CPU.
D-Direction Flag:-Is set for autoincrementing or autodecrementing mode in string
manipulation instructions.
AC-Auxiliary Carry Flag:-Is set if there is a carry from the lowest nibble during
addition or borrow for the lowest nibble.
O-Overflow Flag:-Is set if the result of a signed operation is large enough to be
accommodated in a destination register.

31) What are Data Copy/Transfer Instructions?


A:- Mov
Push
Pop
Xchg
In
Out
Xlat
Lea
Lds/Les
Lahf
Sahf
Pushf
Popf

32. What are Machine Control Instructions?


A:- Nop
Hlt
Wait
Lock

33) What are Flag Manipulation Instructions?


A:- Cld
Std
Cli
Sti

34) What are String Instructions?


A:- Rep
MovSB/MovSW
Cmps
Scas
Lods
Stos

35.What is an Interrupts
Def.:- An interrupt operation suspends execution of a program so that the system
can take special action. The interrupt routine executes and normally returns control
to the interrupted procedure, which then resumes execution. BIOS handles Int 00H-
1FH, whereas DOS handles INT 20H-3FH.

36. What is an Opcode?


A:-The part of the instruction that specifies the operation to be performed is called
the Operation code or Op code.

37.What is an Operand?
A:-The data on which the operation is to be performed is called as an Operand.

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


A:-A JMP instruction permanently changes the program counter.
A CALL instruction leaves information on the stack so that the original program
execution sequence can be resumed.
39.What is meant by Polling?
A:- Polling or device Polling is a process which identifies the device that has
interrupted the microprocessor.

40.What is meant by Interrupt?


A:-Interrupt is an external signal that causes a microprocessor to jump to a specific
subroutine.

41.What is an Instruction?
A:-An instruction is a binary pattern entered through an input device to command
the microprocessor to perform that specific function.

42.What is Microcontroller and Microcomputer?


A:- Microcontroller is a device that includes microprocessor: memory and I/O
signal lines on a single chip, fabricated using VLSI technology.
Microcomputer is a computer that is designed using microprocessor as its Cubit
includes microprocessor, memory and I/O.

43.What is Assembler?
A:-The assembler translates the assembly language program text which is given as
input to the assembler to their binary equivalents known as object code.
The time required to translate the assembly code to object code is called access
time. The assembler checks for syntax errors and displays them before giving the
object code.

44.What is the use of HLDA?


A:-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.

45. Explain about "LEA"?


A:-LEA(Load Effective Address) is used for initializing a register with an offset
address.
A common use for LEA is to initialize 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.

46. Difference between "Shift" and "Rotate".


A:-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.

47.Difference between JMP and JNC?


A:-JMP is Unconditional Branch.
JNC is Conditional Branch.

48.What are the 4 Segments?


A:-Code Segment Register {CS}
Data Segment Register {DS}
Extra Segment Register {ES}
Stack Segment Register{SS}

49.What is the main use of ready pin?


A:-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.

50.Explain about Direction Flag?


A:-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.

51. What is the function of microprocessor in a system?


The microprocessor is the master in the system, which controls all the activity of the
system. It issues address and control signals and fetches the instruction and data
from memory. Then it executes the instruction to take appropriate action.

52. What are the modes in which 8086 can operate?


The 8086 can operate in two modes and they are minimum (uniprocessor) mode and
maximum ( or multiprocessor) mode.

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


The 8086 can operate on either 8-bit or 16-bit data. The 8086 uses 20bit address to
access memory and 16-bit address to access 1/0 devices.
54. 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.

55. What is pipelined architecture?


In pipelined architecture the processor will have number of functional units and the
execution time of functional units are overlapped. Each functional unit works
independently most of the time.

56. What are the functional units available in 8086 architecture?


The bus interface unit and execution unit are the two functional units available in
8086 architecture.

57. List the segment registers of 8086.


The segment registers of 8086 are Code segment, Data segment, Stack segment and
Extra segment registers.

58. 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.

59. 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.

60. 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.

61. 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.

62. 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).

63.What is a port?
The port is a buffered I/O, which is used to hold the data transmitted from the
microprocessor to I/O device or vice-versa.

64.Give some examples of port devices used in 8085 microprocessor based system?
The various INTEL I/O port devices used in 8085 microprocessor based system are
8212, 8155, 8156, 8255, 8355 and 8755.

PROGRAMS ON MASM
Commands to be followed in DOS box to run MASM programs

mount c c:\masm

edit pgmname.asm

masm pgmname.asm

link pgmname.obj

debug pgmname.exe

You might also like