Back to: COMPUTER SCIENCE SS3
Welcome to class!
In today’s class, we will be talking more about data representation. Enjoy the class!
Data Representation II
Number System defines a set of values used to represent ‘quantity’.
 Base or Radix: The total number of digits available in a number system.
 Decimal number system:
There are 10 digits i.e. 1, 2, 3, 4, 5, 6, 7, 8, 9 available in the decimal number system. It is known as the Base 10 system. The value of a digit in a number depends upon its position in the number e.g. the number 546 in this system is represented as (546)_{10}
546 = (4*10^{2}) + (8*10^{1}) + (6*10^{0})
 Binary number system:
The Binary Number System contains 2 unique digits 0 and 1. It is known as Base 2 system.
 Octal number system:
There are 8 unique digits available in the octal number system. These are 0, 1, 2, 3, 4, 5, 6, 7. Thus, any number formed is the combination of these digits. It is known as the Base 8 system.
 Hexadecimal number system:
There are 16 unique digits available in the Hexadecimal number system. These are 0, 1, 2, 3, 4, 5, 6, 7, 8, A, B, C, D, E, F where A denotes 10, B denotes 11………, F denotes 15. Thus any number formed is a combination of these digits. It is known as the Base 16 system.
Converting Decimal to Binary, Octal and Hexadecimal

Integer part
Remainder method
 Divide the decimal number by the base of the target number system that is, to convert decimal to binary, divide the decimal number with 2 (the base of binary number system), 8 for octal and 16 for hexadecimal.
 Note the remainder separately as the first digit from the right. In case of hexadecimal, if the remainder exceeds 9, convert the remainder into equivalent hexadecimal form. E.g., if the remainder is 10 then note the remainder as A.
 Continually repeat the process of dividing until the quotient is zero and keep writing the remainders after each step of division.
 Finally, when no more division can occur, write down the remainders in reverse order.
Fractional part
 Multiply the fractional part by the value of the new base.
 Record the integer part if it exists, else record 0.
 Repeat step 1 with the result of the previous multiplication and then step 2, until the fractional part becomes 0. In case of infinite calculations, generally, 6 digits are taken.
Converting Binary, Octal and Hexadecimal to Decimal
The method used for conversion of a binary, octal and hexadecimal number to decimal number involves each digit of the binary, octal or hexadecimal number to be multiplied by its weighted position, and then each of the weighted value is added to get the decimal number.
Example:
Binary Number  1  1  0  1  0 
Weight of each bit  2^{4}  2^{2}  2^{2}  2^{1}  2^{0} 
Weighted Value  2^{4} * 1  2^{3} * 1  2^{2} * 0  2^{1} * 1  2^{0} * 0 
Solved Multiplication  16  8  0  2  0 
Sum of weight of all bits = 16 + 8 +0 + 2 + 0 = 26
Thus, the decimal equivalent of (11010)_{2} is (26)_{10}
Converting Between Octal and Hexadecimal
Steps of conversion
 Convert each octal digit to 3bit binary form
 Combine all the 3bit binary numbers.
 Segregate the binary numbers into 4bit binary form by starting the first number from the right bit (LSB) towards the number on the left bit (MSB).
 Finally, convert these 4bit blocks into their respective hexadecimal symbols.
Evaluation
 A single unit which is composed of a small group of bits is known as (a) bit (b) bug (c) flag (d) byte
 BCD stands for (a) Binary Coded Decimal (b) Binary Coded Digitals (c) Binary Characters Decimals (d) Binary Conducting Decimals
 The system in which fractions are written by extending binary rotation is called (a) fixedpoint representation (b) floatingpoint representation (c) binary digits representation (d) single rotation representation
 ‘megabytes’ of computer storage capacity consists of (a) one million bytes (b) two million bytes (c) three million bytes (d) four million bytes
 In BCD code, maximum possible characters set size is (a) character set of 64 (b) character set of 84 (c) character set of 94 (d) character set of 104
In our next class, we will be talking about Security and Ethics. We hope you enjoyed the class.
Should you have any further question, feel free to ask in the comment section below and trust us to respond as soon as possible.
LEARN TO CODE IN 8 WEEKS. Pay Only ₦25000 To Join Class💃Access Fun Video Lessons to Pass WAEC, NECO, JAMB, POSTUTME in One Sitting💃