You are on page 1of 22

ASSEMBLY PROGRAMMING

1. Question 1. Explain Some Assembly Controls?


Answer :
o BRA Branch; Motorola 680×0, Motorola 68300; short (16 bit)
unconditional branch relative to the current program counter
o JMP Jump; Motorola 680×0, Motorola 68300; unconditional jump
(any valid effective addressing mode other than data register)
o JMP Jump; Intel 80×86; unconditional jump (near [relative
displacement from PC] or far; direct or indirect [based on contents of
general purpose register, memory location, or indexed])
o JMP Jump; MIX; unconditional jump to location M; J-register loaded
with the address of the instruction which would have been next if the
jump had not been taken
o JSJ Jump, Save J-register; MIX; unconditional jump to location M; J-
register unchanged
o Jcc Jump Conditionally; Intel 80×86; conditional jump (near [relative
displacement from PC] or far; direct or indirect [based on contents of
general purpose register, memory location, or indexed]) based on a
tested condition: JA/JNBE, JAE/JNB, JB/JNAE, JBE/JNA, JC, JE/JZ,
JNC, JNE/JNZ, JNP/JPO, JP/JPE, JG/JNLE, JGE/JNL, JL/JNGE,
JLE/JNG, JNO, JNS, JO, JS
o Bcc Branch Conditionally; Motorola 680×0, Motorola 68300; short (16
bit) conditional branch relative to the current program counter based on
a tested condition: BCC, BCS, BEQ, BGE, BGT, BHI, BLE, BLS, BLT, BMI,
BNE, BPL, BVC, BVS
o JOV Jump on Overflow; MIX; conditional jump to location M if
overflow toggle is on; if jump occurs, J-register loaded with the address
of the instruction which would have been next if the jump had not been
taken
2. Question 2. What Is Assembly Condition Codes?
Answer :
Condition codes are the list of possible conditions that can be tested during
conditional instructions. Typical conditional instructions include: conditional
branches, conditional jumps, and conditional subroutine calls. Some processors
have a few additional data related conditional instructions, and some processors
make every instruction conditional. Not all condition codes available for a
processor will be implemented for every conditional instruction.

C++ Interview Questions


3. Question 3. What Is Data Movement?
Answer :
Data movement instructions move data from one location to another. The source
and destination locations are determined by the addressing modes, and can be
registers or memory. Some processors have different instructions for loading
registers and storing to memory, while other processors have a single instruction
with flexible addressing modes.
4. Question 4. What Are Kinds Of Processors?
Answer :
Processors can broadly be divided into the categories of: CISC, RISC, hybrid, and
special purpose.

C++ Tutorial
5. Question 5. What Are Assembly Attributes?
Answer :
Attributes are declarative tags in code that insert additional metadata into an
assembly

C Interview Questions
6. Question 6. What Are The Types Of Assemblies?
Answer :
Assemblies are of two types:
1. Private Assemblies
2. Shared Assemblies
7. Question 7. Explain An Intermediate Language?
Answer :
Assemblies are made up of IL code modules and the metadata that describes
them. Although programs may be compiled via an IDE or the command line, in
fact, they are simply translated into IL, not machine code. The actual machine
code is not generated until the function that requires it is called.

C Tutorial   Embedded Systems Interview Questions


8. Question 8. What Is The Maximum Number Of Classes That Can Be
Contained In A Dll File?
Answer :
There is no limit to the maximum number of classes that can be contained in a
DLL file.
9. Question 9. Can One Dll File Contain The Compiled Code Of More Than One
.net Language?
Answer :
No, a DLL file can contain the compiled code of only one programming language.

Linux Embedded systems Interview Questions


10. Question 10. What Are The Different Types Of Assemblies? Explain Them
In Detail
Answer :
The following are the two types of assemblies:
Private Assembly - Refers to the assembly that is used by a single application.
Private assemblies are kept in a local folder in which the client application has
been installed.
Public or Shared Assembly - Refers to the assembly that is allowed to be shared
by multiple applications. A shared assembly must reside in Global Assembly
Cache (GAC) with a strong name assigned to it.
For example, imagine that you have created a DLL containing information about
your business logic. This DLL can be used by your client application. In order to
run the client application, the DLL must be included in the same folder in which
the client application has been installed. This makes the assembly private to your
application. Now suppose that the DLL needs to be reused in different
applications. Therefore, instead of copying the DLL in every client application
folder, it can be placed in the global assembly cache using the GAC tool. These
assemblies are called shared assemblies.
Question 11. Name The Different Components Of An Assembly?
Answer :
An assembly is a logical unit that is made up of the following four different types of
components:
o Assembly manifest
o MSIL source code
o Type metadata
o Resources

