Advanced Virtual RISC Microcontroller Questions and Answers – Architecture

This set of AVR Micro-controller Multiple Choice Questions & Answers (MCQs) focuses on “Architecture”.

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

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

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
View Answer

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

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

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

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

Answer: c
Explanation: 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
View Answer

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

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
View Answer

Answer: d
Explanation: 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
View Answer

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

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

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

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

Answer: c
Explanation: 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).
advertisement

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

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

Sanfoundry Global Education & Learning Series – Microcontroller.

To practice all areas of Microcontroller, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.