1.
In case of, Zero-address instruction method the operands are stored in _____
Correct Answer
C. Push down stack
Explanation
In the zero-address instruction method, the operands are stored in a push down stack. This means that the operands are pushed onto the top of the stack and can be accessed later when needed. This method allows for efficient storage and retrieval of operands, as well as flexibility in the order of operations.
2.
In assembly language programming, minimum number of operands required for an instruction is/are
Correct Answer
A. Zero
Explanation
In assembly language programming, the minimum number of operands required for an instruction is zero. This means that there are instructions that do not require any operands to perform their operation. These instructions are typically used for simple operations or for instructions that do not require any input or output.
3.
In which addressing mode the operand is given explicitly in the instruction?
Correct Answer
B. Immediate
Explanation
Immediate addressing mode is the addressing mode in which the operand is given explicitly in the instruction. This means that the value of the operand is directly specified in the instruction itself, rather than being stored in a memory location or calculated using an expression. Immediate addressing mode is commonly used for constants or immediate values that need to be used in arithmetic or logical operations.
4.
In the following indexed addressing mode instruction, MOV 5(R1),LOC, the effective address is ______
Correct Answer
D. EA = 5+[R1]
Explanation
The given instruction MOV 5(R1),LOC uses indexed addressing mode. In this mode, the effective address is calculated by adding the displacement value (5) to the value stored in the register R1. Therefore, the effective address is EA = 5 + [R1].
5.
If a system is 64 bit machine , then the length of each word will be _______
Correct Answer
B. 8 Byte
Explanation
In a 64-bit machine, the length of each word is typically 8 bytes. This is because a 64-bit machine has a 64-bit processor, which means it can handle data in 64-bit chunks or words. Each word consists of 8 bytes, where each byte is 8 bits. This allows the processor to process larger amounts of data at a time, resulting in improved performance and efficiency compared to a 32-bit machine.
6.
When using the Big Endian assignment to store a number, the sign bit of the number is stored in _____
Correct Answer
A. The higher order byte of the word
Explanation
In Big Endian assignment, the most significant byte of a word is stored in the higher order byte position. Since the sign bit of a number is typically located in the most significant bit of a byte, it follows that the sign bit of the number will be stored in the higher order byte of the word.
7.
A _______ gate is used to detect the occurrence of an overflow.
Correct Answer
B. XOR
Explanation
An XOR gate is used to detect the occurrence of an overflow because it produces a high output only when the number of high inputs is odd. In the case of detecting an overflow, an XOR gate can be used to compare the carry-out from the most significant bit (MSB) with the carry-in to the MSB. If the two inputs are different, indicating an overflow, the XOR gate will output a high signal.
8.
In a normal adder circuit the delay obtained in generation of the output is _______
Correct Answer
A. 2n + 2
Explanation
In a normal adder circuit, the delay obtained in the generation of the output is 2n + 2. This means that for an n-bit adder, there will be a delay of 2n + 2 time units before the output is generated. The delay is determined by the number of stages in the adder circuit, which is equal to the number of bits in the input. Each stage introduces a delay of 1 time unit, and there are 2n stages in total. Additionally, there are 2 extra time units for the carry propagation and final output generation. Therefore, the total delay is 2n + 2.
9.
A subtractor is not usually present in a computer because
Correct Answer
C. The full adder will take care of subtraction
Explanation
A subtractor is not usually present in a computer because the full adder can perform both addition and subtraction operations. The full adder has the capability to subtract by using the concept of two's complement, which allows for efficient subtraction without the need for a separate subtractor circuit. Therefore, there is no need to include a separate subtractor in a computer system.
10.
Which condition code register flags will be set to 1 when result is negative?
Correct Answer
A. N
Explanation
The condition code register flag N will be set to 1 when the result is negative. This flag indicates that the result of an operation is negative, meaning that the most significant bit of the result is 1.
11.
The 32 bit number 5A938AF2 is held in (Byte Addressed) memory using the big-endian method starting at location 100.The number held in memory location 102 is
Correct Answer
B. 1000 1010
Explanation
The given memory layout represents a big-endian method, where the most significant byte is stored at the lowest memory address. Since the number is 32 bits long, it is stored across four memory locations starting from location 100. The number held in memory location 102 corresponds to the second byte of the 32-bit number, which is "1000 1010" in binary. Therefore, the correct answer is "1000 1010".
12.
The words are said to be ______ in memory if they begin at a byte address that is multiple of number of bytes in a word
Correct Answer
A. Aligned
Explanation
In computer memory, words are considered to be aligned if they start at a byte address that is a multiple of the number of bytes in a word. This means that the starting address of the word is evenly divisible by the word size. Aligned memory access is important for efficient data retrieval and manipulation, as unaligned access can result in performance penalties or even errors. Therefore, the correct answer is "Aligned."
13.
The 64 bit number A526FFAD4AC38BF2X is held in (Byte Addressed) memory using the big-endian method starting at location 100.The number held in memory location 105 is transferred to
Register R1 . What would be the binary contents of R1 ?
Correct Answer
A. 1100 0011
Explanation
The binary contents of R1 would be 1100 0011 because the number held in memory location 105 is transferred to R1.
14.
The instruction, Add #45,R1 does
Correct Answer
B. Adds 45 to the value of R1 and stores it in R1
Explanation
The instruction "Add #45, R1" indicates that the value of 45 should be added to the current value stored in register R1. After performing the addition, the result is stored back in register R1. This means that the value of R1 is updated by adding 45 to its previous value.
15.
Consider the byte register R1 = ABH . What will be contents of R1 after the execution of AShiftL #2, R1?
Correct Answer
A. EA
Explanation
The contents of register R1 after the execution of AShiftL #2, R1 will be EA. The AShiftL instruction performs a logical left shift operation on the value in R1 by a specified number of bits. In this case, the value in R1 (ABH) will be shifted to the left by 2 bits, resulting in EAH. Therefore, the contents of R1 after the execution will be EA.
16.
Which condition code register flags will be tested by Branch > 0 instruction?
Correct Answer
D. Zero and negative
Explanation
The Branch > 0 instruction will test the zero and negative condition code register flags. The zero flag indicates whether the result of the previous operation was zero, while the negative flag indicates whether the result was negative. By testing these flags, the instruction can determine whether the branch should be taken based on whether the previous operation resulted in a zero or negative value.
17.
Addressing mode used in instruction Add r1,r2,r3 is______
Correct Answer
A. Registers
Explanation
The given instruction "Add r1,r2,r3" uses the addressing mode of Registers. In this mode, the operands of the instruction are directly specified using registers. In this case, the values in registers r2 and r3 are added together and the result is stored in register r1. This mode is commonly used for arithmetic operations where the operands are stored in registers.
18.
Match each of the high level language statements given on the left hand side with the most natural addressing mode from those listed on the right hand side. 1. A[1] = B[J]; a. Indirect addressing
2. while [*A++]; b. Indexed addressing
3. int temp = *x; c. Autoincrement
Correct Answer
C. (1, b), (2, c), (3, a)
Explanation
The correct answer is (1, b), (2, c), (3, a).
In statement 1, A[1] = B[J], the most natural addressing mode is indexed addressing because it involves accessing an element in an array (A) using an index (1) and another array (B) using a variable (J).
In statement 2, while [*A++], the most natural addressing mode is autoincrement because it involves accessing the value pointed to by a pointer (A) and then incrementing the pointer.
In statement 3, int temp = *x, the most natural addressing mode is indirect addressing because it involves accessing the value pointed to by a pointer (x).
19.
The instruction ADD R1, 30FF is of _____
Correct Answer
B. A 2-address instruction format
Explanation
The instruction ADD R1, 30FF is of a 2-address instruction format. In this format, the instruction specifies both the source and destination operands within the instruction itself. In this case, the source operand is the value stored at memory address 30FF, and the destination operand is the register R1. The instruction will add the value at memory address 30FF to the value in register R1.
20.
Displacement addressing mode will have example
Correct Answer
C. Add R4,100(R1)
Explanation
The correct answer is "Add R4,100(R1)" because this instruction uses the displacement addressing mode. In this mode, the effective address is calculated by adding the displacement value (100) to the contents of register R1. This allows the program to access memory locations that are located at a fixed distance from the base address stored in R1.
21.
When using the Little Endian assignment to store a number, the sign bit of the number is stored in _____
Correct Answer
B. The lower order byte of the word
Explanation
In Little Endian assignment, the least significant byte of a word is stored first, followed by the more significant bytes. Therefore, when storing a number, the sign bit (which indicates whether the number is positive or negative) will be stored in the lower order byte of the word.
22.
Whenever a memory location is used, then actual memory address specified through addressing mode, is called the
Correct Answer
A. Effective address
Explanation
The effective address refers to the actual memory address that is specified through the addressing mode when a memory location is being used. It is the address where the data is stored or retrieved from in memory. The other options, such as registry and immediate address, do not accurately describe the concept of the actual memory address specified through addressing mode.
23.
Let’s say that the word EFBACDFE16 is stored in a memory which is byte addressable, little endianness is followed and 1 word = 2 bytes. Which of the following gives the correct order of bytes storage of the word in memory?
Correct Answer
B. BA EF FE CD
Explanation
In little endianness, the least significant byte is stored first followed by the most significant byte. In this case, the word "EFBACDFE16" is stored in memory as "BA EF FE CD".
24.
Consider the byte registers R0 = ABH and R1 = ABH (H stands for Hexadecimal). What will be contents of R0 and R1 after the execution of the instruction Compare R1, R0?
Correct Answer
A. R0 = ABH and R1 = ABH
Explanation
After the execution of the instruction Compare R1, R0, the contents of R0 and R1 will remain unchanged and will still be ABH.