Grade 11 Computer Studies student notes organised by curriculum strand and sub-strand. Explore Strand 1.0: Foundation of Computer Studies; Strand 2.0: Computer Networking; Strand 3.0: Software Development online.
This document is a complete set of study notes for Computer Studies in Grade 11 of Kenya’s Senior School. It follows the KICD Senior School Curriculum Design for Computer Studies, Grade 11 (draft), and covers every strand and sub-strand in that design. The notes explain each topic in clear, simple English and are illustrated with thirty-three diagrams, circuits, tables and screen examples drawn specially for these notes, with worked examples, tested Python, SQL, HTML and PHP code, and practice questions.
The notes are organised into the three strands of the curriculum, with eleven sub-strands in total, followed by a quick revision sheet.
Strand | Sub-strands |
|---|---|
1.0 Foundation of Computer Studies | 1.1 Data Representation · 1.2 Binary Arithmetic Operations · 1.3 Logic Gates · 1.4 Logic Circuits |
2.0 Computer Networking | 2.1 Network Standards and Protocols · 2.2 Network Security |
3.0 Software Development | 3.1 OOP Concepts · 3.2 OOP Implementation · 3.3 Relational Database Fundamentals · 3.4 SQL · 3.5 Web Development Fundamentals |
© 2026 Tr Boen. All rights reserved.
Owner: Tr Boen Website: www.cbcteacher.co.ke Telephone: 0722591434 |
These study notes are the property of Tr Boen. The copyright covers the whole document, including the explanations, tables, figures, illustrations, practice questions, answers, design and layout, and the Tr Boen logo. The work is protected under the copyright laws of Kenya and international copyright agreements.
To request permission, order more copies, or ask about licences for a whole school, please contact Tr Boen on 0722591434 or visit www.cbcteacher.co.ke. Please also report any unauthorised copies through the same contacts.
The structure, strands, sub-strands, learning outcomes and key inquiry questions follow the KICD Senior School Curriculum Design, Computer Studies Grade 11 (draft). The curriculum design remains the property of the Kenya Institute of Curriculum Development (KICD). These notes are an independent study aid written by Tr Boen; they are not an official KICD publication.
FOUNDATION
You should be able to: identify the units used to represent data in computers; explain the representation of different types of data in computers; describe the types of number systems used in computers (decimal, binary, octal and hexadecimal); convert numbers between different number systems; represent data using different coding schemes (ASCII, EBCDIC and BCD); and acknowledge the importance of data representation in computers. |
A computer is made of millions of tiny electronic switches called transistors. A switch has only two states: off and on. These two states are written as 0 and 1, so every piece of data inside a computer (a letter, a photo, a song or a video) is stored as a pattern of 0s and 1s. This is called binary representation. A single 0 or 1 is called a bit (short for binary digit).
Data is raw facts and figures, such as the marks 45, 67 and 82. Information is data that has been processed so that it has meaning, such as "The class average is 64.7".
Bits are too small to count files, so they are grouped into larger units. A group of 8 bits is a byte, and a byte can store one character such as the letter A. A group of 4 bits is called a nibble.

Figure 1.1: Units of data measurement, each 1,024 times larger than the one before
Unit | Symbol | Size | Typical example |
|---|---|---|---|
Bit | b | 0 or 1 | One on/off signal |
Byte | B | 8 bits | One character, e.g. "A" |
Kilobyte | KB | 1,024 bytes | A short text message or a small email |
Megabyte | MB | 1,024 KB | A photo or a 3-minute song |
Gigabyte | GB | 1,024 MB | A movie or a phone's memory |
Terabyte | TB | 1,024 GB | A large hard disk |
Units are used in three main ways:
DO NOT CONFUSE B AND B A small b means bit and a capital B means byte. A 100 Mbps connection moves 100 megabits per second, which is only about 12.5 megabytes per second (100 ÷ 8). |
Type of data | How it is represented |
|---|---|
Text | Each character is given a binary code, for example the letter A is 01000001 in ASCII |
Numbers | Stored directly as binary numbers |
Images | A grid of tiny dots called pixels; each pixel's colour is stored as a binary number |
Audio | The sound wave is measured thousands of times a second (sampling) and each measurement is stored as a binary number |
Video | A fast series of images (frames) together with an audio track |
A number system is a way of writing numbers using a set of digits. Its base (or radix) is the number of different digits it uses. In every system the position of a digit decides its value (positional value): each place is worth the base raised to a power.

Figure 1.2: The four number systems used in computing
System | Base | Digits used | Where it is used |
|---|---|---|---|
Decimal | 10 | 0 to 9 | Everyday counting and money |
Binary | 2 | 0 and 1 | Inside the computer's circuits |
Octal | 8 | 0 to 7 | Short form of binary (groups of 3 bits), e.g. Unix file permissions |
Hexadecimal | 16 | 0 to 9 and A to F | Short form of binary (groups of 4 bits), e.g. colour codes and memory addresses |
In hexadecimal the letters stand for numbers above 9: A = 10, B = 11, C = 12, D = 13, E = 14, F = 15.
Decimal | Binary | Octal | Hexadecimal |
|---|---|---|---|
0 | 0000 | 0 | 0 |
5 | 0101 | 5 | 5 |
8 | 1000 | 10 | 8 |
10 | 1010 | 12 | A |
15 | 1111 | 17 | F |
16 | 10000 | 20 | 10 |
1. Decimal to binary (repeated division by 2). Divide the number by 2 again and again, writing down each remainder. Stop when the quotient is 0. Read the remainders from the bottom to the top.

Figure 1.3: Converting 25 (decimal) to binary by repeated division
So 25 in decimal is 11001 in binary. The same method works for other bases: divide by 8 for octal and by 16 for hexadecimal.
WORKED EXAMPLES 156 to octal: 156 ÷ 8 = 19 remainder 4; 19 ÷ 8 = 2 remainder 3; 2 ÷ 8 = 0 remainder 2. Reading upwards gives 234 in octal. 500 to hexadecimal: 500 ÷ 16 = 31 remainder 4; 31 ÷ 16 = 1 remainder 15 (F); 1 ÷ 16 = 0 remainder 1. Reading upwards gives 1F4 in hexadecimal. |
2. Binary, octal or hexadecimal to decimal (add up the positional values). Multiply each digit by the value of its place and add the results.
WORKED EXAMPLES 101101 (binary) to decimal: the place values from the right are 1, 2, 4, 8, 16, 32. So 1×32 + 0×16 + 1×8 + 1×4 + 0×2 + 1×1 = 32 + 8 + 4 + 1 = 45. 2B (hexadecimal) to decimal: 2×16 + 11×1 = 32 + 11 = 43. 234 (octal) to decimal: 2×64 + 3×8 + 4×1 = 128 + 24 + 4 = 156. |
3. Binary to octal and hexadecimal (grouping). Because 8 = 2³ and 16 = 2⁴, binary can be converted by grouping bits. For octal group the bits in threes from the right. For hexadecimal group them in fours. Add zeros at the left if needed.
Conversion | Working | Answer |
|---|---|---|
101110011 to octal | 101, 110, 011 = 5, 6, 3 | 563 |
11010111 to hexadecimal | 1101, 0111 = D, 7 | D7 |
745 (octal) to binary | 7 = 111, 4 = 100, 5 = 101 | 111100101 |
3AF (hex) to binary | 3 = 0011, A = 1010, F = 1111 | 001110101111 |
To convert between octal and hexadecimal, go through binary. For example, 345 (octal) = 011 100 101 = 0 1110 0101 = E5 (hexadecimal).
A coding scheme is an agreed table that gives every character (letter, digit or symbol) its own binary code, so that different computers can exchange text.

