Form Three Computer Science Notes
Chapter One: Data Representation · Ordinary Level (Form Three) · Study Notes. Read this chapter free, then continue every chapter in the Click Online Academy app.
All Form Three Computer Science Chapters
- Chapter 1Data RepresentationRead below · Free
- Chapter 2Computer ProgrammingContinue in the app
- Chapter 3Computer NetworksContinue in the app
- Chapter 4Database and Database Management SystemContinue in the app
Learning Outcomes
By the end of this chapter, you should be able to:
- explain the concept of data representation and the difference between data and information;
- describe bits, bytes and larger storage units;
- identify the four main number systems (decimal, binary, octal, hexadecimal) and convert between them;
- perform binary addition and subtraction;
- explain ASCII and Unicode and why Unicode matters for Kiswahili and other languages;
- apply knowledge of data representation to everyday digital technology.
Key Terms and Concepts
| Term | Meaning |
|---|---|
| Data | Raw facts, figures or symbols that have not yet been processed. Examples: 17, “Juma”, 1001101. |
| Information | Data that has been processed and organised so that it is meaningful and useful. Example: “Juma is 17 years old.” |
| Data Representation | The method used to store, process and transmit data inside a computer using binary digits (0s and 1s). |
| Bit (Binary Digit) | The smallest unit of data in a computer. It can only be 0 or 1. |
| Byte | A group of 8 bits. It is the basic unit used to measure storage size. |
| Number System | A way of writing numbers using a fixed set of digits and a base (radix). Common systems: decimal, binary, octal, hexadecimal. |
| ASCII | American Standard Code for Information Interchange – a character-coding system that uses 7 bits to represent 128 English characters and symbols. |
| Unicode | A modern character-coding standard that can represent characters from almost every writing system in the world, including Kiswahili letters and emojis. |
1. Concept of Data Representation
Data are the raw materials of computing – numbers, letters, symbols, images, sounds and video that a computer receives. On their own they have little meaning.
Data representation is the way these raw materials are turned into a form that the computer’s electronic circuits can understand and process. All modern computers use digital (binary) representation.
Difference Between Data and Information
| Aspect | Data | Information |
|---|---|---|
| Meaning | Raw, unprocessed facts | Processed, meaningful facts |
| Example | 25, 30, 28 | Average temperature is 27.7 °C |
| Usefulness | Limited until processed | Ready for decision-making |
| Form | Numbers, text, signals | Reports, charts, messages |
Why Computers Represent Data Digitally
- Electronic circuits are reliable when they only have two clear states: ON (1) and OFF (0).
- Binary signals are less affected by noise and interference than continuous (analogue) signals.
- Digital data can be copied, stored and transmitted without loss of quality.
- It is easy to design hardware and software that work with only two symbols.
Bits, Nibbles, Bytes and Larger Units
A bit is the smallest piece of digital data. It can hold only one of two values: 0 (OFF / false / low voltage) or 1 (ON / true / high voltage). All data inside a computer is ultimately stored as long strings of bits.
| Unit | Symbol | Size | Approx. Equivalent |
|---|---|---|---|
| Bit | b | 1 binary digit | 0 or 1 |
| Nibble | – | 4 bits | Half a byte |
| Byte | B | 8 bits | One character (approx.) |
| Kilobyte | KB | 1 024 bytes | Half a page of text |
| Megabyte | MB | 1 024 KB | One short song (MP3) |
| Gigabyte | GB | 1 024 MB | One hour of video |
| Terabyte | TB | 1 024 GB | Large hard-disk capacity |
Types of Digital Data and Data Types
- Numbers – integers and real numbers used in calculations.
- Text – letters, digits and symbols that form words and sentences.
- Images – still pictures made of coloured dots (pixels).
- Audio – sound waves sampled and stored as numbers.
- Video – sequences of images plus audio played at high speed.
Programming languages classify data so the computer knows how to treat them: Integer, Real/Decimal, Character, String, Boolean (True/False).
TEST YOUR UNDERSTANDING
Q1. What is the main difference between data and information?
Q2. Why do computers use binary (0 and 1) instead of decimal numbers?
Q3. How many bits are in 2 bytes? How many bytes are in 1 kilobyte?
2. Number Systems and Their Representation
A number system is a method of writing numbers using a limited set of symbols (digits) and rules. The most important property is its base (also called radix). In positional notation the value of a digit depends on its position; moving one place to the left multiplies the value by the base.
The Four Number Systems You Must Know
Decimal Number System (Base 10)
- Digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
- Used by humans in everyday life
- Each place is a power of 10
Binary Number System (Base 2)
- Digits: 0 and 1 only
- The native language of computers
- Each place is a power of 2: … 16, 8, 4, 2, 1
Octal Number System (Base 8)
- Digits: 0–7
- Sometimes used as a shorter way to write binary
- Each place is a power of 8
Hexadecimal Number System (Base 16)
- Digits: 0–9 and A, B, C, D, E, F (where A=10, B=11 … F=15)
- Very common in computing (memory addresses, colour codes, MAC addresses)
- Each place is a power of 16
TEST YOUR UNDERSTANDING
Q4. What is the base of the binary number system? Which digits are allowed?
Q5. In hexadecimal, what decimal value does the digit ‘C’ represent?
Q6. Why is hexadecimal popular among computer programmers?
3. Conversion Between Number Systems
Binary → Decimal
Write the place values (powers of 2) under each bit and add the values where the bit is 1.
Place values: 16 8 4 2 1
Bits: 1 0 1 1 0
Calculation: 16 + 0 + 4 + 2 + 0 = 22₁₀
Decimal → Binary (Repeated Division)
Divide the decimal number by 2 repeatedly and record the remainders. Read the remainders from bottom to top.
25 ÷ 2 = 12 remainder 1
12 ÷ 2 = 6 remainder 0
6 ÷ 2 = 3 remainder 0
3 ÷ 2 = 1 remainder 1
1 ÷ 2 = 0 remainder 1
Reading remainders upwards: 11001₂
Hexadecimal → Decimal
A = 10, so 10×16¹ + 3×16⁰ = 160 + 3 = 163₁₀
Decimal → Hexadecimal
Use repeated division by 16. Remainders 10–15 are written as A–F.
45 ÷ 16 = 2 remainder 13 (D)
2 ÷ 16 = 0 remainder 2
Reading upwards: 2D₁₆
Binary ↔ Hexadecimal (Shortcut)
Group binary digits in sets of four (starting from the right). Convert each group to its hex equivalent.
| Binary | Hex | Binary | Hex |
|---|---|---|---|
| 0000 | 0 | 1000 | 8 |
| 0001 | 1 | 1001 | 9 |
| 0010 | 2 | 1010 | A |
| 0011 | 3 | 1011 | B |
| 0100 | 4 | 1100 | C |
| 0101 | 5 | 1101 | D |
| 0110 | 6 | 1110 | E |
| 0111 | 7 | 1111 | F |
Group: 1101 0110 → D 6 → D6₁₆
TEST YOUR UNDERSTANDING
Q7. Convert 1101₂ to decimal.
Q8. Convert 19₁₀ to binary using repeated division.
Q9. Convert 10101101₂ to hexadecimal.
4. Binary Arithmetic
Rules of Binary Addition
- 0 + 0 = 0
- 0 + 1 = 1
- 1 + 0 = 1
- 1 + 1 = 0 and carry 1 to the next column
- 1 + 1 + 1 = 1 and carry 1
1110
+ 0111
------
10101 (= 21₁₀)
Rules of Binary Subtraction
- 0 – 0 = 0
- 1 – 0 = 1
- 1 – 1 = 0
- 0 – 1 → borrow 1 from the left (the 0 becomes 10₂ which is 2₁₀), so 10₂ – 1 = 1
1000
– 0011
------
0101 (= 5₁₀)
Always convert the binary numbers and the answer back to decimal and verify that the arithmetic is correct. This catches most common errors.
TEST YOUR UNDERSTANDING
Q10. Add: 1011₂ + 0110₂
Q11. Subtract: 1100₂ – 0101₂
5. Character Coding: ASCII and Unicode
Computers only understand numbers. To store letters, digits and symbols we must give each character a unique numeric code. This process is called character coding (or character encoding).
ASCII
- American Standard Code for Information Interchange
- Uses 7 bits → 128 possible characters (0–127)
- Covers English uppercase & lowercase letters, digits 0–9, punctuation and control codes
| Character | ASCII Code | Binary |
|---|---|---|
| A | 65 | 1000001 |
| B | 66 | 1000010 |
| a | 97 | 1100001 |
| 0 | 48 | 0110000 |
| Space | 32 | 0100000 |
Unicode
- Designed to support every writing system in the world
- Can represent over 1 million characters
- Includes Latin, Arabic, Chinese, Kiswahili letters, emojis, mathematical symbols, etc.
- Common encodings: UTF-8 (most popular on the web) and UTF-16
Differences Between ASCII and Unicode
| Feature | ASCII | Unicode |
|---|---|---|
| Number of bits | 7 (or 8 extended) | 8–32 (UTF-8/16/32) |
| Characters available | 128 (or 256) | Over 1 million |
| Languages supported | Mainly English | Almost all languages |
| Kiswahili support | Limited | Full |
| Emojis | No | Yes |
TEST YOUR UNDERSTANDING
Q12. What does ASCII stand for?
Q13. Give two advantages of Unicode over ASCII.
Chapter Summary
- Data are raw facts; information is processed, meaningful data.
- Computers represent all data digitally using bits (0 and 1) because two-state electronics are reliable and noise-resistant.
- Storage units: bit → nibble (4 bits) → byte (8 bits) → KB → MB → GB → TB (powers of 1024).
- Main digital data types: numbers, text, images, audio, video. Programming data types include integer, real, character, string and Boolean.
- Number systems: Decimal (base 10), Binary (base 2), Octal (base 8), Hexadecimal (base 16). Each uses positional (place-value) notation.
- Conversion methods: place-value addition (to decimal) and repeated division (from decimal). Binary ↔ Hex is done by grouping bits in fours.
- Binary addition and subtraction follow simple rules with carry and borrow; always verify by converting to decimal.
- ASCII encodes 128 English characters with 7 bits. Unicode encodes virtually every character in the world (including Kiswahili) and is the modern standard.
- Understanding data representation is essential for everything digital – from phone storage to AI systems.
Enjoying this chapter? Practice questions, progress tracking and the remaining chapters are waiting in the app.
Continue in the appEnd-of-Topic Questions
Attempt all questions in your exercise book before checking the suggested answers. (New Syllabus 2027)
- Section A: Multiple choice. (i) The smallest unit of data in a computer is called a: A. Byte B. Bit C. Nibble D. Kilobyte. (ii) Which of the following is NOT a valid digit in the octal number system? A. 0 B. 5 C. 7 D. 8. (iii) The binary equivalent of decimal 13 is: A. 1101₂ B. 1011₂ C. 1110₂ D. 1001₂. (iv) ASCII uses how many bits to represent a character? A. 4 B. 7 C. 16 D. 32. (v) 1 Kilobyte is equal to: A. 1000 bytes B. 1024 bits C. 1024 bytes D. 1000 bits. (5 marks)
- Match the items: (i) Bit (ii) Byte (iii) ASCII (iv) Unicode (v) Hexadecimal. Column B: A. 8 bits B. Supports almost every language C. Smallest unit of data D. Base 16 E. 7-bit English character code. (5 marks)
- (a) Define data representation. (2) (b) State three reasons why computers use binary. (3) (c) Convert 101101₂ to decimal. (2)
- (a) Convert 42₁₀ to binary. (2) (b) Convert 1A₁₆ to decimal. (2) (c) Convert 10101101₂ to hexadecimal. (2)
- Perform the binary operations and check in decimal: (a) 1101₂ + 1011₂ (3) (b) 10010₂ – 01101₂ (3)
- (a) Explain two differences between ASCII and Unicode. (4) (b) Why is Unicode important for Tanzanian students and software? (3)
- A student types the word “HI” on a computer. (a) Using ASCII, state the decimal codes for ‘H’ and ‘I’. (2) (b) Write the binary representation of each code. (2) (c) Explain how the computer stores these characters. (3)
Suggested Answers
- (i) B. Bit. (ii) D. 8. (iii) A. 1101₂. (iv) B. 7. (v) C. 1024 bytes.
- (i) C. (ii) A. (iii) E. (iv) B. (v) D.
- (a) Data representation is the method of storing and processing data inside a computer using binary digits (0s and 1s). (b) Electronic circuits work reliably with two states; binary is less affected by noise; data can be copied without loss of quality. (c) 32+0+8+4+0+1 = 45₁₀.
- (a) 42÷2=21 r0; 21÷2=10 r1; 10÷2=5 r0; 5÷2=2 r1; 2÷2=1 r0; 1÷2=0 r1 → 101010₂. (b) 1×16 + 10 = 26₁₀. (c) Groups: 1010 1101 → AD₁₆.
- (a) 1101 + 1011 = 11000₂ (13+11=24₁₀). (b) 10010 – 01101 = 00101₂ (18–13=5₁₀).
- (a) ASCII has only 128 characters while Unicode has over a million; ASCII mainly supports English while Unicode supports all languages including Kiswahili; Unicode supports emojis, ASCII does not. (b) It allows correct storage and display of Kiswahili text and other local languages on computers and mobile phones.
- (a) H = 72, I = 73. (b) H = 1001000₂, I = 1001001₂. (c) Each character is looked up in the ASCII/Unicode table, the corresponding numeric code is obtained, and that number is stored in binary form in the computer’s memory.
These are suggested answers. Credit is also given to correct points expressed in your own words.
Ready for Chapter 2: Computer Programming?
Continue Form Three Computer Science (New Syllabus 2027) in the Click Online Academy app, with all chapters in your pocket.
Click here to continue learning on our app