0% found this document useful (0 votes)
13 views

Computer Basics

Uploaded by

Krishna Kg
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)
13 views

Computer Basics

Uploaded by

Krishna Kg
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/ 7

COMPUTER BASICS

COMPUTER ORGANIZATION AND ARCHITECTURE

System Bus

The system bus is a critical component in computer architecture that facilitates


communication between the central processing unit (CPU), memory, and other
peripherals. It acts as a pathway for data transfer and consists of three main types of
buses: the address bus, data bus, and control bus. These buses work in conjunction to
ensure that data and commands are correctly transmitted and received across the
computer's various components, enabling efficient processing and operation.

Address Bus

The address bus is used to specify the memory addresses where data is stored or
retrieved. When the CPU needs to read from or write to a specific location in memory,
it sends the address of that location via the address bus. The width of the address bus
(measured in bits) determines the maximum amount of memory the system can
address.

Data Bus

The data bus carries the actual data between the CPU, memory, and peripheral
devices. When data is being read from or written to memory, it travels along the data
bus. The width of the data bus (measured in bits) influences the volume of data that
can be transferred at one time. A wider data bus can transfer more data in parallel,
thereby increasing the system's overall data throughput and performance.

Control Bus

The control bus is responsible for carrying control signals that manage and coordinate
the activities of the computer's components. These signals include commands to read
or write data, interrupt signals, and timing signals to synchronize the operations of
different parts of the system. The control bus ensures that all components work in
harmony and follow the correct sequence of operations, enabling the orderly
execution of tasks within the computer.
Von neumann Architecture

The Von Neumann architecture is a basic design for computers that uses the same
memory for both instructions (programs) and data. Created by John von Neumann,
this model involves the CPU fetching instructions from memory one at a time,
decoding, and then executing them. Everything is connected by a single system bus,
which can sometimes slow down the process because the same path is used for both
instructions and data. Despite this, the Von Neumann architecture is the foundation
for most modern computers due to its straightforward and effective design.

Types of memory

Primary Memory (Volatile)

Primary memory, also known as main memory or RAM (Random Access


Memory), is the computer's immediate storage used to hold data and
instructions that the CPU needs while performing tasks. It is called volatile
memory because it loses all stored information when the power is turned off.
Primary memory is crucial for the system's performance as it provides quick
access to data, allowing the CPU to operate efficiently. However, its
temporary nature means data must be saved to secondary storage to ensure it
is not lost.
RAM (Random Access Memory)

RAM is a type of volatile memory that temporarily stores data and


instructions that the CPU needs while performing tasks. It provides fast read
and write access to a storage medium that is directly accessible by the CPU.

Types of RAM:

1. DRAM (Dynamic RAM): Stores each bit of data in a separate


capacitor, which needs to be refreshed thousands of times per
second to retain the data. It is commonly used for the main memory
in computers.
2. SRAM (Static RAM): Uses flip-flops to store each bit, which makes it
faster and more reliable than DRAM. However, it is also more
expensive and uses more power. SRAM is typically used for cache
memory in CPUs.

ROM (Read-Only Memory)


ROM is a type of non-volatile memory that permanently stores data and instructions
needed for the computer to boot and perform basic functions. The data in ROM
cannot be easily modified or rewritten.

Types of ROM:

1. PROM (Programmable ROM): Can be programmed once after manufacturing. Once


programmed, the data cannot be changed.
2. EPROM (Erasable Programmable ROM): Can be erased by exposing it to ultraviolet light and
then reprogrammed. It allows multiple updates, but the process is relatively slow.
3. EEPROM (Electrically Erasable Programmable ROM): Can be erased and reprogrammed
using electrical charge. It allows for more flexible data updates compared to EPROM and is
used in applications requiring frequent updates.

Cache Memory

Cache memory is a small, high-speed memory located close to the CPU that stores
frequently accessed data and instructions. By keeping this critical information readily
available, cache memory significantly reduces the time the CPU takes to access data
from the main memory, thereby speeding up the overall processing. There are
typically multiple levels of cache (L1, L2, and sometimes L3), with L1 being the
fastest and smallest, integrated directly into the CPU chip, and L2 and L3 being larger
but slightly slower.

Secondary Memory (Non-Volatile)

Secondary memory refers to storage devices that hold data permanently, even when
the computer is powered off. This type of memory includes hard drives, solid-state
drives (SSDs), optical discs, and external storage devices. Secondary memory is used
for storing large amounts of data, software applications, and the operating system.
While it is slower to access compared to primary memory, its non-volatile nature
ensures data persistence and is essential for long-term data retention.

ALU(Arithmetic Logic Unit)

The Arithmetic Logic Unit (ALU) is a fundamental component of the central


processing unit (CPU) in a computer. It is responsible for performing arithmetic
operations (such as addition, subtraction, multiplication, and division) and logic
operations (such as AND, OR, NOT, and XOR). The ALU processes binary data and
plays a critical role in executing instructions by manipulating the data needed for
computations and decision-making processes. Essentially, the ALU is the "calculator"
within the CPU, handling all the mathematical and logical tasks that enable the
computer to perform complex operations. By working closely with other CPU
components, such as the control unit and registers, the ALU ensures that the correct
data is processed and that results are accurately produced and stored.
CONTROL LOGIC

The Control Unit (CU) is a key component of the central processing unit (CPU) in a
computer. Its primary role is to manage and coordinate the operations of the computer
by directing the flow of data between the CPU and other components. The Control
Unit interprets the instructions from the computer’s memory, decodes them, and then
issues signals to execute the instructions using the ALU, registers, and other parts of
the CPU. It ensures that operations occur in the correct sequence and that the CPU
responds properly to inputs and produces the correct outputs. By orchestrating the
activities within the CPU, the Control Unit plays a crucial role in the overall
functionality and performance of the computer.