Figure 1.4: Three coding schemes and the code for the letter A
Scheme | Full name | Bits per character | Notes |
|---|---|---|---|
ASCII | American Standard Code for Information Interchange | 7 bits (128 characters); extended ASCII uses 8 bits (256) | Most common on personal computers; A = 65, a = 97, 0 = 48 |
EBCDIC | Extended Binary Coded Decimal Interchange Code | 8 bits (256 characters) | Used on IBM mainframe computers; A = C1 in hexadecimal |
BCD | Binary Coded Decimal | 4 bits for each decimal digit | Used where exact decimal digits matter, such as calculators and digital clocks |
Encoding the word CAT in ASCII: C = 67 = 01000011, A = 65 = 01000001, T = 84 = 01010100. So CAT is stored as 01000011 01000001 01010100, which is 3 bytes.
Encoding 59 in BCD: 5 = 0101 and 9 = 1001, so 59 is stored as 0101 1001.
UNICODE ASCII cannot represent every language. Unicode (for example UTF-8) uses more bits so that it can store the letters of Kiswahili, Arabic, Chinese and emojis in the same file. |
Design a short poster or leaflet for your school community that explains bits and bytes and the unit of memory in a phone, and show how a name such as "TOM" is written in binary using ASCII.
✎ Practice: Data representation
ANSWERS
|
Key inquiry questions: Why are different data units important in computing? How are different types of data represented in computer systems?
FOUNDATION
You should be able to: explain the fundamental concepts of binary arithmetic operations and their significance in computing; represent signed and unsigned binary numbers in one's and two's complement; perform arithmetic operations on unsigned and signed binary numbers; and appreciate the use of binary operations in computers. |
Inside the processor, the Arithmetic and Logic Unit (ALU) adds, subtracts and compares numbers using binary arithmetic. Every calculation you do on a calculator, a phone or a school computer, from adding marks to working out a bank balance, is finally done with 0s and 1s.
Binary addition follows four simple rules.
Addition | Result | Carry |
|---|---|---|
0 + 0 | 0 | 0 |
0 + 1 | 1 | 0 |
1 + 0 | 1 | 0 |
1 + 1 | 0 | 1 (because 1 + 1 = 10 in binary) |
When three 1s meet in a column (1 + 1 + carry 1), the result is 1 with a carry of 1.

Figure 1.5: Adding 1011 and 0110, working from right to left
WORKED EXAMPLE Add 1011 and 0110. Column 1: 1 + 0 = 1. Column 2: 1 + 1 = 0 carry 1. Column 3: 0 + 1 + 1 = 0 carry 1. Column 4: 1 + 0 + 1 = 0 carry 1. The last carry becomes a new digit: 10001. Check in decimal: 11 + 6 = 17, and 10001 = 16 + 1 = 17. ✓ |
Another example: 1101 + 1011 = 11000 (13 + 11 = 24).
Subtraction | Result |
|---|---|
0 − 0 | 0 |
1 − 0 | 1 |
1 − 1 | 0 |
0 − 1 | 1 with a borrow of 1 from the next column |
Example: 1101 − 0110 = 0111 (13 − 6 = 7).
Subtraction by borrowing is slow for a computer, so computers subtract by adding the complement of a number. This also solves the problem of writing negative numbers.
Three methods are used to represent signed numbers. The examples use 8 bits.
Method | How it works | +5 | −5 | 8-bit range |
|---|---|---|---|---|
Sign and magnitude | Sign bit, then the size of the number | 00000101 | 10000101 | −127 to +127 |
One's complement | Negative number = flip every bit of the positive number | 00000101 | 11111010 | −127 to +127 |
Two's complement | Negative number = one's complement + 1 | 00000101 | 11111011 | −128 to +127 |
Two's complement is the method most computers use because it has only one zero and subtraction becomes ordinary addition.

Figure 1.6: Finding the two's complement of 5 to represent −5
To read a negative two's complement number back: flip the bits, add 1 and put a minus sign. For example 11111011 becomes 00000100, plus 1 gives 00000101 = 5, so the number is −5.
To calculate A − B, find the two's complement of B and add it to A. If there is a carry out of the leftmost bit, discard it.
WORKED EXAMPLE: 9 − 5 IN 8 BITS 9 = 00001001 and 5 = 00000101. The two's complement of 5 is 11111011 (this is −5). Add: 00001001 + 11111011 = 1 00000100. Discard the carry (the leftmost 1). The answer is 00000100 = 4. ✓ |
Find the one's complement of B and add it to A. If there is a carry out of the leftmost bit, add it back to the answer (the end-around carry).
WORKED EXAMPLE: 9 − 5 USING ONE'S COMPLEMENT 9 = 00001001 and one's complement of 5 = 11111010. Add: 00001001 + 11111010 = 1 00000011. Add the end-around carry: 00000011 + 1 = 00000100 = 4. ✓ |
Overflow happens when the answer is too large for the number of bits available. In 4 bits, 1111 + 0001 = 10000 needs 5 bits, so the leftmost 1 is lost and the computer wrongly gets 0000. Programmers avoid this by using more bits.
Sensitise your peers in a computer club about binary arithmetic by running a short quiz: each member adds two binary numbers and checks the answer in decimal.
✎ Practice: Binary arithmetic
ANSWERS
|
Key inquiry questions: What are the practical applications of binary arithmetic operations in real-life situations? How are signed and unsigned binary numbers in one's and two's complement represented in computing?
FOUNDATION
You should be able to: describe logic gates as used in computer systems; create a truth table from logic gates; analyse truth tables to predict the outputs; derive a Boolean expression from a truth table; and appreciate the use of logic gates in real-life situations. |
A logic gate is a small electronic circuit that takes one or more binary inputs (0 or 1) and produces one binary output according to a fixed rule. Logic gates are the building blocks of digital circuits. A processor contains billions of them. In logic, 1 means true (high voltage, switch on) and 0 means false (low voltage, switch off).
A truth table lists every possible combination of inputs and the output for each. A gate with n inputs has 2ⁿ rows, so a two-input gate has 4 rows and a three-input circuit has 8 rows.

