Number Systems & Data Representation - SS1 Digital Technologies Lesson Notes

Number Systems & Data Representation - SS1 Digital Technologies

SS1 Digital Technologies Lesson Notes

Term 1 — Week 6: Number Systems & Data Representation

Introduction to Data Representation

In everyday life, humans count using ten digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. This system is known as the Decimal system (Base 10). However, because computer memory circuits are made up of millions of tiny electronic switches that can only exist in two distinct physical states (ON or OFF), digital hardware must process numbers using a different mathematical framework altogether.

To map data accurately within computing, engineers utilize four primary types of number systems. Each system is defined uniquely by its Base (or Radix), which indicates the total count of distinct characters available to represent values.

The Four Core Number Systems:
Decimal System (Base 10): Uses 10 digits (0–9). The standard human tracking system.
Binary System (Base 2): Uses 2 digits (0 and 1). The native language of all electronic CPU logic gates.
Octal System (Base 8): Uses 8 digits (0–7). Used to shorten binary code sequences into more readable sets.
Hexadecimal System (Base 16): Uses 16 alphanumeric characters (0–9 and letters A, B, C, D, E, F where A=10, B=11, C=12, D=13, E=14, F=15). Extensively used for hardware MAC addresses and web color codes.

Character & Value Equivalency Chart

Below is a structured tracking grid showing how the exact same numeric amounts are expressed across the four distinct base systems:

Decimal (Base 10) Binary (Base 2) Octal (Base 8) Hexadecimal (Base 16)
0000000
1000111
2001022
4010044
7011177
81000108
91001119
10101012A
11101113B
12110014C
15111115F

Conversion From One Number System to Another

Binary Number Conversion

a. Conversion from Binary to Octal Number System

To directly convert from binary to octal, a binary-to-octal conversion table is very helpful. The table below shows the equivalent 3-bit binary numbers for each octal digit.

Binary to Octal Conversion Table

Bin 000001010011100101110111
Oct 01234567

To perform the conversion, first, group the binary digits into sets of three, starting with the least significant (rightmost) digit. If the leftmost group doesn't have three digits, add leading zeros to complete the group. Then, look up each 3-bit group in the table above to find its octal equivalent.

Example 1: Convert 111001012 to an octal number.

Solution:

Add leading zeros to group into sets of three binary digits:

111001012 = 011  100  101

By looking up these values in the table above:

  • 011 is 3
  • 100 is 4
  • 101 is 5

Therefore, 111001012 = 3458

Method 2: Conversion via Decimal

Another method involves converting the binary number to the decimal number system first, and then converting the decimal result to an octal number system.

To convert 111001012 to decimal, multiply each digit by its respective power of the base (2), starting with 20 for the rightmost digit and increasing the power to the left:

111001012
= (1 × 27) + (1 × 26) + (1 × 25) + (0 × 24) + (0 × 23) + (1 × 22) + (0 × 21) + (1 × 20)
= (1 × 128) + (1 × 64) + (1 × 32) + (0 × 16) + (0 × 8) + (1 × 4) + (0 × 2) + (1 × 1)
= 128 + 64 + 32 + 0 + 0 + 4 + 0 + 1
= 22910

Next, convert 22910 to base eight by dividing 229 by 8 and writing down the remainder (R) at each step. Read the remainders from bottom to top.

Divide by 8 Quotient Remainder (R)
8229
8285
834
803

Picking the remainders from bottom to top, we get 345.

Therefore, 111001012 = 3458

b. Binary to Hexadecimal

A binary to hexadecimal conversion table is needed to directly convert from binary to hexadecimal. The table below shows the equivalent 4-bit binary numbers for each hexadecimal digit.

Binary to Hexadecimal Conversion Table

Bin 00000001001000110100010101100111 10001001101010111100110111101111
Hex 01234567 89ABCDEF

Next, group the binary digits into sets of four, starting with the least significant (rightmost) digits. If the leftmost group doesn't have four digits, add leading zeros to complete the group. Then, look up each 4-bit group in the table above to find its hexadecimal equivalent.

Example: Convert 111001012 to hexadecimal.

Solution:

111001012 = 1110  0101

Looking at the table above:

  • 1110 is E
  • 0101 is 5

Therefore, 111001012 = E516

c. Binary to Decimal

The most common mathematical method involves multiplying each binary digit by its corresponding power of the base (2), starting with 20 for the least significant (rightmost) digit and increasing the power to the left. Then, sum all the results.

Example 1: Convert 1111000000002 to decimal.

Solution:

