0% found this document useful (0 votes)
2 views4 pages

Computer Architecture

Chapter 5 of Computer Science 11 covers logical and relational operations, the architecture of a stored program computer designed by Van Neumann, and the roles of various components such as the Control Unit, Arithmetic and Logical Unit, and Main Memory. It explains the types of memory including RAM and ROM, the function of buses for communication between components, and the CPU's instruction set and execution cycle. Additionally, it discusses the operating system's role in managing hardware resources and memory management.

Uploaded by

danialahmed473
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)
2 views4 pages

Computer Architecture

Chapter 5 of Computer Science 11 covers logical and relational operations, the architecture of a stored program computer designed by Van Neumann, and the roles of various components such as the Control Unit, Arithmetic and Logical Unit, and Main Memory. It explains the types of memory including RAM and ROM, the function of buses for communication between components, and the CPU's instruction set and execution cycle. Additionally, it discusses the operating system's role in managing hardware resources and memory management.

Uploaded by

danialahmed473
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/ 4

Computer Science 11 Short Notes Chapter 5 1

CHAPTER 05 logical and relational operations i.e., greater than (>),


Equal to (=), Less than (<) Greater or equal to (>=), Less
COMPUTER ARCHITECTURE
or equal to (<=) or not equal to (!=).
2. CU (Control Unit):
■ Van Neumann’s Stored Program Computer The control unit reads the instructions from the
A sequence of instructions (Program) and the data are memory and decodes these instructions. This unit uses
stored in the memory of the machine. The machine other components of the computer to execute the
reads the instructions one by one and executes these instructions given to the computer.
instructions accordingly. In 1951, Van Neumann ◆◆◆
■ Main Memory
designed this stored program computer. This simple
design proved to be powerful and general purpose. It is Main Memory is an important component of computer.
the basis of modern day computers. It is used to store that data and instruction which are
Components of modern stored program machine being executed. Main memory is called working area of
1. Control Unit (CU) computer. A computer can't work without main
The control unit reads the instructions from the memory.
memory and decodes these instructions. This unit uses There are two types of main memory:
■ RAM (Random Access Memory)
other components of the computer to execute the
instructions given to the computer. RAM Stands for Random Access Memory. RAM is used
2. Arithmetic and Logical Unit (ALU) to store data and instructions that are being executed
General-purpose computer can perform different currently. All the programs loaded into RAM before
arithmetic operations on the data so it has a special execution. So, it is very important component of
unit that has electronic circuits to perform the basic computer. Processor can't process any data without
arithmetic and logical operations on the data. RAM. It is used to store input data and results of
3. Main Memory processing. Therefore, it is called working area of
It is used to store program and data during execution. computer.
We call it working area of the computer or Primary RAM is a volatile memory. It means that it retains its
Memory also. contents in presence of electric current. It lost its
4. I/O Unit contents when power is turned off.
This handles the processor’s communication with the There are two types of RAM:
peripherals (Disc drive, monitor, printer etc). There are 1. DRAM (Dynamic RAM)
registers to hold the data incoming or outgoing. Data DRAM Stands for Dynamic Random Access Memory.
and instructions should be in the memory before the DRAM changes its electrical current state with passage
computer can start executing, stored program computer of time. DRAM requires a current pulse to maintain its
uses I/O devices. electrical state. It is called refreshing DRAM. Processor
5. Bus Interconnection can't access data from DRAM when DRAM is being
The communication lines / channel used to connect refreshed. That's why DRAM is slower type of RAM. It
different parts of the computer together. utilizes more power and it is less expensive.
◆◆◆ 2. SRAM (Static RAM)
■ The CPU SRAM Stands for Static Random Access Memory.
CPU Stands for Central Processing Unit. All the Electrical Current state never changes in SRAM. So,
processing takes place in CPU. It is also called brain of SRAM don't require any current pulse or frequent
computer. It controls all the activities of computer and refreshing to maintain its electrical state. Processor
coordinates and command peripheral devices to hasn't to wait to access data due to refreshing RAM.
perform their operations. It is located on the mother Therefore, SRAM is faster than DRAM. It utilized less
board. A Computer can't work without CPU. CPU power. It is more expensive than DRAM. SRAM is mostly
consists of two components. used to build a faster type of memory called "Cache
1. ALU 2. CU Memory".
1. ALU(Arithmetic & Logic Unit): ■ ROM (Read Only Memory)
ALU stands for Arithmetic and Logic Unit. It executes ROM stands for Read-Only Memory. It stores data
all the instruction in CPU. It performs Arithmetic and permanently. It holds BIOS (which is a program that
Logic Operations. ALU further has two units. runs at startup, checking hardware and loading the
(a) Arithmetic Unit (AU): operating system.) ROM is pre-programmed and
Arithmetic unit is an important unit of ALU. It unchangeable. Users cannot modify or write new data
performs arithmetic operations i.e., Addition, onto it. It is non-volatile. It retains stored data even
Subtraction, Multiplication, Division. when power is turned off.
(b) Logic Unit (LU): There are Three types of ROM:
Logic unit is also an important component of ALU. It 1. PROM (Programmable Read Only Memory)
compares data and decides if first item is greater Initially blank and the user or manufacturer can write
than, equal to or less than second item. It performs data onto it by using special devices. Once the
Computer Science 11 Short Notes Chapter 5 2
program / data is written onto PROM it can not be and speed differences between the CPU and attached
changed or altered. devices, keeping everything running smoothly.
2. EPROM (Erasable Programmable Read Only
Memory) Methods of transferring data from the peripherals
Initially blank, programs and data can be written on it 1. Interrupts
by the manufacturer or by the used by using special The processor issues command to the I/O devices.
devices. Unlike PROM, the data written on it can be When the devices get ready, these generate an interrupt
erased by using special devices (i.e. ultraviolet rays). So signal for the processor. On sensing this signal, the
data / program written on it can be changed and new processor suspends all other processing and performs
data can also be added on this form of ROM. the I/O operation. The disadvantage of this scheme is
3. EEPROM (Electrically Erasable Programmable Read that it reduces the over all performance of the
Only Memory) processor.
This kind of ROM can be re-written by using electrical 2. DMA (Direct Memory Access)
devices and so data stored on this ROM can be easily The processor issues I/O command and gets busy in
modified. other useful tasks. The special hardware gets the data
◆◆◆ from the I/O device and uses the system bus to place it
■ Bus Interconnection in the main memory. When data is transferred, the
The components of computer are interconnected by processor does not need the system bus. So, the
using a set of parallel lines(Conducting Wires). Each of processor does not have to wait for the I/O operation to
these lines can be used to transfer a sequence of bits complete. The disadvantage of this scheme is that it is
from one component of the computer to the other more complex and extensive and more hardware is
component. This set of parallel lines is called BUS. needed.
1. System Buses: ◆◆◆

