Form Three Computer Science · Chapter 1: Data Representation
New Syllabus 2027

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

  1. Chapter 1Data RepresentationRead below · Free
  2. Chapter 2Computer ProgrammingContinue in the app
  3. Chapter 3Computer NetworksContinue in the app
  4. Chapter 4Database and Database Management SystemContinue in the app

Learning Outcomes

By the end of this chapter, you should be able to:

Key Terms and Concepts

TermMeaning
DataRaw facts, figures or symbols that have not yet been processed. Examples: 17, “Juma”, 1001101.
InformationData that has been processed and organised so that it is meaningful and useful. Example: “Juma is 17 years old.”
Data RepresentationThe 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.
ByteA group of 8 bits. It is the basic unit used to measure storage size.
Number SystemA way of writing numbers using a fixed set of digits and a base (radix). Common systems: decimal, binary, octal, hexadecimal.
ASCIIAmerican Standard Code for Information Interchange – a character-coding system that uses 7 bits to represent 128 English characters and symbols.
UnicodeA 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

AspectDataInformation
MeaningRaw, unprocessed factsProcessed, meaningful facts
Example25, 30, 28Average temperature is 27.7 °C
UsefulnessLimited until processedReady for decision-making
FormNumbers, text, signalsReports, charts, messages

Why Computers Represent Data Digitally

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.

UnitSymbolSizeApprox. Equivalent
Bitb1 binary digit0 or 1
Nibble–4 bitsHalf a byte
ByteB8 bitsOne character (approx.)
KilobyteKB1 024 bytesHalf a page of text
MegabyteMB1 024 KBOne short song (MP3)
GigabyteGB1 024 MBOne hour of video
TerabyteTB1 024 GBLarge hard-disk capacity

Types of Digital Data and Data Types

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)

Example: 347 = 3×10² + 4×10¹ + 7×10⁰ = 300 + 40 + 7

Binary Number System (Base 2)

Binary 1101₂ expanded: 1×2³ + 1×2² + 0×2¹ + 1×2⁰ = 8 + 4 + 0 + 1 = 13₁₀

Octal Number System (Base 8)

Hexadecimal Number System (Base 16)

Hexadecimal 2F₁₆ expanded: 2×16¹ + 15×16⁰ = 32 + 15 = 47₁₀

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.

Convert 10110₂ to decimal
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.

Convert 25₁₀ to binary
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

Convert A3₁₆ to 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.

Convert 45₁₀ to hexadecimal
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.

BinaryHexBinaryHex
0000010008
0001110019
001021010A
001131011B
010041100C
010151101D
011061110E
011171111F
Binary 11010110₂ → Hex
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

With carry:
  1110
+ 0111
------
10101 (= 21₁₀)

Rules of Binary Subtraction

With borrow:
  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).

Letter ‘A’ → ASCII code 65 → binary 1000001₂

ASCII

CharacterASCII CodeBinary
A651000001
B661000010
a971100001
0480110000
Space320100000

Unicode

Differences Between ASCII and Unicode

FeatureASCIIUnicode
Number of bits7 (or 8 extended)8–32 (UTF-8/16/32)
Characters available128 (or 256)Over 1 million
Languages supportedMainly EnglishAlmost all languages
Kiswahili supportLimitedFull
EmojisNoYes

TEST YOUR UNDERSTANDING

Q12. What does ASCII stand for?

Q13. Give two advantages of Unicode over ASCII.

Chapter Summary

Enjoying this chapter? Practice questions, progress tracking and the remaining chapters are waiting in the app.

Continue in the app

End-of-Topic Questions

Attempt all questions in your exercise book before checking the suggested answers. (New Syllabus 2027)

  1. 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)
  2. 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)
  3. (a) Define data representation. (2) (b) State three reasons why computers use binary. (3) (c) Convert 101101₂ to decimal. (2)
  4. (a) Convert 42₁₀ to binary. (2) (b) Convert 1A₁₆ to decimal. (2) (c) Convert 10101101₂ to hexadecimal. (2)
  5. Perform the binary operations and check in decimal: (a) 1101₂ + 1011₂ (3) (b) 10010₂ – 01101₂ (3)
  6. (a) Explain two differences between ASCII and Unicode. (4) (b) Why is Unicode important for Tanzanian students and software? (3)
  7. 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

  1. (i) B. Bit. (ii) D. 8. (iii) A. 1101₂. (iv) B. 7. (v) C. 1024 bytes.
  2. (i) C. (ii) A. (iii) E. (iv) B. (v) D.
  3. (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₁₀.
  4. (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₁₆.
  5. (a) 1101 + 1011 = 11000₂ (13+11=24₁₀). (b) 10010 – 01101 = 00101₂ (18–13=5₁₀).
  6. (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.
  7. (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