Microprocessor
1. Question 1. Describe Briefly Any Three Types Of Transmission?
Answer :
The various types of commonly used transmissions are as follows:
Simplex Transmission: This type of data transmission involves data to be moved
only in one direction. In this no data can be sent back using the same channel. A 
good example of this form of transmission can be found in a keyboard.
Half Duplex Transmission: This type of transmission allows data to be transferred
in both directions but not at the same time. One end transmits while the other 
receives.
Full Duplex Transmission: In this type of transmission data can be sent and
received at the same time. There are no two different modes such as transmit
and  receive.
2. Question 2. Briefly Explain The 8279 Operation ?
Answer :
o The 8279 is basically a programmable keyboard and a component for
display interfacing.
o The 8279 can scan and also encode a 64 key keyboard as well as a
numerical display of 16 digits.
o The keyboard has a buffer based on FIFO to store up to 8 keys after
which the processor must retrieve a character.
o It contains 8 lines that can be used to connect to 8 columns of a
keyboard. There are two additional lines for STB keys.
o Once a key is pressed they are automatically debounced and it can
function using two modes -key lockout and n-key roller.
o On simultaneous presses only the first key is detected. In case of n-
key rollover mode all simultaneous presses are detected and stored in
the internal buffer.
Embedded Systems Interview Questions
3. Question 3. Briefly Mention The Differences Between Vga And Cga
Graphics.?
Answer :
The characteristics of CGA are as follows:
o The CGA or the Color/Graphics adapter was the first color graphics
card for IBM pc`s.
o It contain 16KB of video memory and used an Rca jack to connect to
a Tv or monitor ( NTSC compatible).
o It could also be connected to a RBGI interface CRT monitor (4-bit).
o The characteristics of VGA graphics are as follows:
o The VGA or the video graphics array was a hardware introduced with
the IMB PS/2 computers.
o It has been widely adopted world over and now actually implies the
analog computer display standard.
o Eventually after much modifications by other manufacturers the VGA
was superseded by SVGA.
4. Question 4. Describe Briefly The External And Internal Bus Of The 8088
Processor?
Answer :
o Internal Data Bus: As its name suggests the internal data bus only
works inside a CPU that is internally. It is able to communicate with the
internal cache memories of  the CPU. Since they are internally placed
they are relatively quick and are now affected by the rest of the
computer.
o External Data bus: This type of bus is used to connect and interface
the computer to its connected peripheral devices. Since they are external
and do not lie within the circuitry of the cpu they are relatively slower.
o The 8088 processor in itself contains a 16-bit internal data bus
coupled with a 20-bit address register. This allows the processor to
address to a maximum of 1 MB.
Analog Communication Tutorial
5. Question 5. Explain Briefly The Role Of The 8284 Processor?
Answer :
o The 8284 is considered to be a supporting part for microprocessors.
It is responsible for the generation of clock signals.
o The clock generator forms an intrinsic part of a circuit as without it
every component in the system would have to create a signal for it
independently.
o When F/C’ is at logic, the oscillator output is steered through to the
divide-by-3 counter.
Digital Electronics Interview Questions
6. Question 6. How Can A Microprocessor Based Computer System Be
Developed?
Answer :
In developing a Microprocessor based computer system the following steps are
involved: 
o The first step is to develop the CPU module.By doing so the basic
system timing, sequential startup order is established. 
o After that memory needs to be added: The primary memory is
essential for the programs that are stored on the computer. There can
be several forms of memories with different hierarchies. The CPU loads
and fetches instruction from the memory.
o The third step is adding input/output: There are basically two
hardware techniques for getting data into and out of a computer. 
o The parallel interface is the most common and natural form. 
o The serial interface is the second technique.
o Question 7. Explain In Pentium Processors How Memory
Management Has Been Improved?
Answer :
o By adding a paging unit and a new system in the memory system the
management of it has been improved upon.
o Paging Unit: The paging mechanism works on 4KB memory pages or
with a  new extension available to the Pentium with 4MB memory
pages. 
o Memory-management mode: The system memory-management
mode (SMM) is on the equal levels such as the protected mode, real
mode, and virtual mode. Still the memory management mode function
as a manager. High-level system functions  such as power management
and security are taken care of by it.
Digital Communication Tutorial   VHDL Interview Questions
o Question 8. What Do You Understand By Macro? Explain The Various
Conditional Constructs Used While Programming A Macro?
Answer :
o Macro can be considered to be a sequence of instructions to which a
name is assigned.
o For short sequence of instructions which are of fixed nature Macros
are used.
o They can execute faster as compared to subroutines. 
o The MACRO directives are used to inform the assembler the starting
of a macro.
o In order to enclose a macro the ENDM directive is used. 
o The general format of the MACRO directive is: Macro Name MACRO
ARG1, ARG2 , …..,ARG N.
o To create macro sequences conditional assembly language
statements are used. Theses statements control the flow of the program
and are variations of the IF-THEN, IF-THEN-ELSE, DO-WHILE, and
REPEAT-UNTIL constructs used in high-level language programming
languages.
o Question 9. Briefly Explain Cwd Instructions In 8086 Family?
Answer :
CWD also known as the Convert signed Word to signed Double word instruction, it
is used to extend the sign bit of a word in AX register to all the bits of the DX
register. Generally used before a signed word in AX. Then it is divided by another
signed word using IDIV instruction. It does not affect any flag.

Computer architecture Interview Questions


o Question 10. Briefly Explain Loop Instructions In 8086 Family:
Answer :
LOOP: (Jump to specified label until CX = 0): As the name suggests the loop
instruction is used to repeat a sequence of instructions for a specified number of
time. It does not affect any flag and the number of times the loop is to be
repeated is stored in the CX register.
o Question 11. Briefly Explain Imul Instructions In 8086 Family?
Answer :
IMUL: This instruction is used for the multiplication of two signed numbers.The
result of imul between two signed numbers is signed as well. The OF (Over flow)
and CF (Carry flag) flags get affected by this instruction.
Microprocessor 8085 Interview Questions
o Question 12. Briefly Explain Sar Instructions In 8086 Family?
Answer :
SAR: Also known as Shift each bit of operand right, this instruction shifts each bit
of the operand in a register or memory location, right by the number of bits
specified. The carry flag is affected by this operation.
Embedded Systems Interview Questions
o Question 13. Explain Segments Their Pro`s And A Method For Their
Implementation?
Answer :
o The division of address space into logical sections is known as
segmentation and each such space is known as a segment. 
o In order to access a specific memory location, a program must
specify both the segment number and the offset contained in that
segment. Segment memory addressing divides the memory into many
segments. 
o One of the advantages of memory segmentation is that only 16 bit
registers are  required to both store segment base address as well as
offset address. Due to this the designing of the memory is simple.
o By using segmentation there is the advantage of relocability as well.
o Question 14. Briefly Explain Dma And Its Various Addressing
Modes?
Answer :
o The DMA or the direct memory access is a type of process in which
the System bus control is accessed and controlled by an external device
in place of the CPU.
o It is primarily used for the high speed transfer of data from mass
storage devices.
o The DMA functions by directly transferring data to and from from the
memory to the devices.
o The various modes of operation of the DMA are as follows: Demand
mode, Single mode, Block mode and Cascade mode.
o The characteristic of the demand mode is that it can transfer data
until the Dreq input becomes inactive.
o Question 15. Briefly Explain The Functions Of Debugger, Assembler
And The Linker?
Answer :
o Debugger: As its name suggests the debugger is used to test and
debug programs. The debugger allows a user to test a program step by
step, so that the problem points or steps can be identified and rectified.
It allows the user to inspect the registers and the memory locations after
a program has executed.
o Assembler: The assembler is used to convert assembly language
written by a user or a program into a machine recognizable format.
o Linker: There are certain programs which are large in size and cannot
be executed at one go simultaneously. Such programs are divided into
subprograms also known as modules. The linker is used to link such
small programs to form one large program.
Microprocessor 8086 Interview Questions
o Question 16. In Assembly Language, Write The Program To Search
For The Largest Number Among N Numbers Which Are Stored In The Memory?
Answer :
The program to detect the largest number among n numbers stored in the
memory are as follows:
Step 1>>MOV AX, 0000 
Step 2>>MOV SI, 0200 
Step 3>>MOV CX, [SI] 
Step 4>>BACK : INC SI 
Step 5>>INC SI 
Step 6>>CMP AX, [SI] 
Step 7>>JAE GO 
Step 8>>MOV AX, [SI] 
Step 9>>GO: LOOP BACK 
Step 10>>MOV [0251], AX 
Step 11>>INT 3
o Question 17. Write A Program In Assembly Language To Find Out
One`s And Two`s Complement For An 8 Bit Number?
Answer :
The program to find the one`s complement of an eight bit number is as follows:
LDA 2501H 
CMA 
STA 2502H 
HLT
The program to find the two`s complement is as follows:
LDA 2501H 
CMA 
INR A 
STA 2502H 
HLT
MICROPROCESSOR 8085
1. Question 1. What Are The Various Registers In 8085?
Answer :
Accumulator register, Temporary register, Instruction register, Stack Pointer,
Program Counter are the various registers in 8085.
2. Question 2. What Are The Various Flags Used In 8085?
Answer :
Sign flag, Zero flag, Auxillary flag, Parity flag, Carry flag.

