Engineering Questions with Answers - Multiple Choice Questions

MCQs on Architecture

1 - Question

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 - Question

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 - Question

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.




4 - Question

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 - Question

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 - Question

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 - Question

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.




8 - Question

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 - Question

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




10 - Question

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.

Get weekly updates about new MCQs and other posts by joining 18000+ community of active learners