1111000000002
= (1 × 211) + (1 × 210) + (1 × 29) + (1 × 28) + (0 × 27) + (0 × 26) + (0 × 25) + (0 × 24) + (0 × 23) + (0 × 22) + (0 × 21) + (0 × 20)
= (1 × 2048) + (1 × 1024) + (1 × 512) + (1 × 256) + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0
= 2048 + 1024 + 512 + 256
= 3840

Therefore, 1111000000002 = 384010

Example 2: Convert 101110011.11012 to decimal.

Solution:

101110011.11012
= (1 × 28) + (0 × 27) + (1 × 26) + (1 × 25) + (1 × 24) + (0 × 23) + (0 × 22) + (1 × 21) + (1 × 20)
  + (1 × 2-1) + (1 × 2-2) + (0 × 2-3) + (1 × 2-4)
= (1 × 256) + (0 × 128) + (1 × 64) + (1 × 32) + (1 × 16) + (0 × 8) + (0 × 4) + (1 × 2) + (1 × 1)
  + (1 × 0.5) + (1 × 0.25) + (0 × 0.125) + (1 × 0.0625)
= 256 + 0 + 64 + 32 + 16 + 0 + 0 + 2 + 1  +  0.5 + 0.25 + 0 + 0.0625
= 371 + 0.8125
= 371.8125

Therefore, 101110011.11012 = 371.812510

Decimal Number Conversion

a. Decimal to Binary

To convert a number from decimal (base 10) to binary (base 2), divide the given decimal number by 2 and write down the remainder. Continue this process until the quotient becomes zero (0). The binary equivalent is obtained by picking the remainders from bottom to top.

Example 1: Convert 192010 to binary.

Solution:

Divide by 2 Quotient Remainder (R)
21920
29600
24800
22400
21200
2600
2300
2150
271
231
211
201

Picking the remainders from bottom to top, we have 111100000000.

Therefore, 192010 = 1111000000002

Example 2: Convert 371.812510 to binary.

Solution:

First, convert the integer part (371) by repeatedly dividing by 2:

Divide by 2 Quotient Remainder (R)
2371
21851
2921
2460
2230
2111
251
221
210
201

Picking the remainders from bottom to top for 371, we get 101110011.

Next, convert the fractional part (0.8125) by repeatedly multiplying by 2 and taking the whole number part:

Multiply by 2 Result Whole Part (W)
0.8125 × 21.6251
0.625 × 21.251
0.25 × 20.50
0.5 × 21.01

Picking the "Whole Part" from top to bottom for 0.8125, we get .1101.

Merging the two results, we have 101110011.1101.

Therefore, 371.812510 = 101110011.11012

b. Decimal to Octal

To convert from decimal (base 10) to octal (base 8), simply divide the given decimal number by eight (8) and write down the remainder. Continue this process until the quotient becomes zero (0). Collect the remainders from bottom to top to get the octal equivalent.

Example 1: Convert 179210 to base 8.

Solution:

Divide by 8 Quotient Remainder (R)
81792
82240
8280
834
803

Picking the remainders from bottom to top, we get 3400.

Therefore, 179210 = 34008

c. Decimal to Hexadecimal

To convert from decimal (base 10) to hexadecimal (base 16), continue to divide the given decimal number by sixteen (16) and write down the remainder. If the remainder is 10 or greater, convert it to its corresponding hexadecimal letter (A-F).

Relationship between Decimal and Hexadecimal

Dec 0123456789101112131415
Hex 0123456789ABCDEF

Example 1: Convert 179210 to hexadecimal.

Solution:

Divide by 16 Quotient Remainder (R) Hex Remainder
161792
1611200
16700
16077

Picking the Hex Remainder from bottom to top, we get 700.

Therefore, 179210 = 70016

Example 2: Convert 4780610 to hexadecimal.

Solution:

Divide by 16 Quotient Remainder (Decimal) Remainder (Hex)
1647806
16298714E
1618611B
161110A
16011B

Picking Hex Remainder from bottom to top, we get BABE.

Therefore, 4780610 = BABE16

Fun Alphanumeric Hack: Other valid hexadecimal vocabulary words include: AD, BE, FAD, FADE, ADD, BED, BEE, BEAD, DEAF, FEE, ODD, BOD, DEAD, DEED, BABE, CAFE, FED, FEED, FACE, and BAD.

Octal Number Conversion

a. Octal to Binary

Simply look up each octal digit in a conversion table to obtain its equivalent group of three binary digits. Then, combine these binary groups to form the complete binary number.