Electrical and Electronics Engineering Interview Questions


3. Question 3. What Is Stack Pointer?
Answer :
Stack pointer is a special purpose 16-bit register in the Microprocessor, which
holds the address of the top of the stack.
4. Question 4. What Is Program Counter?
Answer :
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.

Assembly Programming Tutorial


5. Question 5. Which Stack Is Used In 8085?
Answer :
LIFO (Last In First Out) stack is used in 8085.In this type of Stack the last stored
information can be retrieved first.

Digital Electronics Interview Questions


6. Question 6. What Happens When Hlt Instruction Is Executed In Processor?
Answer :
The Micro Processor enters into Halt-State and the buses are tri-stated.
7. Question 7. What Is Meant By A Bus?
Answer :
A bus is a group of conducting lines that carriers data, address, & control signals.

Microprocessor Tutorial   PLC/Microcontrollers/Microprocessors Interview

Questions
8. Question 8. What Is Tri-state Logic?
Answer :
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.
9. Question 9. Give An Example Of One Address Microprocessor?
Answer :
8085 is a one address microprocessor.

Microprocessor 8086 Interview Questions


10. Question 10. In What Way Interrupts Are Classified In 8085?
Answer :
In 8085 the interrupts are classified as Hardware and Software interrupts.
11. Question 11. What Are Hardware Interrupts?
Answer :
TRAP, RST7.5, RST6.5, RST5.5, INTR.

