Computer Organization and Assembly Language
Introduction
Study the relationship between machine instructions, memory, processors and lower-level programming.
Topic-Wise Overview
Computer Systems
Compilation, processors, caches, storage hierarchy and operating systems
Data Representation
Binary information, integers, arithmetic and floating-point values
Machine-Level Programming
Instruction encodings, registers, procedures, arrays and pointers
Debugging and Security
Machine-level debugging, memory references and buffer overflow
Processor Design
Instruction-set architectures, hardware control and pipelining
Study Guidance
Study the complete collection of 200 Computer Organization and Assembly Language MCQs below, organized into four sets of 50. Every question has four options, a correct answer, and an explanation. Topics include computer systems, data representation, assembly instructions, CPU architecture, cache and virtual memory, pipelining, performance, input/output, storage, and machine-level security.
Explore Other Subjects
Browse Computer Science subjects
Computer Organization and Assembly Language — MCQs 1–50
Select an answer and reveal its explanation.
Question 1. CPU purpose?
- Execute machine instructions
- Store all data permanently
- Operate Wi-Fi only
- Display images only
Show correct answer and explanation
Correct answer: A. Execute machine instructions
The processor executes machine code.
Question 2. ALU purpose?
- Disk storage
- Arithmetic and logical operations
- Network routing
- Operating system installation
Show correct answer and explanation
Correct answer: B. Arithmetic and logical operations
The ALU computes numeric and logic results.
Question 3. Control unit role?
- Archive documents
- Design websites
- Direct processor control signals
- Only calculate hashes
Show correct answer and explanation
Correct answer: C. Direct processor control signals
Control logic sequences execution.
Question 4. Register definition?
- Magnetic disk
- External monitor
- Network address
- Small fast CPU storage
Show correct answer and explanation
Correct answer: D. Small fast CPU storage
Registers hold processor operands and state.
Question 5. Program counter contains?
- Next instruction address
- Hard disk size
- Number of cores
- Operating-system name
Show correct answer and explanation
Correct answer: A. Next instruction address
The PC tracks the instruction stream.
Question 6. Instruction set architecture?
- Cooling fan arrangement
- Programmer-visible instructions and machine state
- Printer control software
- Only memory size
Show correct answer and explanation
Correct answer: B. Programmer-visible instructions and machine state
ISA defines machine-level operations and interfaces.
Question 7. Opcode field?
- Contains network domain
- Always specifies a file path
- Identifies an instruction operation
- Only stores user input
Show correct answer and explanation
Correct answer: C. Identifies an instruction operation
Opcode selects the operation.
Question 8. Operand means?
- A compiler error
- A hard drive
- Only a comment
- A value or location used by an instruction
Show correct answer and explanation
Correct answer: D. A value or location used by an instruction
Instructions operate on operands.
Question 9. Assembler performs?
- Assembly to machine-code translation
- Physical circuit design
- Wi-Fi configuration
- File compression
Show correct answer and explanation
Correct answer: A. Assembly to machine-code translation
The assembler encodes mnemonics into instructions.
Question 10. Compiler performs?
- Manufacture chips
- Translation of higher-level source programs
- Operate monitor pixels
- Only encrypt files
Show correct answer and explanation
Correct answer: B. Translation of higher-level source programs
Compilers generate lower-level representations.
Question 11. Linker role?
- Issue machine instructions
- Create raw data
- Combine object modules and resolve references
- Control cooling fans
Show correct answer and explanation
Correct answer: C. Combine object modules and resolve references
Linkers connect compiled modules.
Question 12. Loader role?
- Write original source
- Design a processor
- Only manage printing
- Prepare executable program memory for running
Show correct answer and explanation
Correct answer: D. Prepare executable program memory for running
Loaders map executable segments.
Question 13. Executable means?
- A loadable program artifact
- A memory cell
- A network cable
- A text comment only
Show correct answer and explanation
Correct answer: A. A loadable program artifact
Executable formats contain program code.
Question 14. Instruction cycle?
- Only backup and restore
- Fetch decode execute sequence
- Only input and output
- Only compile and link
Show correct answer and explanation
Correct answer: B. Fetch decode execute sequence
Processors process instructions through these stages.
Question 15. A bit is?
- Eight bytes
- A whole instruction always
- One binary digit
- An address bus
Show correct answer and explanation
Correct answer: C. One binary digit
A bit has value zero or one.
Question 16. Standard byte size?
- 4 bits
- 16 bits
- 32 bits
- 8 bits
Show correct answer and explanation
Correct answer: D. 8 bits
One byte has eight bits.
Question 17. Eight-bit unsigned pattern count?
- 256
- 255
- 128
- 512
Show correct answer and explanation
Correct answer: A. 256
Two to the eighth gives 256 patterns.
Question 18. Maximum unsigned eight-bit number?
- 256
- 255
- 127
- 128
Show correct answer and explanation
Correct answer: B. 255
Range is zero through 255.
Question 19. Decimal 13 in binary?
- 1011
- 1110
- 1101
- 1001
Show correct answer and explanation
Correct answer: C. 1101
Eight plus four plus one gives thirteen.
Question 20. Binary 1010 in decimal?
- 8
- 12
- 5
- 10
Show correct answer and explanation
Correct answer: D. 10
Eight plus two gives ten.
Question 21. Binary 1111 in hexadecimal?
- F
- E
- A
- 10
Show correct answer and explanation
Correct answer: A. F
Four ones represent fifteen.
Question 22. Hexadecimal A in decimal?
- 12
- 10
- 8
- 15
Show correct answer and explanation
Correct answer: B. 10
A denotes ten in base sixteen.
Question 23. One hexadecimal digit encodes?
- 2 bits
- 8 bits
- 4 bits
- 16 bits
Show correct answer and explanation
Correct answer: C. 4 bits
Sixteen combinations need four bits.
Question 24. 1100 AND 1010?
- 1110
- 0110
- 0010
- 1000
Show correct answer and explanation
Correct answer: D. 1000
Only the high bit is one in both.
Question 25. 1100 OR 1010?
- 1110
- 1000
- 0110
- 0000
Show correct answer and explanation
Correct answer: A. 1110
OR yields one where either input is one.
Question 26. 1100 XOR 1010?
- 1110
- 0110
- 1000
- 0010
Show correct answer and explanation
Correct answer: B. 0110
XOR is one for differing bits.
Question 27. Unsigned left shift by one without lost bits?
- Divide by two
- Invert every bit
- Multiply by two
- Add one
Show correct answer and explanation
Correct answer: C. Multiply by two
The place values double.
Question 28. Unsigned right shift by one?
- Multiply by two
- Add two
- Change every bit
- Floor divide by two
Show correct answer and explanation
Correct answer: D. Floor divide by two
Dropping the low bit halves the integer.
Question 29. Two’s complement represents?
- Signed integers
- File permissions
- Network addresses only
- Only floating point
Show correct answer and explanation
Correct answer: A. Signed integers
Two’s complement encodes signed integers.
Question 30. Signed eight-bit two’s complement range?
- Zero to 255
- Negative 128 to positive 127
- Negative 127 to 128
- Zero to 127
Show correct answer and explanation
Correct answer: B. Negative 128 to positive 127
The representable interval is asymmetric.
Question 31. Eight-bit negative one encoding?
- 00000001
- 10000000
- 11111111
- 01111111
Show correct answer and explanation
Correct answer: C. 11111111
All ones encode negative one in two’s complement.
Question 32. Sign extension does?
- Only append zeros always
- Multiply by two
- Sort bytes
- Preserve signed value when widening
Show correct answer and explanation
Correct answer: D. Preserve signed value when widening
Leading copies of the sign bit preserve value.
Question 33. Zero extension does?
- Add high-order zero bits
- Add high-order ones
- Invert each bit
- Add a checksum
Show correct answer and explanation
Correct answer: A. Add high-order zero bits
Zeros preserve the unsigned magnitude.
Question 34. Fixed-width overflow means?
- Every successful addition
- Result outside representable range
- A disk error
- Only a syntax error
Show correct answer and explanation
Correct answer: B. Result outside representable range
Finite bit widths limit numeric range.
Question 35. Common floating-point standard?
- ASCII
- UTF-8
- IEEE 754
- Ethernet
Show correct answer and explanation
Correct answer: C. IEEE 754
IEEE 754 specifies binary floating-point formats.
Question 36. Floating-point exponent controls?
- CPU core count
- Disk sector
- Cache replacement
- Numeric scale
Show correct answer and explanation
Correct answer: D. Numeric scale
Exponent scales the significand.
Question 37. Floating-point significand represents?
- Significant precision digits
- A network address
- Only program length
- A page table entry
Show correct answer and explanation
Correct answer: A. Significant precision digits
It carries the meaningful digits.
Question 38. Decimal one tenth in binary floating point?
- Always exact in binary32
- Usually cannot be represented exactly with finite bits
- Always an integer
- Requires no exponent
Show correct answer and explanation
Correct answer: B. Usually cannot be represented exactly with finite bits
One tenth has a repeating binary fraction.
Question 39. NaN means?
- Next Address Number
- New Arithmetic Notation
- Not a Number
- Network Access Node
Show correct answer and explanation
Correct answer: C. Not a Number
NaN is a special floating-point value.
Question 40. Endianness specifies?
- Instruction execution order
- CPU clock speed
- Number of registers
- Byte order of multibyte values
Show correct answer and explanation
Correct answer: D. Byte order of multibyte values
It defines memory byte arrangement.
Question 41. Little endian low address contains?
- Least significant byte
- Most significant byte
- Always zero
- Only sign bit
Show correct answer and explanation
Correct answer: A. Least significant byte
The least significant byte comes first.
Question 42. Big endian low address contains?
- Least significant byte
- Most significant byte
- Always zero
- Only exponent
Show correct answer and explanation
Correct answer: B. Most significant byte
The most significant byte comes first.
Question 43. Byte addressing means?
- Each address identifies a full disk
- Only instructions are addressed
- Each address identifies a byte
- No bytes can be accessed
Show correct answer and explanation
Correct answer: C. Each address identifies a byte
Byte-addressed memory indexes bytes.
Question 44. Alignment means?
- Values are sorted
- Data are encrypted
- Instruction is skipped
- Address respects required boundary
Show correct answer and explanation
Correct answer: D. Address respects required boundary
Aligned objects begin at suitable multiples.
Question 45. Size of a 32-bit quantity?
- 4 bytes
- 8 bytes
- 16 bytes
- 2 bytes
Show correct answer and explanation
Correct answer: A. 4 bytes
32 divided by eight equals four.
Question 46. Size of a 64-bit quantity?
- 4 bytes
- 8 bytes
- 16 bytes
- 64 bytes
Show correct answer and explanation
Correct answer: B. 8 bytes
64 divided by eight equals eight.
Question 47. RAM expansion?
- Read Arithmetic Machine
- Remote Access Module
- Random Access Memory
- Register Address Mode
Show correct answer and explanation
Correct answer: C. Random Access Memory
RAM denotes random-access memory.
Question 48. Volatile memory?
- Keeps data forever
- Only optical disk
- Only firmware
- Loses contents on power removal under normal operation
Show correct answer and explanation
Correct answer: D. Loses contents on power removal under normal operation
Ordinary RAM is volatile.
Question 49. ROM traditionally stores?
- Nonvolatile firmware or read-only data
- Only temporary stacks
- Only network packets
- CPU execution flags
Show correct answer and explanation
Correct answer: A. Nonvolatile firmware or read-only data
ROM is nonvolatile storage.
Question 50. Cache memory?
- Slow archival tape
- Fast storage of useful recently accessed data
- A network cable
- Only display memory
Show correct answer and explanation
Correct answer: B. Fast storage of useful recently accessed data
Caches exploit locality.
Computer Organization and Assembly Language MCQs — Questions 51–100
Choose an option and reveal the answer and explanation.
Question 51. Temporal locality?
- Nearby data are never used
- Every access is random
- Recent data may be reused soon
- All data are permanent
Show correct answer and explanation
Correct answer: C. Recent data may be reused soon
Caches exploit recent access patterns.
Question 52. Spatial locality?
- Only one register is used
- Every access repeats the same address
- All addresses are distant
- Nearby addresses may be used soon
Show correct answer and explanation
Correct answer: D. Nearby addresses may be used soon
Cache blocks exploit spatial locality.
Question 53. Cache hit?
- Requested block found in cache
- Cache is full necessarily
- A page fault always occurs
- Data were deleted
Show correct answer and explanation
Correct answer: A. Requested block found in cache
Hits use a fast storage level.
Question 54. Cache miss?
- CPU has stopped
- Requested block not present
- All data lost
- Only a network error
Show correct answer and explanation
Correct answer: B. Requested block not present
Misses fetch data from a lower level.
Question 55. Cache line?
- One opcode
- A CPU core
- A block of contiguous bytes stored in cache
- A disk directory
Show correct answer and explanation
Correct answer: C. A block of contiguous bytes stored in cache
Caches transfer blocks.
Question 56. Direct-mapped cache?
- Any line available
- No cache address
- Only random placement
- One possible cache line per memory block
Show correct answer and explanation
Correct answer: D. One possible cache line per memory block
Each block maps to one index.
Question 57. Fully associative cache?
- Any eligible cache line can hold a block
- Exactly one location for a block
- Only ROM data
- No tags
Show correct answer and explanation
Correct answer: A. Any eligible cache line can hold a block
Placement is unrestricted by fixed indexing.
Question 58. LRU replacement?
- Always evicts newest line
- Evicts least recently used line
- Deletes all data
- Uses only addresses
Show correct answer and explanation
Correct answer: B. Evicts least recently used line
LRU favors recent accesses.
Question 59. Write-through cache?
- Never writes data
- Always delays all writes until eviction
- Propagates writes to a lower level
- Only reads
Show correct answer and explanation
Correct answer: C. Propagates writes to a lower level
Backing storage is updated as part of the write policy.
Question 60. Write-back cache?
- Never records writes
- Requires write through each store
- Only caches instructions
- Defers lower-level updates for dirty lines
Show correct answer and explanation
Correct answer: D. Defers lower-level updates for dirty lines
Dirty lines may be written later.
Question 61. Virtual address?
- An address within a process virtual space
- Only a hard disk sector
- A network MAC address
- A physical CPU serial number
Show correct answer and explanation
Correct answer: A. An address within a process virtual space
Address translation maps virtual addresses.
Question 62. Page table?
- Records compiler warnings
- Records page mappings and permissions
- Stores monitor settings
- Stores only process names
Show correct answer and explanation
Correct answer: B. Records page mappings and permissions
Page tables support virtual memory.
Question 63. TLB?
- Temporary Loading Bus
- Terminal Logic Binary
- Translation Lookaside Buffer
- Transfer Link Buffer
Show correct answer and explanation
Correct answer: C. Translation Lookaside Buffer
A TLB caches translations.
Question 64. Page fault?
- Always a hardware defect
- A compiler error
- Every cache hit
- Access requiring virtual-memory fault handling
Show correct answer and explanation
Correct answer: D. Access requiring virtual-memory fault handling
Fault handlers can load pages or enforce access rights.
Question 65. Virtual memory benefit?
- Address-space abstraction and protection
- Unlimited physical memory
- No possible page faults
- Only image compression
Show correct answer and explanation
Correct answer: A. Address-space abstraction and protection
Virtual memory isolates process addresses.
Question 66. Stack organization?
- First in first out only
- Last in first out
- Random order
- Sorted order
Show correct answer and explanation
Correct answer: B. Last in first out
Recent pushes are popped first.
Question 67. Stack pointer?
- Tracks hard drive size
- Tracks network ports
- Tracks current stack position
- Stores only an opcode
Show correct answer and explanation
Correct answer: C. Tracks current stack position
SP denotes a stack boundary.
Question 68. Call instruction?
- Deletes code
- Resets the CPU
- Only initializes memory
- Transfers control to a subroutine and saves return information
Show correct answer and explanation
Correct answer: D. Transfers control to a subroutine and saves return information
Calls enable procedures.
Question 69. Return instruction?
- Resumes execution at a saved return point
- Always reboots
- Allocates physical RAM
- Only sets zero flag
Show correct answer and explanation
Correct answer: A. Resumes execution at a saved return point
Return restores caller flow.
Question 70. Stack frame?
- Only network packets
- Stores activation-related local and saved information
- Only user passwords
- Only disk sectors
Show correct answer and explanation
Correct answer: B. Stores activation-related local and saved information
Frames organize procedure data.
Question 71. MOV instruction?
- Multiply two integers only
- Always jump
- Move or copy data
- Stop processor
Show correct answer and explanation
Correct answer: C. Move or copy data
MOV transfers values between supported operands.
Question 72. ADD instruction?
- Perform bitwise NOT
- Always branch
- Read disk sector
- Perform addition
Show correct answer and explanation
Correct answer: D. Perform addition
ADD computes sums.
Question 73. SUB instruction?
- Perform subtraction
- Compute an OR operation
- Store a file
- Decode Unicode
Show correct answer and explanation
Correct answer: A. Perform subtraction
SUB computes a difference.
Question 74. CMP instruction?
- Copy all registers
- Compare operands and update status flags in common ISAs
- Always multiply values
- Stop all interrupts
Show correct answer and explanation
Correct answer: B. Compare operands and update status flags in common ISAs
Comparison often sets condition status.
Question 75. Unconditional jump?
- Only jumps when zero flag is set
- Always returns
- Transfers control without testing a condition
- Only reads memory
Show correct answer and explanation
Correct answer: C. Transfers control without testing a condition
Unconditional branches redirect execution.
Question 76. Conditional branch?
- Always transfers control
- Always clears memory
- Only executes on startup
- Uses condition flags or predicate to choose a target
Show correct answer and explanation
Correct answer: D. Uses condition flags or predicate to choose a target
Branches choose paths according to conditions.
Question 77. Zero flag?
- Indicates zero result of a relevant operation
- CPU is powered off
- All registers are cleared
- Disk is full
Show correct answer and explanation
Correct answer: A. Indicates zero result of a relevant operation
Zero status helps conditional branching.
Question 78. Carry flag?
- Only signed overflow
- Indicates carry or borrow conditions for unsigned arithmetic
- Network transmission loss
- Only page faults
Show correct answer and explanation
Correct answer: B. Indicates carry or borrow conditions for unsigned arithmetic
Carry is useful in unsigned calculations.
Question 79. Overflow flag?
- A full cache
- A DNS lookup failure
- Indicates signed arithmetic overflow in relevant operations
- A system reboot
Show correct answer and explanation
Correct answer: C. Indicates signed arithmetic overflow in relevant operations
Signed overflow differs from carry.
Question 80. Increment operation?
- Squares a value
- Divides by two always
- Clears all bits
- Adds one to a value
Show correct answer and explanation
Correct answer: D. Adds one to a value
Increment increases a value by one.
Question 81. Immediate addressing?
- Uses a literal value in an instruction
- Only a pointer in memory
- Only a network URL
- Only the stack top
Show correct answer and explanation
Correct answer: A. Uses a literal value in an instruction
Immediate operands are encoded constants.
Question 82. Register addressing?
- Uses a disk block
- Uses a CPU register operand
- Uses only a memory-mapped device
- Uses a domain name
Show correct answer and explanation
Correct answer: B. Uses a CPU register operand
The register provides the operand.
Question 83. Direct addressing?
- Always accesses a literal only
- Only uses the stack pointer
- Specifies a memory address through instruction encoding
- Always uses no memory
Show correct answer and explanation
Correct answer: C. Specifies a memory address through instruction encoding
The instruction identifies a memory location.
Question 84. Register-indirect addressing?
- Uses an immediate constant as the data only
- Reads an opcode as data
- Discards the register
- Uses an address held in a register
Show correct answer and explanation
Correct answer: D. Uses an address held in a register
A register acts as a pointer.
Question 85. Indexed addressing?
- Computes effective address using index-related components
- Only updates status flags
- Only changes instruction length
- Always uses address zero
Show correct answer and explanation
Correct answer: A. Computes effective address using index-related components
Indexed modes support array access.
Question 86. Pointer?
- Stores only a floating-point exponent
- Stores an address or reference to data
- Must equal zero
- Only identifies a CPU core
Show correct answer and explanation
Correct answer: B. Stores an address or reference to data
Pointers refer to locations.
Question 87. Array element byte offset?
- Always equal to index
- Only array capacity
- Index multiplied by element size for contiguous fixed-size elements
- Only element value
Show correct answer and explanation
Correct answer: C. Index multiplied by element size for contiguous fixed-size elements
Scaled indexing locates array entries.
Question 88. Memory alignment?
- Only sorts array values
- Only encrypts data
- Only selects a stack frame
- Places data at suitable address boundaries
Show correct answer and explanation
Correct answer: D. Places data at suitable address boundaries
Alignment may matter for hardware accesses.
Question 89. Memory-mapped I/O?
- Device registers appear at designated addresses
- Only disk files count as devices
- Devices never use registers
- Only external URLs access hardware
Show correct answer and explanation
Correct answer: A. Device registers appear at designated addresses
Software accesses mapped device controls.
Question 90. Interrupt?
- Only a compile error
- Event that redirects execution to a handler
- Only a branch prediction
- Only a stack overflow
Show correct answer and explanation
Correct answer: B. Event that redirects execution to a handler
Interrupt handling services events.
Question 91. Interrupt service routine?
- A source compiler
- Only a hardware cable
- Code that handles an interrupt
- A DNS resolver
Show correct answer and explanation
Correct answer: C. Code that handles an interrupt
An ISR responds to interrupts.
Question 92. Polling?
- Always waits for interrupts only
- Encrypts every device register
- Only allocates RAM
- Repeatedly checks device status
Show correct answer and explanation
Correct answer: D. Repeatedly checks device status
Polling examines readiness.
Question 93. DMA?
- Direct Memory Access
- Dynamic Machine Arithmetic
- Data Mapping Array
- Digital Memory Algorithm
Show correct answer and explanation
Correct answer: A. Direct Memory Access
DMA performs transfers with limited CPU involvement.
Question 94. Bus bandwidth?
- Only number of assembly keywords
- Data transfer capacity of an interconnect
- Only RAM size
- Only number of users
Show correct answer and explanation
Correct answer: B. Data transfer capacity of an interconnect
Bandwidth measures transferable data rate.
Question 95. System bus?
- Only a software class
- Only a file index
- Carries information among hardware components
- Only a website
Show correct answer and explanation
Correct answer: C. Carries information among hardware components
Buses convey data addresses or control.
Question 96. Instruction pipelining?
- Always performs one instruction at a time without overlap
- Eliminates memory
- Requires no control logic
- Overlaps stages of multiple instructions
Show correct answer and explanation
Correct answer: D. Overlaps stages of multiple instructions
Pipelining improves potential throughput.
Question 97. Data hazard?
- Dependence on results of earlier instructions
- Only wrong DNS address
- Only a disk fault
- Only overheating
Show correct answer and explanation
Correct answer: A. Dependence on results of earlier instructions
Dependencies can delay pipelines.
Question 98. Control hazard?
- Only register allocation
- Uncertain instruction path due to branches
- Only cache replacement
- Only binary encoding
Show correct answer and explanation
Correct answer: B. Uncertain instruction path due to branches
Branch decisions can change fetch flow.
Question 99. Structural hazard?
- Only two variables share a name
- Only an invalid opcode
- Competing instructions require the same limited resource
- Only a stack pop
Show correct answer and explanation
Correct answer: C. Competing instructions require the same limited resource
Resource conflicts cause stalls.
Question 100. Branch prediction?
- Ensures every branch correct
- Removes jumps
- Only encrypts code
- Speculatively estimates branch outcome
Show correct answer and explanation
Correct answer: D. Speculatively estimates branch outcome
Prediction keeps pipelines busy.
Computer Organization and Assembly Language MCQs — Questions 101–150
Reveal the answer and explanation after considering each question.
Question 101. CPU instruction-level parallelism?
- Independent instructions overlap in execution
- Only multiple applications start
- Every code line runs twice
- CPU frequency doubles
Show correct answer and explanation
Correct answer: A. Independent instructions overlap in execution
ILP exploits independent instructions.
Question 102. Pipeline cycle time primarily depends on?
- Shortest stage only
- Slowest pipeline stage plus overhead
- Total program lines
- Disk capacity
Show correct answer and explanation
Correct answer: B. Slowest pipeline stage plus overhead
A stage bottleneck limits clock speed.
Question 103. Ideal 5-stage pipeline first result after?
- 1 cycle
- 10 cycles
- 5 cycles
- 2 cycles
Show correct answer and explanation
Correct answer: C. 5 cycles
The first instruction completes all five stages.
Question 104. Ideal 5-stage pipeline completing 10 instructions uses?
- 10 cycles
- 50 cycles
- 5 cycles
- 14 cycles
Show correct answer and explanation
Correct answer: D. 14 cycles
Total ideal latency equals 5+10-1 cycles.
Question 105. One-issue ideal pipeline steady throughput?
- One instruction per cycle
- Five instructions per cycle always
- One per five cycles
- No completion
Show correct answer and explanation
Correct answer: A. One instruction per cycle
Once full the pipeline can retire one per cycle.
Question 106. Read-after-write hazard?
- Two instructions only read a value
- A later instruction requires an earlier result
- Two instructions write independent registers
- A cache miss alone
Show correct answer and explanation
Correct answer: B. A later instruction requires an earlier result
RAW is a true dependency.
Question 107. Write-after-read hazard?
- A later read requires an earlier write
- Only two reads
- A later write may overtake an earlier read
- A power failure
Show correct answer and explanation
Correct answer: C. A later write may overtake an earlier read
WAR is an anti-dependency.
Question 108. Write-after-write hazard?
- Two separate reads
- A page fault
- Two branches use the same target
- Two writes to one logical destination may be reordered
Show correct answer and explanation
Correct answer: D. Two writes to one logical destination may be reordered
WAW is an output dependency.
Question 109. Register renaming reduces?
- False register dependencies
- All RAW dependencies
- All memory delays
- All cache misses
Show correct answer and explanation
Correct answer: A. False register dependencies
Physical register mapping removes WAR and WAW restrictions.
Question 110. Out-of-order execution?
- Violates all dependencies
- Executes ready instructions around stalled earlier ones
- Always changes program meaning
- Only reorders files
Show correct answer and explanation
Correct answer: B. Executes ready instructions around stalled earlier ones
Scheduling can improve resource utilization.
Question 111. Instruction retirement in order supports?
- Only faster disks
- Disabling interrupts
- Precise architectural state
- Only debugging symbols
Show correct answer and explanation
Correct answer: C. Precise architectural state
Ordered commit maintains exceptions and visible state.
Question 112. Reorder buffer function?
- Store website files
- Count CPU pins
- Assign network ports
- Track speculative work for ordered retirement
Show correct answer and explanation
Correct answer: D. Track speculative work for ordered retirement
ROB entries manage instruction completion.
Question 113. Speculative execution?
- Run predicted work before outcomes become certain
- Always remove branch instructions
- Read only ROM
- Require no dependencies
Show correct answer and explanation
Correct answer: A. Run predicted work before outcomes become certain
Predicted paths may execute before confirmation.
Question 114. Branch predictor role?
- Select CPU voltage alone
- Estimate branch direction or target
- Create passwords
- Encrypt program data
Show correct answer and explanation
Correct answer: B. Estimate branch direction or target
Prediction reduces fetch stalls.
Question 115. Branch misprediction penalty?
- All data are lost
- RAM capacity doubles
- Wrong-path work must be discarded
- CPU instructions become longer
Show correct answer and explanation
Correct answer: C. Wrong-path work must be discarded
Incorrect speculation wastes cycles.
Question 116. CPI represents?
- Core count per instruction
- Cache pages per input
- Characters per identifier
- Average cycles per retired instruction
Show correct answer and explanation
Correct answer: D. Average cycles per retired instruction
CPI is average clocks per instruction.
Question 117. 2 GHz clock with CPI 2 yields approximately?
- 1 billion instructions per second
- 2 billion
- 4 billion
- 500 thousand
Show correct answer and explanation
Correct answer: A. 1 billion instructions per second
2 billion cycles divided by 2 CPI gives 1 billion.
Question 118. IPC denotes?
- Interrupts per codeword
- Instructions per cycle
- Inputs per cache
- Indices per core
Show correct answer and explanation
Correct answer: B. Instructions per cycle
IPC measures retired instructions per cycle.
Question 119. CPU execution time formula?
- Only RAM size times CPU frequency
- Only instruction length
- Instruction count times CPI times cycle time
- Only file size
Show correct answer and explanation
Correct answer: C. Instruction count times CPI times cycle time
Cycle count is instruction count times CPI.
Question 120. Clock frequency measures?
- Instructions per clock always
- Cache capacity
- Number of ALUs
- Clock cycles per second
Show correct answer and explanation
Correct answer: D. Clock cycles per second
Hertz measures cycles each second.
Question 121. Clock speed alone is insufficient because?
- Instruction counts and CPI vary
- All ISAs are identical
- CPI always equals one
- Compiler choice is irrelevant
Show correct answer and explanation
Correct answer: A. Instruction counts and CPI vary
Performance depends on more than frequency.
Question 122. Amdahl law describes?
- Only cache line placement
- Speedup limits from unaccelerated work
- Only disk throughput
- Only machine code length
Show correct answer and explanation
Correct answer: B. Speedup limits from unaccelerated work
Serial work restricts total acceleration.
Question 123. Half the time improved twofold gives total speedup?
- 2
- 3
- 4/3
- 4
Show correct answer and explanation
Correct answer: C. 4/3
New time 0.5+0.25=0.75, inverse 4/3.
Question 124. If 20 percent remains serial maximum speedup?
- 10
- 20
- Infinite
- 5
Show correct answer and explanation
Correct answer: D. 5
1 divided by 0.2 equals five.
Question 125. Throughput measures?
- Completed work per unit time
- Only latency of one request
- Only cache hit rate
- CPU temperature
Show correct answer and explanation
Correct answer: A. Completed work per unit time
Throughput is a processing rate.
Question 126. SIMD means?
- Several instructions on one datum necessarily
- One instruction applied to multiple data lanes
- Only independent programs
- One CPU core only
Show correct answer and explanation
Correct answer: B. One instruction applied to multiple data lanes
SIMD exploits data parallelism.
Question 127. Multicore processor?
- Contains only multiple registers
- Has no cache
- Contains multiple processing cores
- Uses only one instruction set word
Show correct answer and explanation
Correct answer: C. Contains multiple processing cores
Different cores execute work concurrently.
Question 128. Simultaneous multithreading?
- Runs only one software thread
- Guarantees 2x speedup
- Disables scheduling
- Shares one core among multiple hardware threads
Show correct answer and explanation
Correct answer: D. Shares one core among multiple hardware threads
SMT improves utilization of shared execution units.
Question 129. Race condition?
- Outcome depends on unsafe timing of concurrent operations
- A cache hit
- Arithmetic overflow only
- A fast program
Show correct answer and explanation
Correct answer: A. Outcome depends on unsafe timing of concurrent operations
Unsynchronized shared access can change results.
Question 130. Atomic read-modify-write?
- All memory accesses are encrypted
- An indivisible update relative to relevant observers
- Every thread waits forever
- Only one CPU exists
Show correct answer and explanation
Correct answer: B. An indivisible update relative to relevant observers
Atomic operations help coordinate threads.
Question 131. Mutex use?
- Increase page size
- Encrypt memory
- Protect critical section with mutual exclusion
- Change clock rate
Show correct answer and explanation
Correct answer: C. Protect critical section with mutual exclusion
Only the lock holder enters the protected region.
Question 132. Deadlock scenario?
- All threads finish
- No shared state exists
- Only two arithmetic instructions run
- Threads wait cyclically on resources
Show correct answer and explanation
Correct answer: D. Threads wait cyclically on resources
Circular wait can prevent progress.
Question 133. Cache coherence?
- Maintain consistent shared-data cache views
- Only increase cache size
- Encrypt all cache lines
- Disable writes
Show correct answer and explanation
Correct answer: A. Maintain consistent shared-data cache views
Coherence protocols coordinate copies.
Question 134. Write-invalidate protocol?
- Writes every file to disk
- Invalidates competing copies before exclusive modification
- Always broadcasts passwords
- Removes all caches
Show correct answer and explanation
Correct answer: B. Invalidates competing copies before exclusive modification
Invalidation helps maintain shared memory consistency.
Question 135. False sharing?
- Two threads share the same logical variable
- A cryptographic collision
- Independent variables on one cache line cause coherence traffic
- A disk formatting error
Show correct answer and explanation
Correct answer: C. Independent variables on one cache line cause coherence traffic
Cache-line granularity can create unwanted contention.
Question 136. Memory consistency model?
- Physical RAM manufacturer
- Only register count
- A file format
- Permitted ordering of shared-memory operations
Show correct answer and explanation
Correct answer: D. Permitted ordering of shared-memory operations
Models define what threads may observe.
Question 137. Memory fence?
- Constrains ordering of memory operations
- Encrypts stack frames
- Updates BIOS
- Changes every opcode
Show correct answer and explanation
Correct answer: A. Constrains ordering of memory operations
Fences enforce specified ordering.
Question 138. Context switch?
- Convert integer bases
- Save one task state and load another
- Replace a hardware core
- Invalidate every file
Show correct answer and explanation
Correct answer: B. Save one task state and load another
OS switches executing contexts.
Question 139. User mode?
- Gives full device access
- Means firmware boot only
- Restricts application execution privileges
- Disables memory protection
Show correct answer and explanation
Correct answer: C. Restricts application execution privileges
Applications generally execute with limited privileges.
Question 140. Kernel mode?
- Only reads user files
- Means a source programming language
- A cache coherence state
- Enables privileged operating-system operations
Show correct answer and explanation
Correct answer: D. Enables privileged operating-system operations
Kernel code has elevated hardware control.
Question 141. Load-store architecture?
- Arithmetic primarily uses registers with separate memory access instructions
- All arithmetic acts directly on disk
- All instructions include memory writes
- Registers cannot contain data
Show correct answer and explanation
Correct answer: A. Arithmetic primarily uses registers with separate memory access instructions
Load-store designs isolate memory operations.
Question 142. RISC commonly emphasizes?
- Only huge microcoded instructions
- Relatively simple regular instruction formats and operations
- No registers
- Only stack instruction sets
Show correct answer and explanation
Correct answer: B. Relatively simple regular instruction formats and operations
RISC conventions facilitate decoding and pipelining.
Question 143. CISC traditionally emphasizes?
- Only one instruction
- No microarchitecture
- A larger range of instruction forms and addressing capabilities
- No operand modes
Show correct answer and explanation
Correct answer: C. A larger range of instruction forms and addressing capabilities
CISC denotes complex instruction-set designs.
Question 144. Microcode is?
- Only source comments
- A network security algorithm
- A storage filesystem
- Internal control sequences implementing some machine instructions
Show correct answer and explanation
Correct answer: D. Internal control sequences implementing some machine instructions
Microprogrammed control can realize ISA behavior.
Question 145. Microarchitecture describes?
- Hardware organization implementing an ISA
- Only a user manual
- Only the ISA instruction names
- Only the compiler language
Show correct answer and explanation
Correct answer: A. Hardware organization implementing an ISA
Different processor designs can implement the same ISA.
Question 146. An exception differs from a typical external interrupt by?
- Always being generated by keyboard input
- Often being caused synchronously by the executing instruction
- Never involving operating-system handling
- Always halting the CPU permanently
Show correct answer and explanation
Correct answer: B. Often being caused synchronously by the executing instruction
Exceptions arise from instruction execution conditions.
Question 147. A system call permits?
- Unrestricted access to kernel memory
- Direct power supply replacement
- User software to request kernel services through a controlled interface
- Only a compiler warning
Show correct answer and explanation
Correct answer: C. User software to request kernel services through a controlled interface
System calls cross a privilege boundary.
Question 148. Privilege levels protect?
- Only printed output
- Only program names
- Only disk file extensions
- Sensitive processor operations and memory resources
Show correct answer and explanation
Correct answer: D. Sensitive processor operations and memory resources
Hardware privilege supports isolation.
Question 149. A timer interrupt is useful for?
- Preemptive operating-system scheduling
- Directly compiling source code
- Always increasing RAM
- Storing cache tags
Show correct answer and explanation
Correct answer: A. Preemptive operating-system scheduling
Timers let the OS regain control.
Question 150. A memory protection fault may arise from?
- An ordinary cache hit
- Access violating a page or segment permission
- Successful register write
- Valid arithmetic multiplication
Show correct answer and explanation
Correct answer: B. Access violating a page or segment permission
Protection prevents unauthorized memory accesses.
Computer Organization and Assembly Language MCQs — Questions 151–200
Choose the correct option and reveal its explanation.
Question 151. What is an instruction encoding?
- Only a source code comment
- A hardware cooling profile
- Binary representation of an ISA instruction
- A disk block address
Show correct answer and explanation
Correct answer: C. Binary representation of an ISA instruction
Machine instructions are encoded as bit fields.
Question 152. A fixed-length instruction format helps?
- Guarantee smallest code size
- Eliminate all registers
- Remove all branches
- Simplify instruction fetching and decoding
Show correct answer and explanation
Correct answer: D. Simplify instruction fetching and decoding
Uniform widths simplify boundaries and decode.
Question 153. Variable-length instructions can improve?
- Code density for some workloads
- Guaranteed constant decoding effort
- Elimination of alignment considerations
- Removal of memory operands
Show correct answer and explanation
Correct answer: A. Code density for some workloads
Short encodings may save instruction storage.
Question 154. What is an addressing mode?
- The CPU brand
- A rule describing how an instruction obtains its operand or effective address
- A security role
- Only a clock frequency
Show correct answer and explanation
Correct answer: B. A rule describing how an instruction obtains its operand or effective address
Addressing modes interpret operand fields.
Question 155. PC-relative addressing computes a target from?
- Only the stack base
- A disk serial number
- Program-counter-related value and signed displacement
- Only the source filename
Show correct answer and explanation
Correct answer: C. Program-counter-related value and signed displacement
Relative branches encode displacement from an architectural PC reference.
Question 156. Why is PC-relative addressing useful?
- It removes branch prediction
- It requires no instructions
- It disables relocation
- Code can branch using offsets without fixed absolute addresses
Show correct answer and explanation
Correct answer: D. Code can branch using offsets without fixed absolute addresses
Relative addresses aid position-independent control flow.
Question 157. A relocation entry in object code helps?
- Adjust address-dependent references during linking or loading
- Increase CPU voltage
- Encrypt opcodes
- Choose the cache victim
Show correct answer and explanation
Correct answer: A. Adjust address-dependent references during linking or loading
Relocation corrects references after placement.
Question 158. A symbol table in an assembler or linker records?
- Only user passwords
- Names and associated address or binding information
- Only runtime cache misses
- Only memory refresh rates
Show correct answer and explanation
Correct answer: B. Names and associated address or binding information
Symbols connect names to machine locations.
Question 159. A label in assembly commonly identifies?
- A hardware peripheral only
- A CPU register in every ISA
- An instruction or data location for reference
- A network port
Show correct answer and explanation
Correct answer: C. An instruction or data location for reference
Labels make branches and addresses readable.
Question 160. What is a pseudo-instruction?
- Always a privileged opcode
- A CPU manufacturing command
- An illegal instruction only
- An assembler-level notation translated into one or more actual machine instructions
Show correct answer and explanation
Correct answer: D. An assembler-level notation translated into one or more actual machine instructions
Assemblers may expand convenient mnemonics.
Question 161. Why do calling conventions matter?
- They coordinate register use argument passing and return behavior across procedures
- They specify disk rotation
- They determine web page color
- They replace ISA definitions
Show correct answer and explanation
Correct answer: A. They coordinate register use argument passing and return behavior across procedures
Shared conventions make separately compiled procedures interoperable.
Question 162. What is a callee-saved register?
- A register that every call must clear
- A register the called procedure must preserve under the ABI when it uses it
- A memory-mapped device
- Only the return address
Show correct answer and explanation
Correct answer: B. A register the called procedure must preserve under the ABI when it uses it
The callee restores designated registers before returning.
Question 163. What is a caller-saved register?
- A register the callee can never change
- Only a stack pointer
- A register whose value a caller must preserve if needed across a call
- A CPU cache line
Show correct answer and explanation
Correct answer: C. A register whose value a caller must preserve if needed across a call
Callers protect values they need afterward.
Question 164. How are many function arguments passed under modern ABIs?
- Only via keyboard input
- Only through disk files
- Only through instruction opcodes
- Through designated registers with stack space when needed
Show correct answer and explanation
Correct answer: D. Through designated registers with stack space when needed
Calling conventions define argument locations.
Question 165. What does a stack overflow in recursive calls often indicate?
- Excessive stack growth beyond available stack space
- A signed integer overflow always
- Only a cache miss
- A valid return value
Show correct answer and explanation
Correct answer: A. Excessive stack growth beyond available stack space
Deep recursion can exhaust the call stack.
Question 166. Why are stack frames allocated for procedures?
- To store network routing tables only
- To manage locals saved registers and call-related state
- To replace all registers
- To encrypt source code
Show correct answer and explanation
Correct answer: B. To manage locals saved registers and call-related state
Frames organize temporary activation storage.
Question 167. What is a leaf function?
- A function with no arguments
- A function with no return value
- A procedure that makes no further procedure calls
- Only an interrupt handler
Show correct answer and explanation
Correct answer: C. A procedure that makes no further procedure calls
Leaf procedures invoke no other functions.
Question 168. What is tail-call optimization?
- Converting every loop into recursion
- Eliminating all functions
- Always increasing stack depth
- Reusing a call frame when a call occurs in tail position and constraints permit
Show correct answer and explanation
Correct answer: D. Reusing a call frame when a call occurs in tail position and constraints permit
Tail calls may avoid additional stack growth.
Question 169. What is reentrant code?
- Code that can safely be entered again before a prior invocation completes under suitable conditions
- Code that runs only once
- Code without instructions
- A function with one local variable
Show correct answer and explanation
Correct answer: A. Code that can safely be entered again before a prior invocation completes under suitable conditions
Reentrancy requires appropriate state management.
Question 170. Why is stack alignment often required by an ABI?
- To ensure every function is recursive
- To meet operand access and procedure interoperability rules
- To eliminate memory errors automatically
- Only for screen drawing
Show correct answer and explanation
Correct answer: B. To meet operand access and procedure interoperability rules
Alignment can be required at call boundaries.
Question 171. What is an I/O controller?
- A source editor
- A data structure for sorting
- Hardware coordinating communication with a peripheral
- A compiler pass
Show correct answer and explanation
Correct answer: C. Hardware coordinating communication with a peripheral
Controllers manage device signals and data.
Question 172. What is programmed I/O?
- Every transfer occurs solely through DMA
- Only disk encryption
- A wireless network protocol
- CPU executes instructions to transfer data with a device
Show correct answer and explanation
Correct answer: D. CPU executes instructions to transfer data with a device
CPU-driven I/O performs the transfers.
Question 173. Why is interrupt-driven I/O useful?
- The CPU need not poll continuously for every device event
- Interrupts eliminate all latency
- It makes devices faster than RAM always
- It requires no handlers
Show correct answer and explanation
Correct answer: A. The CPU need not poll continuously for every device event
Devices can signal when attention is needed.
Question 174. How does DMA improve large transfers?
- It disables memory
- A controller moves blocks between device and memory with less per-byte CPU involvement
- It encrypts all files
- It replaces physical buses
Show correct answer and explanation
Correct answer: B. A controller moves blocks between device and memory with less per-byte CPU involvement
DMA reduces CPU copying overhead.
Question 175. What is memory-mapped I/O?
- A disk is always treated as RAM
- All instructions are I/O instructions
- Device registers are accessed through assigned address ranges
- Only file names identify devices
Show correct answer and explanation
Correct answer: C. Device registers are accessed through assigned address ranges
Address reads and writes may operate hardware registers.
Question 176. What is a solid-state drive based on?
- Magnetic rotating platters exclusively
- A paper tape
- Only volatile CPU registers
- Nonvolatile semiconductor storage
Show correct answer and explanation
Correct answer: D. Nonvolatile semiconductor storage
SSDs commonly use flash memory.
Question 177. A hard disk drive stores information on?
- Rotating magnetic media
- Only SRAM cells
- Only processor registers
- Optical fiber
Show correct answer and explanation
Correct answer: A. Rotating magnetic media
HDDs use magnetized spinning platters.
Question 178. Seek time for a hard drive is?
- Only data transmission time
- Time spent positioning the read/write head over a track
- Time to compile a driver
- Network propagation delay
Show correct answer and explanation
Correct answer: B. Time spent positioning the read/write head over a track
Mechanical head movement contributes to access latency.
Question 179. Rotational latency in a disk is?
- Time to install the OS
- CPU clock period
- Waiting for the desired sector to rotate under the head
- RAM refresh time
Show correct answer and explanation
Correct answer: C. Waiting for the desired sector to rotate under the head
Sector position adds rotational waiting.
Question 180. What is storage throughput?
- Only the number of files
- Only seek time
- The number of passwords
- Amount of data transferred per unit time
Show correct answer and explanation
Correct answer: D. Amount of data transferred per unit time
Throughput quantifies transfer rate.
Question 181. A memory hierarchy places faster smaller storage generally?
- Closer to the CPU than slower larger storage
- Always on external disks
- Only in the cloud
- Only in firmware
Show correct answer and explanation
Correct answer: A. Closer to the CPU than slower larger storage
Registers and caches are near the processor.
Question 182. Why is SRAM often used for CPU caches?
- It is always nonvolatile
- It offers low-latency access without DRAM-style refresh
- It has higher density than DRAM
- It requires a spinning disk
Show correct answer and explanation
Correct answer: B. It offers low-latency access without DRAM-style refresh
SRAM trades area and cost for speed.
Question 183. Why is DRAM common in main memory?
- It never needs refresh
- It is nonvolatile
- It offers greater density at comparatively lower cost per bit
- It uses mechanical platters
Show correct answer and explanation
Correct answer: C. It offers greater density at comparatively lower cost per bit
DRAM is denser than typical SRAM.
Question 184. What does DRAM refresh do?
- Defragment storage
- Encrypt memory pages
- Increase register count
- Restore charge information in storage cells periodically
Show correct answer and explanation
Correct answer: D. Restore charge information in storage cells periodically
Capacitor charge leaks and needs refresh.
Question 185. What is cache miss penalty?
- Additional time to obtain data absent from the current cache
- Every instruction’s fixed opcode size
- The number of clock cores
- Only a compilation warning
Show correct answer and explanation
Correct answer: A. Additional time to obtain data absent from the current cache
Miss penalty measures extra access delay.
Question 186. Average memory access time can be approximated as?
- Hit rate divided by CPU count
- Hit time plus miss rate times miss penalty
- Instruction count times power
- Disk capacity plus RAM size
Show correct answer and explanation
Correct answer: B. Hit time plus miss rate times miss penalty
The simple AMAT model accounts for misses.
Question 187. If cache hit time is 1 ns miss rate 10 percent and miss penalty 50 ns then AMAT is?
- 5 ns
- 51 ns
- 6 ns
- 1.5 ns
Show correct answer and explanation
Correct answer: C. 6 ns
1 plus 0.1 times 50 equals 6 nanoseconds.
Question 188. If a cache has hit rate 95 percent what is its miss rate?
- 95 percent
- 10 percent
- 0 percent
- 5 percent
Show correct answer and explanation
Correct answer: D. 5 percent
Miss rate is 100 minus hit percentage.
Question 189. A compulsory cache miss occurs?
- When a block is first accessed without previously being in that cache
- Only when cache is full
- Only because of associativity
- Only from branch misprediction
Show correct answer and explanation
Correct answer: A. When a block is first accessed without previously being in that cache
Cold-start misses occur on first reference.
Question 190. A conflict cache miss occurs when?
- The first block is ever accessed
- Blocks compete for limited placements within a cache set
- The CPU lacks an ALU
- A disk file is deleted
Show correct answer and explanation
Correct answer: B. Blocks compete for limited placements within a cache set
Set mapping can cause misses even when total cache capacity could hold blocks.
Question 191. What is a capacity miss?
- Only initial compulsory access
- Only an interrupt
- A miss caused by insufficient cache capacity for needed working data
- Only a program-counter change
Show correct answer and explanation
Correct answer: C. A miss caused by insufficient cache capacity for needed working data
Working sets exceeding capacity produce capacity misses.
Question 192. A direct-mapped cache with 16 lines uses how many index bits?
- 2
- 8
- 16
- 4
Show correct answer and explanation
Correct answer: D. 4
Sixteen possible line indices need log2(16)=4 bits.
Question 193. A 64-byte cache block uses how many byte-offset bits?
- 6
- 4
- 8
- 16
Show correct answer and explanation
Correct answer: A. 6
Sixty-four bytes require six bits to select a byte.
Question 194. A two-way set-associative cache permits?
- Only one cache line total
- Two candidate lines per indexed set
- Any line in the entire cache
- Four lines per set necessarily
Show correct answer and explanation
Correct answer: B. Two candidate lines per indexed set
Two ways offer two placements within a set.
Question 195. Cache tags are used to?
- Store only CPU temperature
- Encrypt all addresses
- Determine which memory block occupies a selected line
- Choose branch direction
Show correct answer and explanation
Correct answer: C. Determine which memory block occupies a selected line
Tags distinguish blocks sharing a set index.
Question 196. Why can buffer overflow attacks threaten programs?
- They only increase file size
- They always improve performance
- They cannot affect control flow
- Out-of-bounds writes may corrupt control data and memory
Show correct answer and explanation
Correct answer: D. Out-of-bounds writes may corrupt control data and memory
Memory corruption may enable crashes or control hijacking.
Question 197. What is a stack canary?
- A checked sentinel that can detect some stack overwrites
- An instruction format
- Only a disk encryption key
- A program-counter bit
Show correct answer and explanation
Correct answer: A. A checked sentinel that can detect some stack overwrites
Canaries help detect certain overwrites before return.
Question 198. What does NX or DEP protection do?
- Makes all data unreadable
- Marks selected memory regions non-executable
- Encrypts every register
- Prevents all security vulnerabilities
Show correct answer and explanation
Correct answer: B. Marks selected memory regions non-executable
Execution permission can block injected code in data pages.
Question 199. What is address-space layout randomization?
- Makes instruction order random
- Changes the ISA every run
- Randomizes positions of memory regions to make addresses less predictable
- Removes stack frames
Show correct answer and explanation
Correct answer: C. Randomizes positions of memory regions to make addresses less predictable
ASLR complicates attacks relying on fixed addresses.
Question 200. What is a precise exception?
- An exception that never interrupts
- A source-code syntax error
- An error that only affects graphics
- An exception presented with a coherent architectural state at an instruction boundary
Show correct answer and explanation
Correct answer: D. An exception presented with a coherent architectural state at an instruction boundary
Precise exceptions support restart and debugging.
