0% found this document useful (0 votes)
26 views6 pages

0795 CSC - Lower Sixth Notes

Lower sixth ICT notes

Uploaded by

jordan kuame
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)
26 views6 pages

0795 CSC - Lower Sixth Notes

Lower sixth ICT notes

Uploaded by

jordan kuame
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/ 6

0795 Computer Science

Lower Sixth Lesson Notes

Outline

Module 1: Computer Organisation and Architecture


1.1. Basic Computer Architecture
1.2. Instruction Set Architecture
1.3. Data Representation
1.4. Digital Electronics

Module 2: Data Structures and Algorithms


1. Data Structures
2. Algorithm Design
3. Computational Compelxity

Module 3: Software

1. Application Software
2. System Software
3. Operating System Functions

------------------------------------------- Notes --------------------------------------------

Module 1: Computer Organisation and Architecture 2. The Functional Setup of Computer System
A modern computer can be defined as a machine that
can accept instructions and perform computations
1.1. Basic Computer Architecture
based on those instructions. A computer takes data as
Lesson 1: Introduction to Computer Organisation
input from the user and processes this data under the
1. Definitions control of a set of instructions called program, and
 Computer architecture refers to the abstract design gives the result as output and can save the data for
and functional behavior of a computer system. It future use. The machine part of the computer consists
includes the instruction set architecture, data of physical components called the hardware, while the
formats, and addressing modes. Defining the program part consists of intangible components called
instruction set, the number of bits used for the software.
representing various data types, and techniques for
addressing memory are examples of architectural There are four main components in the functional setup

attributes. of a computer: the central processing unit, the memory

 Computer organisation refers to the operational unit, the Input/Output Unit and the Buses.

units and their interconnections that realize the The Central Processing Unit (CPU)
architectural specification. This includes the high- Function: Executes program instructions and process
level aspects of a computer’s design such as the data.
CPU, memory types, I/O devices, and buses. Main components:
Describing the layout of a CPU, memory hierarchy - Control Unit
and data paths are examples of computer - Arithmetic Logic Unit
organisational attributes. - Registers

1
Memory type of computer architecture in which instructions and
Function: Stores data and instructions that the CPU data are stored together in a common memory. It is a
needs during processing stored-program computer model based on the
Types: following three concepts:
- Random Access Memory (RAM) - Data and instructions are stored in a single read-
- Read Only Memory (ROM) write memory.
- Secondary storage - The contents of this memory are addressable by
location, without regard to the type of data
Input/Output (I/O) Devices
contained there.
Input devices: allow users to input data into the
- Execution occurs in a sequential fashion (unless
computer.
explicitly modified) from one instruction to the
Examples:
- Keyboards next.

- Mice A Von Neumann


computer consists of Stored program concept:
- Scanners
the idea that instructions
Output devices: present information to users. five major units: (programs) and data are
Examples: input unit, stored together in memory.
arithmetic/logic unit, Instructions are then
- Monitors
fetched from memory one
- Printers control unit, memory at a time and executed.
- Speakers unit and output unit.
Buses The ALU and Control Unit operate together to form
Function: Connects different components within the the Central Processing Unit (CPU).
computer, facilitating data transfer between them.
Types: ALU
Input Unit Output Unit
- Data bus: carries data between components
Control Unit
- Address bus: carries memory addresses.
- Control bus: carries control signals.
Memory Unit
--------------------------------------------------------------------------------
Block diagram of a Von Neumann Computer
Lesson 2: Computer Architectures

The architecture of a computer system defines its structure Some key applications of the Von Neumann
and behavior, detailing how hardware components interact. architecture are:
Computer architectures can be classified into several types - Personal computers and laptops.
based on different criteria. The most common types are - Some microcontrollers
Von Neumann, Harvard, parallel processing, distributed - Supercomputers and high-performance clusters.
and dataflow architectures. - Video game consoles

1. The Von Neumann Computer Architecture 2. The Harvard Architecture


Most of today’s computer designs are based on The Harvard computer architecture stores program
concepts developed by the Hungarian born instructions and data in separate memories. The
mathematician John Von Neumann, referred to as the programs memory and data memory have different
Von Neumann architecture. In its strictest definition, communication pathways to the CPU, allowing
the term Von Neumann computer refers to a specific simultaneous access to both instructions and data.

2
Instruction Memory Multiple Instruction, Single Data
MISD machines are multiprocessor machines capable

ALU
of executing different instructions on different
Input Unit Output Unit processors, but all of them operating on the same data
Control Unit set. They have n processors, each with its own control
unit, that share a common memory. Each processor
Data Memory
receives a distinct instruction stream but all operate on
Block diagram of Harvard Computer the same data stream. Such machines no longer exist.

Some common applications of the Harvard architecture