Assembly Programming Interview Questions


12. Question 12. What Are Software Interrupts?
Answer :
RST0, RST1, RST2, RST3, RST4, RST5, RST6, RST7.

Electrical and Electronics Engineering Interview Questions


13. Question 13. Which Interrupt Has The Highest Priority?
Answer :
TRAP has the highest priority.
14. Question 14. Name 5 Different Addressing Modes?
Answer :
Immediate, Direct, Register, Register indirect, Implied addressing modes.
15. Question 15. How Many Interrupts Are There In 8085?
Answer :
There are 12 interrupts in 8085.

8051 Microcontroller Interview Questions


16. Question 16. In 8085 Which Is Called As High Order / Low Order Register?
Answer :
Flag is called as Low order register & Accumulator is called as High order
Register.
17. Question 17. What Are Input & Output Devices?
Answer :
Keyboards, Floppy disk are the examples of input devices. Printer, LED / LCD
display, CRT Monitor are the examples of output devices.
Advanced C++ Interview Questions
18. Question 18. Can An Rc Circuit Be Used As Clock Source For 8085?
Answer :
Yes, it can be used, if an accurate clock frequency is not required. Also, the
component cost is low compared to LC or Crystal.

Digital Electronics Interview Questions


19. Question 19. Why Crystal Is A Preferred Clock Source?
Answer :
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.
20. Question 20. What Does Quality Factor Mean?
Answer :
The Quality factor is also defined, as Q. So it is a number, which reflects the
lossness of a circuit. Higher the Q, the lower are the losses.

Embedded C Interview Questions


21. Question 21. What Are Level-triggering Interrupt?
Answer :
RST 6.5 & RST 5.5 are level-triggering interrupts
22. Question 22. How Can Signals Be Classified For The 8085 Microprocessor?
Answer :
The signals of the 8085 microprocessor based on their functions can be
classified into 7 categories namely:
o Frequency and power signals
o Address and data buses
o The control bus
o Interrupt Signals
o Serial Input / Output signals
o DMA signals
o Reset Signals
23. Question 23. Mention The Various Functional Blocks Of The 8085
Microprocessor.?
Answer :
The various functional blocks of the 8085 microprocessor are:
o Registers 
o Arithmetic logic unit 
o Address buffer 
o Increment / decrement address latch 
o Interrupt control 
o Serial I/O control 
o Timing and control circuitry 
o Instructions decoder and machine cycle encoder.

Microprocessor Interview Questions


