Unit 9: Data and Data Representation – Part A
Learning Objectives
Learners will learn to:
understand the significance of number systems
understand how and why computers use binary to represent all forms of data.
understand denary, binary and hexadecimal number systems.
convert numbers between denary, binary and hexadecimal number systems.
Vocabulary
radix
denary
Let Us Start
Hey, have you ever wondered Computers rely heavily on the binary
how computers process and number system, where they use only
represent information? two digits, 0 and 1. It's like their own
language.
1
Let Us Explore
What is the smallest and largest 4-digit number you can form using the digits 2, 6, 0
and 8?
__________________________________________________________________________________
__________________________________________________________________________________
We generally follow the decimal number system for calculations. It uses the digits
from 0 to 9. Computer represents all types of data and information, including audio,
video, graphics, text, etc., in a binary number system. Nowadays, a large number of
systems are used by the computer.
Get, Set, Go
9.1 Number system
A number system is a way to represent numbers using digits or symbols in a
structured manner. It defines a set of values that are used to represent a quantity.
Every number system has a set of digits. The total number of digits used in a number
system is called its Base or Radix. The base is written after the number as a subscript.
Example: 762.
Some of the popular number systems are:
Denary number system
Binary number system
Hexadecimal number system
9.2 Types of number system
The Denary Number System
The denary number system, also known as the decimal system, is a base-10
numbering system that uses 10 digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. Here, ‘0’ is the
least and ‘9’ is the greatest. Since it uses 10 digits, we say it has a base of 10. Each
number can be used individually or grouped to form a number. Example: 56,89,134.
2
The value of the digits can be determined depending on their position in the
number. In the denary number system, the successive positions to the left of the
decimal point represent units, tens, hundreds, thousands and so on. The value of
each digit in a number depends upon its position from right to left. Each position
represents a specific power of the base 10.
Let us take the example of the decimal number 426.78
Place value hundred tens ones tenths hundredths
Digits 4 2 6 7 8
Let us calculate the value of each digit in its respective place:
(4×100)+(2×10)+(6×1)+(7×0.1)+(8×0.01)
400+20+6+0.7+0.08
426.78
Binary number system
Computers use the binary number system to represent and process information for
several fundamental reasons. The binary number system uses only two values to
represent numbers. The values used in the binary number system are: 0, 1
Here ‘0’ is the least value known as low and ‘1’ is the highest value known as high.
Since it uses two digits, it has a base of 2. Each digit is called a bit (binary digit).
Converting Binary numbers into Denary numbers
The binary number system is the basis of all modern computing. It is easier and more
practical to represent numbers used for computers in the binary number system.
The value of a binary number 10101 in the denary system can be calculated as shown
below.
3
Place 25 = 32 24 = 16 23 = 8 22 = 4 21 = 2 20 = 1
value
Digits 1 0 1 1 0 1
(1×25)+(0×24)+(1×23)+(1×22)+(0×21)+(1×20)
=32+0+8+4+0+1
=45
So, the binary number 101101 is equivalent to the decimal number 45.
Activity 1
Convert the following binary numbers to their equivalent denary number.
1. 10111
2. 11111
3. 11100
4. 11010
Converting Denary Numbers to Binary
There are various methods to convert a denary number into a binary number. Using
the remainder method, let us convert a denary number to its corresponding binary
number. In this method, we will divide the denary number by 2 recursively until we
get remainder 0 while noting each remainder.
Steps to convert denary numbers into binary
Step 1: Write down the denary number as a dividend.
Step 2: Divide it by 2 (Binary number has base 2; hence the divisor is 2).
Step 3: Write the result underneath.
Step 4: Write the remainder on the right-hand side. This will be either 0 or 1.
4
Step 5: Again divide the result of the division by 2 and write down the remainder.
Step 6: Continue dividing and writing down remainders until the result of the division
is 0.
Step 7: The most significant bit (MSB) is at the bottom of the column of remainders
and the least significant bit (LSB) is at the top
Let's take a decimal number, 27 and convert it to its binary equivalent.
To convert a denary number to binary, you repeatedly divide the denary number by 2
and record the remainder in reverse order.
Divisor Dividend Quotient Remainder
27 2 13 1
13 2 6 1
6 2 3 0
3 2 1 1
1 2 0 1
Write down all remainders starting from MSB to LSB. (11011).
So, the binary equivalent of 2710 is 11011.
Activity 2
Convert the following denary numbers to their equivalent binary numbers.
1. 49
2. 225
3. 9084
Hexadecimal Number System
The hexadecimal number system uses 16 symbols. It uses the digits from 0-9 and
then alphabets from A to F. Thus, it has 16 alphanumeric digits. The base of this
number system is 16. Each digit in a hexadecimal number system represents a power
of 16. This number system is also known as HEX.
5
Base 0 1 2 3 4 5 6 7 8 9 A B C D E F
16
digits
Denary 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
value
Converting Hexadecimal numbers into Denary numbers
Let us take the hexadecimal number 1A7 and convert it to its denary equivalent.
To convert a hexadecimal number to denary, you can use the positional notation,
where each digit's place has a value based on powers of 16.
(1×162)+(10×161)+(7×160)
=256+160+7
=423
So, the hexadecimal number 1A7 is equivalent to the decimal number 423423.
Converting Hexadecimal numbers into Binary numbers
The hexadecimal system consists of 16 symbols, so it has a base of 16. Let’s see the
procedure of Hexadecimal to Binary conversion.
Binary Number Hexadecimal Number Denary number
0000 0 0
0001 1 1
0010 2 2
0011 3 3
0100 4 4
0101 5 5
0110 6 6
0111 7 7
1000 8 8
6
1001 9 9
1010 A 10
1011 B 11
1100 C 12
1101 D 13
1110 E 14
1111 F 15
Let us take the hexadecimal number 3E7 and convert it to its binary equivalent.
1. Convert each hexadecimal digit to 4 bits
o 3 in hexadecimal is 0011 in binary.
o E in hexadecimal is 1110 in binary.
o 7 in hexadecimal is 0111 in binary.
2. Concatenate the binary representations
o 3E7 in hexadecimal is 001111100111 in binary.
So, the hexadecimal number 3E7 is equivalent to the binary number 001111100111
Activity 3
Convert the following hexadecimal numbers to their equivalent binary numbers.
1. 6C
2. 59
3. BA6
Converting Denary Numbers to Hexadecimal
Using the remainder method, let us see how to convert a denary number to its
equivalent hexadecimal number. In this method, we will divide the Denary number by
16 recursively until we get a remainder less than 16 while keeping a note of each
remainder.
7
Steps to convert a Denary number into hexadecimal
Step 1: Write down the denary number as a dividend.
Step 2: Divide it by 16 (Hexadecimal number has base 16; hence the divisor is 16).
Step 3: Write the result underneath.
Step 4: Write the remainder on the right-hand side.
Step 5: Again divide the result of the division by 16 and write down the remainder.
Step 6: Continue dividing and writing down remainders until the remainder is less
than 16.
Step 7: The most significant bit (MSB) is at the bottom of the column of remainders
and the least significant bit (LSB) is at the top
Let us take the denary number 4096 and convert it to its hexadecimal equivalent.
To convert a denary number to hexadecimal, you repeatedly divide the denary
number by 16 and record the remainder in reverse order.
Divisor Dividend Quotient Remainder
16 4096 256 0
16 256 16 0
16 16 1 0
16 1 0 1
The remainder in reverse order 1000
So, the decimal number 4096 is equivalent to the hexadecimal number 1000.
8
Activity 4
Convert the following hexadecimal numbers to their equivalent denary numbers.
1. 9C
2. A01
3. 1FF
Unit Review
1. A number system is a way to represent numbers using digits or symbols in a
structured manner. It defines a set of values that are used to represent a
quantity.
2. Some popular number systems are the Denary, Binary, and Hexadecimal
number systems.
3. The denary number system, also known as the decimal system, is a base-10
numbering system that uses 10 digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9.
4. Computers use the binary number system to represent and process
information.
5. The hexadecimal number system uses 16 symbols. It uses the digits from 0-9
and then alphabets from A to F. Thus, it has 16 alphanumeric digits.
Check for Understanding
1. Fill in the blanks.
a. The ____________________ number system is the most commonly used in
everyday life, employing 10 digits from 0 to 9.
b. Binary is a _______________-2 number system, using only the digits 0 and 1.
c. In the binary system, each digit's place has a place value based on powers of
____________________.
d. In the hexadecimal system, the letter ___________________ represents the decimal
value 10.
e. Computers use the ____________________ number system for their internal
operations and storage, as it aligns with the on/off states of electronic
components.
9
2. Answer the following questions.
a. What is the denary number system, and what is its base?
______________________________________________________________________________________
______________________________________________________________________________________
______________________________________________________________________________________
______________________________________________________________________________________
______________________________________________________________________________________
______________________________________________________________________________________
______________________________________________________________________________________
b. Why do computers use the binary number system?
______________________________________________________________________________________
______________________________________________________________________________________
______________________________________________________________________________________
______________________________________________________________________________________
______________________________________________________________________________________
c. What do you understand by LSB and MSB? Explain with an example
______________________________________________________________________________________
______________________________________________________________________________________
______________________________________________________________________________________
______________________________________________________________________________________
______________________________________________________________________________________
Lab Activity
Q1. Visit the website http://htmlcolorcodes.com . Use the slider to change the colour
in the palette. Observe the hexadecimal code for the current colour.
10
Resources
https://www.computerscience.gcse.guru/topic/number-systems
Reference Material
https://www.youtube.com/watch?v=rRgGlJ0PQSc
11