Form 3 notes(1)
Form 3 notes(1)
1
FORM 3 NOTES NOUBISSI IVAN
Chapter 1: hardware and software system
Lesson 1: Describing internal component of the computer
A computer is an electronic device that can process data according to instructions given to it.
It is essentially a tool that manipulates information.
Definition of terminologies
1. The system unit: it a case (often called chassis) that contains electronic components
that the computer uses to process and store data, there are 02 types of system units
according to the shapes: the tower with is horizontally represented and the Desktop
System unit which is vertical, the system unit consist of the motherboard or the
circuit board, power supply unit, storage and processing devices, communication
ports, cables, computer fan, CMOS, Disks, memories etc
2. The motherboard, also called the system board is the main circuit board in a
computer to which many electronic devices are attached, examples of electronic
devices attached to the motherboard are: the microprocessor, memory modules,
BIOS chip, expansion slots, etc
3. The processor: Also called the central processing unit, is often referred to as the
brain of the computer use to process data, it takes raw data and turns it into
information. The CPU is made up of two smaller units: the control unit (CU) and the
Arithmetic and Logic Unit (ALU)
o The control Unit is the main part of CPU used to direct and coordinate the flow of
data within the CPU, it also manages the process of moving data and instructions
into and out of memory and executes instructions,
o The ALU: it performs all arithmetic and logic functions in a computer like addition,
subtraction, multiplication and division, The logic Unit performs logical operations
and comparison of data
4. The von Neumann architecture: Made in 1945 by Von Neumann, it is an architecture which
describes the computer system with five basic parts: ALU, Control Unit (containing
Register), Input, Output, Memory
o Registers are special storage locations within the CPU that offer an advantage of speed.
They work under the direction of the control unit to accept and hold data that is being
processed,
For every instruction, a processor repeats a set of four basic operations which comprises a
machine or instruction cycle: Fetch-Decode-Execute-Store
2
FORM 3 NOTES NOUBISSI IVAN
5. The instruction or machine cycle: it describes how program instructions are repeatedly
fetched, decoded and executed, one instruction at a time, until an instruction to HALT is
encountered
o Fetching: the process of obtaining a program, instruction or data item from memory,
o Decoding: process of translating the instruction into signals or commands the computer
can execute or process,
o Executing: process of performing the actions that are required,
o Storing: process of writing the results to memory
8. Storage devices: A storage unit or device refers to any medium or process used for holding
data for later use, The capacity of a storage Unit is measured in bytes
An address is an identifier number that accurately states the location of data or instruction within
the storage unit, Computer storage is classified into 3 major levels such as primary storage;
secondary storage; and tertiary storage
a. Primary storage: This is a storage unit that is designed for holding computer data for short
period of time, it is often called internal storage or main memory, according to the speed
and the volatility of those storage devices. We distinguish:
3
FORM 3 NOTES NOUBISSI IVAN
- RAM: it is a volatile memory which is used to hold data temporally or for a short
period of time
b. Secondary storage: This is a non-volatile storage unit that is designed for holding computer
data for a long period of time e.g
- ROM: in which information and programs are stored or written permanently during
Manufacturing
- Hard disk
- Magnetic disk
- USB key
- Memory card etc
NB: a volatile memory is a storage unit that loss its content when electricity goes off while a non-
volatile memory retains its content even if the is no electricity
Buying a computer
To buy a computer, we must first know what it will be used for. The criteria people often look for
when deciding whether or not to buy a computer can include:
o A processor with a high frequency (speed) usually measured in megahertz (MHz) or
gigahertz (GHz)
o A large amount of RAM;
o A hard drive with a high storage capacity;
o A sound card, or, sound port on the motherboard;
o A CD burner (for creating CDs);
o A floppy disk drive;
o A network card or network port on the motherboard;
o A fast CD-ROM drive
For example, a computer with a microprocessor speed 3Ghz, more than 512Mb of RAM, and a hard
drive with a capacity of 40Gb would be an excellent and highly recommended system. These
selections are the best, but they are not essential. One can still make very good use of many older
and less powerful computers.
4
FORM 3 NOTES NOUBISSI IVAN
Data Capture Methods
Manual Data Entry: Human inputting data directly into a system.
Optical Character Recognition (OCR): Converts printed or handwritten text into
digital, machine-readable format
Barcode and QR Code Scanners: Capture data encoded in barcodes or QR codes,
providing quick and accurate data input.
Magnetic Ink Character Recognition (MICR) : Reads characters printed with
magnetic ink, commonly found on checks
Image Capture: Digital cameras and scanners capture images of documents,
products, or people for data extraction.
Biometric Data Capture: Captures unique physical or behavioral characteristics (e.g.,
fingerprints, facial recognition, voice patterns) for identification and authentication.
5
FORM 3 NOTES NOUBISSI IVAN
Ways of acquiring software
There are several ways to obtain software:
Purchase: You can buy software from a retailer, online store, or directly from the
software company's website.
Subscription: Many software products are available through subscription models,
where you pay a recurring fee for access to the software.
Open Source: Some software is available for free under open-source licenses, which
allow you to use, modify, and distribute the software.
Freeware: Freeware is software that is available for free, but may have restrictions on
its usage or distribution.
Shareware: Shareware is distributed for free, but typically requires payment for full
functionality or continued use.
Cloud-Based: Some software is available through cloud-based services, where you
access and use the software over the internet.
Custom Development: In some cases, organizations may choose to develop their
own custom software to meet specific needs.
Updating and installing software
i. Installing software: Installing software involves copying the software files to your
computer and configuring it to run. Here's a general process:
o Download: Obtain the software from the developer's website or an
authorized source.
o Run the Installer: Execute the downloaded file. This usually starts an
installation wizard.
o Follow Instructions: The wizard will guide you through the installation
process. This typically includes choosing an installation location, selecting
components, and agreeing to terms.
o Installation: The software copies files to your computer and registers
necessary settings.
o Completion: Once finished, you can usually launch the software.
ii. Updating software: Software updates are released to fix bugs, improve performance,
add features, and enhance security. Here is the process
o Check for Updates: Most software has a built-in feature to check for updates.
This is often found in the software's "Help" or "About" menu.
o Download Update: If an update is available, download it.
o Installation: The update installation process is similar to installing new
software, but it's usually simpler and faster.
o Restart: Sometimes, a restart is required to complete the update.
NB: Always download software and updates from trusted sources to protect your computer from
malware.
6
FORM 3 NOTES NOUBISSI IVAN
Lesson 5: creating digital content using software
Lesson 6: describing how computing technology is used in different areas of life
Data communication refers to the exchange of data between two devices via some form of
communication channel. In data communication the following basic terms are frequently
used:
Data: a collection of facts in raw form that becomes information after
processing.
Signal: an electric or electromagnetic encoding of data.
Signaling: propagation of signals across a communication channel.
Transmission: sending of data from one place to another by means of signals.
7.2 Components of data communication
There are five basic components in a communication system.
Data Source: creates data for transmission
Transmitter: encodes data for transmission
Communication channel: connecting medium between communicating
devices
Receiver: decodes transmitted signals back to data
Destination: the final destination of the transmission
Example: John calls Peter on phone.
The data source is John, the transmitter is John’s phone, the communication channel is the
telephone cable or microwave, the receiver is Peter’s phone and the destination is Peter
Features of data communication
Data Transmission modes
Data is transmitted from one point to another by means of electrical signals that may be in
analogue or digital form.
7
FORM 3 NOTES NOUBISSI IVAN
a. Analogue Signals
An analog signal is one in which information is represented as a continuous variation of
some physical property or quantity. Analog signals are continuous waves that carry
information by varying the frequency or amplitude of the wave.
Human speech is an example of an analog signal. Telephone lines use analog signals because
they were originally designed for speech.
b. Digital Signal
A digital signal is one in which information is represented as a sequence of binary values 0
and 1. These two values represent two conditions, on or off, corresponding to two known
levels of voltage or current.
Digital signals do not continuously vary as analogue signals. Signals are transmitted within
the computer as digital signals. Systems that use digital technology are known as baseband
systems.
Digital signal
8
FORM 3 NOTES NOUBISSI IVAN
A broadband system is a system that supports multiple transmissions via multiple frequency
channels. In a broadband system, data is sent in the form of an analog signal where each
transmission is assigned a portion of the bandwidth. Broadband communication is
unidirectional, so in order to send and receive, two pathways are needed. This can be
accomplished either by assigning a frequency for sending and assigning a frequency for
receiving along the same cable or by using two cables, one for sending and one for receiving.
Transmission Modes
Transmission modes simply refer to the direction of flow of information between two
communicating devices. It could be simplex, half duplex or full duplex.
Simplex
In simplex mode, signals are transmitted in only one direction. The flow of information is
unidirectional from transmitter to receiver always. Examples are television broadcasting,
computer to the printer connection and CPU to monitor communication.
A B
Half Duplex
In half duplex mode, signals can be transmitted in both directions but only one way at a
time. The flow of information is bidirectional but information can only be sent if it is not
being received. It is suitable for data transmission between a computer and dumb terminals.
An example is the police radio (walkie-talkie).
A B
Full Duplex
In full duplex mode, signals can be transmitted in both directions simultaneously. The
communicating devices can transmit at the same time. The flow of information is
bidirectional. It is suitable for interactive systems. An example is the telephone.
A B
Parallel Transmission
It is a method of sending multiple bits of data simultaneously across multiple
communication channels. For example, eight separate channels will be required if a block of
eight bits is to be transmitted in parallel. Parallel transmission is fast but it is suited only for
short distances as cabling for long distances will be expensive. It is mainly used for
connections within the computer and for connecting the computer to the printer.
Serial Transmissions
9
FORM 3 NOTES NOUBISSI IVAN
Serial transmission is a method of sending data one bit at a time over a communication
channel. If a block of 8 bits is to be transmitted in series, the bits will be transmitted one
after the other on the same channel. Serial transmission can be asynchronous or
synchronous.
10
FORM 3 NOTES NOUBISSI IVAN
Definition: A protocol is a set of rules and conventions that govern how devices on a
network communicate.
The need for a protocol is obvious: it allows different computers from different vendors and
with different operating characteristics to ‘speak the same language’. The same protocols
must be followed by each machine involved in the communication in order for the receiving
host to be able to understand the message. A protocol may be physical or logical.
Types of protocol
a. Physical Protocols
A physical protocol is a set of rules governing the transmission of data between devices
over a physical medium. It defines the electrical, mechanical, and procedural characteristics
of how data is represented and transmitted.
Example of physical protocols:
Ethernet: Defines standards for wired networks.
USB: Used for connecting peripherals to computers.
Bluetooth: Enables wireless communication between devices.
Wi-Fi: Provides wireless internet connectivity
b. Logical protocol
A logical protocol defines the rules and procedures for data transfer between devices in a
network. It focuses on the software and data formats used, rather than the physical
hardware.
Example of logical protocols:
TCP (Transmission Control Protocol): Guarantees reliable data delivery by
establishing connections and acknowledging received data.
UDP (User Datagram Protocol): Offers faster but less reliable data delivery without
connection setup.
HTTP (Hypertext Transfer Protocol): Used for transferring data on the World Wide
Web.
FTP (File Transfer Protocol): Enables the transfer of files between computers
11
FORM 3 NOTES NOUBISSI IVAN
3. Network Layer: Responsible for routing packets across networks, assigning IP
addresses, and handling congestion control.
4. Transport Layer: Ensures reliable end-to-end communication, error recovery, and
flow control.
5. Session Layer: Manages connections between applications, establishing,
maintaining, and terminating sessions.
6. Presentation Layer: Handles data encryption, compression, and format conversion.
7. Application Layer: Provides network services to user applications, such as email, file
transfer, and web browsing.
12
FORM 3 NOTES NOUBISSI IVAN
Security Risks: Vulnerable to cyber threats like hacking, viruses, malware, and data
breaches.
Dependency: Reliance on network infrastructure can lead to disruptions if the
network fails.
High Setup Costs: Initial investment in hardware, software, and network
infrastructure can be expensive.
Maintenance Costs: Ongoing maintenance and updates are required to ensure
network performance and security.
Unauthorized Access: Sensitive information can be accessed by unauthorized
individuals if security measures are not in place.
Virus and Malware Spread: Viruses and malware can spread rapidly across the
network, infecting multiple computers.
Basic Networking Terms
Node: Any device connected to a network (computer, printer, server, etc.).
Link: The physical connection between two nodes.
Protocol: A set of rules governing communication between devices.
IP Address: A unique numerical identifier assigned to each device on a network.
Subnet: A division of a network into smaller subnetworks.
Router: A device that forwards data packets between networks.
Switch: A device that connects multiple devices on a network.
Hub: A device that connects multiple devices on a network, but broadcasts data to all
connected devices.
Modem: A device that modulates and demodulates signals for data transmission.
Bandwidth: The amount of data that can be transmitted over a network in a given
amount of time
Classification of Computer Networks
Computer networks can be classified based on various factors, including geographical
area, topology, and architecture.
a. Based on Geographical Area
i. Personal Area Network (PAN): Covers a small area, typically within a
person's workspace. Examples include Bluetooth connections between
smartphones, laptops, and other devices.
ii. Local Area Network (LAN): Connects devices within a limited geographical
area, such as a home, office, or school.
iii. Metropolitan Area Network (MAN): Covers a larger area than a LAN,
typically a city or campus.
iv. Wide Area Network (WAN): Spans a large geographical area, often across
countries or continents. The internet is the largest WAN.
b. Based on Topology
13
FORM 3 NOTES NOUBISSI IVAN
Network topology is the layout or arrangement of the components of a network. It
refers to the way in which computers and cables are connected together to build a
network. Different types of topologies exist
i. Bus topology
In bus topology, all computers are connected to a single cable (trunk or backbone) known as
bus
Advantages
o Easy and inexpensive to set up as little cabling is required
o Easy to include additional stations without disrupting the network
o Failure of one node does not affect network
Disadvantages
o High rate of data collision
o Fails if there is any damage to the bus
o Any break in the bus is difficult to identify
ii. Star Topology
In a star topology, all the computers are connected to a central device which could be a hub
or a switch.
Advantages
o Breakdown of a node does not affect the network
o No disruption of the network when connecting or removing devices
o It is easy to detect faults
Disadvantages
o Failure of the central node affects the entire network
o It is costly due to the amount of cables required to connect the devices
14
FORM 3 NOTES NOUBISSI IVAN
Advantages
o No collision as a station needs the token to transmit
o Each computer acts like a repeater so signals are not attenuated
Disadvantages
o If a node in the network fails, the entire network fails
o Network is disrupted when additional stations are added
v. Mesh topology
Mesh topology is a network configuration where devices are interconnected in a
decentralized manner. Instead of relying on a central hub or switch, each device connects
directly to multiple other devices, forming a mesh-like structure.
c. Based on architecture
There are primarily two main types of network architectures:
15
FORM 3 NOTES NOUBISSI IVAN
i. Client-Server Architecture
It is a network in which there are computers called servers that provides services to other
computers called clients. The server manages resources and data, while clients request
services from the server
ii. Peer-to-Peer (P2P) Architecture
It is a network is which all computers act both as a server and client. The is no central
computer
Setting up a LAN
Local Area Network (LAN) is a network that connects devices within a limited geographical
area, like a home, office, or school. Here's a basic guide to setting up a LAN:
Essential Components:
Router: Connects your LAN to the internet and manages network traffic.
Ethernet cables: Connect devices to the router or a switch.
Switch: Optional, but useful for larger networks to expand the number of ports.
Computers, laptops, or other devices: The devices you want to connect.
16
FORM 3 NOTES NOUBISSI IVAN
Lesson 9: The internet
The internet is a global collection of computer networks which aims to facilitate the sharing
of information and communication
major internet services
Communication: To exchange data/information among individuals or organizations,
we need communication services.
Information: It is the procedure for gaining access to information/data stored on the
Internet. Net surfing or browsing is the process of discovering and obtaining
information from the Internet.
Entertainment Services: it serve as an entertainment by providing music , movies ,
online gaming , virtual reality etc via the internet to users
E-commerce: Electronic commerce, also known as e-commerce, is a business
concept that allows businesses and individuals to buy and sell goods through
the internet.
E-learning: it is a concept that makes education possible via the internet. No need to
be physically present for someone to go to school
E-banking: it is a digital platform that allows you to access and manage your bank
accounts and perform various financial transactions online. It's essentially banking
through the internet etc
Disadvantages of the Internet
17
FORM 3 NOTES NOUBISSI IVAN
Domain Name: The part of a URL that identifies a website (e.g.,
whatsapp.com).
IP Address: it is an address that uniquely identifies a device connected to the
internet
HTML: HyperText Markup Language, the code used to create web pages.
Bandwidth: The amount of data that can be transferred over a network
connection.
Cloud Computing: Storing and accessing data and applications over the
internet.
Intranet and Extranet
An intranet is a private network that is set up using the same technology and protocols as
the Internet but is restricted to users inside an organization. It provides similar services
within an organization to those provided by the Internet without necessarily being
connected to the Internet. An intranet can be seen as a private version of the Internet. To
access an intranet, some form of user authentication is usually required. External access to
an intranet is not always provided.
An extranet is an interconnection of two or more intranets. It allows an organization to
share information with other organizations using Internet standards but with security
features preventing access to others
Search query
A search query is simply the words or phrases you type into a search engine to find
information. For example, if you want to know "how to bake a cake," that's your search
query.
Types of Search Queries
Informational: Seeking information or knowledge (e.g., "what is climate change?")
Navigational: Looking for a specific website or page (e.g., "facebook.com")
Transactional: Aiming to complete a task or purchase (e.g., "buy shoes online")
Crafting Effective Search Queries
Be specific: The more specific your query, the better the results.
Use keywords: Identify the main words or phrases related to your topic.
Experiment with different terms: If you don't find what you're looking for, try
different words or phrases.
Use quotation marks: To search for an exact phrase.
Use the minus sign: To exclude a word from results.
Use the plus sign: To include a word.
Example: If you want to find information about "gluten-free chocolate cake recipes," you
could try these search queries:
18
FORM 3 NOTES NOUBISSI IVAN
gluten-free chocolate cake recipes
best gluten-free chocolate cake
how to make gluten-free chocolate cake
Search Engine Results Page (SERP)
A Search Engine Results Page (SERP) is the page displayed by a search engine in response to
a user's query. It typically lists web pages, images, videos, maps, news articles, and other
relevant content
Components of a SERP
Search Box: This is where users can refine their search or initiate new ones.
Organic Results: These are the natural search results based on relevance and other
factors determined by the search engine's algorithm. Each organic result typically
includes:
i) Title: The clickable headline of the webpage.
19
FORM 3 NOTES NOUBISSI IVAN
Copyright infringement occurs when someone uses protected creative work without
permission. Here are some common examples:
Downloading or sharing copyrighted music without paying
Using copyrighted images without permission
Plagiarizing someone else's work: This involves presenting someone else's ideas or
words as your own
Copying and distributing copyrighted software: This includes sharing software with
others without permission etc
What is Intellectual property?
Intellectual property (IP) refers to creations of the mind, such as inventions; literary and
artistic works; designs; and symbols, names, and images used in commerce. It's the
protection of ideas and creative work.
Types of Intellectual Property
1. Patents: Protect inventions and new processes. Example: A new type of smartphone
or a medical device.
2. Copyrights: Protect literary, artistic, and musical works. Example: Books, songs,
movies, software, and architectural designs.
3. Trademarks: Protect brand names, logos, and symbols. Example: Coca-Cola logo,
Nike swoosh, McDonald's golden arches.
4. Trade Secrets: Protect confidential information, like formulas or processes. Example:
Coca-Cola's secret formula, KFC's recipe.
What is a license?
A license is a formal permission or permit granted by an authority to do something. It's
essentially a legal agreement that outlines the terms and conditions under which something
can be used.
Examples of licenses
Government Licenses: These are issued by government authorities to allow
individuals or businesses to engage in specific activities. Examples include: Driver's
license, Business license, Marriage license etc
Software Licenses: These grant permission to use software under certain conditions.
Examples include: Commercial licenses, Open-source licenses etc
Intellectual Property Licenses: These allow others to use copyrighted or patented
material under specific terms. Examples include: Music licensing, Trademark licensing
etc
20
FORM 3 NOTES NOUBISSI IVAN
Fair use is a legal doctrine that permits limited use of copyrighted material without requiring
permission from the rights holder.
Factors considered in determining fair use include
Purpose and character of the use: Is it for commercial or non-profit educational
purposes?
Nature of the copyrighted work: Is the work factual or creative?
Amount and substantiality of the portion used: How much of the original work is
used?
Effect of the use on the potential market for or value of the copyrighted work: Does
the use harm the original work's market?
Examples of potential fair use:
Quoting short passages from a book in a review
Using a small portion of a song in a parody
Creating a news report that includes brief clips of copyrighted footage
21
FORM 3 NOTES NOUBISSI IVAN
It is any illegal act involving computers and networks. The victims of these acts are
individuals, businesses, or governments.
Types of computer crimes
1. Hacking: it is the act of gaining unauthorized access to a computer system or
network
2. Identity Theft: Stealing someone's personal information for financial gain.
3. Scamming: A scam is a fraudulent or deceptive act designed to obtain money or
other valuables from a victim. Scammers often rely on trickery, false promises, or
manipulation to gain trust and exploit their victims.
4. Piracy: it is the unauthorized duplication and distribution of copyrighted material.
5. Social engineering: it is the psychological manipulation of people into performing
actions or divulging confidential information.
6. Phishing or spamming: it is the act of Sending fraudulent emails or messages to trick
people into clicking links or downloading malicious attachments.
7. Denial of Service (DoS) Attack: it is act of disrupting or preventing normal network
access to a system.
Ways to protect against computer crimes
1. Use Strong Passwords: Create complex passwords and avoid using the same one for
multiple accounts
2. Keep Software Updated: Regularly update your operating system and applications to
patch vulnerabilities.
3. Use Antivirus and Anti-Malware Software: Protect your device from malicious
software.
4. Be Wary of Phishing Attempts: Avoid clicking on suspicious links or downloading
attachments from unknown senders
5. Secure Your Wi-Fi Network: Use a strong password for your home Wi-Fi and consider
using a VPN
Authentication
it is the process of verifying that someone or something is who or what they claim to be.
Common authentication methods are:
o Password: The most common method, but also one of the least secure due to
susceptibility to hacking
o Biometric: In simpler terms, it is using parts of your body to verify who you
are
o Pin: it stands for Personal Identification Number. It's a numerical code used
to verify your identity for various purposes
o Multi-factor authentication (MFA): is a security process that requires
multiple forms of verification to gain access to a system or account. It adds an
extra layer of security beyond traditional passwords.
22
FORM 3 NOTES NOUBISSI IVAN
Access control
It is a security mechanism that defines who can access specific information or resources, and
what they can do with it. It's like a digital gatekeeper that ensures only authorized
individuals can enter a system or perform certain actions
Encryption
It is the process of converting readable information (plaintext) into an unreadable format
(ciphertext) to protect it from unauthorized access. It's like scrambling a message so only
those with the correct key can understand it
23
FORM 3 NOTES NOUBISSI IVAN
Definition
An algorithm is a set of step-by-step instructions that tells the computer how to solve a given
problem
Expressing algorithms
The quality of performance of a computer largely depends on the data structure used. After
the choice of a data structure, the algorithm to be used is relatively obvious
Characteristics of an algorithm
An algorithm should be:
1. Explicit (i.e. solve every instance of the problem)
2. Precise ( it must be exact or unambiguous )
3. Effective: Each step of the algorithm must be feasible and executable.
4. errors free
Language of expression
Algorithms can be expressed in a variety of notations such as
Natural language
Pseudo code: it is the steps or summary of a program before the program is actually
written; an outline of the logic of a program to be written. it is therefore possible to
preview what the program will accomplish
Flowcharts
Computer programs
NATURAL LANGUAGE
Human written or spoken language used by the community. Its expressions for algorithms
are rarely used in complex or technical processes
Example 1
The algorithm below collects two numbers, sum up the numbers, finds the difference and
displays both the sum and the difference
Get two numbers
Find the sum of the numbers
Find the difference of the numbers
Display the sum
Display the difference
Algorithms written in natural language can be easily be understood and executed by human
beings but not by the computer. For a computer to execute this, it must be transformed to a
computer programming language
Example 2: an algorithm for cooking 1kg of rice
24
FORM 3 NOTES NOUBISSI IVAN
Get the rice
Get the pot and water
Light the fire
Select the rice
Put the pot on fire
Pour 2 liters of water and salt to taste
Allow to boil for 5 minutes
Wash the rice and pour in the pot
Allow to boil for 30 minutes
Check if it is ready and serve
NB: with the use of a digital logic, software and other necessary hardware, a robot can be
programmed to follow these steps and boil rice
FLOWCHARTS
It is a graphical representation of the steps of a process in an algorithm. It can be used to
define behaviors of a system or program. Here symbols are used to represent activities while
arrow represents the direction of these activities or stages through the process
Example: write a simple algorithm that adds two numbers and display the result
Algorithm:
1. Start
25
FORM 3 NOTES NOUBISSI IVAN
2. Input two numbers, A and B
3. Calculate the sum: Sum = A + B
4. Output the sum
5. Stop
PSEUDOCODE
Pseudocode is a detailed yet readable description of what an algorithm must do, expressed
in a formally-styled natural language rather than in a programming language. It is a language
based on a small vocabulary which contains keywords corresponding to statements and
identifiers used to specify the data. As all languages it is based on some rules, but they are
less restrictive than those used in programming languages;
26
FORM 3 NOTES NOUBISSI IVAN
Algorithm algo_name
{ variable and constants declaration}
Begin
Instruction 1
Instruction 2
.
.
.
Instruction n
end
b) What is an identifier,
c) Operators
c) Input/output instructions
• Input: To transfer and input data to a variable. We use keywords as READ, GET, …
• Output: To transfer the value of variable to the output device. We use keywords
as: WRITE, PRINT, DISPLAY, …
27
FORM 3 NOTES NOUBISSI IVAN
In pseudocode, the algorithm can be written using less or more specific instructions. The
two algorithms below are adding two numbers entered by the user and display the result
28
FORM 3 NOTES NOUBISSI IVAN
2. Programming Languages
A programming language is a formal language designed to communicate instructions to a
computer. It's like a human language, but with strict rules and syntax. These instructions tell
the computer what tasks to perform and how to perform them.
Two categories of programming languages exist: low-level languages and high-level
languages
a. Low Level Languages
Low level languages are those that allow low-level access to hardware features. There are
two categories of low-level languages: machine language and assembly language.
Machine Language: it is the computer‘s language. It is the language the computer
understands. Machine language instructions are written in binary (a series of 0s and 1s), and
are directly executable by the computer (processor). Each machine language statement
corresponds to one machine action. Machine language is the first generation of
programming languages.
Assembly Language: it is a low-level language that uses words or symbolic codes called
mnemonic codes to represent machine language instructions. Assembly language is the
second generation of programming languages. ADD, LOAD, and STORE are known as
mnemonics. For example:
LOAD R0 Number1 Loads number1 in register 0
ADD R2 R0 R1 Adds registers 0 and register 1 and store result in register 2.
29
FORM 3 NOTES NOUBISSI IVAN
Code), Pascal, Java, FORTRAN (FORmular TRANslation), C++, COBOL (COmmon Business
Oriental Language), etc.
Advantages of high-level languages
Programs are easy to write and understand
Built-in libraries to perform routine tasks
Can be ported to multiple hardware setups from same.
Disadvantages of high level languages
Slower than second generation languages
Produce larger program files for same functionality than second generation languages.
May not allow for low level hardware access.
3. Language Translators
To run a program on a computer, the program needs to be translated into the machine
language of the computer on which it will run.
A language translator is a computer program that translates program instructions from one
language into another without loss of original meaning. There are three types of language
translators: assembler, compiler, and interpreter.
a. Assembler
An assembler translates instructions from assembly language into machine language. This
process is called assembling.
b. Compiler
A compiler is a computer program that translates an entire block (i.e.at once) of instructions
written in a high-level language into machine language instructions before executing it.
The high-level language program is called source code and the generated machine language
program is called object code. Types of compiled languages are Pascal, C, C++, FORTRAN,
JAVA, and Python.
Advantages of a Compiler
Fast in execution
The object/executable code produced by a compiler can be distributed or executed
without having the compiler present.
The object program can be used whenever required without the need of recompilation.
Disadvantages of a Compiler
Debugging a program is much harder. Therefore, not so good at finding errors.
30
FORM 3 NOTES NOUBISSI IVAN
When an error is found, the whole program has to be re-compiled though compilation
process is so fast.
c. Interpreter
An interpreter is a computer program that translates and executes instructions written in a
high-level language into machine language instructions one line at a time. If a program
performs a section code 1000 times, then the section is translated into machine code 1000
times since each line is interpreted and then executed. Types of interpreters: BASIC, Lisp,
Logo, etc.
Advantages of an Interpreter
Good at locating errors in programs since interpretation is done line by line.
Debugging is easier since the interpreter stops when it encounters an error.
If an error is corrected, there is no need to retranslate the whole program.
Disadvantages of an Interpreter
It is slow as interpretation is done line by line.
Translation has to be done every time the program is to be executed since no object code
is produced.
For the program to run, the interpreter must be present.
4. Program Errors and Correction
Syntax Error
Syntax is the set of rules that specify how the symbols of a language can be put together to
form meaningful statements. A syntax error is a place in a program where the syntax rules of
the programming language were not followed. A syntax error will stop a program
compilation or interpretation.
Semantic Error
Semantics specify the meaning of an orderly well-formed program. A semantic error is a
situation where the programmer misunderstood the meaning of something in the
programming language. Compilation and interpretation do not detect semantic errors.
Semantic errors are detected from wrong results. They are also called logical errors.
Something may be syntactically correct but semantically incorrect.
Run-time Error
Run-time error is an error that occurs when a program is being executed. For example, a run-
time error may occur if division by 0 is attempted. A run-time error may cause the program
to stop execution.
Debugging
31
FORM 3 NOTES NOUBISSI IVAN
An error in a computer program is known as a bug and debugging is the process of finding
and removing bugs. Syntax errors and semantic errors are bugs. A debugger is the software
tool (or person) used for this purpose.
6. Key Words and Operators
a. Key Words
Any high-level language has its own set of predefined words which are used to write
programs. Each of these words has a specific meaning, and cannot be used for any other
purpose within the programming language IDE. These words are known as key words or
reserved words.
A reserved word is a key word in a programming language that has a specific meaning and
cannot be used for any other purpose. E.g. If, Else, For, To and goto.
b. Operators
Operators are used to perform various operations on data. They may be arithmetic,
relational or logical. Arithmetic operators are +, -, *, %, ++ and -- and /. Relational operators
include <, >, ==, <=, >= and !=. Logic operators are NOT (!), AND (&&) and OR (||).
7. Programming paradigms
It is a fundamental style and methodology of computer programming. There are: imperative
(procedural), declarative, and object oriented Paradigms.
Imperative Paradigm: It is also known as procedural programming paradigm. It uses
sequences of instructions that are executed by the processor in the order the programmer
designed. Imperative programming manipulates variables and data structures/types stating
how to obtain the results.
Examples: C, Pascal, FORTRAN, Ada, etc.
Declarative Paradigm: Made up of logic Paradigm and Functional Paradigm. Its control
flow is implicit i.e. the programmer states only what the result should look like not how to
obtain it.
Logic paradigm is a programming process that consists of a set of facts and rules (axioms)
describing properties of a certain objects and theorems to be proved. E.g. Prolog, Mercury.
Prolog and Mercury are fifth generation language also called Natural Languages.
Functional programming paradigm: Here a program development is the construction of
mathematical functions. E.g. Lisp, Mathematical, etc.
Object Oriented Paradigm (OOP): Here software is viewed as a collection of units called
objects which receive messages each of which is capable of performing the actions that are
immediately related to it as well as requesting actions of other objects. Objects respond to
messages by performing operations called methods. Together, these objects interact to solve
the problem. E.g. design of graphical user interface using C++, Python, Perl, Java.
32
FORM 3 NOTES NOUBISSI IVAN
8. Software development tools
These are software that are used to develop applications and system software.
Source code editor: A source code editor is a text editor program designed specifically for
editing source code of computer programs. It could be a standalone application or it may be
built into an IDE.
Integrated Development Environment (IDE): An IDE is single software that provides
comprehensive facilities to computer programmers in which all software development is
done. Also known as Integrated Design Environment or Integrated Debugging Environment.
An IDE normally consist of: a source code editor, a compiler or interpreter, automation tools,
a debugger.
Linker: This is software that is used to combine object code modules (sub-programs)
together to make a complete program.
9. Stages in the program development cycle
Problem Analysis.
Task Analysis.
Algorithm Development.
Coding
Testing and Debugging.
Documentation and Maintenance.
33
FORM 3 NOTES NOUBISSI IVAN