24. Question 24. Mention The Steps In The Interrupt Driven Mode Of Data
Transfer.?
Answer :
The steps followed in this type of transfer are as follows:
o The peripheral device would request for an interrupt.
o The request acknowledgement for the transfer is issued at the end of
instruction execution.
o Now the ISS routine is initialized, The PC has the return address which
is now stored in the stack.
o Now data transfer is managed and coordinates by the ISS.
o Again the Interrupt system is enabled and the above steps are
repeated.
PLC/Microcontrollers/Microprocessors Interview Questions
25. Question 25. Write A Program That Will Store The Contents Of An
Accumulator And Flag Register At Locations 2000h And 2001h.?
Answer :
By making use of the Push & Pop instructions the program can be written as:
o LXISP, 4000H - this step initiates the SP at 4000h.
o PUSH PSW - the contents of the accumulator and flag are pushed into
the stack.
o POP B 
o MOV A, B
o STA 2000H
o MOV A, C
o STA 2001H
o HLT
26. Question 26. Classify Interrupts On The Basis Of Signals. State Their
Differences.?
Answer :
On the basis of level the signals can be classified into the following types:
o Single level interrupts
o Multi level interrupts
o The differences between them are as follows:
o For single the interrupts are manages through a single ping whereas
in multi they are managed by multiple pins.
o For single level interrupts polling is essential whereas for multi level it
is not necessary.
o Single level interrupts are much slower than multi level interrupts.
.NET Assemblies Interview Questions
27. Question 27. What Are The Two Major Differences Between Intr And Other
Interrupts ( Hardware)?
Answer :
The two major differences between INTR and the other hardware interrupts are
as follows:
o All the hardware interrupts are vectored interrupts but the INTR
interrupt is not so. An INTR interrupt will always get the address of a
subroutine from the device ( external ) itself. In the case of other
hardware interrupts the interrupts come from the call generated by the
processor at a already determined vector location.
o In case of the INTR interrupt the return address of an interrupt is
never saved but in the case of other hardware interrupts the locations is
saved in the stack.
Microprocessor 8086 Interview Questions
28. Question 28. Explain Briefly The Trap Input For The 8085.?
Answer :
o The TRAP input is sensitive to both edge and level.
o The pulse width for this signal should be in excess as compared to
the normal noise width.
o A second trap will never be able to respond for the second time as it
requires the first trap to go through a high to low transition.
o The pulse widths are wider than normal widths so as to prevent
unwanted false triggers.
o Question 29. Explain Briefly What Happens When The Intr Signal
Goes High In The 8085?
Answer :
The INTR is a maskable interrupt for the 8085. It has the lowest priority and is
also non vectored. When this INTR signal goes into the high state the following
things occur / take place:
o For every instruction that is executed the 8085 checks the status of
this interrupt./
o Till an instruction is completed the signal of INTR will remain high.
Once an instruction is completed the processor sends an
acknowledgement signal INTA.
o As soon as the INTA signal goes low a new opcode is placed on the
data bus for transfer.
o Once the new instruction is received the processor saves the address
of new instruction into the STACK and an interrupt service subroutine
begins.
o Question 30. Explain All The Addressing Modes Of The 8085 With
The Help Of Examples.?
Answer :
The various types of addressing modes of the 8085 are as follows:
o Direct addressing: The instructions in itself contain the opearand. For
ex. STA5513H or in/out instructions such as IN PORT C.
o Register addressing: The general purpose registers contain the
operands. For ex. MOV A, B;
o Register indirect addressing: This involves the use of register pairs
instead of a single register. For ex MOV A, M; ADD M.
o Immediate addressing: The example are MVI A, 07; or ADI 0F etc.
o Implicit addressing: this form of addressing contains no operands.
For ex. RAR, CMA etc.
o Question 31. Mention The Different Types Of Data Transfers
Possible In The 8085.?
Answer :
The various types of data transfer operations possible are:
o Data transfer is possible between two registers.
o It is also possible between a memory location and a register.
o Also it can occur between an input/output device and an
accumulator.
o In reality data is never transferred it can only be copied from one
location to another.
o Question 32. What Differences Can You State Between The Hlt And
Hold States?
Answer :
o The Hold is a hardware input whereas HLT is a software instruction.
o When the HLT state is executed the processor simply stops and the
buses are driven to tri state. No form of acknowledgement signal is
given out by the processor.
o In case of HOLD the processor goes into hold state but the buses are
not driven to tri state.
o When the processor goes into the HOLD state it gives out an HLDA
signal. This signal can be made to use by other devices.
o Question 33. Does The 8085 Support Externally Initiated Operations?
If Yes How?
Answer :
Yes the 8085 does support several externally initiated operations. The possible
operations and the corresponding pins for them in the 8085 are as follows:
o It supports resetting ( this is possible with the Reset Pin ).
o Various interruptions ( these are possible through Trap, RST 7.5, 6.5,
5.5 and the interrupt pins. )
o The 8085 also supports Readying with the help pf the Ready pin.
o It also has a HOLD pin which can basically pause the operation till
required/ as required.
Assembly Programming Interview Questions
o Question 34. Explain The Flow Of A Typical Instruction Word.?
Answer :
The flow of a typical Instruction word is as follows:
o The content of the program counter of 2 byte is transferred to the
address register known as MAR ( memory address register ). This
occurs at the starting of a fetch cycle.
o The contents are transferred via the address bus.
o Once this is done the timing and control section of the processor
reads the contents of the referenced memory address location.
o After this the data is sent to the memory data register with the help of
the data bus.
o Now the data is placed in the instruction register which will eventually
decode and execute it.
o Question 35. Briefly Explain The Steps Involved In A Fetch Cycle.?
Answer :
Fetch cycle is the time required to fetch an opcode from a particular location in
memory.
o General Fetch Cycles consist of 3T states.
o The first T state involves the sending of the memory address stored in
the Program Counter to the memory.
o During the second T state the contents of the addressed memory is
read ( this generally is the opcode at the specified location)
o In the third T state the opcode is sent to the Instruction register
through the data bus for execution.
o For slower memories the processors has the provision to get in to the
WAIT cycles as well.
o Question 36. What Are Wait States In Microprocessors, Explain.?
Answer :
o The WAIT state plays a significant role in preventing CPU speed
incompatibilities.
o Many a times the processor is at a ready state to accept data from a
device or location, but there might be no input available. This can lead to
wastage of cpu time.
o So in such cases when the cpu is ready for an input but there is no
such valid data then the system gets into WAIT state. In this scenario
the pin 35 ( ready pin )is put into a low state.
o As soon as there is some valid data for the 8085 the system comes
off the WAIT state and the low state of the READY pin is withdrawn.
8051 Microcontroller Interview Questions
o Question 37. What Are The Boons And Banes Of Having More
General Purpose Registers In A Microprocessor.?
Answer :
o If there are more general purpose registers the program writing
process is more flexible and convenient.
o The number of bits that would be required to detect the registers
would increase with more registers, this results in the lowering of the
number of operations.
o When a program would involve CALL subroutines the status of the
registers would have to be saved and restored often, this would result in
a significant overhead for the processor.
o Higher the number of these registers mores space would be used by
them on the chip. This can create problems in adding / implementing
other functions on the chip.
o Question 38. Explain In Brief The Control And Timing Circuitry Of
The 8085.?
Answer :
o The timing and control circuitry section of the 8085 is responsible for
the generation of timing and control signals so that instructions can be
executed.
o The types of signals involved are : Clock signals, Control signals,
Status signals, DMA signals and also the reset section.
o It is responsible for the fetching and the decoding of the various
operations.
o This section also aids in the generations of control signals for the
executions of instructions and for the sync between external devices.
o Question 39. Explain Briefly The Flag Register In The 8085
Microprocessor.?
Answer :
o The flag register in 8085 is an 8-bit register which contains 5 bit
positions.
o These five flags are of 1bit F/F and are known as zero, sign, carry,
parity and auxiliary carry.
o For sign flag if the result of an MSB operation is 1 then it is set else it
is reset.
o The zero flag is set of the result of an instruction is zero.
o The auxiliary carry flag is used for BCD operations, not free to the
programmer.
o The carry flag is used for carrying and borrowing in case of addition
and subtraction operations.
o The parity flag is used for results containing an even number of one's.
o Question 40. What Is A Stack Pointer Register, Describe Briefly.?
Answer :
o The Stack pointer is a sixteen bit register used to point at the stack.
o In read write memory the locations at which temporary data and
return addresses are stored is known as the stack.
o In simple words stack acts like an auto decrement facility in the
system.
o The initialization of the stack top is done with the help of an
instruction LXI SP.
o In order to avoid program crashes a program should always be
written at one end and initialized at the other.
Advanced C++ Interview Questions
o Question 41. Describe Briefly The Accumulator Register Of 8085.?
Answer :
o It is one of the most important 8 bit register of 8085
o It is responsible for coordinating input and output to and from the
microprocessor through it.
o The primary purpose of this register is to store temporary data and for
the placement of final values of arithmetic and logical operations.
o This accumulator register is mainly used for arithmetic, logical, store
and rotate operations.