Figure 1.7: Symbols of the seven basic logic gates
Gate | Boolean expression | Rule in words |
|---|---|---|
AND | A · B | Output is 1 only when both inputs are 1 |
OR | A + B | Output is 1 when at least one input is 1 |
NOT | Ā (or A′) | Output is the opposite of the input |
NAND | (A · B)′ | NOT AND: output is 0 only when both inputs are 1 |
NOR | (A + B)′ | NOT OR: output is 1 only when both inputs are 0 |
XOR | A ⊕ B | Output is 1 when the inputs are different |
XNOR | (A ⊕ B)′ | Output is 1 when the inputs are the same |
A | B | AND | OR | NAND | NOR | XOR | XNOR |
|---|---|---|---|---|---|---|---|
0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 |
0 | 1 | 0 | 1 | 1 | 0 | 1 | 0 |
1 | 0 | 0 | 1 | 1 | 0 | 1 | 0 |
1 | 1 | 1 | 1 | 0 | 0 | 0 | 1 |
The NOT gate has one input: when A = 0 the output is 1, and when A = 1 the output is 0.
REAL-LIFE MODELS OF GATES AND: two switches in series with a bulb: the bulb lights only when both are on. OR: two switches in parallel: the bulb lights when either one is on. NOT: a security light that is on when the daylight sensor is off. |
Universal gates. NAND and NOR are called universal gates because any other gate can be built using only NAND gates or only NOR gates. This makes chips cheaper to manufacture.
Follow these steps (the sum of products method):
A | B | Output F |
|---|---|---|
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 0 |
WORKED EXAMPLE Output F is 1 in row 2 (A = 0, B = 1) and row 3 (A = 1, B = 0). Row 2 gives Ā · B and row 3 gives A · B̄. So F = Ā·B + A·B̄, which is the XOR function (A ⊕ B). |
Study the table, find which gate rule it follows, and then predict the output for new inputs. For example, if a table gives output 1 for inputs (0,0) and (1,1) only, it is an XNOR gate, so inputs (1,1) will give 1 and inputs (0,1) will give 0.
Rule | Meaning |
|---|---|
A · 0 = 0 and A · 1 = A | AND with 0 gives 0; AND with 1 keeps A |
A + 0 = A and A + 1 = 1 | OR with 0 keeps A; OR with 1 gives 1 |
A · A = A and A + A = A | Repeating a signal changes nothing |
A · Ā = 0 and A + Ā = 1 | A signal and its opposite |
Learners can model gates with a battery (cell), connecting wires, switches (or a metal paper clip and a board) and a small bulb. Two switches in series model AND and two switches in parallel model OR. Safety: use small cells only and never connect to mains electricity.
✎ Practice: Logic gates
ANSWERS
|
Key inquiry questions: What is the significance of logic gates in digital devices? How do logic gates form the building blocks of digital devices?
FOUNDATION
You should be able to: explain the relationship between logic gates and logic circuits; combine logic gates to form logic circuits; derive Boolean expressions from logic circuits; and acknowledge the application of logic circuits in daily-life situations. |
A logic circuit is made by joining two or more logic gates so that the output of one gate becomes the input of another. Gates are the building blocks, and circuits are the structures built from them. Logic circuits are used in every digital device, from a calculator to a mobile phone.

Figure 1.8: A logic circuit for Q = (A AND B) OR C
To read a circuit, work from the inputs towards the output and write the expression at the output of every gate.
WORKED EXAMPLE In Figure 1.8 the AND gate has inputs A and B, so its output is A · B. This output goes to the OR gate together with C. So the final output is Q = A · B + C. |
For three inputs we need 2³ = 8 rows. Work out the output of each gate in turn.
A | B | C | A · B | Q = A · B + C |
|---|---|---|---|---|
0 | 0 | 0 | 0 | 0 |
0 | 0 | 1 | 0 | 1 |
0 | 1 | 0 | 0 | 0 |
0 | 1 | 1 | 0 | 1 |
1 | 0 | 0 | 0 | 0 |
1 | 0 | 1 | 0 | 1 |
1 | 1 | 0 | 1 | 1 |
1 | 1 | 1 | 1 | 1 |
For example, X = (A + B) · C̄ needs an OR gate for A + B, a NOT gate for C̄, and an AND gate that combines them.

Figure 1.9: A burglar alarm circuit: Alarm = (Door OR Window) AND Armed
Application | Logic idea |
|---|---|
Burglar alarm | The alarm sounds if the system is armed AND (the door OR a window is opened) |
Simple switches | A two-way staircase switch uses XOR: the bulb changes state whenever either switch is moved |
Street lights | A light sensor feeds a NOT gate: when there is no daylight (0), the light turns ON |
Emergency response | A fire alarm sounds when the smoke sensor OR the heat sensor is on |
Digital devices | Calculators and computers use circuits that add, compare and store binary numbers |
A logic circuit can be tested before it is built: draw it in free circuit simulation software or an online simulator, set the inputs, and compare the output with the truth table. A physical model can be made with switches, a cell, wires and a bulb.
Make a short video or poster for your community showing how logic circuits work in a burglar alarm and a street light, and explain why they make homes safer.
✎ Practice: Logic circuits
ANSWERS
|
Key inquiry questions: How are logic circuits used in digital devices? What are the real-life applications of logic circuits?
Computer Studies · Grade 11
NETWORKING
You should be able to: identify the standards used in computer networking; describe the protocols in the Transmission Control Protocol/Internet Protocol (TCP/IP) model; explain encapsulation and decapsulation of data across different layers of the network; configure a computer network to establish communication; and appreciate the use of network standards and protocols in computer networking. |
A computer network is a group of computers and devices joined together so that they can share data and resources such as files, printers and an internet connection.
Without standards and protocols, a phone made in one country could not open a website hosted in another. They make communication possible, reliable and secure.
Functions of protocols: addressing devices; breaking data into small parts and putting it back together; detecting and correcting errors; controlling the speed of sending (flow control); finding the best route; and protecting data.
A network model divides communication into layers. Each layer does one job and serves the layer above it. This makes networks easier to design, test and repair.
The OSI model (Open Systems Interconnection) was developed by ISO. It has seven layers. A memory aid from the top: All People Seem To Need Data Processing.
Layer | Name | Main job |
|---|---|---|
7 | Application | Gives network services to the user's programs (web, email) |
6 | Presentation | Formats, compresses and encrypts data |
5 | Session | Opens, manages and closes a conversation between devices |
4 | Transport | Splits data into segments and delivers it reliably |
3 | Network | Adds IP addresses and chooses the route |
2 | Data link | Moves frames between devices on one network using MAC addresses |
1 | Physical | Sends the bits as electrical, light or radio signals |
The TCP/IP model is the practical model used on the internet. It has four layers.