Multiple Instruction, Multiple Data
are:
MIMD machines are multiprocessor machines capable
- Digital signal processors
of executing multiple instructions on multiple data sets.
- Some microcontrollers
Each processor element in this model has a separate
3. Parallel Processing Architectures instruction stream and data stream hence such
Parallel architectures include various computer designs machines are well suited for any kind of application.
that allow multiple operations to be carried out Examples of MIMD machines include multi-core
simultaneously. This includes SIMD (Single computers like the Blue Gene, Fujitsu K computer and
Instruction, Multiple Data), MISD (Multiple CRAY Jaguar.
Instruction, Single Data), and MIMD (Multiple
Instruction, Multiple Data), and other parallel
computing architectures.

Single Instruction, Multiple Data


SIMD machines are multiprocessor machines which
are capable of executing the same instruction on all the
processors at the same time. At any given moment, the
control unit broadcasts the same instruction to all
processors which operate on different data sets from 4. RISC and CISC Architectures
distinct data streams. This architecture is commonly One of the most important characteristics that
used in vector processors, graphics processing units distinguish different computers is the nature of their
(GPUs), and other parallel processing systems to speed instruction sets. There are two fundamentally different
up computations that can be parallelized. approaches in the design of instruction sets for modern
computers, namely RISC and CISC.

Reduced Instruction Set Computers


RISC is a CPU design with a small number of basic
and simple machine language instructions, from which
more complex instructions can be composed. RISC
instructions are hardwired. This means that the control
unit has a dedicated circuit for each possible
instruction. Hardwired control units are simple and fast
but they can be inflexible and difficult to modify.
Characteristics of RISC architecture are:

3
 Simplified Instruction Set: RISC architectures  Shorter Design Cycle: RISC processors can be
use a small, highly optimized set of instructions. designed more quickly, and can take advantage of
Each instruction typically performs a single task. other technological developments sooner than
 Load/Store architecture: RISC architectures corresponding CISC designs, leading to greater
often follow a load/store model, where arithmetic leaps in performance between generations.
and logical operations can be performed only on
operands that are in processor registers. Complex Instruction Set Computers
CISC is a CPU design with a large number of different
 Fixed Instruction Length: RISC instructions and complex instructions. CISC instructions are
have a uniform instruction length where each microprogrammed. This means that the control unit
instruction fits in a single word. The restriction uses a microcode to execute instructions. The
reduces the complexity and the number of microcode is a set of instructions that can be modified
different types of instructions that may be included or update, allowing for greater flexibility and ease of
in the instruction set of a computer. modification.
CISC style characteristics are:
 Large Number of Registers: RISC designs often
include a larger set of general-purpose registers to  Complex Instruction Set: CISC architectures
have a larger set of instructions, some of which
minimize memory access.
can perform complex operations in a single
 Simple Addressing Modes: RISC architectures instruction.
employ a limited number of addressing modes,
simplifying instruction decoding and execution.  Memory Operations: CISC instruction sets are
not constraint to the load/store architecture. Many
 Pipelining: RISC instructions are optimized for instructions can directly operate on memory,
pipelining, allowing multiple instructions phases allowing for fewer load/store instructions
(fetch, decode, execute) to occur simultaneously, compared to RISC.
improving performance.
 Variable Instruction Length: Instructions can
Advantages of RISC architecture: vary in length, which can complicate the decoding
 Higher Performance: A simplified instruction set but allows for more flexibility in instruction
allows for a pipeline processing. This allows for design.
faster execution and improved performance.
 Fewer Registers: CISC architectures typically use
 Lower Per-Chip Cost: The instruction set of a fewer registers, relying on memory for temporary
RISC processor is so simple that it uses up much storage more than RISC architectures.
less chip space. Smaller chips allow a
semiconductor manufacturer to place more parts  Complex Addressing Modes: CISC instructions

on a single silicon wafer, which can lower the per- support a wide variety of addressing modes,

chip cost dramatically. enabling flexible data patterns.

Advantages of CISC architecture:


 Lower Power Consumption: Simpler operations
 Compatibility: The ease of microcoding new
and efficient pipelining can lead to lower power
consumption, which is critical in mobile and instructions makes CISC machines upwardly
compatible. A new computer can run the same
embedded systems.
programs as earlier computers because the new

4
computer contains a superset of the instructions of Applications of distributed computer architecture are:
the earlier computers.  Web services: many web applications use distributed

 Efficient Use of Memory: As each instruction is architectures to balance load and provide redundancy.

more capable, fewer instructions can be used to Examples are Amazon S3, Google Drive, Dropbox.

implement a given task. This makes more efficient  Data processing: big data applications often utilize

use of the relatively low main memory. distributed computing frameworks like Apache Hadoop
and Apache Spark.
 Compiler Simplicity: Because microprogrammed
 Collaborative applications: systems that require