8051 MICROCONTROLLER
1. Question 1. Introduction Of 8051 Microcontroller Architecture?
Answer :
In 1981, Intel Corporation introduced an 8-bit microcontroller called the 8051. The
8051 became widely popular after Intel allowed other manufacturers to make and
market any flavors of the 8051. They please with the condition that they remain
code-compatible with the 8051. This has led to many, versions of the 8051 with
different speeds and amounts of on-chip ROM marketed by more than half a
dozen manufacturers. It is important to note that although there are different
flavors of the 8051 in terms of speed and amount of on-chip ROM, they are all
compatible with the original 8051 as far as the instructions are concerned. This
means that if you write your program for one, it will run on any of them regardless
of the manufacturer.
2. Question 2. Intel 8051 Follows Which Architecture?
Answer :
Intel 8051 is Harvard Architecture.

PLC/Microcontrollers/Microprocessors Interview Questions


3. Question 3. What Is The Difference Between Harvard Architecture And Von
Neumann Architecture?
Answer :
The name Harvard Architecture comes from the Harvard Mark. The most obvious
characteristic of the Harvard Architecture is that it has physically separate signals
and storage for code and data memory. It is possible to access program memory
and data memory simultaneously. Typically, code (or program) memory is read-
only and data memory is read-write. Therefore, it is impossible for program
contents to be modified by the program itself.
The von Neumann Architecture is named after the mathematician and early
computer scientist John von Neumann. Von Neumann machines have shared
signals and memory for code and data. Thus, the program can be easily modified
by itself since it is stored in read-write memory.
4. Question 4. 8051 Was Developed Using Which Technology?
Answer :
Intel’s original MCS-51 family was developed using NMOS technology, but later
versions, identified by a letter C in their name (e.g., 80C51) used CMOS technology
and consume less power than their NMOS predecessors. This made them more
suitable for battery-powered devices.