Figure 2.1: The four layers of the TCP/IP model with example protocols
TCP/IP layer | Protocols and devices | Job |
|---|---|---|
Application | HTTP, HTTPS, SMTP, FTP, DNS | Lets programs such as a browser or email app use the network |
Transport | TCP, UDP | Breaks data into segments, controls delivery |
Internet | IPv4, IPv6 | Adds IP addresses and routes packets (done by routers) |
Network access | Ethernet, Wi-Fi, MAC addresses | Sends frames over the cable or radio link |

Figure 2.2: How the seven OSI layers map onto the four TCP/IP layers
Feature | OSI model | TCP/IP model |
|---|---|---|
Number of layers | 7 | 4 |
Developed by | ISO (a reference model) | US Department of Defense; used on the internet |
Use | Mainly for teaching and troubleshooting | The model that real networks use |
Similarities: both models use layers, both have application, transport and network functions, and both rely on standard protocols so that different devices can communicate.
Protocol | Full name | Purpose |
|---|---|---|
HTTP / HTTPS | Hypertext Transfer Protocol (Secure) | Loading web pages; HTTPS encrypts the data |
SMTP | Simple Mail Transfer Protocol | Sending email |
FTP | File Transfer Protocol | Uploading and downloading files |
DNS | Domain Name System | Changes a name such as www.cbcteacher.co.ke into an IP address |
TCP | Transmission Control Protocol | Reliable delivery: checks that every segment arrives and in order |
UDP | User Datagram Protocol | Fast delivery with no checking; used in video calls and games |
IP | Internet Protocol | Addresses and routes packets (IPv4 or IPv6) |
MAC | Media Access Control | Hardware address of the network card on the local network |
Every device on a network needs an IP address. IPv4 addresses have 32 bits, written as four numbers (called octets) between 0 and 255, separated by dots, for example 192.168.1.10. Because there are not enough IPv4 addresses, IPv6 uses 128 bits written in hexadecimal.

Figure 2.3: Structure of an IPv4 address and subnet mask
When you send a message, each layer adds its own header (extra control information) around the data. This is encapsulation. At the receiving computer the layers remove the headers in reverse order. This is decapsulation.

Figure 2.4: Encapsulation at the sender and decapsulation at the receiver
Layer | Unit of data | What is added |
|---|---|---|
Application | Data | The message itself |
Transport | Segment | TCP/UDP header with port numbers and sequence numbers |
Internet | Packet | IP header with source and destination IP addresses |
Network access | Frame | MAC addresses and an error-checking trailer, then sent as bits |
Learners can use real devices or a network simulator (such as Cisco Packet Tracer or other free simulators).
Task 1: Build one LAN. Connect three computers to a switch using straight-through cables. Give each computer an IP address on the same network:
Device | IP address | Subnet mask | Default gateway |
|---|---|---|---|
Computer 1 | 192.168.1.10 | 255.255.255.0 | 192.168.1.1 |
Computer 2 | 192.168.1.11 | 255.255.255.0 | 192.168.1.1 |
Computer 3 | 192.168.1.12 | 255.255.255.0 | 192.168.1.1 |
Task 2: Connect two LANs with a router. Give the second LAN the network 192.168.2.0 and give each router interface the gateway address of its LAN (192.168.1.1 and 192.168.2.1).

Figure 2.5: Two local area networks connected by a router
Task 3: Test and troubleshoot. Use the ping command to test connectivity. A successful ping shows replies from the other computer.
TESTING CONNECTIVITY FROM COMPUTER 1 C:\> ping 192.168.2.10 Reply from 192.168.2.10: bytes=32 time=1ms TTL=127 Reply from 192.168.2.10: bytes=32 time=1ms TTL=127 |
If the ping fails ("Request timed out"), check in this order: (1) cables and lights, (2) IP address and subnet mask are on the same network, (3) the default gateway is correct, (4) the router interfaces are switched on, (5) firewalls are not blocking.
Task 4: Share resources. Share a folder or printer on one computer and open it from another. Always give access only to the people who need it, so that the network stays safe.
Prepare a poster, short video or leaflet for community members explaining how to share a printer or files in a small network and why standards help devices to work together.
✎ Practice: Network standards and protocols
ANSWERS
|
Key inquiry questions: What is the significance of standards in computer networking? How do network protocols enable online activities?
NETWORKING
You should be able to: describe security principles in computer networking; analyse security threats to a computer network; explore control measures used to counter security threats in computer networks; apply security control measures to secure a computer network; and acknowledge the importance of securing a computer network. |
Networks carry school records, marks, mobile money transactions, health records and private messages. Network security is the set of rules and tools used to protect a network and its data from misuse, damage and unauthorised access.
The three basic principles of network security are known as the CIA triad.

Figure 2.6: The CIA triad: three principles of network security
Principle | Meaning | Example |
|---|---|---|
Confidentiality | Only authorised people can read the data | Only the principal can open the exam database |
Integrity | Data stays accurate and is not changed without permission | Nobody can secretly change a learner's marks |
Availability | Authorised users can use the system when they need it | The school portal works during registration |
A threat is anything that can harm a network or its data.
Threat | Description |
|---|---|
Malware | Harmful software: viruses spread by attaching to files, worms spread by themselves, trojans pretend to be useful programs, spyware secretly watches users, and ransomware locks files until money is paid |
Phishing | A fake email, SMS or website that tricks people into giving passwords or bank details |
Hacking | Unauthorised access to a computer or network |
Denial of Service (DoS/DDoS) | Flooding a server with requests so that real users cannot reach it |
Password attacks | Guessing or stealing passwords |
Eavesdropping (sniffing) | Secretly capturing data as it travels through the network, for example on an open Wi-Fi |
Social engineering | Tricking people into giving away secrets |
Insider threats | A careless or dishonest user inside the organisation |
A control measure is a method used to prevent, detect or reduce the effect of a threat.

