Computing Note 4
Computing Note 4
COMPUTING NOTE
SECTION 1 – 5
OUTLINE
• SECTION 1 - COMPUTER SYSTEMS – DATA REPRESENTATION AND COMPUTER
STRUCTURE
FORM 1
Prepared by Emmanuel mbrah lawson
COMPUTING NOTE – SECTION 1 - 5
SECTION 1
A bit is the smallest unit of data in computing or the digital world. A bit can only be in one of two
‘binary’ states: ‘0’ or ‘1. The ‘0’ often signifies ‘Off’ or ‘False’ and the ‘1’ signifies ‘On’ or ‘True’.
Note: Representing data as bit patterns involves using sequences of 0s and 1s (bits) to encode
different types of data.
1. INTEGER REPRESENTATION
When encoding numbers in binary, we are converting from base-10 (decimal) to base-2 (binary).
In binary numbers, the place values for each digit goes up in 2’s, going from right to left.
For example, the first five place values are
Binary
When converting from binary to decimal, the sum of the product of each digit and its place value is
calculated. The worked example below shows that the binary number 10110 equals the decimal
number 22.
Important Rules
Leading zeros can be added to the front of a binary number without changing its value (e.g.,
5 = 101 = 00000101 as a byte).
To make a full byte (8 bits), pad shorter binary numbers with leading zeros on the left.
When counting binary place values, start from 0 on the rightmost digit and move left (2⁰, 2¹,
2², ...).
2. TEXT REPRESENTATION
Text characters are represented using standard character encoding schemes such as ASCII
(American Standard Code for Information Interchange) and Unicode.
Standard ASCII uses a 7-bit code to represent 128 characters — 95 printable (letters, digits,
symbols) and 33 non-printable control characters (e.g., carriage return, line feed).
Extended ASCII uses an 8-bit code, allowing 256 characters total (128 extra
characters/symbols added).
How it works: Every character has a unique binary code. For example:
When you press a key, the computer converts it to its ASCII binary code to store or display
it.
Goal: give every character in every language a unique code, creating a global standard
3. Image Representation
A pixel is the smallest unit of a digital image or display — like a single tiny dot of colour.
An image is made up of thousands (or millions) of pixels arranged in a grid. Each pixel is
given a binary code representing its colour.
A bitmap is the grid/array of all these binary codes together — it represents the whole
image. This method of representing images is called bitmapped graphics.
The number of bits used per pixel determines how many colours can be shown:
Example codes
1 bit
2 colours: 0, 1 (e.g., black & white)
2 bits
4 colours: 00, 01, 10, 11
Rule: Number of colours = 2^ (number of bits per pixel)
Black-and-White Images
1 = white 0 = black
A grid of 0s and 1s can therefore directly represent a simple black-and-white image, where
each digit corresponds to one pixel's colour.
Colour Representation
More bits per pixel = more possible binary combinations = more colours available. For
example, with 2 bits, you get 4 possible patterns (00, 01, 10, 11), so 4 different colours can
be shown.
4. Audio Representation
The number of bits used per sample is called the bit depth. It determines how much detail
(resolution) is captured for each sample.
Bit depth
8-bit: Each sample is represented by an 8-bit binary number, which can range from 0 to 255
(- 1). This provides relatively low resolution and dynamic range some basic audio
applications like early video games or simple sound effects.
16-bit: Each sample is represented by a 16-bit binary number, which can range from 0 to
65,535 (- 1). Standard, higher resolution, CD-quality audio
24-bit: Range from 0 to 16,777,215 (2²⁴ − 1), Very high resolution/dynamic range,
Professional recording & mastering
The sampling rate is how often samples are taken (e.g., samples per second).
A higher sampling rate = more samples per second = the digital recording captures the
original sound waves more accurately = better sound quality.
A lower sampling rate (e.g., one sample every second) would miss most of the wave's
detail, producing poor, choppy-sounding audio compared to sampling every 0.1 seconds.
6. File Representation: All files (documents, images, videos, executable programs) are
ultimately stored as collections of bits. The way these bits are arranged follows a specific
file format, which tells the computer how to interpret and display the data correctly.
Examples of file formats
Pictures-JPEG, Word documents-DOC, DOCX, Spreadsheets-XLS, XLSX
7. Data for Transmission: When data travels across a network (e.g., the internet), it is
broken into same-sized pieces called packets. Each packet travels separately and is
reassembled back into the original data at its destination.
Bit patterns let computers process, store, and transmit data efficiently using simple
electronic circuits that only need to tell apart two states (0 and 1).
This simple foundation supports the entire range of modern computing applications.
Real-world applications
Smartphones and digital devices: Every app social media, navigation, productivity —
relies on bit patterns for its data and functions.
Browsing the web, sending texts, taking photos all of this digital activity is stored and
processed as bit patterns "behind the scenes."
Boolean logic is a type of algebra where results are either True or False (not numbers).
It was developed by mathematician George Boole. It's widely used in programming, digital
circuit design, and data processing
Relationship to Bits
This lets computers use simple electrical "charged/not charged" circuit states to represent
logical true/false values.
LOGIC OPERATIONS
There are three main logic operations. These are: AND, OR and NOT.
1. AND operation
The AND operation takes two input values, often represented as A and B, and produces an
output based on the following rules:
a. If both A and B are 1 (true), the output is 1 (true).
b. Otherwise, if either A or B (or both) is 0 (false), the output is 0 (false).
2. OR Operation
The OR operation takes two input values, also often represented as A and B, and produces
an output based on the following rules:
a. If either A or B (or both) is 1 (true), the output is 1 (true).
b. If both A and B are 0 (false), then the output is 0 (false).
3. NOT Operation
The NOT operator takes a single input value (often referred to as A) and produces the
opposite value as the output.
a. If A is 0 (false), the output is 1 (true).
b. If A is 1 (true), the output is 0 (false).
Forms the basis for decisions, comparisons, and computations in computer systems.
Underpins programming (if/else logic), digital circuit design, and how computers make
decisions.
where all the calculating, sorting, searching, and decision-making happens. The CPU is
discussed in more detail later in this material. Main or working memory stores data that is
currently being used by the CPU. Secondary or backing storage is where saved computer
data is stored
FLIP-FLOP
A flip-flop is a basic electronic circuit used for storing bits. A flip-flop can store only one bit
of data. Some types of memory (for example, a type of RAM called SRAM) use flip-flop
circuits.
TYPES OF MEMORY
1. RAM (Random Access Memory) serves as the primary storage location for data that the
CPU is actively working on or requires for quick access. This type of working memory holds
data and instructions that are currently being processed by the CPU. RAM is directly
accessible by the CPU.
Characteristics: Directly accessible by the CPU; capacity measured in GB or TB; storage
locations identified by binary memory addresses.
Volatile: Requires power to retain data — when the computer turns off, RAM's contents are
lost.
Uses: Running programs, multitasking — more RAM = can run more programs at once /
handle more data efficiently
3. Secondary Memory/Storage
Secondary memory is external, non-volatile memory where data can be stored
permanently. Examples include internal/external hard disk drives (HDDs), Pen drives (Flash
drives), CDs, and solid-state drives (SSDs). Secondary storage is also sometimes termed
auxiliary storage.
4. Cache Memory
Cache memory or CPU cache is a small, high-speed memory for temporary data storage. It
is located directly on the CPU or close to it. It acts as a buffer between the CPU and RAM,
holding frequently used data and instructions that the processor may require next. This
reduces the need for frequent slower memory retrievals from RAM which may otherwise
keep the CPU waiting
5. Registers
Registers are the fastest access and smallest capacity storage units. They are located
within the CPU itself. They serve as temporary storage areas that store the data,
instructions and memory addresses that the CPU is currently processing
CACHING
In computing, a cache is a hardware or software component that stores data so that future
requests for that data can be served faster.
Another example of caching is browser cache, also known as web cache and CPU cache
1. Browser cache/Web cache
Browser cache is a temporary storage area in RAM or on disk that holds the most recently
downloaded web pages. As you jump from web page to web page, the caching of those
pages in memory lets you quickly go back to a page without it having to be downloaded
again. To ensure that the latest page is displayed
NOTE: If a user gets a run-time error message when trying to access a particular webpage,
this can indicate a corrupt browser cache.
A possible solution to these issues is to clear the browser cache.
2. CPU cache
Cache memory is a fast random-access memory that temporarily stores a small amount of
data and instructions that the CPU is likely to use, so that it can run more efficiently.
The CPU is the part of a computer that It manages all work with data. It is often called the processor
and is responsible for executing instructions and performing calculations that enable computers to
carry out tasks.
1. Control Unit (CU): The “brain” of the CPU that manages all operations within the CPU.
FUNCTION
1. It controls the order in which instructions are executed. Decides which instruction
happens first, second, etc.
2. It directs other CPU components, such as the ALU and registers.
3. It fetches instructions from memory, decodes them, and tells other parts what to do.
Means Gets information from memory and understands what the instruction means
5. Send the data and instruction to ALU for processing: → Passes tasks to other parts like
ALU
6. Decode instructions
2. Arithmetic and Logic Unit (ALU): Responsible for arithmetic and logical operations. Performs
calculations and makes decisions. Arithmetic operations → Addition (+), subtraction (−),
multiplication (×), division (÷)
1. The Control Unit gets instructions 2. It tells the ALU what to do 3. The ALU performs the
calculation or decision 4. The result is sent back or used
FUNCTION
1. Performs arithmetic operation to process numbers: The CPU can calculate numbers
Example: 2 + 2, 10 – 5 Like using a calculator
2. Performs logical operations to make decision: The CPU can make decisions Example: Is
5 greater than 3? (Yes/No
3. Registers: Very small, high-speed storage locations inside the CPU. Store data temporarily while
it is being processed. They hold data for a short time while it is being used
FUNCTION
1. Program Counter (PC): Holds the address of the next instruction to be executed
2. Instruction Register (IR): Stores the current instruction being executed by the CPU
3. Memory Address Register (MAR): Holds the address of memory location being accessed
4. Memory Data Register (MDR): Holds the data being transferred to or from memory
5. Accumulator (AC) (in some architectures): Stores intermediate results of
arithmetic/logic operations
6. Status Register / Flag Register: Stores condition flags (e.g., zero, carry, sign, overflow)
They are called general-purpose because they can be used for many different operations
depending on what the program needs
EXAMPLES OF REGISTERS
2. Memory address register: holds the address of the data or instruction in memory
3. Memory data register/memory buffer register: holds the actual data being transferred to
/from memory
FUNCTIONS OF REGISTERS
4. Cache: A small, very fast memory located inside or near the CPU. Stores frequently used data
and instructions. Helps the CPU access data more quickly.
FUNCTION OF CACHE
1. Reduce the CPU waiting time: meaning the CPU doesn’t have to go to main memory every
time
2. Store frequently used data: keeps data the CPU uses often
1. L1 Cache (Level 1) The smallest and fastest Located inside the CPU Very quick access
2. L2 Cache (Level 2) Bigger than L1 but a bit slower Still very fast
Clock: An electronic component inside the CPU that controls the timing of all operations. It tells
the CPU when to start and stop each task It controls the speed of processing. Sends out regular
signals called clock pulses. Determines how fast the CPU operates (clock speed or clock
frequency).
Clock speed is how fast the CPU works. Measured in GHz (Gigahertz)
Note: The CPU clock, with its regular electronic pulses, synchronizes the various stages of the
machine cycle, ensuring each step happens at the right time. Measured in Gigahertz (GHz)
• Determines the speed of the CPU: Faster clocks = more instructions executed per second
• Provides timing signals
• Ensures instructions are executed in order
• Controls CPU operations
MACHINE CYCLE
Machine cycle is the step-by-step process the CPU uses to execute instructions. It is a routine that
the CPU repeats rapidly to run a program.
SYSTEM BUS
The system bus is a communication channel (a set of wires) that connects the processor to other
parts of the computer system.
OR System buses is a set of electrical pathways that connects the CPU, memory (RAM), and other
components of a computer.
Transfers data, instructions, and signals between parts of the computer. Buses are communication
pathways that transfer data within the computer.
TYPES OF BUSES
1. Address Bus: Sends memory addresses to other components, e.g. go to a memory location 105
Note: The address bus usually moves in one direction (from CPU to memory).
2. Data Bus: Sends the actual data to/from other components.
Note: Can move data in both directions. Data can travel from the CPU to another component and
also from that component back to the CPU using the same path.
3. Control Bus: Sends control signals such as read, write, interrupt signals, and execute.
ISA is the CPU programming language. CPU instruction set is also known as Instruction Set
Architecture (ISA).
EMBEDDED SYSTEMS
An embedded system is a special-purpose computer that is built inside another device to perform a
specific task.
OR
It is a special-purpose computer system which is completely encapsulated by the device it
controls.
An embedded system is a small computer inside a device that does one specific job.
Instead of a full computer like your phone or laptop, it is hidden inside machines.
Examples:
A microwave → controls heating your food
washing machine → controls washing cycles
ATM → handles money transactions
A traffic light → controls red, yellow, and green lights
Purpose:
To control a device and allow a user to interact with it.
Examples of Embedded Systems
Electronic calculator, Fitness tracker, Central heating system, GPS system, Digital watch, Washing
machine, Microwave oven, Air conditioner, Traffic light system, ATM machine, Refrigerator, Smart TV
1. They can be used in a wide variety of products and devices, and to create new ones.
Used in many devices. Embedded systems are everywhere.
5. Embedded systems are specialized, so they are good at doing their jobs without messing up.
Do one job very well . They are designed for a specific task, so they don’t make many mistakes.
Like: A washing machine focuses only on washing, A microwave focuses only on heating
SECTION 2
COMPUTER HARDWARE
Computer hardware are various physical parts or devices that work together to provide the
necessary input, processing, and output functions in computing tasks.
OR
Refer to all physical parts of a computer that can be seen and touched. These parts work together
to move, process, store and output data.
They are important because they provide the necessary input functionality for computing tasks.
Generally, hardware may be categorized as follows:
1. Input Devices (Input Hardware): Input devices are hardware components that allow users to
enter data and instructions into a computer system.
They enable users to interact with the computer and make it functional.
Features
1. Keyboard: A keyboard is a common input device consisting of a set of keys that allow users
to input/send/enter alphanumeric characters, symbols, and commands.
2. Mouse: A mouse is a pointing device that allows users to control the cursor on the screen. It
enables users to select objects, navigate interfaces, and perform actions through mouse
movements and clicks.
3. Touchscreen: Touchscreens enable users to directly interact with the computer by
touching the display. They can detect and respond to finger gestures, allowing for intuitive
input methods such as tapping, swiping, or pinching.
Note: A touchscreen is both an input and output device.
4. Scanners: Scanners are used to convert physical documents, images, or objects into
digital formats.
2. Output Devices
Output devices display results from the computer. They present the processed data that is entered
into the computer through an input device.
Features of Output Devices
2. Display information
1. MONITOR: Monitors allow users to view computer output on screens. They display text,
images, and videos generated by the computer. Note: A monitor is also called a Visual
Display Unit (VDU).
Types of Monitors:
CRT (Cathode Ray Tube). LCD (Liquid Crystal Display). LED monitor (Light Emitting Diodes)
A plotter is a special output device used to produce high-quality drawings and graphics.
Note: It uses pens or ink to draw lines on paper.
Commonly used by engineers, architects, and graphic designers.
Examples of Plotters
Pen Plotter: A pen plotter is a type of plotter that uses one or more pens or markers to draw images
or lines on paper.
Electrostatic Plotter
An electrostatic plotter is a plotter that uses electrostatic charges to attract toner or ink onto paper.
OR
It is a plotter that uses electrical charges and toner to create images on paper. Plotters can be used
for large posters, maps, and complex engineering designs.
4. PRINTERS: A printer produces hard copies of processed data. It enables the user to print
images, text, or any other information onto paper.
Examples of Printers: Inkjet printers, Laser printers
3D Printer
A 3D printer creates three-dimensional objects from a digital design. It can be used in healthcare,
prototyping, etc.
SOUND OUTPUT DEVICES: These are hardware devices that produce audio from a computer or
other electronic device. They deliver audio output for listening or communication purposes.
Examples
Speakers, Headphones / Earphones, Headsets, Sound bar
They enable users to hear sound.
STORAGE DEVICES
These are devices of a computer system that store and retrieve data, programs, and files.
OR
Storage devices are hardware components used to store data, programs, and information either
temporarily or permanently.
Characteristics of Storage Devices
1. Capacity
The amount of data a device can hold. Measured in bytes, KB, MB, GB, TB.
2. Performance (Speed)
How fast data can be read, retrieved, or written (saved).
3. Storage devices have units of measurement such as KB, GB, TB.
1. Magnetic Storage
Refers to a type of digital data storage that uses a magnetized medium to store binary information.
OR
Magnetic storage uses a magnetic material. It tends to have a high capacity at low cost.
Note: A downside of magnetic storage is lower read speeds.
Examples
Is a type of non-volatile solid-state memory that stores data by trapping electrons in tiny cells to
represent ones and zeros.
Note: Flash memory has no moving parts and can quickly read and write data. It retains information
when the power is off.
Examples of Flash Memory
a) Solid State Drives (SSDs): Is a type of storage device that uses flash memory to store data.
Note: SSDs offer faster data access and transfer speeds compared to HDD due to the absence of
moving parts. They consume less power.
b) USB Flash Drives (Pen drive)
Is a small portable storage device that uses flash memory to store data.
Note: USB flash drives are also known as thumb drives, pen drives, or USB sticks. They connect to
computers via USB ports.
They are used for data backup, file transfer, and portable storage.
c) Memory Card
Memory cards are small, portable storage media commonly used in cameras, smartphones,
tablets, and other portable devices.
Data can be read by connecting the device with the card to the computer or removing the card and
inserting it into a memory card reader connected to the computer. It uses flash memory.
Examples:
Secure Digital (SD) cards, microSD cards, Compact Flash (CF) cards, Memory Stick
NETWORK STORAGE
Network storage is a type of hardware that allows access to storage on a local area network (LAN).
OR Network storage is a way of storing data (files, documents, videos) on a device or system that is
connected to a network, so multiple users and devices can access it.
1. Centralized Storage: All files are kept in one place (server or storage device).
2. File Sharing: Many users can access and share files easily.
3. Remote Access: Files can be accessed from different locations (home, school, office).
4. Backup and Security: Data can be backed up and protected from loss.
Examples of Network Storage
CLOUD STORAGE
Cloud storage refers to storing data on remote servers in data centers that are accessed through
the internet. OR
Cloud storage is type of storage which can be accessed remotely over the internet. It is a type of
storage where data (files, documents) is kept on remote servers on the internet instead of a local
device like a computer or flash drive.
Most cloud storage is used by users of both stand-alone and networked computers.
Examples of Cloud Storage Service Providers
Google Drive, Dropbox, OneDrive, iCloud
Online access: Cloud storage allows you to access your files over the internet. files are
stored on remote servers (data centers), not just your computer. You can open your files
using any device—phone, tablet, or computer. You only need an internet connection and
your login details
Sharing: Cloud storage makes it easy to share files with others. You can send a link instead
of copying files. It supports real-time collaboration (many people working on the same file).
Backup: Cloud storage helps to keep your data safe by creating backups. Files can be
automatically saved and updated in the cloud. If your device is lost, stolen, or damaged,
your data is still safe online. You can restore deleted or older versions of files.
A data center storage system is a large and powerful setup of computers and storage devices used
to store, manage and protect huge amounts of data in a central location called a data centre.
A data center is a special building that contains computers and equipment used to store, process
and manage large amounts of data.
1. File Storage Devices: A type of data centre storage system where data is stored and organized in
files and folders, allowing users to access, manage and share information over a network.
Examples
Network-Attached Storage (NAS): NAS devices are specialized storage devices connected to a
network and used for centralized data storage and file sharing.
OR
Network-Attached Storage (NAS: Is a special storage device connected to a network that allows
multiple users and devices to store, access and share files from one central location.
Note: NAS devices are often used in homes and in small to medium-sized businesses. They provide
data access to multiple users or devices over a network and operate 24/7. NAS devices contain a
minimum of two hard drives or SSDs, ranging from TB to PB.
NAS devices have a processor that provides computing intelligence and power to manage the file
system. The processor reads and writes data, processes and serves files, and manages multiple
users.
Note: NAS has a feature like [Link] uses file access protocols such as:
Network File System (NFS), Common Internet File System (CIFS)
Features of NAS
1. Centralized Storage: Provides a centralized location for storing and accessing data on a
network. Allows multiple users or devices to access files and documents from a single
storage place.
2. Easy Setup and Management: NAS devices are designed to be simple to install and use,
even for beginners. You only need to connect the NAS to a router using a network cable.
Most NAS systems come with a user-friendly web interface (like a website) to control
everything. No advanced technical skills are needed—just follow on-screen instructions.
You can manage users, storage space, and settings easily from a computer or even a phone.
3. File Sharing and Collaboration: NAS allows many people to access and share files at the
same time. Files are stored in a central location (the NAS device). Multiple users (students,
teachers, workers) can open, edit, and save files from different computers. It supports
permissions, so some users can only view files while others can edit them. Useful in
schools, offices, and homes for teamwork
4. Remote Access: NAS devices often support remote access, allowing users to access their
files and data anywhere with an internet connection.
5. Data Protection and Redundancy: NAS systems often have built-in data protection
features such as: RAID (Redundant Array of Independent Disks) RAID helps safeguard
against data loss due to disk failures. RAID configuration distributes data across multiple
hard drives, providing: Redundancy Fault tolerance
6. Scalability: NAS systems are scalable. This means users can expand storage capacity as
needed by adding additional hard drives.
7. Data Security: NAS offers strong security features to protect stored data from unauthorized
access and ensure data integrity. These include: User authentication, Access control,
Encryption
Block storage devices store data in blocks and can provide many terabytes of data capacity.
OR. A storage system that saves data in fixed-size chunks called blocks.
Each block has a unique address, allowing the system to quickly find, read, and write data.
Examples of Block Storage Devices
Storage Area Network (SAN): SAN is a special high-speed network that connects computers to
storage devices like disks or connects storage devices to computers. SAN uses: Fibre Channel,
Ethernet
Features of SAN
✓ Centralized storage
✓ Scalable (easy to add more storage)
1. NAS uses TCP/IP networks (commonly Ethernet), while SAN runs on high-speed Fibre
Channel networks.
3. NAS uses protocols such as NFS, CIFS, HTTP, SMB but SAN uses, SCSI protocol
4. NAS is easier to manage and plugs into the LAN easily, while SAN requires more
administration time.
5. NAS is less expensive to purchase and maintain, while SAN is more complex and costly,
often requiring dedicated staff.
Note: NTFS (Network File System): The system was designed in 1984 by Sun Microsystems. This
distributed file system protocol allows a user on a client computer to access files over a network.
SMB (Server Message Block): A network file sharing protocol that allows applications on a
computer to read and write files.
CIFS (Common Internet File System): A dialect of SMB. CIFS is an implementation of the SMB
protocol created by Microsoft.
FC (Fibre Channel): A high-speed data transfer protocol providing fast, lossless delivery of raw
block data.
Redundant Array of Independent Disks is a storage technology that combines multiple drives to
improve performance, reliability, and data redundancy.
OR RAID is a method of combining multiple hard drives into one system to improve speed, storage
capacity, and data safety.
Note: Data redundancy is when multiple copies of the same information are stored in more than
one place at a time. Redundancy provides fault tolerance, which is the ability of a system to
continue operating properly in the event of the failure of one or more components.
1. RAID 0 (Striping): Data is split across multiple disks. Very fast access but no data
protection. If one disk fails, all data is lost.
2. RAID 1 (Mirroring): Same data is copied to two disks. Very safe but uses more storage.
3. RAID 5 (Striping + Parity): Data and backup information are spread across disks. Good
speed and safety.
4. RAID 10 (1+0): Combination of RAID 1 and RAID 0. Very fast and very safe but expensive.
Advantages of RAID
✓ Improves performance
✓ Protects data
✓ Increases storage capacity
Communication hardware devices enable the transmission and reception of data and signals
between computers, devices, and networks.
OR. Communication hardware devices are physical tools used to send, receive, and manage data
in a network.
They help computers and other devices communicate with each other.
1. Network Interface Card (NIC): NIC, also known as a network adapter or network card, enables
computers to connect to networks. NIC provides a hardware interface for transmitting and receiving
data over wired networks.
Or
It is a hardware component inside a computer that allows it to connect to a network.
Note: NIC can be wired (Ethernet) or wireless (Wi-Fi), Bluetooth.
2. Modem: A modem is a device used to modulate and demodulate digital signals into analogue
signals and vice versa.
Modems allow computers to communicate over analogue networks such as telephone lines.
A modem is used for internet access because it receives an analogue signal from the ISP and then
converts it into a digital signal.
3. Routers: Routers are devices that connect different networks and direct data from one device to
another.
Routers send information to the correct destination.
Features:
4. Switches: A switch is a network device that connects multiple devices (computers, printers)
within the same network and sends data only to the correct device.
Or
Switches are devices that enable the interconnection of multiple devices within a local network.
Note: They receive and forward data packets to their intended destination based on their Media
Access Control (MAC) addresses. A MAC address is a string of characters that identifies a device on
a network.
5. Hubs: A hub is a network device that connects multiple devices in a LAN and broadcasts data to
all devices connected to it.
6. Wireless Access Point (WAP): WAPs enable wireless connectivity in local networks.
Or. It is a device that allows wireless devices (like phones, laptops) to connect to a wired network
using Wi-Fi.
Note: They create wireless network signals that devices can connect to, allowing wireless
communication and internet access.
7. Repeaters and Extenders: These are devices used to extend the coverage area of a Wi-Fi
network.
8. Repeaters: A repeater boosts weak signals so they can travel longer distances without losing
strength.
9. Extender: An extender takes an existing WIFI signal and rebroadcasts it, increasing coverage
MOTHERBOARD
A motherboard is a large circuit board that holds and connects all the essential components of a
computer, allowing them to work together.
OR
A motherboard is the main circuit board inside a computer. It connects all parts of the computer so
they can communicate and work as one system.
Note: The motherboard’s form factor is the specification of a motherboard, such as the
dimensions, power supply type, location of mounting holes, and number of ports on the back
panel.
1. Connects all components: Links CPU, RAM, hard drive, and other parts together
3. Distributes power: Supplies electricity from the power supply to all parts
4. Holds important components: Provides slots and sockets for CPU, RAM, and expansion cards
5. Controls startup (BIOS/UEFI): Starts the computer and checks hardware before loading the
system
4. CPU Socket: A CPU socket is a special slot on the motherboard where the Central
Processing Unit (CPU) is placed. It holds the CPU firmly and connects it electrically to the
rest of the computer system.
1. Holds the CPU in place: It ensures the processor stays secure on the motherboard.
2. Provides electrical connection: It connects the CPU to other components like RAM, storage,
and power supply.
3. Allows easy replacement: You can remove and replace the CPU without soldering.
Types of CPU Sockets
Pins are on the CPU which fit into corresponding holes in the socket on the motherboard
Used by AMD Example: AM4
a. Clock Speed: Measured in GHz, it determines how fast the CPU can execute instructions.
b. Number of Cores: Multicore processors can handle multiple tasks simultaneously.
c. Cache Memory: Provides faster access to frequently used data for the CPU
5. RAM Slots: RAM slots are where memory modules (RAM sticks) are inserted on the
motherboard.
A RAM slot is a long, thin slot on the motherboard where you insert the RAM (Random Access
Memory) sticks. It allows the CPU to access memory quickly for running programs. Note: RAM
stores the program and data that the computer is currently using, and more RAM means the
computer can handle more tasks at once.
Expansion slots are the connection points on the motherboard where you can add extra
components like graphics cards, sound cards and WNICs (Wireless Network Interface Controllers)
to enhance the computer’s capabilities
OR. An expansion slot is a connector on a computer’s motherboard that allows you to add extra
hardware components to enhance the computer’s capabilities.
Purpose
1. To expand the functionality of a computer.
Common Types
3. PCI Express (PCIe): Faster, used for graphics cards and high-speed devices.
4. Chipset
Electronics on the motherboard that communicate with all the connected components. It manages
data flow between the different parts, making sure everything works together smoothly.
A chipset is a crucial part of a computer’s motherboard that acts like the “traffic manager” for data.
It controls how data flows between the CPU, RAM, storage devices, and peripherals.
A chipset is a set of integrated circuits on the motherboard. It manages communication between
the processor, memory, expansion cards, and other peripherals.
Purpose
Types of Chipsets
1. Northbridge
Connects the CPU to high-speed components like RAM and graphics cards.
2. Functions of BIOS
1. POST (Power-On Self-Test): Checks if the CPU, RAM, keyboard, and other hardware are working.
2. Bootloader: Locates the operating system on a storage device (like HDD or SSD) and loads it.
3. Hardware Settings: Let’s you configure settings like system time, boot order, and
enabling/disabling devices.
4. Interface for Operating System: Provides communication between OS and hardware
components before the OS drivers take over.
Where It’s Located: Stored on a ROM chip (Read-Only Memory) on the motherboard.
Modern systems use UEFI (Unified Extensible Firmware Interface), which is an advanced
version of BIOS.
6. Power Connectors
1. 24-pin ATX Connector (Main Power): Supplies power to the motherboard and most
components. It is the largest connector from the PSU.
2. 4-pin or 8-pin CPU Power Connector: Supplies additional power to the CPU for stable
performance, especially in high-speed processors.
Function
Analogy: The power connector is like the main electrical plug of a house—without it, nothing in
the house (computer) will work.
7. Storage Connectors
These connectors help to attach Hard Disk Drives (HDD) and Solid-State Drives (SSD) to store all
your files and programs.
A storage connector is a part of the motherboard that allows you to connect storage devices like
hard drives (HDDs), solid-state drives (SSDs), or optical drives so the computer can read and write
data.
Common Types of Storage Connectors
1. SATA ((Serial Advanced Technology Attachment) Connector
Most common for HDDs and SSDs.
Supports fast data transfer (up to 6 Gbps for SATA III).
8. I/O Ports
I/O ports (Input/Output ports) are the connectors on a computer that allow it to communicate with
external devices such as keyboards, mice, printers, monitors, and USB drives.
1. USB (Universal Serial Bus): Connects devices like flash drives, printers, and phones.
2. HDMI / VGA / DisplayPort: Connects monitors and projectors.
3. Ethernet (LAN) Port: Connects to a network or the Internet.
4. Audio Ports: Connect speakers, headphones, and microphones.
5. PS/2 Ports (older): Connect keyboard and mouse.
6. Thunderbolt / USB-C: High-speed data transfer and charging.
Functions
1. Input Ports: Receive data from external devices (keyboard, mouse, scanner).
2. Output Ports: Send data to external devices (monitor, printer, speakers).
9. SOUND CARD
A sound card is a piece of hardware that connects to the motherboard (via a PCIe slot) and is
responsible for handling sound received via a microphone and for producing sound on a computer that
can be heard through speakers or headphones.
A sound card is a computer component that allows your computer to produce and process audio, such
as music, speech, or sound effects. It can be built into the motherboard or added as an expansion card.
A sound card (also called an audio card) is a hardware device that converts digital data from the
computer into sound you can hear through speakers or headphones.
Purpose / Functions
1. Audio Output
Plays music, game sounds, and system alerts through speakers or headphones.
2. Audio Input
Allows recording from microphones, musical instruments, or other audio devices.
3. Audio Processing
Some sound cards have advanced processors to improve sound quality, reduce noise, or add 3D
effects.
A graphics card (also called a video card or GPU – Graphics Processing Unit) is a computer
component that creates and displays images, videos, and animations on your monitor.
Purpose / Functions
1. Render Graphics
Converts digital data into images, videos, or 3D graphics for the screen.
2. Enhance Performance
Dedicated graphics cards handle complex tasks like gaming, video editing, and 3D modeling,
reducing strain on the CPU.
3. Multiple Displays
Allows connecting more than one monitor.
Built-in components, like a sound chip, GPU or Wi-Fi chip, save the computer user from having to
add separate cards for these functions.
Onboard or integrated components are hardware parts that are built directly into the motherboard,
instead of being separate cards or devices.
They handle functions like graphics, sound, or networking without extra hardware.
Common Onboard / Integrated Components
1. Integrated Graphics: Built into the CPU or motherboard. Uses system RAM for video
display.
2. Integrated Sound (Audio): Provides audio output and input through motherboard ports. No
need for a separate sound card for basic audio tasks.
3. Onboard LAN / Network Interface: Allows connection to the Internet or a local network.
4. Onboard USB and I/O Controllers: Manages input/output ports like USB, HDMI, and
Ethernet.
Integrated graphics are built into the motherboard or CPU and share memory with the computer’s
processor (CPU). They do not have their own dedicated memory or RAM; instead, they utilize a
portion of the system’s RAM
Dedicated graphics cards are separate components that plug into the motherboard via an
expansion slot. They have their dedicated RAM (VRAM), GPU, and cooling system, independent of
the computer’s CPU and main RAM.
A cooling system is a set of devices that removes heat from components like the CPU, GPU,
and motherboard to prevent overheating and keep the system running efficiently.
Purpose / Functions
Prevent Overheating: Stops components like CPU, GPU, and RAM from getting too hot.
Maintain Performance: High temperatures can slow down the CPU; cooling keeps it running at full
speed.
1. Air Cooling: Uses fans and heat sinks to move heat away from components.
Heat sink: A metal piece that absorbs heat from CPU or GPU.
Heat sink
2. Liquid Cooling
Uses water or special coolant in tubes to absorb and remove heat.
More efficient for high-performance computers or gaming rigs.
3. Passive Cooling
COMPUTER SOFTWARE
Computer software refers to the set of instructions, programs, or data that tells a computer what to
do. Unlike hardware (which you can touch), software is intangible you cannot touch it, but it
controls how the computer works.
1. Application Software: These are programs designed to help users perform specific tasks
directly. This is the software most people interact with daily.
Application software are programs designed to carry out a specific task other than one relating to
the operation of the computer/device itself.
Application software is tailored to fulfil particular user needs, such as productivity, communication,
entertainment, education, and more. Examples of application software include a spreadsheet
program, database management systems, a word processor, and games software.
Productivity Software: Productivity software helps users create, edit, manage, and share various
types of digital content, including documents, spreadsheets, presentations, and databases.
Examples include Microsoft Office Suite (Word, Excel, PowerPoint), Google Workspace (Docs,
Sheets, Slides), and Adobe Acrobat.
Multimedia Software: Multimedia software enables users to create, edit, organize, and playback
multimedia content such as audio, video, and images. Examples include media players (VLC Media
Player, Windows Media Player), photo editing software (Adobe Photoshop, GIMP), and video editing
tools (Adobe Premiere Pro, iMovie)
2. Systems Software: Systems software is the programs that governs the computer system It:
System software is the foundation software that manages and controls computer hardware,
enabling other software to run. It acts as a bridge between the user, application software, and
hardware.
Note: system software acts as an intermediary between the hardware and the end-user
applications, enabling the efficient execution of tasks and providing essential services for the
computer system to function properly
1. Operating Systems (OS): An Operating System (OS) provides the user interface, manages
hardware resources, and manages the running of applications.
NOTE: In order to perform the actions requested by the computer’s users, an operating system
must be able to communicate with those users. The portion of an operating system that handles
this communication is often called the user interface. Older user interfaces, called shells,
communicated with users through textual messages using a keyboard and monitor screen.
Nowadays, computer systems usually perform this task by means of a Graphical User Interface.
GUI systems, applications run in Windows, and all objects (apps, hardware and files) are
represented by icons. Users interact with the interface by using a mouse and on-screen pointer.
When a program is run, it is loaded into RAM. The operating system determines how much memory
the program requires and allocates enough space to hold it and its data. When the program is
closed, the allocated space is freed up for use by other programs.
All modern operating systems have multitasking capabilities. Multitasking means being able to run
two or more programs simultaneously.
Examples of operating systems include Microsoft Windows, macOS, Linux, Android, and iOS.
1. Process Management: The OS controls how programs run. It decides which program uses the
CPU, when, and for how long (multitasking).
2. Memory Management: It manages the computer’s memory (RAM), allocating space to programs
and ensuring efficient use without conflicts.
3. File Management: The OS organizes and manages files and folders—creating, saving, deleting,
and retrieving data.
4. Device Management: It controls hardware devices like printers, keyboards, and monitors using
drivers, ensuring they work properly.
5. User Interface (UI): Provides a way for users to interact with the computer—either through
graphical interfaces (icons, windows) or command-line interfaces.
6. Input and Output Management: Handles communication between the computer and external
devices (input/output operations).
2. Device Drivers: A device driver is a program that controls a specific hardware device attached to
a computer.
Device drivers control and facilitate communication between hardware devices and the operating
system.
Device drivers are special programs that allow the operating system (OS) to communicate with
hardware devices attached to a computer
NOTE: They also deliver outputs or status/messages from the hardware devices to the operating
system and thus to applications. Devices such as keyboards modems, routers, speakers, and
printers require device drivers to operate.
A device driver acts like a translator between the computer and a hardware device.
The driver converts those instructions into a form the device understands
3. Utility Software: Utility Software is system software that helps to maintain the proper and
smooth functioning of a computer system. These programs assist the operating system to manage,
organize, maintain, and optimize the functioning of the computer system.
Utility software: is a type of system software designed to help manage, maintain, and optimize a
computer system. It assists the OS but does not replace it
Examples of
Utility Software
2. Utility software assists the operating system but never replaces it.
SECTION 3
A computer network is a group of two or more computers and devices connected together to share
resources and information.
A computer network is a system of interconnected devices that can communicate and share
resources with each other
A computer network is a collection of two or more computers and other devices (such as printers,
servers, and smartphones) that are linked together to communicate, share data, and share
resources.
1. Connectivity: Devices are physically or wirelessly linked using cables, fibre optics, radio waves,
or satellites. This connection gives devices a path through which information can travel.
2. Communication: Once connected, devices can send and receive data — emails, files, web
pages, video calls, and more. Communication follows agreed-upon rules called protocols (e.g.,
TCP/IP
3. Resource Sharing: A network allows multiple users to access shared resources a single internet
connection, a shared printer, a central database, or a file server without needing separate
equipment for each user.
2. Data Sharing and Collaboration: Networks make it easy for users to share files,
documents, and information with one another quickly and efficiently. Instead of copying
files onto a USB drive and physically moving them from one computer to another, users on a
network can simply send or access files directly
3. Shared Internet Access: Rather than purchasing a separate internet connection for each
computer, a network allows all connected devices to share a single internet connection. A
router distributes the internet signal across the network, giving every device access to the
web simultaneously. Example: In a computer laboratory with 30 computers, all machines
can browse the internet through one shared connection provided by a single router.
ensures consistency across the entire system. Example: An ICT administrator in a school
can install an antivirus update on all 40 lab computers at the same time from the server,
without visiting each machine individually
5. Communication: Networks allow users to send emails, instant messages, make video
calls, hold virtual meetings, and share information in real time. This speeds up decision-
making, reduces the need for physical travel, and keeps people connected regardless of
distance. Example: A student in Accra can video call a lecturer in Kumasi and attend a
virtual class without leaving home
6. Remote Access: With a network — especially one connected to the internet, users can
access files, systems, and applications from any location, not just from their office or
school. Remote access allows employees to work from home, administrators to manage
systems from offsite, and students to access learning materials from anywhere. Example: A
teacher working from home can log into the school's network and retrieve lesson materials
stored on the school server.
7. Scalability: A network can easily grow as the needs of an organization increase. New
computers, printers, or other devices can be added to an existing network without
rebuilding the entire system. Whether a school expands from one computer lab to three, or
a company opens new offices, the network can be extended to accommodate more users
and devices with minimal disruption. Example: When a school builds a second computer
lab, the new computers can simply be connected to the existing network infrastructure
rather than starting from scratch.
Hub
A hub is a basic networking device that connects multiple computers in a network and allows them
to communicate with each other.
When a hub receives data from one device, it broadcasts (sends) that data to all other devices
connected to it whether they need it or not
Nodes
A node is any device that is connected to a network and is capable of sending, receiving, or
forwarding data.
Nodes are essentially the endpoints or junction points of a network. Every device that participates
in a network —whether sending or receiving — is considered a node.
Examples of nodes include:
1. Computers and laptops
2. Smartphones and tablets
3. Printers
4. Servers
5. Routers and switches
Modems
A modem (short for Modulator-Demodulator) is a device that converts digital signals from a
computer into analogue signals that can travel over telephone or cable lines, and vice versa. It
serves as the bridge between your network and your ISP (Internet Service Provider). Without a
modem, your network cannot access the internet through a telephone or cable line.
1. Modulation — converts digital data to analogue signals for transmission
2. Demodulation — converts incoming analogue signals back to digital data
3. Often combined with a router in a single device called a modem-router
Bridges
A network Bridge is a device that divides a bigger network into smaller networks called segments. It
is like separating a very huge class of students into smaller classes so that interaction between
teacher and student will be more effective. With bridges, there is a great improvement in the overall
performance of the network since each segment has its own separate bandwidth.
Protocols
Protocols are a set of rules and standards that govern how data is transmitted, received, and
interpreted across a network.
They ensure that different devices and systems — regardless of their make or manufacturer — can
communicate with each other in an orderly, reliable way. Without protocols, communication
between devices would be chaotic and impossible
. Examples include TCP/IP (Transmission Control Protocol/Internet Protocol), HTTP (Hypertext
Transfer Protocol), and DNS (Domain Name System)
Network Operating System (NOS)
This is the software that manages and controls the network, providing services such as file sharing,
network security, and network administration.
It controls how data is shared, who can access what, and how devices communicate. It provides
services such as file sharing, printer sharing, user authentication, and security management.
Examples of NOS:
1. Windows Server
2. Linux (Ubuntu Server, Red Hat)
Firewalls
A firewall is a security system either hardware, software, or both that monitors and controls
incoming and outgoing network traffic based on predetermined security rules.
It acts as a barrier (or wall) between a trusted internal network and untrusted external networks
(like the internet), blocking unauthorized access while allowing legitimate communication
The main difference between a hardware firewall and a software firewall is that the hardware
firewall runs on its own physical device, while a software firewall is a program installed on a
computer.
Network Cables and Connectors
Network cables are the physical wires that carry data between devices in a wired network, while
connectors are the plugs and ports used to join cables to devices
e.g., Ethernet cables)
2. LAN (Local Area Network): LAN Connects devices within a limited area like a building,
school or office. LANs provide high data transfer rates and low latency (delay in network
communication), making them ideal for resource sharing and collaborative work.
CISCO defines LAN as, a collection of devices connected together in one physical location,
such as a building, office, or home. Examples of LAN include Networking in school, networking
in a laboratory, networking in a university campus, networking between two computers.
Examples: Computers in a school computer lab sharing a printer, home Wi-Fi network
connecting phones, laptops, and smart TVs, office network sharing files between employees
4. WAN (Wide Area Network): Spans very large geographical areas countries or even
the entire globe. It connects multiple LANs and MANs.
Examples: The Internet (the largest WAN), a bank connecting its branches across different
countries, multinational companies linking their offices globally
WAN range is not fixed
Network topology refers to the physical or logical arrangement of devices and connections in a
computer network.
1. Bus Topology
All devices are connected to a single central cable called the ‘bus’. Each device on the network can
communicate directly with the others. However, if the central bus cable fails, the entire network will
go down. Since it is using a single cable, if multiple devices send data at the same time, there will
be collisions and network errors.
Bus topology uses a technology called, CSMA/CD to rectify this problem. Carrier Sense Multiple
Access / Collision Detection. This means, before a device sends a message through the single
cable, it first senses to ensure no other station is transmitting before it transmits to prevent
collision. If the station should detect a collision, the station stops transmitting and waits for a
random time interval before trying to resend the frame.
Features
1. It is easy to setup
2. It is easy to connect or remove devices in this network without affecting any other device
3. Very cost effective as compared to the other topologies
4. Uses less cables
5. It is best suited for small networks
Disadvantages of Bus Topology
Star Topology: All devices are connected to a central device like a hub or switch. If one device fails,
it does not affect the rest of the network. However, the central hub becomes a single point of
failure.
Features
1. It is easy to expand a star topology as new nodes and workstations can be added to the
open ports on the hub.
1. If the central hub or switch fails, the whole network goes down
2. Installation cost is high.
3. Uses more cables
Ring Topology: The devices are connected in a closed loop. Each device is connected to two other
devices, creating a continuous circle. Data travels around the ring from one device to the next until
it reaches its destination.
Most ring topologies allow packets to travel in one direction, called a unidirectional ring network.
Others allow data to be transmitted in either direction, called bidirectional.
Features
1. Difficult to troubleshoot
2. If one device or cable fail, the entire network is affected.
3. Adding new devices to the network would slow down the network
4. Data sent from one node to another has to pass through all the intermediate nodes. This
makes the transmission slower in comparison to that in a star topology
Mesh Topology: In this kind of topology, all the nodes in the network are connected with all other
nodes via a network channel. It is a point-to-point connection. There are multiple paths from one
node to another node.
Mash topology provides high reliability and fault tolerance. Fault tolerance refers to the ability of a
network to continue operating without interruption when one or more of its components fail. The
internet is an example of the mesh topology.
Mesh topology is divided into two namely, Fully Connected mesh topology and partially
connected mesh topology. In a full mesh topology, each node is connected to all the nodes
represented in the network. Partial Mesh Topology has not all but certain nodes connected to
those nodes with which they communicate frequently.
Features
1. The building and maintenance of this network is difficult and time consuming
2. Expensive to install
3. The arrangement where in every network node is connected to every other node of the
network, many connections serve no major purpose. This leads to the redundancy of many
network connections.
4. A lot of cabling is required. Thus, the costs incurred in setup and maintenance are high.
5. Owing to its complexity, the administration of a mesh network is difficult
It is a combination of bus and star topologies. It has a central hub (root) connected to multiple
devices in a star configuration. Each of these devices can then have additional devices connected
to them, forming a hierarchical structure.
Features
The network can be expanded by the addition of secondary nodes. Thus, scalability is achieved.
1. The whole network is divided into segments and that makes it easy to manage and maintain
2. Fault identification is easy
Disadvantages of Tree Topology
1. If the root node goes down, then the entire network suffers.
2. If a fault occurs on a node, it is difficult to troubleshoot the problem
3. It is expensive when compared to other topologies as devices required to set up are very
costly
Hybrid Topology
It combines two or more different types of topologies. For example, an example of a hybrid topology
is a ring star, where a star network is connected through a hub to a ring network.
Features
• Since it involves more than one topology, it is difficult to design the architecture
• they require a lot of cables and other networking devices in the installing process
NETWORK ARCHITECTURE
This refers to the way network devices and services are structured to serve the connectivity needs
of the user devices. This includes the hardware, software, protocols, and configurations used to
create and manage the network.
The physical and logical layout of the software, hardware, protocols, and data transmission media
is referred to as computer network architecture. There are two types of network architectures have
been defined below:
1. Peer to Peer Networks:
Peer to peer network is an architecture of network where computers are able to communicate with
one another and share what is on or attached to their computer with other users. No computer on
the network is “master” and none is a “servant”, they all have equal privileges.
In this architecture, all devices on the network are considered equal peers, capable of both
requesting and providing resources (i.e., acting as both a client and a server). There is no central
server. Each device can directly communicate, request and provide services to other devices on the
network, which makes it a decentralized network.
In this network, all users on the network have equal responsibility over who can access data and
resources on their systems.
P2P typically is used for smaller networks, often with fewer than 10 computers, or where fewer
computers need access to the same data
It is less expensive and easy to set up compared to client-server networks. However, they can be
less stable as the number of peers increases and may have security challenges since each node
has equal authority
This is a type of network which designed in such a way that, there are client computers which are
the end users that are accessing resources from a central computer known as server.
In this architecture, devices on the network are divided into two categories: clients and servers.
Clients (e.g., computers, smartphones) request services or resources from servers (e.g., access to
webpages from a web server, access to files from a file server). Servers respond to client requests,
It is the server that performs all the major operations such as security and management
Because this model is centralized, it is more secure and easier to back up data. It is suitable for
both small and large networks and for situations where many computers need access to the same
information. Many schools use this model
Note the link between network topology and network architecture. Network topology is the
practical implementation of network architecture. A network topology is the arrangement of
different elements within the network, including devices like routers, switches, and
computers, whereas network architecture refers to the design and physical structure of a
computer network
CLOUD NETWORKS
The cloud’ refers to servers that are accessed over the internet, and the software and databases
that run on those servers. Cloud servers are located in data centers
Cloud Network is a virtualized infrastructure where network resources such routers, firewall, and
bandwidth are hosted and managed by third party cloud provider/cloud vendor.
Cloud network It involves a network of remote servers hosted on the internet to store, manage, and
process data, rather than a local server or a personal computer
Cloud networking is the infrastructure that supports cloud computing, which is the delivery of
various services through the internet.
In a cloud network, the network is on premises, but some or all resources used to manage it are in
the cloud and these resources are rented from a third-party cloud provider/ cloud vendor.
A cloud network can employ a client-server architecture. In this model, the cloud acts as the server
that provides resources and services, and the clients (which can be end user devices like
computers, smartphones, etc.) The cloud-based delivery of services ensures that clients can
access resources on-demand via the internet
OSI MODEL
The OSI Model is a seven-layer conceptual framework that was built and published in the year 1984
by the International Organization for Standardization (ISO)
The OSI model describes how a network functions and gives a reference framework (a set of rules)
that explains the process of transmitting data between network devices.
This means that, when data is sent over a network between two endpoints, the process is divided
into seven distinct groups of related functions or layer. Each of these layers perform a specific task
concerning the transmission of data
In the OSI model, the process of communication between two devices on a network can be divided
into seven distinct groups of related functions, or layers, with each layer having a specific job
From highest level to lowest level the seven levels of the OSI model are:
LAYER 1 – THE PHYSICAL LAYER: Is responsible for the transmission and reception of raw data
bits over a physical medium, such as wires, optical fibres, or wireless signals
3. It defines the transmission rate, i.e., the number of bits sent per second
LAYER 2 - THE DATA-LINK LAYER: manages node-to-node data transfer and handles error
detection and correction during the transmission between two physically connected devices.
is responsible for reliable transmission and delivery of data frames between connected nodes by
ensuring that any data transfer is error-free between nodes over the physical layer
The major functions and services provided by the Data Link layer
1. The Data Link layer translates the raw bits from the physical layer into packets known as
frames
Layer 3 – The Network Layer: is responsible for routing data packets between different networks,
this layer determines the best physical path for data to travel from source to destination.
Network Layer: manages addressing and tracks the location of devices on the network. It receives
frames from the data link layer and delivers them to the intended destination based on the
addresses inside the frame.
It is also responsible for packet routing where determination of the best path to transmit packet
from source to the destination from a number of routes available is done. Routers are the crucial
devices used in this layer
1. It determines the best optimal path out of the multiple paths from source to destination
Layer 4 – Transport Layer: ensures complete data transfer by providing end to-end
communication, error recovery, and flow control between devices,
Transport Layer is responsible for delivering, error checking, flow control and sequencing data
packets. It ensures that massages are transmitted in the order in which they are sent and there is no
duplication of data.
Two examples of protocols found at the transport layer are the User Datagram Protocol (UDP) and
Transmission Control Protocol (TCP).
Layer 5 – Session Layer: manages and controls the connections between devices, establishing,
maintaining, and terminating communication sessions.
This session creates communication channels called sessions responsible for the establishment of
connection, maintenance and synchronization of sessions, authentication, and also ensures
security. Examples of session layer protocols include Zone information protocol (ZIP) and
password authentication protocol (PAP).
1. This session allows for the establishment, maintenance and termination of a connection
between devices
Layer 6 – Presentation Layer: converts data between the application layer and the lower layers,
ensuring that data is in a usable format, and handling encryption and compression.
The presentation layer is responsible for ensuring that, the data at this point is translated into the
required format that is understandable to the communicating end systems. It also manages any
encryption and decryption required by the application layer. It is also called the syntax layer or
translation layer. Examples of presentation layer protocols include Apple Filing Protocol (AFP) and
Lightweight Presentation Protocol (LPP)
Layer 7 – Application Layer: provides network services directly to the user or application software,
such as email, file transfer, and web browsing, facilitating end user interaction with the network.
1. It allows users to send data, access data and also facilitates communication.
A possible mnemonic for remembering the names of the layers (highest to lowest) is:
A Penguin Said That Nobody Drinks Pepsi
1. OSI Model It assists network administrators and operators to select the required hardware
and software to build network
3. Make troubleshooting simpler by focusing on a layer that is causing the problem rather than
trying to locate it throughout the entire network
Network transmission media, also known as network cables or communication channels, are used
to transfer data between devices in a computer network
Network transmission media: refers to the physical path or channel through which devices on the
network communicate with each other. It is the route that transmits data from the sending device to
the receiving device on a network
NOTE: Transmission media is broadly classified into two types namely, Guided Media (Wired) and
Unguided Media (wireless).
The term "wireless technologies" describes a number of ways to transfer data and information
without the use of physical cables or wires.
Wireless media offer mobility and flexibility but they can be affected by environmental factors and
have limited range and security concerns. This type of connection uses radio waves or other
wireless technologies to communicate between devices
NOTE: Wireless Metropolitan Area Networks (WMANs) use various wireless technologies, the most
common being WiMAX and LTE. Wireless Wide Area Networks (wWANs) use various wireless
technologies, including cellular network and satellite
Bluetooth is commonly used for connecting mobile devices, such as smartphones, to other devices
such as headphones, speakers, and smartwatches. It can also be used to connect devices such as
keyboards, mice, and game controllers to computers and other devices.
NFC uses close-range radio signals to transmit data between two NFC-enabled devices. Examples
of NFC-enabled devices include many smartwatches, most smartphones, and some digital
cameras, computers, point of sales devices, ATMs, and smart televisions. Other objects, such as
contactless debit and credit cards, and contactless travel cards, also use NFC technology. For
successful communications, the devices either touch or are within a distance of 4 centimetres (1.6
inches) of each other
2. Infrared (IR)
Infrared connectivity is a wireless technology that uses a beam of infrared light to transmit
information. It is used for short-range or medium-range communications between two devices.
NOTE: Wireless Technologies used by Wireless Personal Area Networks (wPANs) include
Bluetooth, NFC, IR
Wi-Fi stands for "Wireless Fidelity" and is a wireless networking technology that uses radio waves
to provide high-speed internet and network connectivity to devices within a certain range. Wi-Fi
operates on a frequency band of 2.4 GHz or 5 GHz
Wi-Fi networks typically consist of a wireless access point (AP), which is connected to a wired
network, and one or more wireless clients, such as laptops, smartphones, and tablets. The AP acts
as a hub for wireless communication, allowing devices to connect to the network and
communicate with each other.
Cellular networks are wireless networks that allow mobile devices, such as smartphones and
tablets, to connect to the internet and communicate with each other. These networks use radio
waves to establish communication between devices and are based on a system of cell sites that
cover a certain geographic area.
Cellular networks operate on different frequency bands, with the most common ones being 2G, 3G,
4G, and 5G. Each generation of cellular technology provides faster speeds, better performance,
and improved features compared to the previous generation. Cellular networks use a system of
base stations and cell towers to provide coverage to mobile devices. When a device connects to a
cellular network, it is assigned a unique identifier, such as an International Mobile Subscriber
Identity (IMSI), which allows it to communicate with other devices on the network.
The first commercial cellular network, the 1G generation, was launched in Japan in 1979.
One of the main advantages of cellular networks is their wide coverage area, which allows
users to stay connected even when they are on the move. cellular networks can be affected by
factors such as distance from the nearest cell tower, terrain, and weather conditions, which
can impact signal strength and quality
5. Satellite Communication
Satellite communication involves transmitting data signals to and from satellites in space. It is
commonly used for long-distance communication in remote areas and for global connectivity.
It is commonly used for long-distance communication in remote areas and for global connectivity.
Note: mobile phones adapt the technology for emergency use when phone signal is not available.
In recent years’ satellite-based internet has become mainstream under the name Starlink.
NOTE: Satellite communications have several advantages over other wireless technologies,
including their ability to provide coverage over large geographic areas, their high-speed data
transfer capabilities, and their ability to support real-time communication.
Range of applications that use satellite technology, including television and radio broadcasting,
internet access, navigation systems, military communications, and remote sensing.
There are two main types of satellite communications: geostationary and low Earth orbit
(LEO).
The signals or waves that are transmitted are channeled or directed along a physical path using
wire or cable. Wired connections use physical cables to transfer data between devices. this type of
connection is known for being fast, reliable, and secure. These connections are often used in
places where stable and high-speed internet is crucial, like offices and homes.
There are three major types of guided media namely, Twisted Pair Cable, Coaxial cable and Fiber
optic cable. (Ethernet cables)
A twisted pair cable is a widely used cable for transmitting data and information over certain
distances. A twisted pair cable consists of two separate insulated copper wires that are twisted
together within a wrapping shield and run parallel with each other. This helps to reduce the
crosstalk or electromagnetic induction between the pair of wires. They come in categories like
Cat5e, Cat6, Cat7 and Cat8. Cat6 cables are commonly used for high-speed Ethernet data
transmissions in modern networks with a data rate of 10Gbps. Cat7 cables with a data rate of up to
100Gbps are more suited to data centers than residential applications.
1. Unshielded twisted pair (UTP): UTP cables have twisted pairs of copper wires and come in
categories like Cat5e and Cat6. UTP cables are small in diameter but unprotected against electrical
interference. Commonly used in LANs
2. Shielded twisted pair, have extra insulation or protective jacket or covering over the conductors
in the form of a copper braid covering which provides strength to the cable. This reduces noise,
cuts, losing bandwidth and signal interference in the cable. It is a cable that is usually used
underground and is more costly than UTP. It supports higher data transmission rates across a long
distance
Coaxial Cable
This is a type of copper cable specially built with a metal shield and other components engineered
to block signal interference. It consists of a copper conductor surrounded by insulation, a braided
metallic shield, and an outer jacket. These cables were commonly used for older Ethernet networks
(e.g. 10Base2 and 10Base5). Coaxial cables have good bandwidth and resistance to interference
but are bulky and less flexible compared to twisted pair cables
Coaxial Cable
A common use of coaxial cable in networking today is for connecting a cable modem to an Internet
Service Provider (ISP), and for cable broadband internet. They are also used in automobiles,
aircraft, military and medical equipment, as well as connecting satellite dishes, radio and television
antennas to their respective receivers.
Fibre optic cables use strands of glass or plastic to transmit data as pulses of light. They offer high
bandwidth, long-distance transmission capabilities, and immunity to electromagnetic interference.
Fibre optic cables are commonly used in high-speed networks, telecommunications, and data
centres.
These cables operate in two modes namely, Single mode fiber and multimode fiber. Single mode
fiber carries a single ray of light whereas multimode carries multiple beams of light. It is possible for
the cable to have unidirectional or bidirectional capabilities
Signal transmission Takes place in the Takes place in the Takes place in an
electrical form over the electrical form over optical form over glass
metallic conducting the inner conductor of fibre.
wires. the cable.
Installation and Simple and easy. Relatively difficult. Difficult.
Implementation
Cost Very low. Moderate. Expensive.
Diameter Larger than optical fibre Larger than optical Small diameter.
cable. fibre cable.
SECTION 4
What is a Variable?
A variable is a named storage location in a computer's memory that holds a value which can
change during the execution of a program.
Think of a variable as a labelled box — you can put something inside it, look at what is inside,
replace it with something else, or use its contents in a calculation.
Imagine a box labelled 'score'. At the start of a game the box holds 0. Each
📦
time you win a point, the value inside the box increases. The box (variable)
Analogy
stays the same; only its contents (value) change.
Before a variable can be used in most programming languages, it must be declared (introduced)
and assigned an initial value.
Example in Python:
# Declaration and assignment
student_name = "Kofi Mensah" # string variable
age = 17 # integer variable
gpa = 3.75 # float (decimal) variable
is_registered = True # boolean variable
# Updating a variable
age = 18 # the value changes; the name stays the same
ALGORITHMS
What is an Algorithm?
An algorithm is a series of steps that you follow to solve a problem or complete a task.
💡 Real- A recipe for making jollof rice is an algorithm. It has a clear starting point
World (gather ingredients), step-by-step instructions (wash rice, add tomatoes...),
Analogy and a defined end result (cooked jollof rice).
1. Input: Is the data the user enters to initiate a process that will yield the output. An algorithm
takes zero or more inputs which is the data or information the algorithm operates on, to produce
the desired output.
2. Output: Is the result or solution to the problem based on the given inputs.
3. Definiteness: each algorithm step must be precise, leaving no room for interpretation or
uncertainty.
4. Finiteness: an algorithm must have a finite number of steps, meaning it should eventually
terminate after a finite number of operations.
5. Effectiveness: the steps of the algorithm should be simple and executable, meaning they can
be performed by a computer or by a person with pen and paper.
Examples of Real-life Algorithms 1. An algorithm for a child getting ready for school could be:
a. Wake up
b. Brush teeth
c. Wash
d. Dress
e. Eat breakfast
f. Get school bag
g. Travel to school
h. Arrive at school
i. Enter school premises
Note that an algorithm can be contained in another algorithm, for example brushing teeth is an
algorithm within the algorithm of a child getting ready for school. Also, for some children, the steps
might be in a different order, like Step c (Wash) being switched with Step b (Brush teeth), or the
formula might be more detailed, for example replacing Step a (Wake up) with additional steps such
as Turn off alarm clock, get out of bed and Make bed
Another example of an algorithm could be for a child eating breakfast. This example involves an
iteration (repetition)
a. Put porridge in a bowl
b. Add sugar and milk to the porridge
c. Stir to mix in sugar and milk
d. Spoon porridge into the mouth
e. Repeat step 4 until all porridge is eaten
f. Rinse bowl and spoon
Types of Algorithms
1. Search Algorithms: A search algorithm defines a step-by-step method for locating specific
elements in a data set.
For example, a search algorithm could be used to find Ghana in a list of countries.
2. Sorting Algorithms: These are algorithms that puts elements of a list into an order, for example,
arranging the name cards in alphabetical order.
A sorting algorithm arranges elements in a list in a specific order — usually ascending
(smallest to largest) or descending (largest to smallest).
3. Encryption Algorithms: These are algorithms that encode (hide) data to make it more
secure when being stored or transmitted.
An encryption algorithm converts readable data (plaintext) into an unreadable format
(ciphertext) to protect it from unauthorized access. Only someone with the correct key can
decrypt and read the original data.
For example, HTTPS websites that transmit credit card and bank account numbers encrypt
(hide) this information to prevent identity theft and fraud. These websites will use encryption
algorithms.
Key Terms:
Plaintext: The original, readable message or data.
Ciphertext: The encrypted, unreadable version of the data.
Encryption: The process of converting plaintext into ciphertext.
Decryption: The process of converting ciphertext back into plaintext.
Key: A value used by the algorithm to encrypt or decrypt data
4. Mathematical Algorithms: These are algorithms that perform mathematical operations, such as
finding the average of two numbers or as calculating the least common multiple (LCM) of two
numbers
Note: There are many other examples of algorithms, including those that can solve significant real-
world problems such as optimizing traffic flow, financial forecasting, healthcare diagnostics, and
environmental monitoring
Note that the operator for multiplication in In Ghana, you are eligible to vote when you
Python is * are 18 years. Write the algorithm for this task
TRY: Write in your books a program to output in pseudocode
the sum of four numbers entered by the user.
A program is required that will prompt the
user to enter three numbers and will output
more of his songs. Find out if someone is engineering, business, and many other
eligible for a discount ticket. Write fields to plan, design, and communicate
processes visually.
pseudocode for the program
Rules for Drawing Flowcharts
Terminal Rounded rectangle (oval) Marks the START or END of the flowchart
Flow Arrow Arrow line Shows the direction of flow between steps
This flowchart shows the process of admitting a candidate to No. 1 High School, depending on their
score. The candidate is admitted to No. 1 High School if their total score is greater than 800. They’re
not admitted to No. 1 High School if their total score is less than 800
2. flowchart for writing a program which outputs the sum of four numbers entered by the user.
Develop pseudocode and a flowchart for each of the following problem specifications:
• Write a program to output the sum of four number entered by the user
write a program that will output the result of the first number divided by a second number. Both
numbers should be entered by the user. USING pseudocode AND flowchart
1. Write an algorithm to find the sum and average of five numbers entered by a user.
2. Write pseudocode to check whether a student has passed or failed, given that the pass
mark is 50%.
the actual code is written based on the data because they are at the limits of
design specifications. This is where possible outcomes
developers create the software by translating
ERRORS THAT CAN OCCUR DURING
the design into a functional product using the
TESTING
chosen programming languages and tools
a. syntax errors: This occurs when code
Note: debugging may be required Debugging
violate the grammatical rules of a
means to correct errors in the code. An
programming [Link] missing closing
example of a syntax error.
brackets, parentheses or quote, misspelled
4. Testing keywords
Testing is conducted to ensure that the b. run-time errors: A run-time error happens
software meets the required standards and is when a program tries to do something it can’t,
free of bugs. Often this involves checking like dividing by zero, which can cause the
what the output from the program will be program to crash.
using various sets of test data, to check if it
c. logic errors: A logic error is a mistake in
gives the desired output or not. Testing should
how the program is designed, such as using
be systematic, that is, it should be planned,
the wrong formula to calculate something
and the results of test runs recorded. Also,
testing should be as comprehensive as NOTE: After testing and before the software is
possible. This may involve using different deployed (making the software available to
types of test data - normal, exceptional and the client), installation instructions, user
extreme. For example, if a program is being guides, and training materials are created to
developed to check how many pupils in a help the client use the software effectively
class of ten passed a test where the pass this is called Documentation.
result is 50% or higher, a possible
After Documentation, there is often an
comprehensive set of test data would be 56,
Evaluation phase, where the program is
78, 47, 90, -82, 79, 58, 60, 50, 77
reviewed to make sure it meets the original
Normal data is as expected data that the problem’s requirements.
program should accept as input. (56,78, 47
5. Maintenance
,90, 79, 58, and 77 in the above example. OR
refers to data that the program is designed to Once the software is in use, the maintenance
accept as valid input. phase begins. This involves regular updates,
bug fixes, and modifications to improve the
Exceptional data is out-of-range or invalid
software or adapt it to changing user needs or
data, example) such as -82 or a test result
environments. making adjustments for
written as “forty” instead of a number.
different situations, like creating a version
Extreme data is data that lies on the that works in another country or on a different
boundary of what is considered normal, like operating system.
the number 50 in the example. A result of 0%
mnemonic for the SDLC:
or 100% would also be considered extreme
A Dance In The Moonlight
Note: In some programming languages, a variable has to be declared, indicating its name and data
type, before it can be used. In Python, you do not need to declare variables before using them. The
data item is set to a type when you assign a value to a variable
EXAMPLES
“Conversion Functions: allow you to convert data from one type to another. For example, you can
convert a number stored as a string to an integer or change a floating-point number to an integer.
Example int (“123”) converts the string “123” to the integer 123.
Note: The Python function type () can be used to check data type.
Type () Function
DATA STRUCTURES
A data structure is a particular way of organizing data in a computer so that it can be used
effectively. Examples include arrays, linked lists, stacks, queues, trees, and graphs.
They are like the building blocks that allow programmers to efficiently store, retrieve, and
manipulate data in computer programs
Note: Data structures enable the efficient storing, retrieving, and manipulating of data in computer
programs.
4. Data structures enable efficient storage and retrieval of data, reducing processing time and
improving performance.
5. The choice of the most appropriate data structures will enable you to write more efficient code.
(Note that two measures of efficient code are how fast it takes to run and how little memory is
needed by the code.)
6. Data structures often hide the implementation details of data storage, allowing programmers to
focus on the logical aspects of data manipulation.
Data structure in which data elements are arranged sequentially or linearly, where each element is
attached to its previous and next adjacent elements. Examples of linear data structures include
arrays, linked lists, stacks, and queues.
The term traversing refers to the iterating over a collection of data. Data elements in a linear data
structure are traversed one after the other and only one element can be directly reached while
traversing
In computing, non-linear data structures are those where the data elements are not organized
sequentially, but rather, in an interconnected manner.
All the data elements in a non-linear data structure cannot be traversed in single run
Static data structures: Static data structure has a fixed memory size. It is easier to access the
elements in a static data structure.
The memory for these data structures is allocated at the compile time (i.e. when program code is
converted into machine code), and the user cannot change their size after being compiled;
however, the data stored in them can be altered Example: array
Dynamic data structures: these have a size that can change to accommodate different data
requirements. The memory of these data structures is allocated at run time, and their size can vary
during the code’s execution.
The user can change both the size of a dynamic data structure, and the data elements stored in the
data structure at run time. Examples of dynamic data structures include linked lists, queues,
stacks, and trees.
1. Traversing: Traversing a Data Structure means to visit the element stored in it.
2. Searching: Searching means to find a particular element in the given data-structure
3. Insertion: Insertion means to add an element in the given data structure
4. Deletion: Deletion means to Remove an element in the given data structure
5. Sorting: Putting the elements of a data structure either in ascending or descending order.
You can access the element in an array by referring to an index number. The first element in an array
has the index 0, so the first element in the num() array can be referenced by num(0).
ARRAYS
Array is a fundamental linear data structure that stores a collection of elements of the same data
type. Each element has a unique index number starting with 0. Each element in an array is
accessed through its index.
In an array, all the data elements share the same name, but each one has a unique number called a
subscript. This number helps you find a specific item in the array by using the array’s name along
with the subscript. arrays is that the data is stored in connected (contiguous) memory spaces
(locations), which makes it easy to move (traverse) through the items using their index numbers.
For example, rather than having six different integer variables to store the values 2,
6, 11, 7, 18, and 4, a variable array
numbers = [2,6,11,7,18,4]
print(numbers)
print() print(numbers[0])
print(numbers[5])
Instead of having separate variables for each student’s score such as score1 = 75, score2 = 88,
score3 = 92, etc.
You can use a single array called scores to store all the values together scores = [75, 88, 92, 67,
84]. This is an integer array.
Also, storing Names of Friends can be done as friends = [“Ama”, “Kwame”, “Kojo”, “Akua”,
“Yaw”]
instead of having individual variables for each friend’s name, like friend1 = “Ama”, friend2 =
“Kwame”, etc. This variable is a string.
Example
print(“The first animal stored in the array is”, animals[0]) # The output
1. Array Index: In an array, elements are identified by their indexes. Array index starts from 0.
2. Array element: Elements are items stored in an array and can be accessed by their index.
3. Array Length: The length of an array is determined by the number of elements it can
contain. In most programming languages, the size of an array declared as arrayName(size)
indicates the total number of elements it can hold. For example, if you declare score(9), it
means the array score can hold exactly 9 items,
TYPES OF ARRAYS
Arrays are available in various types, the most common being one-dimensional and multi-
dimensional arrays. Multi-dimensional arrays are basically arrays within arrays
Eg
names = ['Joseph', 'Courage', 'Abdul']
number = [1,2,3,4,5]
arr3 = [1.5,2.5,3.5,4.5]
print(number)
print(names[1])
For example, if a school wants to store the marks of five students (Daniel, Kojo, Beatrice, Nii, and
Nana) across four subjects (Computing, Science, Mathematics, and English), you will use a 2D
array
arr4 = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
print(arr4)
print(arr4[1][0])
marks = [ [10,55,90,70,60], [50,60,75,65,95], [95,75,55,85,45], [35,95,65,55,75]]
print(marks[1][2]) #outputs the element in the second row and third column
marks[1][2] = 92 #changes the value of the element in the second row and third column
print(marks[1][2])
print (marks) #outputs the whole array
7. sort(): Sorts the list in ascending order (or based on a custom sorting key).
fruitList = ["apple", "banana", "cherry", "apple"]
[Link]()
print(fruitList)
8. Insertion in Array:
Fruits = [“apple”, “banana”, “cherry”]
[Link](1, “orange”)
Print(Fruits)
9. Append: append() method to add an element to an array. This add the element to the end of the
array
Fruits = [“apple”, “banana”, “cherry”]
[Link]( “orange”)
Print(Fruits)
10. Update/modify: in Array You can modify or update an element in the array using the index.
Cars = [‘ford’, ‘volvo’, bmw’]
Cars[1] = ‘toyota’
Print(cars)
11. Deletion: Deletion means to Remove an element in the given array.
Design and write a program that set up an array of three daily activities of your choice (you choose
the elements, no duplicates). Use in-built Python code to reverse the order of the elements in the
array. Each element in the reversed array should be output on a separate line
APPLICATIONS OF 2D ARRAYS
1. Tabular Data Representation: Representing tabular data, such as spreadsheets or database
tables.
2. Game Boards and Maps: Game boards, whether for chess (8X8 matrix), or other games, can be
modeled using 2D arrays. Maps in video games (top-down or side views) are often represented as
2D arrays, where each cell corresponds to a specific location.
3. Computer Graphics and Image Processing: Each pixel’s colour in a bitmapped graphic can be
stored in a 2D array • Image processing algorithms often manipulate pixel values using 2D arrays
ADVANTAGES OF ARRAYS
2. Memory efficiency: Arrays allocate memory in a contiguous block, which minimizes memory
overhead
3. Ordered collection: Arrays maintain the order of elements, which is crucial when dealing with
sequences, lists, or data sets where element order is meaningful.
4. Simplicity: Arrays are straightforward to use and implement in most programming languages
5. Fast data retrieval: Arrays allow for fast data retrieval because the data is stored in contiguous
memory locations
DISADVANTAGES OF ARRAYS
1. Fixed size: Arrays generally have a fixed size that must be specified during declaration. This
limitation can be problematic when the size of data is dynamic or unknown.
2. . Same type data: Arrays typically store elements of the same data type. If you need to store
mixed data types, other data structures will be required.
3. Inefficient insertions and deletions: Adding or removing elements from the middle or
beginning of an array can be inefficient, as it often requires shifting other elements to
accommodate the change.
4. Memory allocation: Arrays pre-allocate memory based on their declared size. This can lead
to wasted memory if the array is larger than needed or insufficient memory if it is smaller
than required
5. Wasted space: If an array is not fully populated, there can be wasted space in the memory
allocated for the array
LINKED LISTS
A linked list: is a linear data structure that consists of a series of nodes connected by pointers or
references.
A linked list: is a linear data structure whose data items have a link to the next data item in the list,
allowing it to expand and contract dynamically.
Note: An entry/element in a linked list is generally called a node will consist of data and a pointer to
the next item. The pointer of the last node of the linked list consists of a null pointer, as it points to
nothing, and the entry point into a linked list is called the head of the list.
The head is not a separate node, but the pointer to the first node. If the list is empty, then the head is
a null reference
linked list as a type of data structure that stores items where each item, or ‘node’, contains two parts.
The data itself, and a reference, often called a ‘pointer’, that points to the next item in the list.
An example Note that the arrow to the next node is the pointer.
A linked list is not fixed like an array, the size of a linked list can be changed anytime, making it
dynamic.
Inserting a node E between B and C would be achieved by changing the link of the pointer from B to
point to the memory location of E and then linking the pointer from E to the memory location of C
Deletion:
Removing a node from a linked list requires adjusting the pointers of the neighboring nodes to
bridge the gap left by the deleted node. Deletion can be performed at the beginning, end, or any
position within the list
To delete node B from the list, the pointer from node A would need to be changed to point to node
C. In this case, the memory that node B used would be marked as open and free space
Note
Adding an item to the end of the list can be done by redirecting the link from D to the new item and
linking the new item to Null.
Adding an item to the beginning of the list can be done by redirecting the Head of the list to the new
item and pointing its link to the memory location of item A.
2. DOUBLY-LINKED LIST
In a doubly linked list, each node contains references to both the next and previous nodes. This
allows for traversal in both forward and backward directions.
A doubly linked list consists of a data field and two pointer fields. The first pointer field contains an
address of the previous node, whereas the second pointer field contains a reference to the next
node
Note: doubly linked list has the advantage of allowing elements to be passed through in two ways.
While singly linked lists allow elements in only one way. One disadvantages of doubly linked lists
include greater memory requirements (two pointers rather than one pointer per node) and more
code is required for implementation, while a singly linked list needs lesser memory and less code
for implementation.
1. In a web browser, previous and next web page URLs can be linked through the previous and
next buttons (Doubly Linked List)
2. In image viewer, the previous and next images can be linked with the help of the previous
and next buttons (Doubly Linked List)
3. The list of songs in the music player is linked to the previous and next songs
4. GPS navigation systems - linked lists can be used to store and manage a list of locations
and routes, allowing users to easily navigate to their desired destination.
5. To implement other data structures such as stacks, queues, binary trees, and graphs of
predefined size
1. A linked list is a dynamic data structure, which means that its size is not fixed, and can
grow and shrink during execution to fit the data set.
2. A linked list is very flexible as the order of items in a linked list can be changed without
actually moving any data around, just the links between them change.
3. A linked list is more memory efficient than an array because it only needs to be as large as
the number of items to be stored, not as large as the total possible number of items to be
stored.
1. Slow Access Time: Accessing elements in a linked list can be slow, as you need to traverse
the linked list to find the element you are looking for
2. Pointers or References: Linked lists use pointers or references to access the next node,
which can make them more complex to understand and use compared to arrays
3. Higher overhead: Linked lists have a higher overhead compared to arrays, as each node in
a linked list requires extra memory to store the reference to the next node
A Stack is a linear data structure that follows the LIFO (Last In, First Out) principle that allows
operations like insertion and deletion from the top of the stack.
LIFO implies that the element that is inserted last, comes out first
Imagine it is like a stack of books; the last book you put (push) on the top of the pile is the first one
you take off (pop).
Real-life examples of stacks are piles of books, a deck of cards, stack of plates, and many more.
Note: When data is added to the stack, it must not go beyond the End pointer. If it does, a Stack
Overflow occurs, and the program terminates. When data is removed from the stack, it must not
be removed below the Bottom pointer. If it does, a Stack Underflow occurs and the program
terminates
1. Simplicity: Stacks are a simple and easy-to-understand data structure, making them
suitable for a wide range of applications
2. Last-in, First-out (LIFO): Stacks follow the LIFO principle, ensuring that the last element
added to the stack is the first one removed. This behavior is useful in many scenarios, such
as function calls in programs
3. Limited memory usage: Stacks only need to store the elements that have been pushed
onto them, making them more memory-efficient compared to some other data structures
1. Limited access: Elements in a stack can only be accessed from the top, making it difficult to
retrieve or modify elements in the middle of the stack
2. Potential for overflow: If more elements are pushed onto a stack than it can hold, an
overflow error will occur, resulting in a loss of data.
3. Not suitable for random access: Stacks do not allow for random access to elements,
making them unsuitable for applications where elements need to be accessed in a specific
order.
4. Limited capacity: Stacks have a fixed capacity, which can be a limitation if the number of
elements that need to be stored is unknown or highly variable
A queue is a linear data structure that follows the First In-First-Out (FIFO) principle
It operates like a line where elements are added at one end and removed from the other end
A Queue is like a line waiting
to purchase tickets, where
the first person in line is the
first person served.
(i.e. First Come First Serve)
Some real-life examples of
queues are a line at a voting
booth or a ticket counter
The first person who joins
the queue at the voting centre
gets to vote first, as opposed
to the last person who joins
the queue
1. Enqueuing: Is the process of adding an item to the end of the queue. It’s just like when a new
person comes and stands at the back of the line. In computing, when you add a new data item to a
queue, you are enqueuing it
2. Dequeuing is the process of removing an item from the front of the queue. Think of it as the
person at the front of the line getting their ticket and leaving the queue. In computing, dequeuing
means taking the first item off the queue to be processed or used.
An examples of a queue
Note: A queue is similar to a stack because both involve adding and removing elements. However,
in a queue, you add elements at one end and remove them from the other end. This method is
called FIFO, which stands for First In, First Out. It means the first item that goes into the queue is
the first one to come out
1. Printer queues: printers employ queues to manage print jobs. Jobs are added to the queue
upon submission, and the printer processes them sequentially.
2. Task scheduling: queues are used to schedule tasks based on priority or the order in which
they were received. For example, a task management system might use a queue to ensure
that high priority tasks are executed promptly.
3. Operating systems: operating systems often rely on queues to manage processes and
resources such as CPU time
4. Traffic management: Transportation systems (e.g., airport control or road networks) use
queues to manage traffic flow, helping regulate the movement of vehicles or passengers
5. Network Protocols: TCP and other network protocols use queues to manage transmitted
packets. Queues ensure correct packet delivery order and appropriate transmission rates.
6. Computer memory: Certain types of computer memory use a queue data structure to hold
and process instructions. For example, in a computer›s cache memory, the fetch-decode-
execute cycle of an instruction follows a queue. The first instruction fetched is the first one
to be decoded and executed, while new instructions fetched are added to the rear.
Non-linear data structures are those that store data in a hierarchical or networked order, where
each data element can have multiple predecessors and successors. You can access the elements
by following different paths or relationships
Trees/Binary Trees: A tree is a non-linear hierarchical data structure that organizes and stores data
in a way that allows for efficient navigation and searching. It consists of nodes with data connected
by edges, forming a branching structure.
Graphs: A graph is a collection of nodes with data elements that are connected to each other
nodes by lines (edges). The nodes can also be referred to as vertices.
One use of a graph structure is to model relationships between users of social media platforms like
Facebook and X. The users are represented as nodes, and friendships or connections between
them are represented as edges
1. Linear data structures typically use less memory than non-linear data structures, but have
slower access time often due to their fixed size and structure
2. Non-linear data structures may have faster access time but require more memory to store
pointers or references
3. linear data structures tend to have slower insertion and deletion compared to non-linear
data structures, as well as simpler search and sort algorithms.
4. non-linear data structures may have faster insertion and deletion due to their flexible
structure, as well as more complicated search and sort algorithms due to their multiple
paths
Python is used for many things, including software development, web development, making
games, analyzing data, controlling robots, mathematics modelling and more. It is a very
powerful programming language, which is why big companies like Google, 53 Dropbox, Spotify,
and Netflix use it.
Note: Python console (also known as the Python shell) so that we can try out some basic Python
code. The Python console is a good place to experiment with small code snippets
1. Select an Integrated Development Environment (IDE) for writing and running your Python code
An IDE (integrated development environment) is a piece of software that combines all the
functions needed for program development in one place. Without an IDE, developers would need to
use both a text editor to enter code and a separate program called a compiler to make the program
understandable to the computer.
Popular choices of IDE’s for Python include Integrated Development and Learning Environment
(IDLE), Spyder, PyCharm, Visual Studio Code, and Jupyter Notebook
Note: To create and test Python programs on an iOS or Android, there are a good number of Python
editor apps available from the App Store or Play Store, including Python Editor (free) - see, Juno
(free), Pythonista, and Pyto, Python Code-Pad-Compiler&IDE, etc.
2. Set up a local or cloud folder: Create a folder to store your Python programs. When saved,
Python files will have the .py extension
PRINT () FUNCTION: is an in-built function in Python to output (display) specific messages to the
screen.
For example,
i. age = 16.
ii. reply = True.
iii. cost = 34.56.
iv. city = “Kumasi”.
v. console = ‘PlayStation’.
Note that single-quoted strings (‘ ’) and double-quoted strings (“ “) should both work in most
Python editors.
EXAMPLE
ARITHMETIC OPERATORS
The equality comparison is defined in Python with a double
equals sign, “==”. The sign is doubled to distinguish comparison from assignment
Syntax
USING IF STATEMENT
In Python, an if statement is used to make if condition1:
decisions in a program. statement1
It tells the computer, If something is true, do
this. elif condition2:
Basic Syntax
statement2
if condition:
else:
statement
statement3
Example
Example
age = 18
score = 75
if age >= 18:
if score >= 80:
print("You are an adult")
print("Grade A")
else:
b. Assign the value of the second variable to 3. Output these two values and label as
the first variable. original
4. Let temp = first value
c. Assign the value stored in the temporary
5. Let first value = second value
variable to the second variable. 6. Let second value = temp
7. Output first value and second value, and
label as values after swap
# Let's say we have two variables:
a = 15 # Cup A with water INTRODUCTION TO LOOPS
b = 10 # Cup B with juice
A loop is a programming structure that allows
print(f" a = {a} (water) and b = {b} (juice)") a set of instructions to be repeated several
# Create another variable “temp” to help with times.
the swap temp = a # Temporary Cup holds Instead of writing the same statement
water a = b b = temp repeatedly, a loop performs the repetition
automatically.
print(f" Now, a = {a} (juice) and b = {b}(water)")
Example Without Loop
print("Welcome")
Pseudocode for Swap Algorithm
1. A = 49 Example Using Loop
2. B = 61
for i in range(2):
3. Output A, B and label as original values
4. Temp = A print("Welcome")
5. A = B
WHY DO WE USE LOOPS?
6. B = Temp
7. Output A, B and label as values after swap • Loops help programmers to:
• Reduce repetition of code
a = 49 • Save time
b = 61 print (“The original values of a and b • Make programs shorter
are”, a, “ and “, b) • Improve efficiency
#swap the values in a and b • Automate repetitive tasks
temp = a
b=a TYPES OF LOOPS IN PYTHON
b = temp Python has two main loops:
print (“The new values of a and b are”, a, “ and
“, b) 1. For Loop
Algorithm Swap 2. While Loop
[Link] first value
2. Enter second value
1. Write a program to display your name 10 8. Calculate the sum of even numbers from 2
times. to 100.
2. Write a program to display numbers from 1 9. Write a program to enter 10 student scores
to 20. and find the total.
3. Write a program to display even numbers 10. Write a program to enter 5 student names
from 2 to 50. and display them
SECTION 5
Web Development
Web development is the process of creating and maintaining websites and web applications. It
involves using different tools and technologies (such as JavaScript, CSS, HTML, etc.) to build these
sites.
Note: When developing a website, there are two aspects – front-end development and back-end
development:
1. FRONT-END DEVELOPMENT: Is the practice of building everything a user sees and interacts with
in web application or website.
Main technologies used in front-end development:
Note: CSS can be written directly in the HTML file or in a separate file that is linked to the HTML
document. Keeping the content (HTML) separate from the design (CSS) makes it easier to apply the
same styles across multiple pages.
c. JS (JavaScript):
JavaScript is a type of programming language called a scripting language which adds interactivity
and dynamic features to websites. It allows developers to create things like animations, interactive
maps, real-time updates, and form validations.
JavaScript makes websites more engaging and responsive to user actions, enhancing the user
experience
By combining HTML, CSS, and JavaScript, front-end developers create websites that are not only
visually appealing but also easy and enjoyable to use.
2. BACK-END DEVELOPMENT
Back-end development deals with server-side processes, database management, and application
logic. It is where the data is stored; It includes managing servers, databases, and the logic that
powers the website.
a. Server-Side Processes: It handles requests from users (like when you click a button) and sends
back the right information, program logic and user requests on the server
b. Database Management: Stores and manages data used by the system. A database is like a digital
storage room where all the website’s data is kept. This includes things like user information, products in an
online store
c. Application Logic
This is the set of instructions that tells the website how to behave. It processes the data from the
database and ensures that everything runs correctly. For example, when you log in to a website, say
Facebook, the application logic checks your username and password against the database before it
allows you to login to your account
Web Hosting is the process of storing a website and its resources on a server connected to the
Internet.
Accessing the Website
Each website has a unique URL (short for Uniform Resource Locator), commonly called its web
address. The URL tells your browser where to go on the internet. When you type a URL into the
browser’s address bar and press Enter on your keyboard, the browser will load the page associated
with that URL. A browser is software which is used to show web pages
Examples of popular browsers. Safari, Mozilla, Chrome, Edge, Opera
Components Of Web Page
1. Headings are the titles or subtitles you see on a web page. They help organize the information
shown on the page, making it easier for users to understand the structure of the content
Importance of Headings
• Headings guide users through the content.
• They break up the text into sections, so users can quickly locate the information they need
without getting lost
2. Menus, also known as navigation bars, are lists of links that help users move around the website.
They are usually found at the top or down the side of the page.
Importance of Menus
Menus provide a consistent way for users to explore the website. They make it easy to find the
information you need without getting lost
3. Links, also known as hyperlinks, are clickable elements on the web page that connect to other
parts of the website. They allow the user to navigate between the different pages of the website or
between different sections within the same page (internal hyperlinks).
Links can also direct the user to a different website (external hyperlinks). Hyperlinks within a
website can be either text-based or images.
1. Headers/Footers The header and footer are typically at the top and bottom of the web page.
They tend to be the same across all web pages and provide a consistent style throughout. The
header typically contains the website's logo, title and navigation/menu, and the footer typically
contains the websites contact information, copyright details and links to important pages such as
the privacy policy.
2. Forms These enable the user to interact with the website by entering information, making
selections or uploading files. The data can be submitted for processing by the back-end.
3. Buttons These provide interactive elements to the user; they trigger actions or events when
clicked. Examples include navigating to a different page and pressing the submit button at the end
of a form. Buttons typically trigger a function in the back-end code that completes a specific
processing action.
4. Web Widgets: These are small standalone elements that can be included in a web page to
provide specific functionality for example:
a. Calendar widgets:
b. social media widgets.
c. Website search widgetsr.
d. Digital clock widget:
e. Weather widget:
Note: Web designers are in charge of how a website looks and how easy it is to use. They decide
things like the layout, colours, images, and fonts of a site. Web designers use a company’s brand
identity to ensure the website matches its style.
While web designers come up with the idea for how the website should look, web developers are
the ones who actually build it by writing the code. Both front-end (what you see) and back-end
(behind the scenes) parts of a website are created by developers
One important part of designing a website is creating a web outline plan, which is a basic guide for
how the site will be structured
2. Create a user persona: Develop a fictional representation of individuals or audience who are
likely use the website. This persona will guide the content decisions and design choices.
Note: A user persona is a detailed fictional profile of a typical user of a product, website, or
system. It represents real users based on research, data, and observations
3. Categories the information: Group the web content into logical categories and subcategories.
Think about the main topics or sections the website will cover. This will guide the number and
names of the web pages and subpages
4. Create a sitemap: This will show the basic structure and organization of a website
5. Create a content outline: A content outline is a detailed plan that shows what each page of a
website will include. It lists all the sections and features needed for the website, just like a sitemap
but more detailed
Prototyping is the process of creating a working model of a website that simulates how the
final product will look and function
Note that CTA/cta stands for call to action which is a prompt that encourages visitors to take a
desired action on a website. It is often designed in the form of a button with a clear command or
action phrase. An example of a CTA is the “CHECK”, “SUBMIT”, “APPLY NOW” and
“CHECKOUT”
SITEMAP
A sitemap is like a map for a website. It shows how different pages of the website are connected
and how they are organized.
There are two main types of sitemaps: visual and XML.
Visual Sitemaps
This is like a drawing that shows how different pages or sections of the website are linked together.
Note: Designers generally recommend that a website should not have more than four levels of
pages, as if a website is too complicated, with too many layers or hard-to-find links, it can be
frustrating for users. The goal is to make sure that all of the important pages are easy to access from
the main menu or other links on the site
Example of a horizonal sitemap with two levels drawn using Microsoft Word. It consists of a home
page with a navigation bar.
The BBC Bitesize page has a link to a sub-page (Quiz page)
Example 2 Barefoot is a business that sells shoes in Tamale. The website being developed for this
business should have a homepage and three linked multimedia pages of the shoes currently on
sale. These three pages (Men, Women and Children) should be navigated backwards and forwards.
A link should exist to the [Link] website from the home page
Content creation: The content creators make or gather content for different parts of the website,
and ensure that this content aligns with the website’s goals and is engaging for the visitors
Development and testing: Web developers will use the web outline plan to code and test the
website. Testers can use the web outline and sitemap, as they adopt the role of the user personas
as part of usability testing.
Deployment and launch: This is where the developer will set up hosting, configure the domain,
and deploy the website to a live server. They will conduct final checks to ensure all elements,
functionality, and links work correctly. They will then create a backup and have a plan for ongoing
maintenance and updates for the website.
Analytics and monitoring. This the stage where the developers will set up tools to see how users
are using the website. This includes how many people visit, what they do on the site, and how well
the site meets its goals.
Developers will regularly check the collected data to monitor and understand what is happening on
the website. They will then use the data to find out what’s working well and what needs fixing, as
well as make any improvements as necessary.
WIREFRAMES
Wireframes are simple drawings that show how a webpage will be arranged. They are like a rough
plan that shows what information should be on the webpage and where everything should go
A web page wireframe is a sketch outline of the information that needs to go on that web page.
Wireframes should clearly show: • navigational links • text areas • media used (including file
format) • position and type of hyperlinks on a page.
Prototypes
Note: The main difference between a wireframe and a low-fidelity prototype is that the latter offers
interactivity. (Allows you to interact with the pages, click on buttons and test how the website
functions.)
A low-fidelity prototype builds on wireframes and is a simple way to turn basic ideas from the
wireframes into a testable product. It usually includes more detail than a wireframe, allowing users
to interact with buttons and links to test how the website will work:
A high-fidelity prototype is a very detailed and interactive version of a website. It closely resembles
how the final website will look and work, with many of the features and functions already included.
high-fidelity prototype are prototypes that look and operate closer to the finished product
3. Improving communication between the client and those creating the website.
5. Providing a guide to the web developers on how the website they are tasked to create
should look like and behave