Engineering Questions with Answers - Multiple Choice Questions
MCQs on Architecture
Is the following instruction correct LDI R3,50?
c) Cant be said
d) None of the mentioned
Explanation: If LDI Rd,k is written then the range of Rd varies from R16-R31, as R3 is less than R16 so this instruction will generate an error.
Registers R0-R31 are used for what type of works?
a) they are used for arithmetic and logic instructions
b) they are used for data copy
c) they are used for calculations
d) none of the mentioned
Explanation: GPRs are used for implementing arithmetic and logic instructions in the controller. They do the same work as the accumulator does in the other microcontrollers and microprocessors.
The largest value that can be loaded in an 8 bit register is?
Explanation: The largest value that can be loaded in an 8 bit register is 11111111b or FFH.
The total space for the data memory available in the AVR based microcontroller is?
Explanation: The maximum value that can be loaded in the code memory of an AVR based microcontroller is FFFFH.
Which of the following instructions affect the flags of the status register?
d) All of the mentioned
Explanation: AND, INC, OR could affect status register flags. All arithmetic and logical instructions affect status register flags except SER Rd instruction. SER Rd is used to SEt Register i.e. after the execution of this instruction Rd loaded with FFH value and no flag is affected.
What is the difference between the two given instructions?
LDI R16,0x34 and LDI R16,$34
a) One copies the hexadecimal value to R16 and the other copies the decimal value to the R16 register
b) One is for command, other is for data
c) One is for assignment, other is for operations
d) Both the commands are the same
Explanation: Both the above commands are the same. They both are used for assigning the hexadecimal values to the registers.
Which out of the following is not a directive?
Explanation: .EQU, .DEVICE, .ORG all are the directives to the assembler whereas LDI is a command.
Is an assembly language a high level language?
c) Can’t be said
d) None of the mentioned
Explanation: Assembly language is not high level language rather it is low level language because it deals directly with the internal structure of CPU. To program in assembly, the internal structure of the CPU must be known. Whereas in high level programming languages programmers don’t bother about the internal structure of the CPU because this is done by the compiler.
A 14-bit program counter can access __________ bytes of memory locations.
Explanation: A 14-bit program counter can access 214 bytes of memory locations i.e. 16k bytes.
214 = 24 x 210
= 16K (210 = 1024 or 1K).
When AVR wakes up, then the value of PC becomes?
Explanation: When an AVR wakes up, then the PC starts at the memory location 00000H.