Figure 2.7: Matching common threats with control measures
Control measure | How it protects the network |
|---|---|
Firewall | Filters traffic between the internet and the network and blocks unwanted connections |
Intrusion detection system (IDS) | Watches network traffic and raises an alarm when it sees suspicious activity |
Encryption | Scrambles data so that only someone with the key can read it |
Access control | Allows only authorised users, using usernames, strong passwords, biometrics (fingerprints) or two-step verification |
Anti-malware and antivirus software | Finds and removes viruses, worms and other harmful programs |
Software updates (patches) | Fix weaknesses that attackers could use |
Backups | Keep copies of data so that it can be restored after an attack or failure |
Audits and logs | Record who did what, so that unusual activity can be found |
User training | Teaches users to avoid phishing and to use safe passwords |

Figure 2.8: A firewall placed between the internet and a school network
A firewall checks every packet against a set of rules. Allowed traffic (such as web browsing) passes through. Blocked traffic (such as a connection from an unknown address) is dropped.
Encryption changes readable data (plaintext) into unreadable data (ciphertext) using a key. Decryption changes it back.

Figure 2.9: Encryption and decryption using a key
WORKED EXAMPLE: CAESAR CIPHER In a Caesar cipher each letter is shifted forward by a fixed number of places. With a shift (key) of 3: A → D, B → E, C → F and so on. The word KENYA becomes NHQBD (K → N, E → H, N → Q, Y → B, A → D). To decrypt, shift each letter back by 3. |
Modern networks use much stronger encryption. For example HTTPS encrypts web traffic and WPA2/WPA3 encrypts Wi-Fi.
Learners can secure a simulated or school network by following these steps:
A STRONG PASSWORD Use at least 12 characters, mixing capital letters, small letters, numbers and symbols. Do not use your name, birth date or "1234". Never share your password, and use a different password for each account. |
If a network is too strict, authorised people may be locked out and the work slows down. If it is too open, attackers can get in. Organisations must balance security and accessibility: give each user the access they need, protect sensitive data with extra controls, and review the rules regularly.
Prepare a poster, short talk or video that sensitises community members about phishing and safe use of mobile money and public Wi-Fi.
✎ Practice: Network security
ANSWERS
|
Key inquiry questions: What security practices are essential in network security? Why is it important for organisations to find a balance between network security and accessibility?
Computer Studies · Grade 11
SOFTWARE
You should be able to: explain principles of object oriented programming; describe a class and an object in object oriented programming; use Unified Modeling Language (UML) to represent a class; and acknowledge the importance of object oriented programming in software development. |
A program is a set of instructions that tells a computer what to do. A programming paradigm is a style of writing programs. In procedural programming a program is a list of steps (functions) that work on data. In object oriented programming (OOP) a program is built from objects: self-contained units that keep their data and the actions that work on that data together, just like real things around us.

Figure 3.1: Procedural programming compared with object oriented programming
Feature | Procedural programming | Object oriented programming |
|---|---|---|
Main unit | Functions (steps) | Objects (data and actions together) |
Data | Often shared by all functions, so it is easy to change by mistake | Hidden inside objects and protected |
Reuse of code | Copying and calling functions | Inheritance and classes can be reused |
Best for | Small, simple programs | Large programs written by many people |
Languages | C, Pascal, BASIC | Python, Java, C++, C# |
Selecting an OOP language. Choose a language by looking at the type of program (mobile app, web, game), how easy it is to learn, the libraries and tools available, the support from the community, speed, and the computers it must run on. Python is a good first OOP language because its code is short and easy to read, and these notes use Python for examples. Java is widely used for Android apps and school projects, and C++ is used for games and system software.
A class is a blueprint or template that describes what a group of similar things have and can do. An object is a particular instance of a class, a real thing made from the blueprint.
Class | Attributes | Methods | Example objects |
|---|---|---|---|
Student | name, admissionNo, marks | enrol(), calculateGrade() | Wanjiku (Adm 101), Otieno (Adm 102) |
Phone | brand, batteryLevel, number | call(), sendSms(), charge() | Tecno Spark, Samsung A15 |
Book | title, author, isbn | borrow(), return() | "Blossoms of the Savannah" |
Matatu | plateNumber, seats, route | start(), pickPassenger() | KDD 123X |
A class is a plan; the objects are the things built from it. One class can create many objects, and each object has its own values of the attributes.
Unified Modeling Language (UML) is a standard way of drawing the design of a program. A class diagram is a rectangle divided into three compartments: the class name (top), the attributes (middle) and the methods (bottom). A symbol shows who can use each member: + means public (anyone), − means private (only the class itself) and # means protected (the class and its sub-classes).

Figure 3.2: A UML class diagram for Student and two objects made from it
An object is shown in a box with its name and class underlined as objectName : ClassName, followed by the values of its attributes.
OOP rests on four main principles.

Figure 3.3: The four principles of object oriented programming
Principle | Meaning | Real-life example |
|---|---|---|
Abstraction | Show only the important features and hide the details | You press the send button on a phone without knowing how the network carries the message |
Encapsulation | Bundle data and methods together and protect the data from direct, unsafe access | An ATM lets you withdraw money, but you cannot change the balance directly |
Inheritance | A new class (child) takes the attributes and methods of an existing class (parent) and may add its own | Dog and Cat inherit from Animal |
Polymorphism | The same method name behaves differently in different classes ("many forms") | speak() makes a dog bark and a cat meow |
Prepare a poster or short video for your community explaining, with local examples such as a Matatu class and a Farmer class, how OOP helps programmers build useful software.
✎ Practice: OOP concepts
ANSWERS
|
Key inquiry questions: Why is OOP widely used in software development? How can real-life problems be represented using OOP principles?
SOFTWARE
You should be able to: describe the syntax of an object oriented programming language; write a program that implements a class and an object; write a program that implements class relationships; write a program that implements the principles of OOP; and appreciate the use of object oriented programming in problem solving. |
All examples use Python. Type them in an editor such as IDLE, Thonny or VS Code, and run them. In Python, a block of code is shown by indentation (four spaces), and the first line of a block ends with a colon (:). The same ideas work in Java and C++, with different syntax.
A class is written with the keyword class. The special method __init__() is the constructor: it runs automatically when an object is created and sets the starting values. self refers to the object itself.
A STUDENT CLASS class Student: school = "Mwangaza Senior School" # class (static) variable def __init__(self, name, marks): # constructor self.name = name # instance variable self.marks = marks def grade(self): # method if self.marks >= 70: return "A" elif self.marks >= 50: return "B" return "C" s1 = Student("Wanjiku", 78) # create an object s2 = Student("Otieno", 55) print(s1.name, s1.grade()) # Wanjiku A print(s2.name, s2.grade()) # Otieno B print(Student.school) # Mwangaza Senior School |
Term | Meaning |
|---|---|
Instance variable | Belongs to one object (e.g. name); every object has its own copy |
Static (class) variable | Shared by all objects of the class (e.g. school) |
Constructor | The method that creates and sets up a new object |
Method | A function written inside a class |
Visibility decides which code may use a member of a class. Java and C++ use the words public, private and protected. In Python it is shown with underscores in the name.
Level | Meaning | In Python |
|---|---|---|
Public | Any code may use it | name |
Protected | Only the class and its sub-classes should use it | _name (single underscore) |
Private | Only the class itself can use it | __name (double underscore) |
By making data private and giving public methods to use it, a class controls how the data is changed.
PROTECTING AN ACCOUNT BALANCE class Account: def __init__(self, owner, balance=0): self.owner = owner self.__balance = balance # private def deposit(self, amount): if amount > 0: self.__balance += amount def withdraw(self, amount): if 0 < amount <= self.__balance: self.__balance -= amount else: print("Not enough money") def get_balance(self): return self.__balance acc = Account("Achieng", 1000) acc.deposit(500) acc.withdraw(300) print(acc.get_balance()) # 1200 acc.withdraw(5000) # Not enough money |
Outside the class, the statement `acc.__balance = 0` cannot change the real balance, so the data is safe.
A child class is written with the parent class in brackets. The child can override (replace) a method of the parent so that the same name gives different results. This is polymorphism.

