250+ TOP MCQs on Architecture and Answers | Advanced Virtual RISC

AVR Micro-controller Multiple Choice Questions on “Architecture”.

1. Is the following instruction correct LDI R3,50?
a) Yes
b) No
c) Cant be said
d) None of the mentioned

Answer: b
Clarification: 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.

2. 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

Answer: a
Clarification: 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.

3. The largest value that can be loaded in an 8 bit register is?
a) 11111111H
b) FH
c) FFH
d) 00H

Answer: c
Clarification: The largest value that can be loaded in an 8 bit register is 11111111b or FFH.

4. The total space for the data memory available in the AVR based microcontroller is?
a) FFH
b) FFFH
c) FFFFH
d) FFFFFH

Answer: c
Clarification: The maximum value that can be loaded in the code memory of an AVR based microcontroller is FFFFH.

5. Which of the following instructions affect the flags of the status register?
a) AND
b) INC
c) OR
d) All of the mentioned

Answer: d
Clarification: 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.

6. 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

Answer: d
Clarification: Both the above commands are the same. They both are used for assigning the hexadecimal values to the registers.

7. Which out of the following is not a directive?
a) .EQU
b) .DEVICE
c) .ORG
d) .LDI

Answer: d
Clarification: .EQU, .DEVICE, .ORG all are the directives to the assembler whereas LDI is a command.

8. Is an assembly language a high level language?
a) Yes
b) No
c) Can’t be said
d) None of the mentioned

Answer: b
Clarification: 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.

9. A 14-bit program counter can access __________ bytes of memory locations.
a) 4K
b) 8K
c) 16K
d) 64K

Answer: c
Clarification: A 14-bit program counter can access 214 bytes of memory locations i.e. 16k bytes.
Calculation:
214 = 24 x 210
= 16K (210 = 1024 or 1K).

10. When AVR wakes up, then the value of PC becomes?
a) 00H
b) 000H
c) 0000H
d) 00000H

Answer: d
Clarification: When an AVR wakes up, then the PC starts at the memory location 00000H.

Leave a Reply

Your email address will not be published. Required fields are marked *