A computer bus that is used to connect main ■ CPU Registers


components of computer i.e., CPU and Main memory is CPU registers are small and high-speed memory
called system bus. System buses are embedded in locations built directly into the CPU that temporarily
motherboard. Generally, system buses consist of 16, 32 store data and instructions the CPU is actively using.
or 64 data lines. ■ Special Purpose Registers / Most Commonly Used
There are three system buses: 1. PC (Program Counter)
i. Control Bus This register holds the address of the next instruction
These lines are used to transmit different commands to be fetched for execution. As soon this instruction is
from one component to the other. fetched, its value is incremented so that it still has the
ii. Data Bus address of next instruction.
On the system bus 32 or 64 lines are reserved to 2. IR (Instruction Register)
transfer data from one component to the other. A 64- Once the instruction is fetched it is stored in the IR
line data bus can transfer 64-bits of data where this instruction is decoded.
simultaneously so it is not difficult to see that the 3. MAR (Memory Address Register)
width of the data bus has a direct impact on the When the CPU wants to store some data in the
performance of the computer. memory or reads the data from the memory, it places
iii. Address Bus address of the required memory location in MAR.
It is important to assign a unique ID (address) to each 4. MBR (Memory Buffer Register)
component. Not only the address is used to identify The CPU uses this register to store data coming from
different components of a system but it is also used to the memory or going to the memory.
specify different memory locations within the main 5. SP (Stack Pointer)
memory. Address bus is used to transmit address from To understand the purpose of this register it is
CPU to Main Memory etc. important to understand a very important data
2. Expansion Bus structure (Arrangement of Data) called Stack. This
A computer bus that is used to connect CPU with structure is an arranged storage in LIFO (Last in First
peripheral devices i.e., Keyboard, Display Screen, Out) order.
Printer, Scanner etc. is called expansion bus. Expansion ■ GPR (General Purpose Registers)
buses may consist of 70-100 data lines. Examples of These resisters are called EAX, EBX, ECX, EDX and can
Expansion buses are: ISA Bus, PCI Bus, PCIe (PCI be used for any mathematical or logical operations.
Express) Bus. They are used for arithmetic and data movement
◆◆◆ purposes. Each can be divided in an upper and lower
■ The I/O Unit byte called AH, AL, BH, BL, CH, CL, DH, DI respectively.
Computers have diverse input/output devices with A stands for Accumulator, B for Base, C for Count and D
varying data speeds and formats. Connecting them for Data. Each of these registers can alternately be used
directly to the main bus would overwhelm the CPU. An as one byte, two byte or four byte registers, AH (1 byte ),
I/O unit acts as a middleman, handling communication AX (2 bytes ), EAX (4 bytes).
Computer Science 11 Short Notes Chapter 5 3
• AX (Accumulator Register) Used for arithmetic instructions provided by a CPU is commonly known as
and data operations. the instruction set of that CPU.
• BX (Base Register) Used for arithmetic and data ■ The Instruction Format
movement and special addressing abilities. Instructions tell the CPU what operation to perform
• CX (Counter Register) Used for counting and what data to use. They're encoded as binary strings
purpose. Acts as a counter for repeating or and typically contain:
looping. • Opcode: A unique code identifying the operation (e.g.,
• DX (Data) Has special role in division and add, load, jump).
multiplication. • Operands: Addresses or values indicating the data
■ Address or Segment Registers involved in the operation. The number and type of
It is a group of 4, some times registers named CS, DS, operands depend on the instruction format.
ES and SS. The segment register is used as base location Common Instruction Formats:
for program instructions, data, and the stack. 1. Zero-Address: These instructions rely on
• CS (Code Segment) The CS register holds the implicit operands, often stored in specific
base location of all executable instructions registers like an accumulator. They are compact
(code) in the program.
but less flexible.
• DS (Data Segment) The DS register is the
defaults base location for memory variables.
2. One-Address: One operand is explicitly
The CPU calculates the offsets of variables using specified while the other is implicit (usually the
the current value of DS. accumulator). This format offers a balance
• ES (Extra Segment) The ES register is an between simplicity and flexibility.
additional base location for the memory 3. Two-Address: Both operands are explicitly
variables. stated, either as register or memory addresses.
• SS (Stack Segment) The SS register contains the
This is the most common format due to its
base location of the current program stack.
◆◆◆ clarity and flexibility.
■ Computer Operations 4. Three-Address: All operands are explicitly
Different types of operations performed by the listed, enabling shorter programs for certain
computer are:
expressions. However, it requires more bits for
1. Data Transfer: Instructions move data between
instruction encoding, making it less common.
the CPU's internal registers and main memory.
This allows the CPU to access and manipulate ◆◆◆
■ Fetch-Decode-Execute Cycle
data efficiently.
When we want to execute a sequence of instructions
2. Arithmetic & Logic: The CPU performs basic (program) those instructions / data are first of all
mathematical operations (addition, subtraction, loaded into the main memory of the computer by using
multiplication, division) and logical operations some I/O device. Once these instructions have been
(comparison, AND, OR, NOT) on data. These loaded into main memory, the address of the first
operations are crucial for calculations, instruction is copied into the program counter and the
control is given to the CPU. The CPU performs the
decision-making, and data analysis.
following steps:
3. I/O (Input/Output): Instructions enable the 1. Fetch Instruction
CPU to communicate with external devices like The CPU reads the value of PC and the instruction
keyboards, printers, and storage drives. This pointed to by PC into the instruction register. This
allows users to interact with the computer and instruction involves the following steps:
exchange information. • Copy the contents of PC into the MAR and
4. Control Transfer: Programs often need to request a memory read.
• Copy the data read from the memory into MBR
repeat operations or change execution flow
and instruction in the IR.
based on certain conditions. Instructions like • Increment PC, so that it points to the next
jump, jumpz, and conditional branch provide instruction.
this capability, allowing programs to handle 2. Decode Instruction
complex logic and decision-making. Once the fetching of instruction is complete the CU
decodes the instruction by analyzing the opcode of the
◆◆◆
■ Instruction set instruction. It also reads the values of operands
Each CPU provides its users with a number of specified in the instruction. Decoding means activating
instructions so that the users can perform different the appropriate circuit to execute the instruction.
operation supported by the CPU. The set of all
Computer Science 11 Short Notes Chapter 5 4
3. Execute Instruction 2. Low-level language?
After decoding the instruction, the processor executes The language which is close to machine language is
the instruction by using the activated circuit. Then the called low level language. A Computer can easily
results of the execution are written back to registers understand low level language. The low level language
and memory. requires a deep understanding of the machine
◆◆◆
architecture.
■ Operating Systems
i. Machine language?
An Operating System is a set of programs running in
It is the native language of computer. Every machine
the background on a computer system and providing an
language instruction consists of 0’s and 1’s. It is
environment in which other programs can be executed
directly executed by the computer. The machine
and the computer system can be used efficiently.
language programs are machine dependent.
Main Functions of Operating System:
ii. Assembly language?
1. Manage Hardware Resources
Machine language instructions (0’s and 1’s) are
The operating system must provide programmer for
replaced with English like words known as
managing the hardware resources of the computer
mnemonics (Ne-monics). It is also called symbolic
like disks, memory, and CPU.
language. An assembler is required to translate the
2. Memory Management
assembly language programs into machine language.
Every program is to be loaded into the computer’s Source code
main memory during the execution. If there are
The program written in High Level Language is called
several programs simultaneously loaded in the main
source program. The computer does not understand the
memory, as is the case when time-sharing is used, the
source code. The source code is converted into machine
program and its data must be protected from the
code and then it is directly executed on the computer.
actions of other programs. Object code
3. Load and Execute Programs
The program in a machine language is called object
A program has to be loaded into the main memory
program. The computer understands the object code
before the processor can execute it. The OS provides
directly.
the facility of easily loading a program into memory Language Processor/Translator
and starts its execution.
It is software that is used to translate the high level
4. Data Security
language or assembly language into machine language.
The OS must also protect the user data against illegal
Each language has its own translator. Only one type of
access and modification.
translator is used in any language. There are three
5. Providing Interface to The Users
types of language processors:
The OS must provide an interface between the user 1. Compiler
and the computer and also between software and the
Compiler is a type of language translator that
computer. Types of interfaces:
translates the source code into object code and the
i. Command Line Interface (CLI)
whole program is translated at the same time. If a
Users communicate with the operating system by
program contains errors then compiler cannot convert
typed commands using a keyboard. Each command
the source code into machine code until all the errors
given to the OS activates one of the many programs
are removed from the source program.
in the OS. 2. Interpreter
ii. Graphical User Interface (GUI)
Interpreter translates the High level language into
The GUI interface consists of Window, Menus, Icons
machine language statement by statement. The
and pointers. The user of the system communicates
working of interpreter is slower than the compiler. Any
with the OS by selecting commands from the menus
error in the program stops execution and all the
or by selecting different icons with the pointing
instructions are executed in a program before errors in
devices.
◆◆◆ the program.
■ Programming Languages 3. Assembler
It is the way of communication between user and This type of language translator translates the assembly
computer. All the programs are written in computer language into machine code.
language.
◆◆◆

1. High level language


It is closed to human language. User can learn and
understand high-level language easily. The
instructions of high-level language are written in
English statements. The programs of high-level
language are not directly executed on the computer. A
language translator is required to translate the high-
level language into low level language.

You might also like