Figure 3.4: Dog and Cat inherit from Animal and override speak()
INHERITANCE AND METHOD OVERRIDING class Animal: def __init__(self, name): self.name = name def speak(self): print(self.name, "makes a sound") class Dog(Animal): def speak(self): print(self.name, "barks") class Cat(Animal): def speak(self): print(self.name, "meows") for a in [Dog("Rex"), Cat("Tom"), Animal("Pet")]: a.speak() # Rex barks # Tom meows # Pet makes a sound |
Classes in a program are connected to each other. The three common relationships are:

Figure 3.5: Association, aggregation and composition
Relationship | Meaning | Example |
|---|---|---|
Association | One class uses or knows another; both exist independently | A Teacher teaches a Student |
Aggregation | A "has-a" relationship where the parts can exist without the whole | A Library has Books; if the library closes, the books still exist |
Composition | A strong "has-a" relationship where the parts cannot exist without the whole | A House has Rooms; if the house is destroyed, the rooms are gone |
AGGREGATION: A LIBRARY HOLDS BOOK OBJECTS class Book: def __init__(self, title, author): self.title = title self.author = author self.available = True class Library: def __init__(self): self.books = [] # the library holds books def add_book(self, book): self.books.append(book) def borrow(self, title): for b in self.books: if b.title == title and b.available: b.available = False return "Borrowed " + title return "Not available" lib = Library() lib.add_book(Book("Blossoms of the Savannah", "Henry Ole Kulet")) print(lib.borrow("Blossoms of the Savannah")) # Borrowed Blossoms of the Savannah print(lib.borrow("Blossoms of the Savannah")) # Not available |
COMPOSITION: A CAR CREATES ITS OWN ENGINE class Engine: def start(self): print("Engine started") class Car: def __init__(self): self.engine = Engine() # the Engine belongs to this Car def drive(self): self.engine.start() print("Car is moving") Car().drive() # Engine started # Car is moving |
Follow these steps to design a program:
✎ Practice: OOP implementation
ANSWERS
|
Key inquiry questions: How do the principles of object oriented programming facilitate solving real-life problems? What is the importance of classes and objects in OOP?
SOFTWARE
You should be able to: explain the types of database models used in computing; create a database for a real life task; represent a database structure in an entity relationship diagram; and acknowledge the importance of relational databases in computing. |
Data is raw facts. Information is data that has been processed to give meaning. A database is an organised collection of related data that is stored electronically so that it can be searched, updated and shared easily. A Database Management System (DBMS) is the software used to create, manage and protect a database. Examples of DBMS software are MySQL, Microsoft Access, Microsoft SQL Server, Oracle and PostgreSQL.

Figure 3.6: Components of a database system
Term | Meaning |
|---|---|
Table (entity) | A grid that stores data about one type of thing, e.g. Student |
Record (row) | All the data about one item, e.g. one learner |
Field (column or attribute) | One piece of data about every item, e.g. name |
Data dictionary | A list that describes every table and field: its name, data type and size |
Metadata | "Data about data", such as the field type and length |
Data types | The kind of data a field holds: text (VARCHAR), whole number (INT), decimal number, date, true/false (BOOLEAN) |
Why not use paper or a single spreadsheet? A database reduces repeated data (redundancy), keeps data correct and consistent (integrity), allows many people to use it at once, protects data with passwords and permissions, and answers questions quickly.
A database model describes how data is organised and connected.

Figure 3.7: Four database models
Model | How data is organised | Example use |
|---|---|---|
Hierarchical | A tree: each child has one parent | A school folder structure; organisation charts |
Network | A graph: each record can have many parents and children | Telecommunication and transport networks |
Relational | Data stored in tables that are linked by common fields (keys) | School records, banking, shops. The most widely used model |
Object-oriented | Data stored as objects with attributes and methods | Multimedia and engineering databases |
A key is a field (or group of fields) used to identify records and link tables.
Key | Meaning | Example |
|---|---|---|
Primary key | A field that identifies each record uniquely; it cannot repeat or be empty | admNo in Student |
Foreign key | A field in one table that is the primary key of another table; it links the two tables | classId in Student (primary key in Class) |
Composite key | A primary key made from two or more fields together | bookId + memberId in a Loan table |
Secondary key | A field that is not unique but is used to search or sort records quickly | name or phone number |

Figure 3.8: Primary and foreign keys linking two tables
An entity is a person, place, thing or event about which data is stored (for example Learner, Teacher, Book). Its attributes are its properties (name, admission number). A relationship is the link between two entities. There are three kinds.

Figure 3.9: Types of relationships between entities
Relationship | Meaning | Example |
|---|---|---|
One-to-one (1:1) | One record in A matches one record in B | One Learner has one School ID card |
One-to-many (1:M) | One record in A matches many records in B | One Class has many Learners |
Many-to-many (M:M) | Many records in A match many records in B | Many Learners study many Subjects |
A many-to-many relationship is split into two one-to-many relationships by adding a linking (junction) table. For example the Marks table links Learner and Subject.
An entity relationship diagram is a drawing that shows the entities, their attributes and their relationships. Rectangles show entities, lines show relationships, and the symbols at the ends of the lines show one or many.

