1.
The instruction that is used to transfer the data from source operand to destination operand is
Correct Answer
A. Data copy/transfer instruction
Explanation
A data copy/transfer instruction is used to transfer the data from a source operand to a destination operand. This type of instruction is specifically designed to move data between memory locations or between registers. It does not perform any arithmetic or logical operations on the data, nor does it involve branching or string manipulation. Therefore, the correct answer is data copy/transfer instruction.
2.
Which of the following is not a data copy/transfer instruction?
Correct Answer
C. DAS
Explanation
DAS is not a data copy/transfer instruction. MOV is used to copy data from one location to another, PUSH is used to transfer data onto the stack, and POP is used to transfer data from the stack to a register or memory location. DAS, on the other hand, is a decimal adjust after subtraction instruction used in assembly language programming to adjust the result of a subtraction operation in the decimal system.
3.
Which of the following instruction is not valid?
Correct Answer
B. MOV DS, 5000H
Explanation
The instruction MOV DS, 5000H is not valid because the DS (Data Segment) register is used to store the starting address of the data segment. It cannot be directly assigned a value like 5000H. It can only be loaded with the contents of another register or memory location.
4.
In PUSH instruction, after each execution of the instruction, the stack pointer is
Correct Answer
D. Decremented by 2
Explanation
In the PUSH instruction, the stack pointer is decremented by 2 after each execution. This is because the PUSH instruction is used to push data onto the stack, which means that the stack pointer needs to be moved downwards to make space for the new data. By decrementing the stack pointer by 2, it ensures that enough space is reserved on the stack for the data being pushed.
5.
The instruction that pushes the contents of the specified register/memory location on to the stack is
Correct Answer
C. PUSH
Explanation
The instruction "PUSH" is used to push the contents of the specified register or memory location onto the stack. This allows for temporary storage of data during program execution. By pushing the contents onto the stack, they can be easily accessed and retrieved later on. This instruction is commonly used in assembly language programming to manage data and control flow within a program.
6.
Which is incorrect?
Correct Answer
A. MOV [1234h], [4567h]
Explanation
The incorrect statement in the given options is "MOV [1234h], [4567h]". This is incorrect because the MOV instruction cannot directly transfer data between two memory locations. It can only transfer data between a memory location and a register, or between two registers. Therefore, attempting to move data from one memory location to another memory location using the MOV instruction is not valid.
7.
The instruction that pushes the content of flag register on to the stack is
Correct Answer
A. PUSHF
Explanation
The instruction that pushes the content of the flag register onto the stack is "PUSHF". This instruction is used in assembly language programming to save the state of the flag register, which contains various status flags that indicate the result of previous operations. By pushing the flag register onto the stack, the current state of the flags can be preserved and later restored if needed. This is useful in situations where the program needs to temporarily change the flag settings and then revert back to the original state.
8.
The instruction that copy the content of stack on flag register is
Correct Answer
B. POPF
Explanation
The correct answer is POPF. The POPF instruction is used to copy the content of the stack onto the flag register. This instruction pops the top of the stack and loads the value into the flag register, allowing the program to access and manipulate the flags stored in the stack.
9.
Which instruction is used for BCD adjustment after addition?
Correct Answer
A. DAA
Explanation
DAA stands for Decimal Adjust Accumulator. This instruction is used for BCD (Binary Coded Decimal) adjustment after addition. BCD is a way of representing decimal numbers in binary form. After addition, if the result is not a valid BCD number, the DAA instruction is used to adjust the result to a valid BCD number. It adjusts the result by adding 6 to the lower nibble if it is greater than 9 or if the Auxiliary Carry flag is set, and by adding 60 to the higher nibble if it is greater than 9 or if the Carry flag is set.
10.
Which instruction is used for BCD adjustment after subtraction ?
Correct Answer
C. DAS
Explanation
DAS stands for Decimal Adjust after Subtraction. It is an instruction used for BCD (Binary Coded Decimal) adjustment after subtraction. BCD is a way of representing decimal numbers in binary form. After subtraction, if the result is not a valid BCD digit, the DAS instruction adjusts the result to ensure it is a valid BCD digit. This adjustment involves correcting the result by adding or subtracting 6 to it, depending on the condition of the auxiliary carry flag. Therefore, DAS is the correct instruction for BCD adjustment after subtraction.
11.
Which instruction is used for left rotation with carry flag?
Correct Answer
D. RCL
Explanation
The RCL (Rotate Left through Carry) instruction is used for left rotation with the carry flag. This instruction shifts the bits of a register or memory location to the left by one position, and the most significant bit is moved to the carry flag, while the carry flag is moved to the least significant bit. This allows for a circular shift of the bits, with the carry flag being included in the rotation.
12.
Which instruction is used for left rotation without carry flag?
Correct Answer
C. ROL
Explanation
The ROL (Rotate Left) instruction is used for left rotation without the carry flag. This instruction shifts the bits of a binary number to the left, and the leftmost bit is moved to the rightmost position while the other bits are shifted one position to the left. This operation does not take into account the carry flag, making it a left rotation without carry flag.
13.
The instruction that performs logical AND operation and the result of the operation is not available is
Correct Answer
C. TEST
Explanation
The correct answer is TEST because the question is asking for the instruction that performs a logical AND operation and does not provide the result of the operation. Out of the given options, only TEST fits this description. AAA, AND, and XOR are not relevant to the question as they do not meet the criteria specified.
14.
The processor enters the single step execution mode, if which of the following flag is set?
Correct Answer
B. Trap
Explanation
When the Trap flag is set, the processor enters the single step execution mode. In this mode, the processor executes one instruction at a time and then generates a trap interrupt after each instruction. This mode is often used for debugging purposes, allowing the programmer to closely monitor the execution of the program and identify any errors or issues.
15.
In the RCL instruction, the contents of the destination operand undergo function as
Correct Answer
A. Carry flag is pushed into LSB & MSB is pushed into carry flag
Explanation
The correct answer is that in the RCL instruction, the contents of the destination operand undergo a function where the carry flag is pushed into the least significant bit (LSB) and the most significant bit (MSB) is pushed into the carry flag. This means that the value of the carry flag is shifted into the LSB of the destination operand, and the value of the MSB is shifted into the carry flag. This operation allows for rotating the bits of the destination operand to the left, while preserving the value of the carry flag.
16.
Which of the following instructions is INVALID?
Correct Answer
D. All of the above
Explanation
The given answer "All of the above" is correct because all three instructions mentioned - POP 1234H, PUSH AL, and POP AL - are invalid. In assembly language, POP and PUSH instructions are used to manipulate the stack. However, in the first instruction, POP 1234H, a specific memory address (1234H) is mentioned instead of a register or a memory location. In the second instruction, PUSH AL, AL is a 8-bit register and cannot be directly pushed onto the stack. Lastly, in the third instruction, POP AL, AL cannot be used as a destination register for the POP instruction. Therefore, all three instructions mentioned are invalid.
17.
What properties of an 8-bit number stored at CL can be checked using the instruction TEST CL,10000001B?
Correct Answer
A. Sign and divisibility of CL contents by 2
Explanation
The TEST instruction performs a bitwise AND operation between the operands. In this case, the operand is 10000001B. When performing the bitwise AND operation, if a bit in the first operand is 1 and the corresponding bit in the second operand is also 1, the result will be 1. Otherwise, the result will be 0.
By performing the TEST instruction on CL with the operand 10000001B, we can check the sign and divisibility of CL contents by 2. If the result is 0, it means that the sign bit (the most significant bit) of CL is 0, indicating a positive number, and the number is divisible by 2. If the result is not 0, it means that the sign bit of CL is 1, indicating a negative number, and the number is not divisible by 2.
18.
What is the effect on the contents of CL after the instruction SAR CL,01H is executed?
Correct Answer
C. Divides signed CL by 2
Explanation
The instruction SAR (Shift Arithmetic Right) is used to perform a signed division by 2 on the contents of the register CL. This means that the value in CL is divided by 2, and the result is stored back in CL. Therefore, the effect on the contents of CL after the instruction SAR CL,01H is executed is that the signed value in CL is divided by 2.
19.
Which of the following addressing mode is generally used for initialization of register or memory?
Correct Answer
D. Immediate
Explanation
Immediate addressing mode is generally used for initialization of register or memory. This is because immediate addressing mode allows the programmer to directly specify the data value to be loaded into the register or memory location during the instruction execution. It is a straightforward and efficient way to initialize a register or memory with a specific value without the need for additional memory access or calculations.
20.
The instruction, “DEC” decreases the contents of the specified register or memory location by________
Correct Answer
C. 1
Explanation
The instruction "DEC" is used to decrease the contents of the specified register or memory location by 1.
21.
Which one among these is not a Flag Manipulation Instructions?
Correct Answer
C. SBC
Explanation
SBC stands for Subtract with Carry, which is an arithmetic instruction used in computer programming to subtract two numbers with the carry flag. It is not a flag manipulation instruction because it does not directly manipulate the flags in the processor. On the other hand, STI (Set Interrupt Flag), STD (Set Direction Flag), and CLD (Clear Direction Flag) are all flag manipulation instructions that specifically modify the interrupt flag and direction flag in the processor.
22.
The instruction that loads effective address formed by destination operand into the specified source register is
Correct Answer
A. LEA
Explanation
The correct answer is LEA. LEA stands for "Load Effective Address" and is an instruction in assembly language that loads the effective address formed by the destination operand into the specified source register. This means that LEA allows the programmer to load the memory address of a variable or data structure into a register, without actually loading the value stored at that address. This can be useful for performing calculations or accessing data indirectly.
23.
The instruction that loads the AH register with the lower byte of the flag register is
Correct Answer
C. LAHF
Explanation
The instruction that loads the AH register with the lower byte of the flag register is "LAHF". This instruction stands for "Load AH from Flags" and it copies the lower 8 bits of the flag register into the AH register. The flag register contains status information about the processor, such as the result of arithmetic operations, carry and overflow flags, etc. By loading the lower byte of the flag register into the AH register, the program can access and manipulate the individual flag bits as needed.
24.
CMP instruction compares the source and the destination operands by performing _______ between the source and the destination operands
Correct Answer
C. Subtraction
Explanation
The CMP instruction compares the source and destination operands by performing a subtraction between them. This is because the comparison is based on the result of the subtraction, which determines if the operands are equal, greater, or less than each other.
25.
"IDIV" instruction is a signed _________
Correct Answer
B. Division
Explanation
The "IDIV" instruction in computer programming is a signed division instruction. It is used to perform division operations on signed integers. Unlike the regular division instruction, "IDIV" takes into account the sign of the operands and produces a signed quotient as the result. This instruction is commonly used in programming languages that support signed integer arithmetic.
26.
The instruction that loads the AH register with the lower byte of the flag register is ______
Correct Answer
B. LAHF
Explanation
The correct answer is LAHF. LAHF stands for Load AH from Flags, and it is an instruction in assembly language that loads the AH register with the lower byte of the flag register. This instruction is used to transfer the status flags of the CPU to the AH register, allowing for further manipulation or analysis of the flags.
27.
The instruction that supports subtraction when borrow is ________
Correct Answer
B. SBB
Explanation
SBB stands for "Subtract with Borrow" and is an instruction that supports subtraction when there is a borrow. This means that if the subtraction operation requires borrowing from a higher digit, the SBB instruction will take that into account. It is commonly used in assembly language programming to perform subtraction operations with borrow.
28.
The instruction that supports addition when carry exists is
Correct Answer
B. ADC
Explanation
The instruction that supports addition when carry exists is ADC. ADC stands for "Add with Carry" and is used to add two numbers along with the carry from a previous addition. It is commonly used in computer programming to perform arithmetic operations that involve carrying over to the next digit. The ADC instruction takes into account the carry flag and adds it to the result, allowing for the addition of numbers larger than the maximum value that can be stored in a single register.
29.
The instructions that are used for reading an input port and writing an output port respectively are
Correct Answer
D. IN, OUT
Explanation
The correct answer is "IN, OUT" because the "IN" instruction is used to read data from an input port, while the "OUT" instruction is used to write data to an output port. Therefore, these instructions are specifically designed for input and output operations.
30.
Which of the following instructions takes only 16 bit operand?
Correct Answer
C. PUSH
Explanation
The PUSH instruction takes only a 16-bit operand. This instruction is used to push the value of a register or memory location onto the stack in the x86 assembly language. The stack is a region of memory used for temporary storage during program execution. Since the operand size is limited to 16 bits, the PUSH instruction can only operate on a 16-bit value. CLD, XLAT, and ADD instructions do not have any specific limitation on the operand size.
31.
Which of the following will update one of the control flags?
Correct Answer
A. STI
Explanation
STI stands for Set Interrupt Flag. It is an instruction in computer programming that updates the interrupt flag. The interrupt flag is a control flag that determines whether or not the processor should respond to interrupts. By setting the interrupt flag using the STI instruction, the processor will enable interrupts and allow the execution of interrupt service routines. Therefore, STI is the correct answer as it updates one of the control flags, specifically the interrupt flag.
32.
Which among the below is a CORRECT instruction?
Correct Answer
D. STD
Explanation
STD is the correct instruction among the options provided. STD stands for Set Direction Flag and it is used to set the direction flag in the processor's status register. The direction flag controls the direction of string operations, such as MOVSB (move byte from string to string). When the direction flag is set (1), the string operations decrement the memory addresses, and when it is cleared (0), the string operations increment the memory addresses. Therefore, STD is the correct instruction as it sets the direction flag to enable string operations to decrement memory addresses.
33.
Which instruction can add a 8bit and 16bit number?
Correct Answer
A. ADD AX, BX
Explanation
The correct answer is ADD AX, BX. This instruction can add a 16-bit number (BX) to another 16-bit number (AX). The other options, ADD AL, BX and ADD AX, BL, involve adding an 8-bit number to a 16-bit number, which is not the same as adding two 16-bit numbers together. Therefore, the correct instruction to add an 8-bit and 16-bit number is ADD AX, BX.
34.
Which of the following instruction divides 32 bit number by a 16 bit number?
Correct Answer
A. DIV BX
Explanation
The correct answer is DIV BX because the DIV instruction is used to divide a 32-bit number by a 16-bit number.