Assembly Programming Tutorial


5. Question 5. Why 8051 Is Called 8 Bit Microcontroller?
Answer :
The Intel 8051 is an 8-bit microcontroller which means that most available
operations are limited to 8 bits.

Assembly Programming Interview Questions


6. Question 6. What Is The Width Of Data Bus?
Answer :
8-bit data bus
7. Question 7. What Is The Width Of Address Bus?
Answer :
16-bit address bus

Digital Logic Design Interview Questions


8. Question 8. List Out The Features Of 8051 Microcontroller?
Answer :
o 40 Pin IC.
o 128 bytes of RAM.
o 4K ROM.
o 2 Timers (Timer 0 and Timer 1).
o 32 Input/ Output pins.
o 1 serial port.
o 6 Interrupts (Including Reset). 
9. Question 9. What Location Code Memory Space And Data Memory Space
Begins?
Answer :
At location 0x00 for internal or external memory
10. Question 10. How Much On Chip Ram Is Available?
Answer :
128 bytes of RAM (from 0x00 to 0x7F) and can be used to store data.
11. Question 11. List Out Addressing Modes In Mcs-51?
Answer :
o Direct Addressing
o Register Addressing
o Register Indirect Addressing
o Implicit Addressing
o Immediate Addressing
o Index Addressing
 
12. Question 12. How Much Total External Data Memory That Can Be
Interfaced To The 8051?
Answer :
64K data memory

PLC/Microcontrollers/Microprocessors Interview Questions


13. Question 13. What Is Special Function Registers (sfr)?
Answer :
The memory addresses from 80H to 0FFH are called SFR. These are 128 bytes
registers specially designed for interrupts and few other operations.
14. Question 14. Give Example Of Bit Address And Byte Address?
Answer :
Example: bit address 87h –> byte address 80h, bit #7
15. Question 15. What Are The Types Of Interrupts In 8051?
Answer :
o External interrupt 0 (IE0) has highest priority among interrupts.
o Timer interrupt 0 (TF0)
o External interrupt 1 (IE1)
o Timer interrupt 1 (TF1) has lowest priority among other interrupts.
o Serial port Interrupt
o Reset.
16. Question 16. What Are The Four Distinct Types Of Memory In 8051?
Answer :
o Internal RAM
o Special function registers
o Program memory
o External data memory
 
17. Question 17. Tell The Addresses Which Are Bit Addressable?
Answer :
The bit addressable memory in 8051 is compose from 210 bits: bit address
space: 20H – 2FH bytes RAM = 00H – 7FH bits address, SFR registers.
18. Question 18. What Is Lst File?
Answer :
o This file is also called as list file.
o It lists the opcodes, addresses and errors detected by the assembler.
o List file is produced only when indicated by the user.
o It can be accessed by an editor and displayed on monitor screen or
printed.
Programmer uses this file to find the syntax errors and later fix them.