Figure 3.10: An entity relationship diagram for a school database
EXAMPLE: A SCHOOL LIBRARY Step 1: Identify entities. Book, Member and Loan. Step 2: List attributes. Book (bookId, title, author), Member (memberId, name, class), Loan (loanId, bookId, memberId, dateBorrowed). Step 3: Choose primary keys. bookId, memberId and loanId. Step 4: Link the tables with foreign keys. bookId and memberId in the Loan table. Step 5: Draw the ERD. Member 1:M Loan and Book 1:M Loan (so Member and Book are many-to-many). Step 6: Create the tables in a DBMS (Section 3.4), enter sample data, and test the queries. |
bookId | title | author |
|---|---|---|
B01 | Blossoms of the Savannah | Henry Ole Kulet |
B02 | The River and the Source | Margaret Ogola |
loanId | bookId | memberId | dateBorrowed |
|---|---|---|---|
L1 | B01 | M10 | 2026-02-03 |
L2 | B02 | M12 | 2026-02-04 |
Create an operational database for a community group, such as a table-banking group or a school canteen, with at least two linked tables, and show members how to use it.
✎ Practice: Relational databases
ANSWERS
|
Key inquiry questions: Why are relational databases preferred for organisational data management? How are relational database applications applied in real-life situations?
SOFTWARE
You should be able to: describe types of structured query language statements; perform structured query language operations in a database; and appreciate the use of structured query language in database management. |
Structured Query Language (SQL) is the standard language used to create, change and ask questions about data in a relational database. It is used by MySQL, Microsoft SQL Server, Oracle, Sybase and many other systems. SQL commands are not case-sensitive, but it is a good habit to write the SQL keywords in capital letters, and every statement normally ends with a semicolon (;).

