Download as pdf or txt
Download as pdf or txt
You are on page 1of 32

Week 002

Number System
Week 002: Number System

Objectives:

• To introduce the Number System.


• To familiarize the Conversion of Number System
• To determine the steps on how to convert Number System to different
bases.
Week 002: Number System

Number System

• In mathematics, a 'number system’ is a set of number, with one or more


operations that can perform like addition and multiplication.

Bit & Byte


• A binary digit is called a bit
• A series of eight bits strung together makes a byte
Week 002: Number System

Types of Number System

Binary
• There can be only two choices for this number -- either a "0" or a "1".
Decimal
• There are ten different numbers that can enter the digit box: "0", "1",
"2", "3", "4", "5", "6", "7", "8", "9".
Octal
• There can be eight possibilities: "0", "1", "2", "3", "4", "5", "6", "7".
Hexadecimal
• Allow 16 numbers: "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B",
"C", "D", "E", and "F".
Week 002: Number System

Table 1.0 Conversion of Number System


Base 2 (Binary) Base 10 (Decimal) Base 8 (Octal) Base 16
(Hexadecimal)
0 0 0 0
1 1 1 1
2 2 2
3 3 3
4 4 4
5 5 5
6 6 6
7 7 7
8 8 8
9 9
10 A
B
C
D
E
F
Week 002: Number System

Table 1.0 Conversion of Number System: Continuation


Binary Decimal Octal Hexadecimal
Binary to Decimal Decimal to Binary Octal to Binary Hexadecimal to Binary
Binary to Octal Decimal to Octal Octal to Decimal Hexadecimal to Decimal
Binary to Decimal to Hexadecimal Octal to Hexadecimal Hexadecimal to Octal
Hexadecimal
Week 002: Number System

Table 2.0 Representation of a binary number


28 27 26 25 24 23 22 21 20
256 128 64 32 16 8 4 2 1
Week 002: Number System

Conversion: Binary to Any Number System

To convert Binary to Decimal follow the steps below.


1. Plot the given number in a table following the value of number system
as shown in the table 1.0. Start from number 1, then leave the other
blank or put the zero 0’s values
2. Add all the values from right to left at the position that are represented
by 1’s
3. The add base 2 in the final answer
Week 002: Number System

Conversion: Binary to Any Number System


To convert Binary to Decimal follow the steps below.
Example: Convert 1010011 to decimal / base 10
Step 1: Plot the given number in the table
Decim 256 128 64 32 16 8 4 2 1
al Digit
Value
Binary 0 0 1 0 1 0 0 1 1
Digit
Value

Step 2: Add all decimal digit value where the binary digit value is 1
64 + 16 + 2 + 1 = 83

Step 3: add the base 10 in the final answer


8310

Therefore: 10100112 = 8310


Week 002: Number System

Conversion: Binary to Any Number System


To convert Binary to Decimal follow the steps below.
Example: Convert 1010011 to decimal / base 10
Step 1: Plot the given number in the table
Decim 256 128 64 32 16 8 4 2 1
al Digit
Value
Binary 0 0 1 0 1 0 0 1 1
Digit
Value

Step 2: Add all decimal digit value where the binary digit value is 1
64 + 16 + 2 + 1 = 83

Step 3: add the base 10 in the final answer


8310

Therefore: 10100112 = 8310


Week 002: Number System

Conversion: Binary to Any Number System


To convert Binary to Decimal follow the steps below.
Example: Convert 1010011 to decimal / base 10
Step 1: Another way to convert is to directly get the nth power of a binary number then add all the
decimal numbers to get the final results. See figure 1.0 for example

Therefore: 10100112 = 8310


Week 002: Number System

Conversion: Binary to Any Number System

To convert Binary to Octal follow the steps below.


1. Group the given binary value into three starting from the right. Note
that you have to pad the digits to three in order to meet the requirement
of 3 per group.
2. Add 4,2 and 1 underneath each binary number per group.
3. Add the octal value of a number system represented by 1’s
Example: Convert 1010011 to octal/ base 8
4. Then read the final answer from right to left.
Week 002: Number System

Conversion: Binary to Any Number System

To convert Binary to Octal follow the steps below.