Assembly Programming Interview Questions


19. Question 19. Explain Db.?
Answer :
o DB is called as define byte used as a directive in the assembler.
o It is used to define the 8 bit data in binary, hexadecimal or decimal
formats.
o It is the only directive that can be used to define ASCII strings larger
than two characters.
o DB is also used to allocate memory in byte sized chunks.
o The assembler always converts the numbers into hexadecimal.
20. Question 20. What Is Equ?
Answer :
o EQU is the equate assembler directive used to define a constant
without occupying a memory location.
o It associates a constant value with data label.
o Whenever the label appears in the program, constant value is
substituted for label.
o Advantage: The constant value occurring at various positions in a
program can be changed at once using this directive.
o Syntax: label EQU constant value
21. Question 21. How Are Labels Named In Assembly Language?
Answer :
o Label name should be unique and must contain alphabetic letters in
both uppercase and lowercase.
o 1st letter should always be an alphabetic letter.
o It can also use digits and special characters?,.,@,_,$.
o Label should not be one of the reserved words in assembly language.
o These labels make the program much easier to read and maintain.
22. Question 22. Are All The Bits Of Flag Register Used In 8051?
Answer :
o The flag register also called as the program status word uses only 6
bits.
o The two unused bits are user definable flags.
o Carry, auxiliary carry, parity and overflow flags are the conditional
flags used in it.
o 1 is a user definable bit and PSW.5 can be used as general purpose
bit.
o Rest all flags indicate some or the other condition of an arithmetic
operation.
 
23. Question 23. Which Bit Of The Flag Register Is Set When Output Overflows
To The Sign Bit?
Answer :
The 2nd bit of the flag register is set when output flows to the sign bit. This flag is
also called as the overflow flag. Here the output of the signed number operation is
too large to be accommodated in 7 bits. For signed numbers the MSB is used to
indicate the whether the number is positive or negative. It is only used to detect
errors in signed number operations.
24. Question 24. What Are Issues Related To Stack And Bank 1.?
Answer :
o Bank 1 uses the same RAM space as the stack.
o Stack pointer is incremented or decremented according to the push
or pop instruction.
o If the stack pointer is decremented it uses locations 7, 6, 5… which
belong to register bank 0.
o If a given program uses R1 then stack is provided new memory
location.
o The push instruction may also take stack to location 0 i.e.it will run
out of space.
Digital Logic Design Interview Questions
25. Question 25. Explain Jnc.?
Answer :
It is a command used to jump if no carry occurs after an arithmetic operation. It is
called as jump if no carry (conditional jump instruction). Here the carry flag bit in
PSW register is used to make decision. The processor looks at the carry flag to
see if it is raised or not.
If carry flag is 0, CPU fetches instructions from the address of the label.
26. Question 26. Can Port 0 Be Used As Input Output Port?
Answer :
Yes, port 0 can be used as input output port. Port 0 is an open drain unlike ports 2,
3, 4. To use it as input or output the 10k ohm pull-up resisters are connected to it
externally. To make port 0 as input port it must be programmed by writing 1 to all
bits.
Example:
o MOV  A,#0FFH
o MOV  P0,A
o Question 27. Which 2 Ports Combine To Form The 16 Bit Address
For External Memory Access?
Answer :
o Port0 and port2 together form the 16 bit address for external
memory.
o Port0 uses pins 32 to 39 of 8051 to give the lower address bits(AD0-
AD7)
o Port2 uses pins 21 to 28 of 8051 to give the higher address bits(A8-
A15)
o This 16 bit address is used to access external memory if attached.
o When connected to external memory they cannot be used as input
output ports.
o Question 28. Can Single Bit Of A Port Be Accessed In 8051?
Answer :
o Yes, 8051 has the capability of accessing only single bit of a port.
o Here only single bit is accessed and rest is unaltered.
o SYNTAX: “SETB X. Y”.
o Here X is the port number and y is the desired bit.
o Example: SETB P1.2
 Here the second bit of port 1 is set to 1.
o Question 29. Other Than Setb, Clr Are There Any Single Bit
Instructions?
Answer :
o There are in total 6 single-bit instructions.
o CPL bit: complement the bit (bit= NOT bit).
o JB bit, target: Jump to target if bit equal to 1.
o JNB bit, target: Jump to target if bit is equal to 0.
o JCB bit, target: Jump to target if bit is equal to 1 and then clear bit.

You might also like