0% found this document useful (0 votes)
31 views10 pages

Mcq-Coal 1

Computer organization mcqs

Uploaded by

Sheikh Ahmed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views10 pages

Mcq-Coal 1

Computer organization mcqs

Uploaded by

Sheikh Ahmed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Chapter 1: Introduction to Assembly Language

1. What is the primary difference between high-level languages and assembly


language?
o A) High-level languages are machine-dependent
o B) Assembly language is more abstract than high-level languages
o C) Assembly language provides direct control over hardware
o D) High-level languages are faster than assembly language
2. What does an assembler do in the assembly language process?
o A) Translates source code to machine code
o B) Debugs the program
o C) Manages memory
o D) Creates high-level language programs
3. Which of the following is NOT a reason to learn assembly language?
o A) It allows low-level hardware control
o B) It helps in understanding how high-level languages work
o C) It provides faster execution times than high-level languages
o D) It is required for all software development
4. Which component of the computer system directly interacts with assembly language
instructions?
o A) Operating System
o B) Processor (CPU)
o C) Compiler
o D) Database
5. What is a "label" in assembly language programming?
o A) A variable name
o B) A memory address used for data storage
o C) A name assigned to a particular line or section of code
o D) A special type of instruction
Chapter 2: The x86 Processor and its Instruction Set
6. Which register is primarily used to hold the return address in a function call?
o A) AX
o B) BX
o C) IP (Instruction Pointer)
o D) SP (Stack Pointer)
7. What is the size of a general-purpose register in the x86 architecture?
o A) 8 bits
o B) 16 bits
o C) 32 bits
o D) 64 bits
8. What is the purpose of the MOV instruction?
o A) Perform a logical operation
o B) Move data between registers or memory
o C) Jump to another part of the program
o D) Add two values together
9. Which of the following is an addressing mode in the x86 architecture?
o A) Direct addressing
o B) Indirect addressing
o C) Indexed addressing
o D) All of the above
10. In x86 assembly, which instruction is used to perform a comparison between two
values?
o A) ADD
o B) CMP
o C) MOV
o D) SUB
Chapter 3: Assembly Language Programming Basics
11. What is the correct format for a simple assembly language program?
o A) [Label] instruction operand
o B) instruction [Label] operand
o C) operand [instruction] label
o D) Label operand instruction
12. Which directive is used to define a data segment in an assembly program?
o A) CODE
o B) DATA
o C) .TEXT
o D) .DATA
13. What does the instruction PUSH AX do in assembly language?
o A) Loads a value into the AX register
o B) Decreases the stack pointer
o C) Increases the stack pointer
o D) Pushes the value of the AX register onto the stack
14. What does the instruction POP BX do in assembly language?
o A) Loads a value into the BX register from memory
o B) Pops a value from the stack and stores it in the BX register
o C) Pops a value from the BX register onto the stack
o D) Increases the value in the BX register
15. Which of the following is the correct syntax for a comment in assembly language?
o A) // comment
o B) /* comment */
o C) ; comment
o D) # comment
Chapter 4: Data Representation
16. What is the binary representation of the decimal number 13?
o A) 1101
o B) 1110
o C) 1011
o D) 1001
17. Which number system uses only the digits 0 and 1?
o A) Binary
o B) Octal
o C) Decimal
o D) Hexadecimal
18. Which of the following is the hexadecimal equivalent of the binary number 1011?
o A) B
o B) 3
o C) A
o D) 5
19. What does the ASCII code represent?
o A) Characters in a computer system
o B) Machine-level instructions
o C) Binary values of integers
o D) Memory addresses
20. Which is the largest value that can be represented in 8 bits in binary?
o A) 255
o B) 128
o C) 512
o D) 1024
21. What is the purpose of the CMP instruction in assembly language?
o A) To compare two values
o B) To perform addition
o C) To move data between registers
o D) To jump to a different section of the program
22. Which of the following is a valid addressing mode in x86 assembly?
o A) Immediate addressing
o B) Register addressing
o C) Direct addressing
o D) All of the above
23. Which register holds the status flags in the x86 architecture?
o A) AX
o B) BX
o C) FLAGS
o D) SP
24. Which instruction is used to jump to a specific address in the program?
o A) MOV
o B) JMP
o C) ADD
o D) INC
25. What is the value of the hexadecimal number F3?
o A) 243
o B) 243
o C) 243
o D) 15
26. In assembly language, which is the smallest unit of data that can be moved between
memory and registers?
o A) Word
o B) Byte
o C) Double word
o D) Quad word
27. How do you represent the decimal number 255 in hexadecimal?
o A) FF
o B) 99
o C) 8F
o D) 7F
28. Which instruction is used to add two values in x86 assembly?
o A) ADD
o B) MOV
o C) SUB
o D) JMP
29. In the x86 architecture, which register is primarily used to store the result of
arithmetic operations?
o A) AX
o B) BX
o C) CX
o D) DX
30. Which of the following is an example of immediate addressing mode?
o A) MOV AX, 5
o B) MOV AX, BX
o C) MOV [BX], AX
o D) MOV AX, [500]
Additional MCQs (General Knowledge of Assembly Language)
31. Which of the following is a characteristic of assembly language programming?
o A) It is easier to write than high-level languages
o B) It allows direct control over hardware
o C) It is independent of the machine architecture
o D) It has no relationship to machine code
32. Which x86 register is used to store the result of a multiplication operation?
o A) AX
o B) DX
o C) CX
o D) BX
33. What is the role of the LEA instruction in x86 assembly?
o A) Loads the effective address of a memory operand
o B) Loads a constant value into a register
o C) Adds two values
o D) Moves data between registers
34. Which of the following is NOT a type of instruction in assembly language?
o A) Data transfer instruction
o B) Arithmetic instruction
o C) Jump instruction
o D) Network instruction
35. What does the JZ instruction do in assembly language?
o A) Jumps if the zero flag is set
o B) Jumps if the carry flag is set
o C) Jumps if the sign flag is set
o D) Jumps unconditionally
36. In x86 assembly, the CALL instruction is used for:
o A) Jumping to another part of the program
o B) Calling a subroutine
o C) Moving data between registers
o D) Pushing data to the stack
37. Which addressing mode uses a constant value in an instruction?
o A) Immediate addressing
o B) Register addressing
o C) Indirect addressing
o D) Direct addressing
38. Which register holds the base address for the stack in x86?
o A) BP
o B) SP
o C) AX
o D) CX
39. Which of the following is NOT a valid operand in x86 assembly?
o A) Immediate value
o B) Register
o C) Variable name
o D) Memory address
40. What is the purpose of the NOP instruction in assembly language?
o A) It performs a no-operation action
o B) It moves data between registers
o C) It performs arithmetic operations
o D) It jumps to another address
41. What is the purpose of the STC instruction?
o A) Set carry flag
o B) Stop the program
o C) Start a computation
o D) Set zero flag
42. Which of the following is an example of a word in x86 assembly?
o A) 2 bytes
o B) 1 byte
o C) 4 bytes
o D) 8 bytes
43. What does the DIV instruction do in x86 assembly?
o A) Divides two values
o B) Adds two values
o C) Multiplies two values
o D) Subtracts two values
44. What is the default size of the AX register in 16-bit x86 assembly?
o A) 8 bits
o B) 16 bits
o C) 32 bits
o D) 64 bits
45. Which of the following instructions is used to subtract two values in assembly
language?
o A) SUB
o B) ADD
o C) MOV
o D) JMP
46. Which of the following instructions is used to compare two values?
o A) CMP
o B) ADD
o C) MOV
o D) INC
47. Which addressing mode uses a register as an operand?
o A) Immediate addressing
o B) Register addressing
o C) Direct addressing
o D) Indirect addressing
48. In assembly language, what does the instruction XOR AX, AX do?
o A) Resets the AX register to 0
o B) Adds two values in AX
o C) Subtracts two values from AX
o D) Performs a logical AND on AX
49. Which of the following registers is used as a counter for looping operations in x86
assembly?
o A) CX
o B) BX
o C) AX
o D) DX
50. What is the size of a double word in x86 assembly?
o A) 2 bytes
o B) 4 bytes
o C) 8 bytes
o D) 16 bytes

You might also like