1MARKS QUESTIONS
—-----------------------------
1. What is a stored-program computer?
A stored-program computer stores program instructions in memory alongside data.
2. Define the fetch cycle.
The fetch cycle retrieves an instruction from memory for execution by the CPU.
3. What is an operand?
An operand is the data on which an operation is performed.
4. What is an operator?
An operator is a symbol or instruction that tells the CPU what operation to perform.
5. Define a register.
A register is a small, fast storage location in the CPU that temporarily holds data or
instructions.
6. What is the function of the ALU?
The ALU (Arithmetic Logic Unit) performs arithmetic and logical operations.
7. Expand CPU.
Central Processing Unit.
8. What is the purpose of the Program Counter (PC)?
It holds the address of the next instruction to be executed.
9. What is a compiler?
A compiler translates high-level language code into machine code.
10. What is an assembler?
An assembler converts assembly language code into machine code.
11. Define instruction format.
It is the layout of bits in an instruction, including opcode and operands.
12. What is an addressing mode?
It defines how the CPU locates the operands for instructions.
13. Name any two types of instructions.
Arithmetic and Data Transfer instructions.
14. What is immediate addressing?
Operand is directly specified in the instruction.
15. What is the role of the control unit?
It manages and coordinates the activities of the computer.
16. Name any two types of registers.
Accumulator and Program Counter.
17. What is machine language?
It is the lowest-level programming language understood directly by the CPU.
18. Name any one memory unit used in computers.
RAM (Random Access Memory).
19. What is the function of the decode stage in instruction execution?
It interprets the instruction to determine the required operation.
20. What does the execute cycle perform?
It performs the operation specified by the instruction.
---
✅ 5-MARK QUESTIONS & ANSWERS
1. Differentiate between compiler and assembler.
A compiler converts high-level language into machine code and usually optimizes the code.
It works on the entire program at once.
An assembler converts low-level assembly language into machine code, working line-by-line
without code optimization.
2. Explain the concept of registers and their types.
Registers are fast, small storage units inside the CPU used to store data and instructions
temporarily.
Common types:
Accumulator (ACC) – used in arithmetic/logic operations
Program Counter (PC) – holds address of next instruction
Instruction Register (IR) – stores current instruction
Stack Pointer (SP) – points to the top of the stack
3. Describe the instruction format with an example.
Instruction format is the structure or layout of an instruction.
Example format:
[Opcode] [Source Operand] [Destination Operand]
Example instruction: ADD R1, R2
Opcode: ADD
Source: R2
Destination: R1
4. Define addressing modes. Explain any three with examples.
Addressing modes determine how the operands are accessed in an instruction.
Examples:
Immediate: Operand is given directly (e.g., MOV R1, #5)
Register: Operand is in a register (e.g., MOV R1, R2)
Direct: Operand is at a specific memory location (e.g., MOV R1, [2000])
5. Explain the role of the operating system in executing a program.
The OS manages memory, CPU scheduling, I/O operations, and file systems. It:
Loads programs into memory
Allocates CPU time
Manages devices and input/output
Provides a user interface
Enables multitasking and resource sharing
15 MARKS QUESTIONS
—--------------------------------
1. Explain in detail the basic organization of a stored-program computer.
A stored-program computer, based on the Von Neumann architecture, integrates both
instructions and data in the same memory. It comprises the following components:
1. Input Unit – Accepts data and instructions from the user and transfers them to the
memory.
2. Memory Unit – Stores data, instructions, and intermediate results. It is divided into RAM
(volatile) and ROM (non-volatile).
3. Control Unit – Interprets instructions and controls the flow of data between components.
4. Arithmetic Logic Unit (ALU) – Performs all arithmetic and logical operations.
5. Registers – Small, fast memory units within the CPU used for temporary storage.
6. Output Unit – Displays results to the user.
The control unit fetches instructions from memory, decodes them, and then executes them
using the ALU and registers. This structure allows efficient execution of stored programs and
is the foundation of modern digital computers.
---
2. Describe the complete fetch-decode-execute cycle.
The Fetch-Decode-Execute cycle is the fundamental process by which a computer operates:
1. Fetch: The Control Unit retrieves the instruction from memory using the Program Counter
(PC). The instruction is placed in the Instruction Register (IR).
2. Decode: The Control Unit interprets the instruction. It identifies the opcode (operation to
be performed) and the operands (data required).
3. Execute: The decoded instruction is carried out. If it's an arithmetic operation, the ALU
performs the task. For memory or I/O operations, the appropriate unit is accessed. The
result is stored in a register or memory.
After execution, the PC is updated to point to the next instruction, and the cycle repeats. This
loop continues until a HALT instruction or program termination is encountered.
---
3. Discuss the role of the operating system, compiler, and assembler in program execution.
All three components—Operating System (OS), Compiler, and Assembler—play critical roles
in executing a program:
Compiler: Translates high-level programming code (like C, Java) into machine language. It
checks syntax, optimizes code, and generates object code.
Assembler: Converts assembly language programs into machine code. It replaces
mnemonics with binary codes and resolves memory addresses.
Operating System: Acts as a mediator between user applications and hardware. It performs
process management, memory allocation, file handling, I/O control, and security. It loads
programs into memory, schedules CPU time, and handles interrupts during execution.
Together, these components transform source code into executable machine instructions
and ensure the system resources are efficiently managed during execution.
---
4. Explain instruction formats and types of instructions.
An instruction format defines the structure of machine language instructions. A typical format
includes:
Opcode: Specifies the operation (e.g., ADD, SUB).
Operands: Data items or memory addresses.
Mode Bits: Indicate the addressing mode.
Types of instructions include:
1. Data Transfer (e.g., MOV, LOAD) – Transfer data between memory and registers.
2. Arithmetic (e.g., ADD, SUB) – Perform calculations.
3. Logical (e.g., AND, OR) – Perform bitwise operations.
4. Control Flow (e.g., JMP, CALL) – Change the sequence of execution.
5. Input/Output – Handle external devices.
Instruction formats vary in size depending on the architecture and can be 1-address,
2-address, 3-address, or 0-address (stack-based) formats.
---
5. Describe various addressing modes with examples.
Addressing modes define how operands are accessed in memory. Major types include:
1. Immediate Mode: Operand is part of the instruction.
Example: MOV A, #5 (Move 5 into A)
2. Direct Mode: Address of the operand is directly specified.
Example: MOV A, 2000H (Move data from memory location 2000H)
3. Indirect Mode: Address is held in a register.
Example: MOV A, @R0 (Move data from address stored in R0)
4. Register Mode: Operand is in a CPU register.
Example: MOV A, B
5. Indexed Mode: Combines base address and index.
Example: Useful in array access.
6. Relative Mode: Address relative to PC, useful for jumps.
7. Base-Register Mode: Combines base register and displacement.
These modes allow flexibility in accessing operands, help with efficient memory use, and
enable powerful programming constructs like loops, arrays, and structures.
---