Octal to Binary Conversion Table

Bin 000001010011100101110111
Oct 01234567

Example 1: Convert 3458 to binary.

Solution:

From the conversion table:

  • 3 = 011
  • 4 = 100
  • 5 = 101

Putting the binary numbers together, we get:

3458 = 0111001012

Leading zeros can be omitted unless they are part of a specific bit group. This simplifies to 111001012.

Therefore, 3458 = 111001012

b. Octal to Hexadecimal

When converting from octal to hexadecimal, it is easiest to first convert the octal number into its binary equivalent, and then from that binary number into hexadecimal.

Example 1: Convert 3458 to hexadecimal.

Solution:

Step 1: Convert Octal to Binary

Octal   =   3   4   5
Binary  = 011 100 101

So, 3458 = 0111001012.

Step 2: Convert Binary to Hexadecimal

Now, group the binary digits into sets of four, starting from the right (least significant). Add leading zeros if necessary to complete the leftmost group.

Binary: 0111001012
Group into fours from right: 0101 (from right)
                             1110 (next 4)
                             0000 (remaining '0', padded)

Combined groups: 0000 1110 0101

Using the Binary to Hexadecimal Conversion Table:

  • 0000 = 0
  • 1110 = E
  • 0101 = 5

Therefore, 0111001012 = E516

So, octal 3458 equals binary 0111001012, which equals hexadecimal E516.

c. Octal to Decimal

Multiply each digit by its corresponding power of the base (8), starting with 80 for the rightmost digit and increasing the power to the left. Then, sum all the results.

Example 1: Convert 3458 to decimal.

Solution:

3458
= (3 × 82) + (4 × 81) + (5 × 80)
= (3 × 64) + (4 × 8) + (5 × 1)
= 192 + 32 + 5
= 22910

Therefore, 3458 = 22910

Hexadecimal Number Conversion

a. Hexadecimal to Binary

Look up each hexadecimal digit in a conversion table to obtain its equivalent group of four binary digits, then combine them seamlessly.

Example 1: Convert A2DE16 to binary.

Solution:

From the conversion table:

  • A = 1010
  • 2 = 0010
  • D = 1101
  • E = 1110

Putting the binary numbers together:

A2DE16 = 10100010110111102

Therefore, A2DE16 = 10100010110111102

b. Hexadecimal to Octal

First convert the hexadecimal number into its binary equivalent, and then group that binary number into sets of three to establish octal positioning.

Example 1: Convert A2DE16 to octal.

Solution:

Step 1: Convert Hexadecimal to Binary

A2DE16 = 10100010110111102

Step 2: Convert Binary to Octal

Group the binary digits into sets of three, starting from the right (least significant).

Binary: 10100010110111102
Group into threes from right: 110  111  011  010  001  010
Add leading zeros:             001 010 001 011 011 110

Using our Binary to Octal Conversion values:

  • 001 = 1
  • 010 = 2
  • 001 = 1
  • 011 = 3
  • 011 = 3
  • 110 = 6

Therefore, hexadecimal A2DE16 equals octal 1213368.

Test Your Knowledge (Week 6 Quiz)

Select the correct answer choice and click 'Submit' to process your conversion score calculation instantly.

1. What is the base or radix value used in the hexadecimal number system?

2. In the hexadecimal system, what alphanumeric letter character is used to represent the decimal number value 12?

3. Convert the decimal integer value 9 into its direct 4-bit binary representation string:

4. Translate the binary sequence value 101₂ into its everyday decimal value equivalent:

5. Which numbering framework relies entirely on symbols 0, 1, 2, 3, 4, 5, 6, and 7?

6. Why do computer systems use Hexadecimal notation if processors can only read binary code natively?

7. Using the bit-grouping shortcut method, how many individual binary bits are precisely represented by a single Octal (Base 8) digit?

8. Which of the following numbers represents a completely INVALID entry within an Octal system compilation?

Class Test & Calculation Assignments

Solve these math problems clearly inside your notebooks showing all breakdown steps:

  1. Convert the following decimal integers completely into binary format strings: 14₁₀ and 42₁₀.
  2. Convert these binary patterns cleanly back into Base 10 decimal digits: 1110₂ and 10011₂.
  3. Explain clearly why values 10 through 15 inside the Hexadecimal system must be written as letters A through F instead of standard numbers.

Comments

Popular posts from this blog

Complete Computer Studies/ICT Curriculum for JSS 1 to SSS 3

90 Objective Examination Questions in Major Subjects

Number Base System