Figure 3.11: Types of SQL statements and their main commands
Type | Full name | Purpose | Commands |
|---|---|---|---|
DDL | Data Definition Language | Creates and changes the structure of a database | CREATE, ALTER, DROP, RENAME |
DML | Data Manipulation Language | Adds, changes and removes the data in tables | INSERT, UPDATE, DELETE |
DQL | Data Query Language | Retrieves data | SELECT |
The examples below use two tables: Class and Student.
classId | teacher |
|---|---|
4A | Mrs Mwangi |
4B | Mr Otieno |
admNo | name | classId | marks |
|---|---|---|---|
101 | Wanjiku | 4A | 78 |
102 | Otieno | 4A | 55 |
103 | Achieng | 4B | 91 |
104 | Kamau | 4B | 64 |
105 | Halima | 4A | 70 |
CREATE TABLE CREATE TABLE Class ( classId VARCHAR(2) PRIMARY KEY, teacher VARCHAR(40) ); CREATE TABLE Student ( admNo INT PRIMARY KEY, name VARCHAR(50) NOT NULL, classId VARCHAR(2), marks INT, FOREIGN KEY (classId) REFERENCES Class(classId) ); |
The FOREIGN KEY line creates a one-to-many relationship: one class can have many learners. A one-to-one relationship is created by making the foreign key also UNIQUE. A many-to-many relationship is made with a junction table that holds two foreign keys.
ALTER, RENAME AND DROP ALTER TABLE Student ADD phone VARCHAR(15); -- add a column ALTER TABLE Student RENAME TO Learner; -- rename a table (MySQL) DROP TABLE Learner; -- delete the table completely |
Note: DROP removes the table and all its data, so use it with great care.
INSERT, UPDATE AND DELETE INSERT INTO Class VALUES ('4A', 'Mrs Mwangi'); INSERT INTO Student (admNo, name, classId, marks) VALUES (101, 'Wanjiku', '4A', 78); UPDATE Student SET marks = 60 WHERE admNo = 102; -- change a value DELETE FROM Student WHERE admNo = 104; -- remove a record |
ALWAYS USE WHERE `UPDATE` or `DELETE` without a WHERE clause changes or deletes every record in the table. |
BASIC QUERIES SELECT * FROM Student; -- all columns, all rows SELECT name, marks FROM Student; -- chosen columns SELECT name, marks FROM Student WHERE marks >= 70; SELECT name, marks FROM Student ORDER BY marks DESC; SELECT name FROM Student WHERE name LIKE 'A%'; -- names starting with A SELECT name FROM Student WHERE classId = '4A' AND marks >= 60 ORDER BY name; |
Query | Result |
|---|---|
SELECT name, marks FROM Student WHERE marks >= 70; | Wanjiku 78, Achieng 91, Halima 70 |
SELECT name, marks FROM Student ORDER BY marks DESC; | Achieng 91, Wanjiku 78, Halima 70, Kamau 64, Otieno 55 |
SELECT name FROM Student WHERE name LIKE 'A%'; | Achieng |
AGGREGATE FUNCTIONS AND GROUP BY SELECT COUNT(*) FROM Student; -- number of records SELECT MAX(marks), MIN(marks), AVG(marks) FROM Student; SELECT classId, COUNT(*), AVG(marks) FROM Student GROUP BY classId; |
classId | COUNT(*) | AVG(marks) |
|---|---|---|
4A | 3 | 67.67 |
4B | 2 | 77.5 |
A JOIN combines rows from two tables using the linked key.
INNER JOIN SELECT Student.name, Class.teacher FROM Student INNER JOIN Class ON Student.classId = Class.classId; |
The result lists each learner beside their class teacher, for example Wanjiku with Mrs Mwangi and Achieng with Mr Otieno.
Learners can make an SQL database for a community group (for example a self-help group's members and contributions), use INSERT to enter data, UPDATE to correct it, and SELECT with GROUP BY to prepare reports such as total contributions per member.
✎ Practice: SQL
ANSWERS
|
Key inquiry questions: How are SQL skills essential in database management? Why is SQL considered a powerful tool in data management?
SOFTWARE
You should be able to: explain the terminologies used in web development; describe the structure of a web application in hypertext markup language; design a web application using appropriate tools; develop a dynamic web application to solve a real-life problem; and acknowledge the importance of web applications in society. |
Term | Meaning |
|---|---|
Web page | A single document on the web, written in HTML and viewed in a browser |
Website | A collection of related web pages under one domain name, e.g. www.cbcteacher.co.ke |
Web application | A program that runs in a browser and lets users do tasks, such as online registration or mobile banking |
HTML | Hypertext Markup Language: the language that describes the structure and content of a web page |
CSS | Cascading Style Sheets: describes the appearance (colours, fonts, layout) |
Client-side scripting | Code that runs in the user's browser, e.g. JavaScript, for buttons and form checks |
Server-side scripting | Code that runs on the web server, e.g. PHP (Hypertext Preprocessor), to process forms and use databases |
Static web page | The content is fixed and is the same for everyone |
Dynamic web page | The content is created by a program and may change for each user or time, e.g. a results portal |
Client-server model | The client (browser) sends a request and the server sends back a response |

Figure 3.12: How a browser and a web server communicate
HTML uses tags in angle brackets, usually in pairs: an opening tag and a closing tag (with a slash). An element is the opening tag, the content and the closing tag. A tag may have attributes that give extra information, written as name="value".

Figure 3.13: The structure of an HTML document
A SIMPLE WEB PAGE (INDEX.HTML) <!DOCTYPE html> <html> <head> <title>My School</title> </head> <body> <h1>Welcome to Mwangaza Senior School</h1> <p>We learn, we serve and we grow.</p> <img src="logo.png" alt="School logo" width="120"> <a href="about.html">About us</a> </body> </html> |
Element | Purpose |
|---|---|
`<head>` | Holds information about the page, such as the `<title>` shown on the browser tab |
`<body>` | Holds everything that is displayed on the page |
`<h1>` to `<h6>` | Headings, from the biggest to the smallest |
`<p>` | A paragraph |
`<a href="...">` | A link to another page |
`<img src="..." alt="...">` | An image; the alt text describes it |
`<ul>`, `<ol>`, `<li>` | Bulleted list, numbered list and list item |
`<table>`, `<tr>`, `<th>`, `<td>` | A table, a row, a heading cell and a data cell |
`<form>`, `<input>` | A form and its input boxes |
`<iframe>` | A frame that shows another page inside this page |
A LIST AND A TABLE <ul> <li>Computer Studies</li> <li>Mathematics</li> </ul> <table border="1"> <tr><th>Name</th><th>Marks</th></tr> <tr><td>Wanjiku</td><td>78</td></tr> </table> |
CSS can be added in three ways.
Method | Where the CSS is written | Use |
|---|---|---|
Inline | In the `style` attribute of one tag | Changing one element only |
Internal | Inside a `<style>` tag in the `<head>` | Styling one page |
External | In a separate `.css` file linked with `<link>` | Styling a whole website (best) |
INTERNAL CSS <style> body { background-color: #f4f8f5; font-family: "Times New Roman", serif; } h1 { color: darkgreen; text-align: center; } p { font-size: 18px; } </style> |
A CSS rule has a selector (what to style), then properties and values in curly brackets.
Before coding, plan the design with a wireframe (a simple sketch of the page layout), a site map (a diagram showing how the pages are linked) and a prototype (a model that can be clicked).

Figure 3.14: Wireframe and site map for a school website
Design principles: keep the layout simple and consistent; use readable fonts and strong colour contrast; make the site work on phones (responsive design); give every image alt text; keep navigation clear.
A dynamic web application uses an HTML form to collect data, a server-side script (such as PHP) to process it, and a database (such as MySQL) to store it.

Figure 3.15: Data flow in a dynamic web application
THE HTML FORM (REGISTER.HTML) <form action="save.php" method="post"> Name: <input type="text" name="name"><br> Marks: <input type="number" name="marks"><br> <input type="submit" value="Save"> </form> |
THE PHP SCRIPT THAT SAVES THE DATA (SAVE.PHP) <?php $conn = new mysqli("localhost", "root", "", "school"); if ($conn->connect_error) { die("Connection failed"); } $name = $_POST["name"]; $marks = (int) $_POST["marks"]; $stmt = $conn->prepare("INSERT INTO Student (name, marks) VALUES (?, ?)"); $stmt->bind_param("si", $name, $marks); $stmt->execute(); echo "Record saved"; $conn->close(); ?> |
The script uses a prepared statement (the `?` marks) so that a user cannot damage the database by typing harmful SQL into the form. This protects against SQL injection.
Using a local server. Install a package such as XAMPP or WAMP, which gives you a web server (Apache), PHP and MySQL on your own computer. Put your files in the server's `htdocs` folder and open them at `http://localhost/` in a browser.
Web applications let people pay bills, register for exams (KNEC), apply for services (eCitizen), shop, learn online and run a business from anywhere. They save time and cost and reach many people at once.
Design and publish a simple local website or web application for a community need (for example a school notice board, a youth group register or a farmers' price list). Sensitise community members on how to use it safely.
✎ Practice: Web development
ANSWERS
|
Key inquiry questions: What design principles should be considered when creating a web application? How can a web application be used to solve real-life problems?
Quick Revision
Topic | Key points to remember |
|---|---|
Data units | 1 byte = 8 bits; 1 KB = 1,024 bytes; each unit is 1,024 times the one before |
Number systems | Decimal 10, binary 2, octal 8, hexadecimal 16 (A = 10 to F = 15) |
Conversions | Decimal to other bases: divide repeatedly, read remainders upwards. To decimal: add the positional values. Binary to octal: groups of 3. Binary to hexadecimal: groups of 4 |
Coding schemes | ASCII 7 or 8 bits (A = 65); EBCDIC 8 bits; BCD 4 bits per decimal digit |
Binary addition | 0+0=0; 0+1=1; 1+1=10 (write 0, carry 1); 1+1+1=11 |
Signed numbers | Sign bit 0 = positive, 1 = negative. One's complement: flip bits. Two's complement: flip bits and add 1. 8-bit two's complement range −128 to +127 |
Logic gates | AND (both 1), OR (at least one 1), NOT (opposite), NAND, NOR, XOR (different), XNOR (same) |
Logic circuits | Join gates; truth table has 2ⁿ rows; Boolean expression from the circuit or from the sum of products |
Topic | Key points to remember |
|---|---|
Standards and protocols | Standard = agreed specification; protocol = rules for sending data |
TCP/IP layers | Application, Transport, Internet, Network access |
OSI layers | Application, Presentation, Session, Transport, Network, Data link, Physical |
Encapsulation | Data, segment, packet, frame, bits; decapsulation is the reverse |
IP addressing | IPv4 has 4 octets (0 to 255); subnet mask; default gateway; test with ping |
CIA triad | Confidentiality, Integrity, Availability |
Controls | Firewall, IDS, encryption, access control, antivirus, updates, backups, audits |
Topic | Key points to remember |
|---|---|
OOP | Class = blueprint; object = instance; attributes = data; methods = actions |
Four principles | Abstraction, encapsulation, inheritance, polymorphism |
UML | Three compartments: name, attributes, methods; + public, − private, # protected |
Relationships | Association (uses), aggregation (has-a, parts exist alone), composition (has-a, parts cannot exist alone) |
Database keys | Primary (unique), foreign (links tables), composite (two or more fields), secondary (search) |
Relationships (data) | One-to-one, one-to-many, many-to-many (needs a linking table) |
SQL | DDL: CREATE, ALTER, DROP. DML: INSERT, UPDATE, DELETE. DQL: SELECT |
Web | HTML = structure; CSS = appearance; PHP = server-side; client sends request, server sends response |
© 2026 Tr Boen. For personal study and classroom use. Please do not redistribute this material.