COMPUTER SCIENCE
WHAT IS UNDER THE HOOD OF A MODERN COMPUTER
The following are the main components of a computer:
i. Keyboard
ii. Mouse
iii. Hard Disk Drive (HDD)
iv. CPU(Central Processing Unit)
v. RAM
vi. Power Supply
vii. Fan Unit
viii. Motherboard
ix. Monitor
x. Headphones
xi. Microphone
xii. Camera
xiii. Sound Card
xiv. Graphics Card
THE EARLY COMPUTING DEVICES
Data is a raw fact that needed to be processed. It is usually without context.
The word compute is derived from the Latin word computare, which means "to
count up", "to sum up", "to reckon together".
THE ISHANGO BONE
The Ishango Bone is a very old object from the Upper Paleolithic era, about 50,000
to 12,000 years ago. It was discovered by a Belgian scientist named Jean de
Heinzelin de Braucourt (1920–1998) and named after the place where it was found.
The bone most likely came from the leg of a baboon, big cat, or another large
animal. It is believed to be the oldest record of prime numbers in history. It has
small marks carved into it, like tallies. People think it was used for counting, doing
simple maths, or even keeping track of the moon (like a calendar).
ASTROLABES
The astrolabe was invented by the ancient Greeks in 225 BC by Apollonius.
It was used to:
i. Tell the time during the day and night
ii. Know when the sun would rise and set, and how long the day would be
iii. Find stars and other objects in the sky
iv. Measure angles, like how high something is
v. Work out latitude (your position on Earth)
ABACUS
The abacus was invented by the Chinese around 500 BC (though some people think
the Babylonians made it around 300 BC). It was one of the earliest tools for
counting and calculating, like a very simple calculator.
THE COMPONENTS OF A COMPUTER
1. Input Device
An input device enables the user to input data into a computer.
Examples include keyboard, mouse, scanner, joystick, stylus, light pen, etc.
2. Memory
A memory is a location where a computer keeps the data that has been input, as
well as software applications and the results of any processing it has carried out, for
the short term.
This memory is also often called main memory. An example of this is Random
Access Memory (RAM).
3. Storage Device
A storage device is a location where a computer stores files that have been created,
as well as software that has been installed, for the longer term.
Examples include:
Hard Disk Drive (HDD)
Solid State Drive (SSD)
Pen drive
Compact Disc (CD)
4. Processor
A processor is a part of a computer that processes data according to the
instructions it has been given. It provides the user with information.
Examples include:
Intel
AMD
Apple
5. Output Device
An output device enables the user to receive information from a computer.
Examples include:
Monitor
Printer
Speaker
Plotter
THE CENTRAL PROCESSING UNIT (CPU)
A Central Processing Unit (CPU) is the primary component of a computer that
performs most of the processing inside the system.
It is often called the "brain" of the computer.
It interprets and carries out instructions from both hardware and software.
FUNCTIONS OF THE CPU
1. Fetch
The CPU fetches the next instruction from memory (usually from RAM).
2. Decode
The Control Unit (CU) interprets or decodes the fetched instruction.
3. Execute
The CPU performs the operation specified by the decoded instruction.
A FETCH–DECODE–EXECUTE CYCLE
Fetch the instruction → Decode the instruction → Execute the instruction
→ Repeat
COMPONENTS OF A CPU
1. Control Unit (CU)
The Control Unit directs and coordinates the operations of the CPU.
2. Arithmetic Logic Unit (ALU)
The Arithmetic Logic Unit is responsible for performing all the arithmetic tasks such
as:
Addition
Subtraction
and logical operations such as:
Comparisons
AND
OR
3. Registers
Registers are small, high-speed storage locations within the CPU used to
temporarily hold data and instructions during processing.
Decomposition Algorithm
What is Decomposition?
Decomposition means breaking a big or complex problem into smaller and easier
parts. It helps us solve one part at a time instead of trying to do everything at once.
Example
When cooking dinner, you can break the task into smaller steps like:
Wash the ingredients
Cook the rice
Fry the meat
Serve the food
Key Terms
Algorithm: A set of step-by-step instructions to solve a problem.
Abstraction: Focusing on the important details and ignoring the unnecessary ones.
Computational Thinking: Thinking logically to solve problems like a computer
would.
Steps in Decomposition
A. Identify the main problem.
B. Break it into smaller sub-problems.
C. Work on each sub-problem one by one.
D. Put all the solutions together.
E. Check if the main problem is solved.
Example: Making Dinner
Ste
Task
p
1 Buy ingredients
Wash
2
vegetables
3 Boil rice
4 Fry meat
5 Serve the meal
Importance of Decomposition
1. Makes complex problems simpler.
2. Helps you stay focused on one part at a time.
3. Saves time and improves efficiency.
4. Gives clear understanding of problems.
Student Lesson Note: Introduction to Scratch Programming
What is Scratch?
Scratch is a block-based visual programming language developed by MIT
(Massachusetts Institute of Technology). It allows you to create stories,
animations, games, and music by snapping colorful coding blocks together. You
don't need to write long code — just drag and drop blocks like puzzle pieces.
Why Learn Scratch?
1. Learn coding in a fun and easy way.
2. Develop logical thinking and creativity.
3. Build problem-solving skills.
4. Express ideas through animation and storytelling.
5. Work together on creative projects.
Scratch Interface Overview
The Scratch screen is divided into different parts:
1. Stage – where your animation or game plays.
2. Sprites – characters or objects that perform actions.
3. Script Area – where you join code blocks together.
4. Block Palette – where all coding blocks are found.
5. Toolbar – for saving, editing, or starting a new project.
Types of Scratch Blocks
Category Function Example
move 10
Motion Moves sprites
steps
Looks Changes appearance say "Hello!"
play drum for
Sound Adds sounds
2 beats
when green
Events Starts actions
flag clicked
repeat 10
Control Loops and waits
times
touching color
Sensing Detects actions
red?
Operators Performs calculations add 2 + 3
Variables Stores data score = 0
Creating Shapes with Scratch
In Scratch, we can use the Pen extension to draw different shapes using code
blocks.
Below are examples of simple projects to draw shapes:
1. Drawing a Square
Use repeat 4, move forward, and turn 90 degrees four times.
2. Drawing a Circle
Use repeat 360 to turn 1 degree and move 1 step each time.
3. Drawing a Triangle
Use repeat 3, turn 120 degrees, and move forward.
THE ORIGINS OF MODERN DIGITAL COMPUTING
ANTIKYTHERA
The Antikythera is believed to be the earliest mechanical analogue "computer" and
is dated around 100BC. It is a complex mechanism designed by the Greeks to
calculate the position of the Sun and Moon, the Moon phases, eclipses, and the
location of various planets in the sky.
BLAISE PASCAL’S MACHINE (PASCALINE)
The French mathematician and Physicist Blaise Pascal built the first mechanical
calculating machine in 1645. This machine was a series of dials and geared wheels
to add and subtract.
GOTTFRIED LEIBNIZ’S MACHINE (Step Reckoner)
Around 1672, a German called Gottfried Wilhelm von Leibniz developed Pascal’s
machine further, creating the Step Reckoner, which could perform all four
arithmetical operations.
WEAVING LOOMS
The first programmable devices were weaving looms. In 1725, a French weaver,
Basile Bouchon, used holes in rolls of papers to allow needles in the loom to engage
or be held back. The design was later improved by another Frenchman, Joseph-
Marie Jacquard, who used punched cards to control each row of the weave. These
cards could control over 1000 variations of weave and intricate designs could be
created and repeated. This development, in 1805, allowed programs to be stored.
ANALYTICAL ENGINE
In 1834, Charles Babbage designed the analytical engine, a mechanical device
remarkably similar to the modern computer. The design had a central arithmetic
unit for calculating (+, -, etc), an area for retaining numbers (a store) and
mechanisms for input and output.
Ada Lovelace
Ada wrote an algorithm for Babbage’s analytical engine to compute a mathematical
problem called Bernoulli’s numbers, which requires thousands of branching to
perform a calculation, and repetitions to create loops. This is considered the first
algorithm specifically designed to work on a computer and Ada is often thought of
as the first computer programmer.
HERMAN HOLLERITH’S MACHINE (TABULATOR)
Herman Hollerith’s machine was an electro-mechanical device designed to process
large amounts of data using punched cards. It was used to analyse 1890 U.S.
census data. This invention laid the foundation for modern computing and later led
to the formation of IBM in 1924.
COLOSSUS
Colossus was developed in 1943 by Tommy Flowers and Max Newman to help
decrypt encrypted messages during World War II. It was the first fully electronic,
programmable binary computer, designed specifically for codebreaking at Bletchley
Park in the UK. Colossus was built specifically for just one task, decrypting ciphers. It
was not a general-purpose machine.
ENIAC (Electronic Numerical Integrator and Computer)
ENIAC was developed in 1945 by John Mauchly and J. Presper Eckert at the
University of Pennsylvania. It was the first general-purpose electronic computer,
designed to perform a variety of calculations.
THE MANCHESTER BABY
This was developed in 1948 by Frederic Williams and Tom Kilburn at the University
of Manchester. It was the world’s first stored-program computer and the first
commercially available general-purpose computer.
COMPUTER GENERATIONS
FIRST GENERATION COMPUTERS (1946–1955)
The first generation of computers used vacuum tubes for processing and magnetic
drums for memory. These computers were large, expensive, and consumed a lot of
electricity, often requiring entire rooms to operate. They were programmed using
machine language and punched cards.
SECOND GENERATION COMPUTERS (1953–1963)
Second generation computers replaced vacuum tubes with transistors, making
them smaller, faster, more reliable, and energy-efficient. These computers used
magnetic core memory and introduced assembly language for programming instead
of machine code. They also supported high-level languages like COBOL and
FORTRAN.
THIRD GENERATION COMPUTERS (1964–1970)
The third generation of computers introduced integrated circuits (ICs), which
combined multiple transistors on a single silicon chip, making computers smaller,
faster, and more efficient. These computers replaced punched cards with keyboards
and monitors for input and output and could run multiple applications
simultaneously using operating systems.
FOURTH GENERATION COMPUTERS (1971–1991)
The fourth generation of computers was marked by the development of the
microprocessor, which integrated an entire CPU onto a single chip, making
computers smaller, faster, and more affordable. This generation saw the rise of
personal computers (PCs) and the introduction of graphical user interfaces (GUIs),
the mouse, and handheld devices. Computers became widely available for home,
business, and education.
FIFTH GENERATION OF COMPUTERS (1992 – PRESENT)
The fifth generation of computers is characterized by the use of multi-core
processors, which contain multiple independent processing units (cores) that allow
for parallel processing and increased performance. These computers are highly
powerful, with significant advancements in artificial intelligence (AI).
HOW THE WEB WORKS
The following are some web related terms:
The Internet
The internet is a global network of millions of connected computers.
Server
A server is a computer connected to a network (possibly the internet) that manages
requests to access its digital services and data.
Artefact
A man-made object, which is of educational, cultural or historical interest. Not all
digital resources are man-made, and so are not true artefacts.
Client
A computer connected to a network (possibly the internet) that can request data
and process services made available by a server.
Web browser
A web browser is an application that can be used to display information stored
digitally as web pages on the computer on the world wide web. Examples include
Google Chrome, Microsoft Internet Explorer, Safari, Opera, Mozilla Firefox, Microsoft
Edge.
Network
A group of inter-connected computers and communication infrastructure that allows
digital data and services to be shared electronically.
World Wide Web (www or the web)
A system of interlinked digital web pages that are located on the internet and made
available to the public. It operates through a system of web pages.
HyperText Markup Language (HTML)
Markup language for creating web pages and displaying other information in web
resources.
Uniform Resource Locator (URL)
It is a technical name for a web address, and it tells you where on the web you can
find a particular digital resource.
Protocol
Standard set of rules and instructions to be followed by a computer.
The following are steps involved in opening a web page (how the web
works):
1. User requests a web page by entering a URL (e.g. [Link]
into their web browser.
2. The browser contacts a DNS (Domain Name System) server to translate the
domain name ([Link]) into an IP address (e.g., [Link]).
3. The browser sends an HTTP/HTTPS request to the web server asking for the
page. The server processes the request by retrieving the requested page. If
the page does not exist, the server returns a 404 Not Found error.
4. The server responds with the requested HTML, CSS, JavaScript, and media
files.
5. The browser displays the page.