COA Previous Year Questions

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

COA Previous Year Questions

Q1. What is the role of stack pointer in computer organization?


Ans1. The stack pointer (SP) in computer organization is a special-
purpose register that keeps track of the top of the stack in memory.
The stack is used for storing temporary data, such as function
parameters, return addresses, and local variables.
The role of the stack pointer is to:
1. Track the current position: It points to the most recent item
added to the stack.
2. Manage function calls: It is adjusted during function calls and
returns to save and restore the program's execution context
(e.g., return addresses and local variables).
3. Support stack operations: It is updated automatically during
push (adding data to the stack) and pop (removing data from
the stack) operations.
In short, the stack pointer helps manage the flow of control and
temporary data storage during program execution.
Q2. What is ROM? How PROM, EPROM and EEPROM differ from
each other?
Ans2. ROM stands for read only memory is a type of non- volatile
memory used in computers and electronic devices to store data that
does not change frequently. ROM retains its contents even when the
device is powered down.

Q3. Difference between combinational and sequential circuits?


Ans3.
Q4. What are CPU Buses and Why they are important?
Ans4. CPU Buses are communication pathways that allow data to
travel between different components of a computer system,
particularly between the CPU, memory, and other peripherals. There
are three main types of CPU buses:
1. Data Bus: Transports actual data between components.
2. Address Bus: Carries memory addresses to specify where data
should be read from or written to.
3. Control Bus: Carries control signals to coordinate the actions of
different components (like read/write commands).

CPU Buses are Important:

• Efficient Communication: CPU buses are essential for


transferring instructions and data between the CPU and other
system components, enabling the computer to function as a
cohesive system.
• Performance: The speed, width, and bandwidth of the buses
impact the overall performance of the system. Faster buses
allow quicker data transfer, which enhances the efficiency of
operations like processing, reading/writing to memory, and
interacting with peripherals.
• System Coordination: The control bus plays a key role in
synchronizing different components, ensuring that operations
occur in the correct sequence.
Q5. Explain different types of addressing modes in basic computer?
Ans5. Addressing modes determine how the operand (data to be
processed) is accessed in computer instructions. Here are some
common types of addressing modes in a basic computer:

The different types of addressing modes in a basic computer include:

1.Immediate Addressing: Operand is directly specified in the


instruction.

2.Direct Addressing: Address of the operand is given in the


instruction.

3.Indirect Addressing: Address field points to the address where the


effective address is stored.

4.Register Addressing: Operand is in a register specified in the


instruction.

5.Indexed Addressing: Effective address is calculated by adding a


constant to a register’s value.

6.Relative Addressing: Effective address is determined by adding an


offset to the program counter.
Q6. What is register in a CPU and How does it work?
Ans6. A register in a CPU is a small, high-speed storage location used
to temporarily hold data, instructions, or addresses that are needed
by the CPU for processing. Registers are faster than RAM and are
essential for quick data manipulation during computation.
Types of Registers:
1. Accumulator (AC): Holds intermediate results of arithmetic or
logical operations.
2. Program Counter (PC): Holds the address of the next
instruction to be fetched and executed.
3. Memory Address Register (MAR): Holds the address in
memory where data is to be read from or written to.
4. Memory Data Register (MDR): Holds the data being transferred
to or from memory.
5. Instruction Register (IR): Holds the current instruction being
executed.
6. Status Register (SR): Stores flags that indicate the status of
operations, like zero, carry, or overflow.
7. General Purpose Registers: Used for temporary data storage
during operations (often referred to by names like R0, R1, etc.).
How Registers Work:
• Registers are directly controlled by the CPU's control unit and
are used for fast data retrieval and storage during instruction
execution.
• For example, the Program Counter (PC) keeps track of which
instruction the CPU will execute next. The Accumulator (AC)
stores results of calculations, and the Instruction Register (IR)
holds the current instruction so the CPU can decode and
execute it.
• The CPU reads data from or writes data to these registers
during the fetch, decode, and execute stages of the instruction
cycle.
In short, registers are critical for quick data access and efficient
execution of instructions in the CPU. They are essential for the CPU's
speed and overall performance.

Q7. Write a difference between Programmed Input/outputs and


Interrupt driven input/output?
Ans7.

Programmed I/O Interrupt Initiated I/O

Data transfer is initiated by the


means of instructions stored in the
The I/O transfer is initiated
computer program. Whenever there
by the interrupt command
is a request for I/O transfer the
issued to the CPU.
instructions are executed from the
program.

CPU can do any other work


CPU cannot do any work until the
until it is interrupted by the
transfer is complete as it has to stay
command indicating the
in the loop to continuously monitor
readiness of device for data
the peripheral device.
transfer
Programmed I/O Interrupt Initiated I/O

Its module is treated as a slow Its module is faster than


module. programmed I/O module.

It can be tricky and


It is quite easy to program and complicated to understand
understand. if one uses low level
language.

The performance of the


The performance of the system is
system is enhanced to
severely degraded.
some extent.

Q8. How DMA controller communicates and transfers data between


peripheral devices and RAM?
Ans8. The DMA (Direct Memory Access) controller is a specialized
hardware component that allows peripheral devices (like hard drives,
network cards, or audio devices) to transfer data directly to or from
RAM without involving the CPU, which speeds up data transfer and
frees up the CPU for other tasks.
How DMA Works:
1. Initiation: The peripheral device sends a request to the DMA
controller to transfer data.
2. Setup: The DMA controller is configured with the address in
RAM where data will be stored or retrieved, the amount of data
to transfer, and the direction (read or write).
3. Data Transfer: The DMA controller takes control of the system
bus (bypassing the CPU) and directly moves the data between
the peripheral and RAM.
4. Completion: Once the transfer is complete, the DMA controller
sends an interrupt signal to the CPU to notify that the data
transfer is finished.
Key Advantages:
• Efficiency: Offloads the CPU from handling data transfer tasks,
allowing it to focus on other operations.
• Speed: Directly transfers large blocks of data, reducing delays
compared to CPU-driven data handling.
In summary, the DMA controller manages the data transfer between
peripheral devices and RAM, enabling faster, CPU-free data handling.

Q9. What is Associative Memory? Explain its working with the help
of diagram.
Ans9. Associative Memory, also known as Content Addressable
Memory (CAM), is a type of memory in which data is accessed based
on its content rather than its memory address. In other words, it
allows data to be retrieved by specifying a value or pattern, and the
memory returns the address or corresponding data directly.
How It Works:
1. Search Operation: Instead of using a specific address to access
data, the system provides a search key (the value you want to
find).
2. Parallel Comparison: The associative memory compares the
search key against all stored values simultaneously.
3. Match Found: If a match is found, the system returns the
associated data or the address where it is stored.
4. No Match: If there’s no match, a "not found" response is given.

Q10. Draw and explain the memory hierarchy structure and mark
the arrow from low to high(speed) and high to low (cost).
Ans10.

You might also like