instruction sets can be written to match the
simultaneous input from multiple users, such as online
constructs of high-level languages, compilers do
gaming or collaborative tools.
not have to be as complicated.
6. Dataflow Architecture
5. Distributed Architecture
Dataflow computer architecture is designed to optimize the
Distributed computer architecture refers to a system
flow of data between processing units, allowing for high
where multiple independent computers work together
levels of parallelism and efficient execution of tasks. In
to achieve a common goal. These systems can be
dataflow architectures, execution is determined by the
geographically dispersed and communicate over a
availability of data rather than a predetermined sequence of
network. Components of distributed computer
instructions. Operations are triggered by the arrival of their
architecture are:
input data. The architecture is often represented as a graph
 Nodes: individual computers or servers that
where:
participate in the distributed system.
 Nodes: represent operations like addition,
 Network: the communication medium (e.g. LAN,
multiplication, …
WAN, Internet) that connects the nodes.
 Edges: represent data dependencies between these
 Middleware: software that facilitates
operations.
communication and management of distributed
resources. --------------------------------------------------------------------------------

Common types of distributed architectures are: Lesson 3: The Processor and Its Components

 Cluster computing: a set of interconnected The Central Processing Unit (CPU), also called processor,

computers that work together as a single system. is the part of the computer that controls the operation of the

Clusters are often used for high-performance computer and performs its data processing functions by

computing tasks. interpreting and executing sequence of instructions

 Grid computing: a distributed architecture that representing programs. Modern CPUs are microprocessors,

connects multiple computers system across various meaning that they are contained on a single integrated

locations to perform large-scale computations. circuit (IC) chip. An integrated circuit is semiconductor

 Cloud computing: a form of distributed material on which thousands or millions of tiny electronic

computing where resources (servers, storage, components (transistors, resistors, capacitors, and diodes)

applications) are provided over the internet on a are connected together as a circuit. This technology of

pay-as-you-go basis. creating an integrated circuit by combining thousands or


millions of transistors on a single chip is known as very
large scale integration (VLSI). Besides the ALU and the
Control unit which are the main components of the CPU,

5
other CPU components include registers, cache memory, - Program Counter (PC): holds the memory
clock and buses. address of the next instruction to be executed.
- Instruction Register (IR): holds the
1. Arithmetic Logic Unit
instruction that is currently being executed by
The ALU is responsible for performing arithmetic
the processor.
operations (addition, subtraction, multiplication,
- Memory Address Register (MAR): holds
division) and logical operations (AND, OR, NOT).
the memory address where data is to be read
Bitwise logical operations and shift operations are also
(fetched) or written (stored).
performed by the ALU to manipulate individual bits.
- Memory Data/Buffer Register
These are essential operations that need to be done on
(MDR/MBR): holds data that has been read
almost any data that is being processed by the CPU.
in from memory or data produced by the ALU
2. Control Unit and waiting to be written to memory.
The Control Unit is responsible for coordinating and - Status Register(SR): holds information about
controlling all the operations of the computer. It does the state of the processor. Status register bits
this by issuing timing and control signals to the other are called flag bits or flags and each flag has a
units, instructing them on how to respond to a unique purpose. For example, there are flag
program’s instructions. By locating and retrieving bits for negative, zero, overflow, and carry.
(fetching) program instructions from memory, Negative bit (N): Set to 1 if the result is
interpreting (decoding) them and ensuring that they are negative; otherwise, cleared to 0
Zero bit (Z): Set to 1 if the result is 0;
executed in proper sequence, the control unit acts like
otherwise, cleared to 0
supervisor seeing that things are done the way they Carry bit (C): Set to 1 if a carry-out results
ought to. from the operation; otherwise, cleared to 0
Overflow bit (V): Set to 1 if arithmetic
3. Registers overflow occurs; otherwise set to 0.
Registers are small, fast storage locations within the
- Accumulator (ACC): holds results of
CPU used to hold temporary data and instructions.
computations performed by the ALU. When
Each register typically holds a word of data, often 32
the ALU carries out an operation like
or 64 bits, depending on the word size of the computer.
addition, subtraction and multiplication, it
The word size refers to the maximum number of bits
stores the result in the accumulator either for
that the processor can manipulate at a time. Since the
reuse by the ALU or before it is sent to a
CPU uses registers for the processing of data, the
destination register.
number of registers in a CPU and the size of each
register, affect the power and speed of the CPU.
4. Buses
Registers can be grouped into two:
(i) General-purpose registers: store data and
addresses according to the need of the program
being executed.
(ii) Special-purpose registers: dedicated to specific
tasks and have special names. They include:
program counter, instruction register, memory
address register, memory data/buffer register, and
status register.

You might also like