INPUT/OUTPUT UNIT

The Input/Output (I/O) unit is a vital part of a computer system that manages the
communication between the computer and the external environment. This unit
handles all input operations, where data and instructions are received from input
devices such as keyboards, mice, scanners, and microphones. Similarly, it oversees
output operations, where processed data is sent to output devices such as monitors,
printers, speakers, and external storage devices. The I/O unit ensures data is correctly
transferred to and from the CPU and memory, facilitating the interaction between the
user and the computer. It acts as an intermediary, converting data from a human-
readable format into a machine-readable format for processing and vice versa, thereby
enabling efficient and effective data exchange and peripheral management.

MEMORY HIERARCHY

REGISTERS

Registers are small, high-speed storage locations within the CPU (Central Processing
Unit) that hold data and instructions temporarily during processing. They are the
fastest form of memory in a computer system, designed to store small amounts of data
that the CPU needs to access quickly. Registers play a crucial role in the execution of
instructions, holding operands for arithmetic and logic operations, storing memory
addresses, and buffering data between the CPU and main memory

TYPES
Memory Data Register (MDR):

The Memory Data Register (MDR) is a temporary storage location within the CPU
that holds the data fetched from memory or the data waiting to be written to memory.
Its primary function is to store the actual data that is being transferred to and from the
main memory (RAM). When the CPU needs to read data from memory, it is first
transferred to the MDR before being processed by other parts of the CPU, such as the
ALU (Arithmetic Logic Unit). Similarly, when the CPU writes data to memory, it is
first placed in the MDR before being transferred to the appropriate memory location.

Memory Buffer Register (MBR):

The Memory Buffer Register (MBR), also known as the Memory Buffer or Memory
Data Register (MDR), is a type of register used to store the data being transferred to
and from the computer's primary storage or secondary storage (e.g., RAM, cache
memory, or hard drive).

MEMORY ADDRESS REGISTER(MAR):

The Memory Address Register (MAR) is a type of register in a computer's CPU


(Central Processing Unit) that stores the memory address from which data will be
fetched or to which data will be sent. It holds the address that specifies a particular
location in the computer's memory where the CPU needs to read from or write to.

When the CPU needs to access data from memory, it sends the memory address to the
MAR. The MAR then communicates this address to the memory unit, indicating the
exact location where the data is stored or where it should be stored. This process is
crucial for enabling the CPU to interact effectively with the computer's memory
subsystem, allowing programs to fetch instructions and data as needed during
execution.

ACCUMULATOR

The Accumulator, often abbreviated as ACC, is a special purpose register within the
CPU (Central Processing Unit) of a computer. Its primary function is to temporarily
hold data that is being processed or manipulated during arithmetic or logical
operations. The accumulator plays a central role in the execution of instructions by the
CPU, particularly in simple arithmetic calculations and data manipulation tasks.

The accumulator operates by fetching data from memory, performing operations on


that data (such as addition, subtraction, or bitwise operations), and storing the results
back into the accumulator or another designated location in memory. It acts as a
buffer where intermediate results of calculations are stored before being finalized or
transferred elsewhere.
PROGRAM COUNTER

The Program Counter (PC), also known as the Instruction Pointer (IP) in some
architectures, is a special-purpose register in a computer's CPU (Central Processing
Unit). Its primary function is to store the memory address of the next instruction to be
fetched and executed.

As a program runs, the CPU continuously fetches instructions from memory in


sequence. The Program Counter keeps track of the memory address of the current
instruction being executed and automatically increments to point to the next
instruction after each fetch operation.

INSTRUCTION CYCLE

The instruction cycle, also known as the fetch-decode-execute cycle, is the


fundamental process a central processing unit (CPU) follows to execute a program.
It's a continuous loop that happens from the moment the computer boots up until it
shuts down.

1. Fetch Instruction:

 In this stage, the CPU retrieves the instruction it's going to work on. It uses a
special register called the Program Counter (PC) to keep track of the memory
address where the next instruction is located.
 The CPU reads the instruction from that memory location and stores it in
another register, typically called the Instruction Register (IR).
 Once the instruction is fetched, the PC is incremented to point to the address
of the next instruction in the program. This way, the CPU knows where to
find the following instruction after it finishes the current one.

2. Decode Instruction:

 Now that the CPU has the instruction in the IR, it needs to understand what it
means. This stage involves deciphering the instruction.
 The instruction typically consists of two parts: an opcode (operation code)
and operands (data to be used in the operation).
 The Control Unit (CU) of the CPU interprets the opcode. The opcode specifies
what kind of operation the CPU needs to perform (addition, subtraction, data
transfer, etc.).
 The CU may also use the decoder to identify and extract any operands from
the instruction that are required for the operation.

3. Read Address from Memory (Optional):

 This step might not be necessary for all instructions. It depends on whether
the instruction needs to access data from memory.
 Some instructions, like moving data between registers, might have the data
embedded within them. But others, like loading data from memory into a
register, require an additional memory access.
 If the instruction needs data from memory, the CPU uses the decoded
information (often the operand) as a memory address. It retrieves the data
from that address and stores it in a temporary register.

4. Execute Instruction:

 Finally, with the instruction decoded and any necessary data retrieved, the
CPU carries out the operation specified by the instruction.
 The Arithmetic Logic Unit (ALU) is responsible for performing arithmetic and
logical operations like addition, subtraction, comparison, etc.
 Other specialized units within the CPU handle different types of instructions,
such as data transfer between registers or memory.
 Once the operation is complete, the CPU moves on to the next instruction
and starts the cycle all over again.

You might also like