Step 1: Group the given binary value into three starting from the right
1|010|011
Note that we have to left pad the value to three therefore the grouped value is:
0 0 1 | 0 1 0 | 0 1 1– The zero’s in blue text are the added value
Step 2: Add 4,2 and 1 underneath the binary value
0 01|010|011
4 21|421|421
Step 3: Add all octal where the number system is 1’s. Note all text in red in step 2 are the octal value with
1’s
4 21|421|421
1 2 3
Step 4: Read the value from right to left.
123
Therefore, 10100112 = 1238
Week 002: Number System

Conversion: Binary to Any Number System

To convert Binary to Octal follow the steps below.


A shortcut version of converting binary to octal is to group the given
binary number to 3 starting right then add all raise value that is equal to 1.
The raise power is 4,2,and 1 to complete the 8 values of octal including the
0.
Week 002: Number System

Conversion: Binary to Any Number System

To convert Binary to Hexadecimal follow the steps below.


1. Group the given binary value into four starting from the right. Note
that you have to pad the digits to four in order to meet the requirement
of 4 per group.
2. Add 8,4,2 and 1 underneath each binary number per group.
3. Add the hexadecimal value of a number system represented by 1’s
Example: Convert 1010011 to hexadecimal / base 16
4. Then read the final answer from right to left.
Week 002: Number System

Conversion: Binary to Any Number System


Step 1: Group the given binary value into four starting from the right
1 01 |0 011
Note that we have to left pad the value to four therefore the grouped value is:
0 1 0 1 | 0 0 1 1– The zero’s in blue text are the added value
Step 2: Add 8,4,2 and 1 underneath the binary value
01 01|0011
84 21|8421
Step 3: Add all hexadecimal value where the number system is 1’s. Note all text in red in step 2 are the
hexadecimal value with 1’s
84 21|8421
5 3
Step 4: Read the value from right to left.
53
Therefore, 10100112 = 5316
Week 002: Number System

Conversion: Decimal to Any Number System

To convert Decimal to Binary follow the steps below.


1. Write the decimal number as the dividend. Then add a slash (/) and
write the base of the destination system (in our case, "2" for binary) as
the divisor outside the curve of the division symbol.
2. Divide the decimal number to binary number and write the remainder
as 0 or 1. Continue to divide until you reach the last digit
3. Read the remainder upward from bottom to top.
4. Note: In converting decimal to binary every remainder that is greater
than to zero is consider one. Since binary only accept two values which
is 0 and 1.
Week 002: Number System

Conversion: Decimal to Any Number System

To convert Decimal to Binary follow the steps below.


Example: Convert 206 to binary / base 2
Step 1,2: Write the decimal number as the dividend in a division symbol and write the base of the destination
system which is base 2.
Division of 2 Quotient Remainder/Bit value
206/2 103 0
103/2 51.5 1
51/2 25.5 1
25/2 12.5 1
12/2 6 0
6/2 3 0
3/2 1 1
1/2 0 1

Step 3: Read the remainder upward


Remainder/Bit value
0
1
Final answer is 11001110
1
1
Therefore: 20610 = 110011102
0
0
1
1
Week 002: Number System

Conversion: Decimal to Any Number System

To convert Decimal to Octal follow the steps below.


1. Divide the given decimal value to 8 until we reach 0 value. To get the
remainder multiple the quotient by 8 minus the given number. The
result from the subtraction is the remainder.
2. Read the values upward
Week 002: Number System

Conversion: Decimal to Any Number System

To convert Decimal to Octal follow the steps below.


Example: Convert 206 to octal / base 8
Step 1. Divide the decimal value to 8
Division of 28 Quotient Remainder/Bit value
206/8 25.75 206 – 200 = 6
25*8 = 200 Remainder is 6
25/8 3.125 25-24 = 1
3*8=24 Remainder is 1
3/8 0.375 8-5 = 3
Remainder = 3

Step 2. Read the values upward


Remainder/Bit value
206 – 200 = 6
Remainder is 6 Final answer is 316
25-24 = 1
Therefore: 20610 = 3168
Remainder is 1
Remainder = 3
Week 002: Number System

Conversion: Decimal to Any Number System

To convert Decimal to Hexadecimal follow the steps below.


1. Divide the given decimal value to 16 until we reach 0 value. To get the
remainder multiple the quotient by 16 minus the given number. The
result from the subtraction is the remainder.
2. Read the values upward
Week 002: Number System

Conversion: Decimal to Any Number System

To convert Decimal to Hexadecimal follow the steps below.


Example: Convert 206 hexadecimal / base 16
Step 1. Divide the decimal value to 8
Division of 28 Quotient Remainder/Bit value
206/16 12.875 206 – 192 = 6
12*16 = 192 Remainder is 14
12/16 0.75 12-0 = 12
Remainder is 12

