DATA REPRESENTATION Lesson Note
Learning Objectives
This SS2 DIGITAL TECHNOLOGY lesson note covers DATA REPRESENTATION for First Term, Week 5.
Lesson Note
Learning Objectives
By the end of the lesson, students should be able to:
Define data representation.
Explain how computers represent data.
Define binary number system.
Explain the importance of bits and bytes.
Identify common number systems used in computing.
Convert simple numbers between decimal and binary
Explain how text is represented in computers.
Explain how images, audio and video are represented digitally.
Describe ASCII and Unicode.
Explain the importance of data representation in digital technology.
A. MEANING OF DATA REPRESENTATION.
Data representation refers to the way data is converted, organized and stored in a form that a computer or digital device can understand and process.
Computers work electronically and use binary digits (bits) to represent information. A bit can have one of two values: 0 and 1
Therefore, text, numbers, pictures, sounds and videos are all converted into patterns of 0s and 1s before computers process or store them.
Example
The decimal number 5 can be represented in binary as:
5₁₀ = 101₂
B. WHY COMPUTERS USE BINARY
Digital computers use electronic circuits that have two basic states, such as:
On / Off
High / Low
True / False
These two states can conveniently be represented using:
1 = ON
0 = OFF
This is why the binary number system is fundamental to digital computers.
C. Bit and Byte
Bit
A bit is the smallest unit of digital data.
The word bit comes from binary digit.
A bit can contain either:
0 or 1
Byte
A byte consists of 8 bits.
For example:
10110101
The above contains eight binary digits, so it is one byte.
Common Data Units
Unit Equivalent
1 bit 0 or 1
1 byte 8 bits
1 kilobyte (KB) About 1,024 bytes
1 megabyte (MB) About 1,024 KB
1 gigabyte (GB) About 1,024 MB
1 terabyte (TB) About 1,024 GB
These units are commonly used to describe the size of digital data and storage.
D. NUMBER SYSTEMS
A number system is a method of representing numbers using specific symbols and rules.
The major number systems used in computing include:
Binary
Decimal
Octal
Hexadecimal
1. Binary Number System
The binary number system has a base of 2.
It uses only:
0 and 1
Examples:
101₂
1100₂
10001₂
Binary is the fundamental number system used internally by digital computers.
2. Decimal Number System
The decimal number system has a base of 10.
It uses the digits:
0, 1, 2, 3, 4, 5, 6, 7, 8 and 9
This is the number system humans commonly use in everyday life.
Example:
25₁₀
3. Octal Number System
The octal number system has a base of 8.
It uses:
0, 1, 2, 3, 4, 5, 6 and 7
Example:
17₈
Octal can provide a shorter way of writing some binary values.
4. Hexadecimal Number System
The hexadecimal number system has a base of 16.
It uses:
0–9 and A–F
The letters represent values as follows:
Hexadecimal Decimal
A 10
B 11
C 12
D 13
E 14
F 15
Examples:
2A₁₆
FF₁₆
10B₁₆
Hexadecimal is commonly used in computing because each hexadecimal digit represents four binary bits.
E. DECIMAL TO BINARY CONVERSION
To convert a decimal number to binary, the number can be repeatedly divided by 2 and the remainders recorded.
Example: Convert 13₁₀ to binary.
Division Quotient Remainder
13 ÷ 2 6 1
6 ÷ 2 3 0
3 ÷ 2 1 1
1 ÷ 2 0 1
Reading the remainders from bottom to top:
13₁₀ = 1101₂
F. BINARY TO DECIMAL CONVERSION
Binary numbers use place values based on powers of 2.
From right to left, the place values are:
128 64 32 16 8 4 2 1
Example: Convert 1011₂ to decimal.
1 × 8 = 8
0 × 4 = 0
1 × 2 = 2
1 × 1 = 1
Therefore:
8 + 0 + 2 + 1 = 11
So:
1011₂ = 11₁₀
G. REPRESENTATION OF TEXT
Computers need a way to represent letters, numbers, punctuation marks and other characters.
Character encoding systems are used for this purpose.
Two important examples are:
*ASCII
ASCII means American Standard Code for Information Interchange.
It assigns numerical codes to characters such as:
*Letters
*Numbers
*Punctuation marks
*Some control characters
For example, the letter A has an ASCII code of 65 in decimal.
*Unicode
Unicode is a character-encoding standard designed to represent characters from many writing systems around the world.
It supports:
*English characters
*African languages
*Arabic
*Chinese
*Greek
*Cyrillic
*Mathematical symbols
*Emojis and many other characters
Unicode is more extensive than traditional ASCII.
H. REPRESENTATION OF IMAGES
Digital images are represented using pixels.
A pixel is one of the tiny individual elements that make up a digital image.
A picture on a screen is made up of many pixels arranged in rows and columns.
Image Representation
For a simple black-and-white image, pixels can be represented using binary values:
0 = white
1 = black
For colour images, more information is required to represent the colour of each pixel.
Image Quality
The number of pixels in an image affects its resolution.
For example:
1920 × 1080
Means an image has 1,920 pixels across and 1,080 pixels vertically.
Higher resolution generally allows more visual detail, although file size can also increase.
I. REPRESENTATION OF COLOUR
Digital devices commonly represent colours using numerical values.
One widely used method is RGB.
RGB means:
R – Red
G – Green
B – Blue
Different amounts of red, green and blue can be combined to produce many colours.
For example, a colour may be represented using three numerical values:
R = 255
G = 0
B = 0
This represents a strong red colour in the common RGB model.
J. REPRESENTATION OF AUDIO
Sound is naturally an analogue phenomenon, but computers store and process digital representations of sound.
To convert sound into digital data, a process called sampling is used.
K. SAMPLING
Sampling involves measuring the amplitude of a sound wave at regular intervals.
The number of samples taken per second is called the sampling rate and is measured in hertz (Hz).
For example:
44,100 samples per second = 44.1 kHz
Higher sampling rates can capture more information about the original sound, although they may require more storage.
L. BIT DEPTH
Bit depth refers to the number of bits used to represent each audio sample.
Greater bit depth can allow a wider range of amplitude values.
M. REPRESENTATION OF VIDEO
A digital video is made up of a sequence of still images called frames.
When frames are displayed rapidly one after another, they create the appearance of motion.
Important video characteristics include:
1. Resolution
2. Frame rate
3. Colour information
4. Audio
5. Compression
1. Frame rate
Frame rate is the number of frames displayed per second.
It is measured in frames per second (fps).
For example:
30 fps means 30 frames are displayed each second.
2. Data Compression
Digital files can sometimes become very large, especially images, audio and video files.
3. Data compression is the process of reducing the amount of storage space required by data.
There are two major types:
a. Lossless Compression
Lossless compression reduces file size without permanently removing the original information.
When the file is decompressed, the original data can be reconstructed.
b. Lossy Compression
Lossy compression reduces file size by permanently removing some information.
It can produce much smaller files, although some quality may be lost.
N. Digital vs Analogue Representation
Digital Representation Analogue Representation
Uses discrete values Uses continuously varying values
Commonly represented using binary Uses continuous physical signals
Easy to store and process electronically Can be more affected by noise
Can be copied without changing Repeated copying can introduce
the basic digital values degradation
Used by computers and many modern devices Used by traditional analogue systems
O. IMPORTANCE OF DATA REPRESENTATION
Data representation is important because it:
Allows computers to understand and process information.
Makes data suitable for storage.
Allows different types of information to be handled digitally.
Makes communication between digital devices possible.
Supports data transmission over networks.
Allows text, images, audio and video to be processed.
Makes data easier to copy and transfer.
Supports computer programming.
Helps determine how much storage data requires.
Makes digital information easier to manipulate and transmit.
P. PRACTICAL EXAMPLES OF DATA REPRESENTATION
Data representation occurs in many everyday digital activities.
When typing a message
The characters are converted into digital codes that the computer or phone can store and process.
When taking a photograph
The camera converts the captured image into digital data represented by pixels and colour information.
When recording music: The sound is sampled and converted into digital values.
When watching a video: The device processes digital video frames, colour information and often digital audio.
When storing a document: The characters, formatting and other information are stored as digital data.
SUMMARY
Data representation is the way information is converted into a form that digital devices can process and store.
Computers fundamentally use binary, consisting of 0 and 1. A bit is the smallest unit of digital data, while 8 bits make one byte.
The major number systems used in computing are binary, decimal, octal and hexadecimal. Text can be represented using encoding systems such as ASCII and Unicode. Images are represented using pixels and colour information, while audio is represented through sampling and video through sequences of digital frames.
Data compression can reduce file sizes, using either lossless or lossy methods.
Evaluation
OBJECTIVE QUESTIONS
1. What is data representation?
A. The physical construction of a computer
B. The way data is converted into a form a computer can process
C. The process of repairing a computer
D. The process of connecting a printer
2. Which number system is fundamental to digital computers?
A. Decimal
B. Octal
C. Binary
D. Roman
3. How many bits make one byte?
A. 2
B. 4
C. 8
D. 16
4. Which digits are used in the binary number system?
A. 0 and 1
B. 1 and 2
C. 0 to 7
D. 0 to 9
5. Which of the following is a character-encoding system?
A. ASCII
B. HDMI
C. USB
D. RAM
6. What is a pixel?
A. A computer processor
B. A small element of a digital image
C. A type of keyboard
D. A storage device
7. What does RGB stand for?
A. Read, Green, Blue
B. Red, Green, Black
C. Red, Green, Blue
D. Red, Gray, Brown
8. What is the process of measuring a sound wave at regular intervals called?
A. Formatting
B. Sampling
C. Printing
D. Scanning
9. Which of the following is a type of data compression that preserves the original information?
A. Lossy compression
B. Lossless compression
C. Image compression only
D. Video compression only
10. Which of the following number systems uses the digits 0–9 and letters A–F?
A. Binary
B. Decimal
C. Octal
D. Hexadecimal
THEORY QUESTIONS
1a. What is data representation? Explain why computers use the binary number system.
1b. Define bit and byte. State the relationship between them.
2a. Explain the binary, decimal, octal and hexadecimal number systems.
2b. Explain how computers represent text, images, audio and video.
3. Convert the following: a. 13₁₀ to binary
b. 1010₂ to decimal
c. State the difference between lossless and lossy compression.