Overview of Number System

Number Base System - SSS 3 Computer Studies

CLASS: SSS Three

Definition of Number System

A number system is a collection of symbols (digits) used to represent numerical values, along with a set of rules for combining these symbols to represent larger numbers. Each number system is defined by its base, which indicates the total number of unique digits (including zero) it uses.

There are various number systems, some of which are examined below:


Decimal Number System (Base 10)

The Decimal Number System (also called base ten or occasionally denary) is the system we use in our daily lives. It uses ten distinct symbols (digits): 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9.


Binary Number System (Base 2)

The Binary Number System is a number system in base 2. It is fundamental to computing and requires only two digits: 0 and 1.


Hexadecimal Number System (Base 16)

The Hexadecimal Number System is in base 16. It uses digits 0 through 9, along with the letters A through F, which represent the decimal values 10 through 15 respectively.

  • A = 10
  • B = 11
  • C = 12
  • D = 13
  • E = 14
  • F = 15

Octal Number System (Base 8)

The Octal Number System, or "oct" for short, is the base-8 number system. It uses the digits 0 to 7.


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 000 001 010 011 100 101 110 111
Oct 0 1 2 3 4 5 6 7

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)
8 229
8 28 5
8 3 4
8 0 3

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 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111
Hex 0 1 2 3 4 5 6 7 8 9 A B C D E F

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

There are many methods for converting binary numbers to decimals. 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)
2 1920
2 960 0
2 480 0
2 240 0
2 120 0
2 60 0
2 30 0
2 15 0
2 7 1
2 3 1
2 1 1
2 0 1

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)
2 371
2 185 1
2 92 1
2 46 0
2 23 0
2 11 1
2 5 1
2 2 1
2 1 0
2 0 1

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 × 2 1.625 1
0.625 × 2 1.25 1
0.25 × 2 0.5 0
0.5 × 2 1.0 1

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)
8 1792
8 224 0
8 28 0
8 3 4
8 0 3

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). Continue this process until the quotient becomes zero (0). Collect the remainders (in hexadecimal form) from bottom to top to get the hexadecimal equivalent.

It is important to note that when converting from decimal to hexadecimal, a conversion table must be used to obtain the hexadecimal digit if the remainder is greater than decimal 9.

Relationship between Decimal and Hexadecimal

Dec 0123456789101112131415
Hex 0123456789ABCDEF

Example 1: Convert 179210 to hexadecimal.

Solution:

Divide by 16 Quotient Remainder (R) Hex Remainder
16 1792
16 112 0 0
16 7 0 0
16 0 7 7

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)
16 47806
16 2987 14 E
16 186 11 B
16 11 10 A
16 0 11 B

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

Therefore, 4780610 = BABE16

Other fun hexadecimal numbers include: AD, BE, FAD, FADE, ADD, BED, BEE, BEAD, DEAF, FEE, ODD, BOD, DEAD, DEED, BABE, CAFE, FED, FEED, FACE, BAD.

Octal Number Conversion

a. Octal to Binary

Converting from octal to binary is straightforward. 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 (e.g., for 001). So, this can be simplified to 111001012.

Therefore, 3458 = 111001012

b. Octal to Hexadecimal

When converting from octal to hexadecimal, it is often 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, through a two-step conversion process, octal 3458 equals binary 0111001012, which equals hexadecimal E516.

c. Octal to Decimal

Converting octal to decimal can be performed using the conventional mathematical method: 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

Converting from hexadecimal to binary is straightforward and is the reverse of binary to hexadecimal. Simply look up each hexadecimal digit in a conversion table to obtain its equivalent group of four binary digits. Then, combine these 4-bit binary groups to form the complete binary number.

Binary to Hexadecimal Conversion Table

Bin 0000000100100011010001010110011110001001101010111100110111101111
Hex 0123456789ABCDEF

Example 1: Convert A2DE16 to binary.

Solution:

From the conversion table above, we have:

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

Putting the binary numbers together:


A2DE16 = 10100010110111102
    

Therefore, A2DE16 = 10100010110111102

b. Hexadecimal to Octal

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

Example 1: Convert A2DE16 to octal.

Solution:

Step 1: Convert Hexadecimal to Binary

Using the Binary to Hexadecimal Conversion Table (provided above):

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

Therefore, A2DE16 = 10100010110111102

Step 2: Convert Binary to Octal

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


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

Using the Binary to Octal Conversion Table (provided earlier in section 'a. Conversion from Binary to Octal Number System'):

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

It implies that 10100010110111102 = 1213368

Therefore, through a two-step conversion process, hexadecimal A2DE16 equals binary 10100010110111102, which equals octal 1213368.

c. Hexadecimal to Decimal

Converting hexadecimal to decimal can be performed using the conventional mathematical method: multiply each digit by its corresponding power of the base (16), starting with 160 for the rightmost digit and increasing the power to the left. Remember to convert hexadecimal letter values (A-F) to their decimal equivalents (10-15) before performing the multiplication. Then, sum all the results.

Relationship between Decimal and Hexadecimal

Dec 0123456789101112131415
Hex 0123456789ABCDEF

Example 1: Convert A2DE16 to decimal.

Solution:


A2DE16
= (A × 163) + (2 × 162) + (D × 161) + (E × 160)
= (10 × 163) + (2 × 162) + (13 × 161) + (14 × 160)
= (10 × 4096) + (2 × 256) + (13 × 16) + (14 × 1)
= 40960 + 512 + 208 + 14
= 41694
    

Therefore, A2DE16 = 4169410

Comments

Popular posts from this blog

90 Objective Examination Questions in Major Subjects

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

JSS 3 Objective Questions and Answers in Computer studies