Oral Question Bank With Answers
Oral Question Bank With Answers
It is a type of miniature electronic device that contains the arithmetic, logic, and
control circuitry necessary to perform the functions of a digital computer's central
processing unit.
2. What is Assembly?
3. What is Assembly Language?
4. What is Assembly Language Program?
In computer programming, assembly language, often referred to simply as
Assembly and commonly abbreviated as ASM or asm, is any low-level
programming language with a very strong correspondence between the
instructions in the language and the architecture's machine code instructions.
5. What is Register?
A processor register is a quickly accessible location available to a computer's
processor. Registers usually consist of a small amount of fast storage, although
some registers have specific hardware functions, and may be read-only or write-
only.
6. What is Data Segment Register?
Data Segment − It contains data, constants and work areas. A 16-bit Data Segment
register or DS register stores the starting address of the data segment.
7. What is Load Effective Address?
Computes the effective address of the second operand (the source operand) and
stores it in the first operand (destination operand).
8. What is Model in the program?
Programming models are supposed to explain how a program will be executed
while the parallel computer model is meant to be an abstraction of the hardware.
The programming model acts as a bridge between algorithms and actual
implementations in software.
9. What is Stack in the program?
A stack is an array or list structure of function calls and parameters used in modern
computer programming and CPU architecture. Similar to a stack of plates at a
buffet restaurant or cafeteria, elements in a stack are added or removed from the top
of the stack, in a “last in first, first out” or LIFO order.
10. What is DB in the program?
define byte - it allocates 8 bits of data in the memory to the variable u want to
assign it to.
11. What is section .data in the program?
The data section is used for declaring initialized data or constants. This data does
not change at runtime. You can declare various constant values, file names, or
buffer size, etc., in this section. The syntax for declaring data section is –
section .data.
12. What is g in the output of the program?
13. What is d in the output of the program?
14. What is DW in the program?
dont worry its just Define Word, it allocates 2 bytes of data (a word) in the memory
to the variable u want to assign it to.
15. What is DD in the program?
same for this it is Define Doubleword, it assigns 4 bytes of data it is double isnt it.
16. What is CX register in the program of the loops?
CX is known as the count register, as the ECX, CX registers store the loop count in
iterative operations. DX is known as the data register. It is also used in input/output
operations. It is also used with AX register along with DX for multiply and divide
operations involving large values.
17. What is CLC in the program?
clc clears all the text from the Command Window, resulting in a clear screen.
18. What is INC?
The INC instruction is used for incrementing an operand by one. It works on a
single operand that can be either in a register or in memory.
19. What is ADC?
Analog-to-digital conversion (ADC) is an electronic process in which a
continuously variable, or analog, signal is changed into a multilevel digital signal
without altering its essential content.
20. What is SBB?
integer subtraction with borrow, it adds the 2nd operand - DEST to the carry flag -
CF and subtracts the result from the 1st operand - SRC, the result of the subtraction
is assigned to the first operand DEST, and flags are set accordingly.
21. What is CMP?
The CMP instruction compares two operands. It is generally used in conditional
execution. This instruction basically subtracts one operand from the other for
comparing whether the operands are equal or not.
22. What is JC?
JC : Stands for 'Jump if Carry' It checks whether the carry flag is set or not. If yes,
then jump takes place, that is: If CF = 1, then jump.
23. What is XCHG?
exchange register/memory with register, basically exchanges the 2 operands, Let us
suppose, HL and DE register pairs are having ABCDH and 6789H contents
respectively. After execution of instruction XCHG the contents of HL and DS
register pairs will be 6789H and ABCDH respectively.
24. What is DEC?
The DEC instruction is used for decrementing an operand by one. It works on a
single operand that can be either in a register or in memory.
25. What is JNZ?
The JNZ instruction transfers control to the specified address if the value in the
accumulator is not 0. If the accumulator has a value of 0, the next instruction is
executed. Neither the accumulator nor any flags are modified by this instruction.
26. What is XOR?
XOR Instruction. • The XOR instruction performs a bit wise Exclusive OR
operation between corresponding bits in the two operands and places the result in
the first operand.
27. What is the use of XOR?
The XOR operation sets the resultant bit to 1, if and only if the bits from the
operands are different. If the bits from the operands are same (both 0 or both 1), the
resultant bit is cleared to 0. XORing an operand with itself changes the operand to
0. This is used to clear a register.
28. What isRCR?
Rotate With Carry Right (rcr) RCR rotates the carry flag into the MSB and the LSB
to the carry flag. ROR rotates the LSB to the MSB without going through the carry
flag.
29. What is JNC?
The JNC instruction transfers program control to the specified address if the carry
flag is 0. Otherwise, execution continues with the next instruction. No flags are
affected by this instruction
30. What is IDIV?
IDIV is an arithmetic instruction that performs a division operation between two
signed numbers. The source operand in the instruction is a signed divisor. It can be
specified using any addressing mode except immediate mode of addressing.
31. What is RCL?
The RCL (Rotate and Carry Left) instruction shifts each bit to the left, copies the
Carry flag to the least significant bit and copies the most significant bit into the
Carry flag.
32. What is AAA?
The aaa instruction is mainly useful for adding strings of digits where there is
exactly one decimal digit per byte in a string of numbers. This text will not deal
with BCD or ASCII numeric strings
33. What is AAS?
Use aas only after executing the form of an add instruction that stores a two-BCD-
digit byte result in the AL register. aas then adjusts AL to contain the correct
decimal result. The top nibble of AL is set to 0.
34. What is DAA?
Decimal Adjust AL after addition
Use daa only after executing the form of an add instruction that stores a two-BCD-
digit byte result in the AL register. daa then adjusts AL to a two-digit packed
decimal result.
35. What is DAS?
Decimal Adjust AL after Subtraction
Use das only after executing the form of a sub instruction that stores a two-BCD-
digit byte result in the AL register. das then adjusts AL to a two-digit packed
decimal result.
36. What is DEC?
Q24
37. What is CMPSB?
38. What is CMPS?
The CMPS instruction compares two strings. This instruction compares two data
items of one byte, word or doubleword, pointed to by the DS:SI and ES:DI registers
and sets the flags accordingly. You can also use the conditional jump instructions
along with this instruction.
CMPSB, CMPSW, CMPSD - compares bytes, words, doubleword respectively
39. What is INT 21 in the program?
int 21h is a software interrupt used in the x86 microprocessor architecture,
particularly in the DOS environment. It allows programs to request various services
from the operating system by specifying a function code in a register and triggering
the interrupt. The operating system then performs the requested operation and
returns the result
40. 42) What is @data indicates in instruction-MOV ax, @data?
@DATA is a variable that holds the value of the location in memory where the data
segment lives. It moves the memory location of @DATA into the AX register (16
bit register). One thing to note here is the @ in front of the word DATA. I believe
this is because @DATA is evaluated during the linking process and it will be
replaced by its actual value. Notice how the other examples to not have the @ in
front because they are referring to an actual memory location to begin with.
41. What is maximum size of the instruction in 80386?
The 80386 sets a limit of 15 bytes on instruction length. The only way to violate
this limit is by putting redundant prefixes before an instruction. Exception 13 occurs
if the limit on instruction length is violated. The 8086/8088 has no instruction
length limit.
42. Why we indicate FF as 0FF in program?
43. What is MUL BX and DIV BX? Where result goes?
44. What are ASCII codes for nos. 0 to F?
45. What is the difference between near and far procedure?
Near procedure
1. A near procedure refers to a procedure which is in the same code segment from that
of the call instruction
2. It is also called intra-segment procedure
3 A near procedure call replaces the old IP with new IP.
4. The value of old IP is pushed on to the stack. SP=SP-2
5. Less stack locations are required
6. Procedure is inside Code Segment
7.Uses keyword near
8.Syntx:- CALL near_procedure_name
9. Example :- Call Delay
Far Procedure
1. A far procedure refers to a procedure which is in the different code segment from
that of the call instruction.
2. It is also called inter-segment procedure call
3. A far procedure call replaces the old CS:IP pairs with new CS:IP pairs
4. The value of the old CS:IP pairs are pushed on to the stack SP=SP-2
5. More stack locations are required
6. Procedure is outside Code Segment
7. Uses keyword FAR
8. Example :- Call FAR PTR Delay
9. Syntax:- CALL far_procedure_name
46. What is the difference between Macro and procedure?
Macro is a set of instruction and the programmer can use it anywhere in the program
by using its name. It is mainly used to achieve modular programming. So same set of
instructions can be used multiple times when ever required by the help of macro.
Wherever macro’s identifier is used, it is replaced by the actual defined instructions
during compilation thereby no calling and return occurs.
Syntax of macro :
%macro macro_name number_of_parameters
<macro body>
%endmacro
Procedures are also like macro, but they are used for large set of instruction when
macro is useful for small set of instructions. It contains a set of instructions which
performs a specific task. It contains three main parts i.e Procedure name to identify the
procedure, procedure body which contains set of instructions, and RET statement
which denotes return statement. Unlike macros, procedures follow call-return method
thereby achieving true modularity.
Syntax of Procedure :
procedure_name :
procedure body
….......................
RET
To call a procedure
CALL procedure_name
https://www.geeksforgeeks.org/difference-between-macro-and-procedure/
47. What is the difference between instructions RET & IRET?
The ret instruction transfers control to the return address located on the stack. This
address is usually placed on the stack by a call instruction.
An interrupt procedure also differs from a normal procedure in the method of leaving
the procedure. The IRET instruction is used to exit from an interrupt procedure. IRET is
similar to RET except that IRET increments ESP by an extra four bytes (because of the
flags on the stack) and moves the saved flags into the EFLAGS register. The IOPL
field of EFLAGS is changed only if the CPL is zero. The IF flag is changed only if CPL
<= IOPL.
48. What is the difference between instructions MUL& IMUL?
There are two instructions for multiplying binary data. The MUL (Multiply) instruction
handles unsigned data and the IMUL (Integer Multiply) handles signed data. Both
instructions affect the Carry and Overflow flag.
49. What is the difference between instructions DIV& IDIV?
DIV − Used to divide the unsigned word by byte or unsigned double word by
word. IDIV − Used to divide the signed word by byte or signed double word by word.
50. What is difference between shifts and rotate instructions?
There is only really one difference between the shift and rotate instructions: rotate
cycles the bits around going out one side and coming in the other, while shift rotates
the bits out one side or the other leaving the space where the rotated bits where either
unchanged or zeroed. Basic difference between “shift” and “rotate” is shift command
makes “fall of” bits at the end of register whereas rotate command makes “Wrap
around” at the end of the register.
51. What is assembly language?
52. What are machine language and assembly language programs?
Machine language is the low level programming language. Machine language can only
be represented by 0s and 1s. Assembly language is the more than low level and less
than high-level language so it is intermediary language. Assembly languages use
numbers, symbols, and abbreviations instead of 0s and 1s.For example: For addition,
subtraction and multiplications it uses symbols likes Add, sub and Mul, etc.
https://www.geeksforgeeks.org/difference-between-machine-language-and-assembly-
language/
53. What is the drawback in machine language and assembly language, programs?
It takes a lot of time and effort to write the code for the same
It is very complex and difficult to understand
The syntax is difficult to remember
It has a lack of portability of program between different computer architectures
as it is very much machine architecture-dependent
It needs more size or memory of the computer to run the long programs written
in Assembly Language.
54. Define bit, byte and word.
BIT Bit is the abbreviation for binary digit. The BIT is the smallest binary (bivalent)
information unit, which can accept a signal status of “1“ or “0“.
BYTE For a unit of 8 binary characters, the term BYTE is used. A byte has the size of 8
bits.
WORD A word is a sequence of binary characters, which is regarded as a unit in a
specific connection. A word also has the size of 2 bytes or 16 bits.
DOUBLE-WORD A double-word corresponds to the word length of 32 binary
characters. A double-word also has the size of 2 words, 4 bytes, or 32 bits.
55. What is a bus?
Connection lines used to connect the internal parts of the microprocessor chip is
called bus. There are three types of buses in a microprocessor –
Data Bus − Lines that carry data to and from memory are called data bus. It is a
bidirectional bus with width equal to word length of the microprocessor.
Address Bus − It is a unidirectional responsible for carrying address of a memory
location or I/O port from CPU to memory or I/O port.
Control Bus − Lines that carry control signals like clock signals, interrupt signal or
ready signal are called control bus. They are bidirectional. Signal that denotes that a
device is ready for processing is called ready signal. Signal that indicates to a
device to interrupt its process is called an interrupt signal.
56. Why data bus is bi-directional?
57. Why address bus is unidirectional?
Address bus is used by a microprocessor to identify the storage location in the
memory where the next data can be found or the next instruction is to be executed.
Data bus is used to transfer data from one unit to another unit of the computer
system. Microprocessor can read data from the memory or write data to the
memory. So, the data bus is bidirectional.