Step 2. Read the values upward


Remainder/Bit value
206 – 192 = 6
Remainder is 14 Final answer is C E
12-0 = 12
Therefore: 20610 = C E16
Remainder is 12
Week 002: Number System

Conversion: Octal to Any Number System

To convert Octal to Binary follow the steps below.


The Octal (base 8) numeral system has 8 possible values (0,1,2,3,4,5,6,7)
for each place-value. Below is the value of octal to binary.
Octal 0 1 2 3 4 5 6 7
value
Binary 000 001 010 011 100 101 110 111
Value

To convert Octal to Binary follow the steps below.


1. Get the binary values of the given octal per digit. Refer to the table
above for the binary value
2. Read the answer downward
Week 002: Number System

Conversion: Octal to Any Number System

To convert Octal to Binary follow the steps below.


Example: Convert 206 to binary / base 2
Step 1,2: Get the binary value
Given 4 2 1 = 7 or also known as base
8
2 010
0 000
6 110

Therefore: 2068 = 010 000 1012


Week 002: Number System

Conversion: Octal to Any Number System

To convert Octal to decimal follow the steps below.


1. Get the given octal value and find the value of 8 to the nth power.
Multiply the given number to base 8 nth power.
2. Add the values.
Step 1,2: Multiple and add
Example: Convert 206 to octal / base 10
Week 002: Number System

Conversion: Octal to Any Number System

To convert Octal to Hexadecimal follow the steps below.


1. Convert the octal number to binary
2. Read the binary number downward then group into 4.
3. Convert the binary number grouped by 4 to hexadecimal. Grouping should start from right
to left.
4. Add all with positive values and or equal to 1.
Example: Convert 206 to hexadecimal / base 16
Given 4 2 1 = 7 or also known as base
8
2 010
0 000
6 110

8421 8421 8421


0|1000 |0110
0 8 6
Therefore: 2068 = 8616
Week 002: Number System

Conversion: Octal to Any Number System

To convert Octal to Hexadecimal follow the steps below.


1. Convert the octal number to binary
2. Read the binary number downward then group into 4.
3. Convert the binary number grouped by 4 to hexadecimal. Grouping should start from right
to left.
4. Add all with positive values and or equal to 1.
Example: Convert 206 to hexadecimal / base 16
Given 4 2 1 = 7 or also known as base
8
2 010
0 000
6 110

8421 8421 8421


0|1000 |0110
0 8 6
Therefore: 2068 = 8616
Week 002: Number System

Conversion: Hexadecimal to Any Number System

The hexadecimal (base 16) numeral system has 16 possible values


(0,1,2,3,4,5,6,7,8,9 and A,B,C,D,E,F) for each place-value. Below is the
value of hexadecimal to binary.
Hexadecimal 0 1 2 3 4 5 6 7 8 9 A B C D E F
value

Binary Value 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1110
Week 002: Number System

Conversion: Hexadecimal to Any Number System

To convert Hexadecimal to Binary follow the steps below.


1. Get the binary values of the given hexadecimal per digit. Refer to the
table above for the binary value
2. Read the answer downward
Example: Convert 206 to binary / base 2
Step 1,2: Get the binary value
Given 8 4 2 1 = 15 or also known as
base 16
2 0010
0 0000
6 0101

Therefore: 20616 = 0010 0000 01012


Week 002: Number System

Conversion: Hexadecimal to Any Number System

To convert Hexadecimal to Decimal follow the steps below.


1. Get the given hexadecimal value and find the value of 16 to the nth
power. Multiply the given number to base 16 nth power.
2. Add the values.
Step 1,2: Multiple and add
Example: Convert 206 to decimal / base 10

Therefore: 20616 = 51810


Week 002: Number System

Conversion: Hexadecimal to Any Number System

To convert Hexadecimal to Octal follow the steps below.


1. Convert the octal number to binary
2. Read the binary number downward then group into 3.
3. Convert the binary number grouped by 3 to hexadecimal. Grouping should start from right to left.
4. Add all with positive values and or equal to 1.
Example: Convert 206 to octal / base 8
Given 8 4 2 1 = 7 or also known as base 8
2 0010
0 0000
6 01 1 0

421 421 421 421


001|000|000|110
1 0 0 6
Therefore: 20616 = 10068
THANK YOU

You might also like