Computer Organization Questions and Answers – Assembly Language

This set of Computer Organization and Architecture Multiple Choice Questions & Answers (MCQs) focuses on “Assembly Language”.

1. __________ converts the programs written in assembly language into machine instructions.
a) Machine compiler
b) Interpreter
c) Assembler
d) Converter
View Answer

Answer: c
Explanation: An assembler is a software used to convert the programs into machine instructions.

2. The instructions like MOV or ADD are called as ______
a) OP-Code
b) Operators
c) Commands
d) None of the mentioned
View Answer

Answer: a
Explanation: This OP – codes tell the system what operation to perform on the operands.

3. The alternate way of writing the instruction, ADD #5,R1 is ______
a) ADD [5],[R1];
b) ADDI 5,R1;
c) ADDIME 5,[R1];
d) There is no other way
View Answer

Answer: b
Explanation: The ADDI instruction, means the addition is in immediate addressing mode.


4. Instructions which won’t appear in the object program are called as _____
a) Redundant instructions
b) Exceptions
c) Comments
d) Assembler Directives
View Answer

Answer: d
Explanation: The directives help the program in getting compiled and hence won’t be there in the object code.

5. The assembler directive EQU, when used in the instruction: Sum EQU 200 does ________
a) Finds the first occurrence of Sum and assigns value 200 to it
b) Replaces every occurrence of Sum with 200
c) Re-assigns the address of Sum by adding 200 to its original address
d) Assigns 200 bytes of memory starting the location of Sum
View Answer

Answer: b
Explanation: This basically is used to replace the variable with a constant value.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

6. The purpose of the ORIGIN directive is __________
a) To indicate the starting position in memory, where the program block is to be stored
b) To indicate the starting of the computation code
c) To indicate the purpose of the code
d) To list the locations of all the registers used
View Answer

Answer: a
Explanation: This does the function similar to the main statement.

7. The directive used to perform initialization before the execution of the code is ______
a) Reserve
b) Store
c) Dataword
d) EQU
View Answer

Answer: c
Explanation: None.

8. _____ directive is used to specify and assign the memory required for the block of code.
a) Allocate
b) Assign
c) Set
d) Reserve
View Answer

Answer: d
Explanation: This instruction is used to allocate a block of memory and to store the object code of the program there.

9. _____ directive specifies the end of execution of a program.
a) End
b) Return
c) Stop
d) Terminate
View Answer

Answer: b
Explanation: This instruction directive is used to terminate the program execution.

10. The last statement of the source program should be _______
a) Stop
b) Return
c) OP
d) End
View Answer

Answer: d
Explanation: This enables the processor to load some other process.

11. When dealing with the branching code the assembler ___________
a) Replaces the target with its address
b) Does not replace until the test condition is satisfied
c) Finds the Branch offset and replaces the Branch target with it
d) Replaces the target with the value specified by the DATAWORD directive
View Answer

Answer: c
Explanation: When the assembler comes across the branch code, it immediately finds the branch offset and replaces it with it.

12. The assembler stores all the names and their corresponding values in ______
a) Special purpose Register
b) Symbol Table
c) Value map Set
d) None of the mentioned
View Answer

Answer: b
Explanation: The table where the assembler stores the variable names along with their corresponding memory locations and values.

13. The assembler stores the object code in ______
a) Main memory
b) Cache
c) RAM
d) Magnetic disk
View Answer

Answer: d
Explanation: After compiling the object code, the assembler stores it in the magnetic disk and waits for further execution.

14. The utility program used to bring the object code into memory for execution is ______
a) Loader
b) Fetcher
c) Extractor
d) Linker
View Answer

Answer: a
Explanation: The program is used to load the program into memory.

15. To overcome the problems of the assembler in dealing with branching code we use _____
a) Interpreter
b) Debugger
c) Op-Assembler
d) Two-pass assembler
View Answer

Answer: d
Explanation: This creates entries into the symbol table first and then creates the object code.

Sanfoundry Global Education & Learning Series – Computer Organization and Architecture.

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

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.