VJC Chapter 9 Data Representation
Uploaded by cheesemuffin · 10 December 2025
Preview
Text from the first pagesVJC/H2Computing/9569 Chapter 9: Data Representation Contents 1 Number systems 1.1 Denary numbers 1.2 Binary numbers 1.3 Hexadecimal numbers 2 Conversion 2.1 Denary to Binary 2.2 Binary to Denary 2.3 Hexadecimal to Binary 2.4 Binary to Hexadecimal 2.5 Denary to Hexadecimal 2.6 Hexadecimal to Denary Syllabus Learning Outcomes 3.1 Data Representation Understand that values can be represented in different number bases: denary, binary and hexadecimal. 3.1.1 Represent data in binary and hexadecimal forms. 3.1.2 Write programs to perform the conversion of positive integers between different number bases: denary, binary and hexadecimal forms; and display results. 1
VJC/H2Computing/9569 1 Number systems In this chapter, we will learn about three number systems – denary, binary and hexadecimal. Learning about number systems will allow you to understand how computers represent data and how to interpret them. 1.1 Denary numbers The number system that we are most familiar with and typically used is called the denary number system. It is also known as the decimal number system and is made up of 10 distinct digits – 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. This is therefore a base 10 number system. Consider a denary number 346. The table below shows the representation of the denary number using place values. Place value 10 2 = 100 10 1 = 10 10 0 = 1 Digit 3 4 6 Product of digit and place value This gives 1.2 Binary numbers The number system used by computers consists of two unique digits – 0 and 1. It is called the binary number system. A binary digit is referred to as a bit. A group of eight bits is called a byte. Humans tend to use the denary number system. Hence, denary numbers must be converted into their binary equivalent before a computer can use them. As with a denary number, the value of a binary number is defined by place values. Consider the binary number 101110. Place value 2 5 = 32 2 4 = 16 2 3 = 8 2 2 = 4 2 1 = 2 2 0 = 1 Digit 1 0 1 1 1 0 Product of digit and place value This gives 2
VJC/H2Computing/9569 1.3 Hexadecimal numbers There is another number system, called the hexadecimal number system. This number system consists of 16 unique digits – 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E and F. The symbols A through to F represent the denary values 10 to 15. Hexadecimal digit 0 1 2 3 4 5 6 7 8 9 A B C D E F Denary equivalent 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 The value of a number is defined by place values. Consider the hexadecimal number 2A6. Place value 16 2 = 256 16 1 = 16 16 0 = 1 Digit 2 A 6 Product of digit and place value 2 x 16 2 = 512 10 x 16 1 =160 6 x 16 0 = 6 Adding up the values in the bottom row shows that the equivalent denary number is 678. 2 Conversion 2.1 Denary to Binary There are two methods for converting a denary number to binary. Method 1: division by 2 1. Divide the denary number by 2 using division with remainder and write down the quotient(result) and the remainder 2. Repeat the division until you get a result of 0 3. Write the remainders in reverse (from the last calculated remainder to the first) to get the binary number For example, to convert the denary number 135 10 into binary using method 1, the result would be calculated like this: Denary Quotient Remainder 135 / 2 67 1 67 / 2 33 1 33 / 2 16 1 16 / 2 8 0 8 / 2 4 0 4 / 2 2 0 2 / 2 1 0 1 / 2 0 1 Therefore, 135 10 = 10000111 2 3
VJC/H2Computing/9569 4
VJC/H2Computing/9569 Method 2: place values table 1. Draw a table with the place values of each digit 2. Find the highest place value( 2 n number) that is equal or less than the denary number 3. Set the digit that corresponds to that place value to 1 4. Subtract the place value from the denary number 5. Take the result of the subtraction and repeat steps 1–4 until you have a result of 0 6. Set the remaining digits to 0 7. Read the binary number from left to right For example, to convert the denary number 135 10 into binary using method 2, the result would be calculated like this: For an 8-bit number, the place values table is: 128 64 32 16 8 4 2 1 The maximum place value divisor of 135 is 128 so the corresponding digit is set to 1: 128 64 32 16 8 4 2 1 1 135 – 128 = 7. The maximum place divisor of 7 is 4, so the corresponding digit is set to 1: 128 64 32 16 8 4 2 1 1 1 7 – 4 = 3. The maximum place divisor of 3 is 2, so the corresponding digit is set to 1: 128 64 32 16 8 4 2 1 1 1 1 3 – 2 = 1. The maximum place divisor of 1 is 1, so the corresponding digit is set to 1: 128 64 32 16 8 4 2 1 1 1 1 1 1 – 1 = 0. The subtraction process ends, and all remaining digits are set to 0: 128 64 32 16 8 4 2 1 1 0 0 0 0 1 1 1 Hence, 135 10 = 10000111 2 5
VJC/H2Computing/9569 6
VJC/H2Computing/9569 2.2 Binary to Denary Each digit of a binary number has a specific place value that is a power of 2. For an 8-bit number, the place values table is: 2 7 2 6 2 5 2 4 2 3 2 2 2 1 2 0 128 64 32 16 8 4 2 1 To convert a binary number into denary, you add up the place values only for the binary digits that are set to 1. Consider the binary number 11000110. 2 7 2 6 2 5 2 4 2 3 2 2 2 1 2 0 1 1 0 0 0 1 1 0 128 + 64 + 4 + 2 = 198 Its denary equivalent is 198 10 2.3 Hexadecimal to Binary To convert a hexadecimal number to binary: 1. Break up the number into its individual hexadecimal digits and 2. Using the table below as a reference, replace each hexadecimal digit with its four-digit binary equivalent. 3. Read the binary number from left to right. Hexadecimal digit 0 1 2 3 4 5 6 7 Binary equivalent 0000 0001 0010 0011 0100 0101 0110 0111 Hexadecimal digit 8 9 A B C D E F Binary equivalent 1000 1001 1010 1011 1100 1101 1110 1111 To convert B03 16 into binary: Hexadecimal digit B 0 3 Binary equivalent 1011 0000 0011 Therefore, the binary number is 101100000011 2 . 7
VJC/H2Computing/9569 2.4 Binary to Hexadecimal To convert a binary number to its hexadecimal equivalent: 1. Split the number into groups of four binary digits, starting from the right. 2. If there is a group on the left that does not have the full set of four binary digits, add leading zeros to that group until it is a full set of four binary digits. 3. Using the table below as a reference, convert each four-digit group of binary numbers into its corresponding hexadecimal digit. Hexadecimal digit 0 1 2 3 4 5 6 7 Binary equivalent 0000 0001 0010 0011 0100 0101 0110 0111 Hexade
Content continues in the PDF. Download PDF
Related notes
- NYJC 2026 Prelim P2Exam Papers · 2026
- NYJC 2026 Prelim P1Exam Papers · 2026
- DHS 2026 Y6 H2 Computing Prelim Paper 2_finalExam Papers · 2026
- ACJC 2026 JC2 Computing Prelim Paper 2 (Practical)Exam Papers · 2026
- 2026_NJC Prelim_Computing_P2.pdfExam Papers · 2026
- 2026_JPJC_Computing_Prelim_P2_finalExam Papers · 2026
- 2026_JPJC_Computing_Prelim_P1_markschemeExam Papers · 2026
- 2026_JPJC_Computing_Prelim_P1_finalExam Papers · 2026
- 2026 ACJC Prelim Computing Paper 2Exam Papers · 2026
- 2024 ACJC Computing PromoExam Papers · 2024
- 2023 ACJC Promo QPExam Papers · 2023
- 2022 ACJC Computing Promo Paper 2Exam Papers · 2022
- See all H2 Computing notes

