1+ +Introduction+to+Number+System
1+ +Introduction+to+Number+System
Number System
Dr. JOAN P. LAZARO, PCpE
Number System
• When we type some letters or words, the computer translates them
in numbers as computers can understand only numbers.
0, 1, 2, 3, 4, 5, 6 ,7 ,8, 9, A, B, C, D, E, F
Binary Number System
Characteristics of the binary number system are as follows −
• Uses two digits, 0 and 1
• Also called as base 2 number system
• Each position in a binary number represents a 0 power of the base (2).
Example 20
• Last position in a binary number represents a x power of the base (2).
Example 2x where x represents the last position - 1.
Binary Number System
Example
• Binary Number: 101012
• Calculating Decimal Equivalent −
1 0 1 0 12
24 23 22 21 20
16 8 4 2 1
16 + 4 + 1 = 2110
Octal Number System
Characteristics of the octal number system are as follows −
1 2 5 7 08
84 83 82 81 80
4096 512 64 8 1
1 1 1 0 12
24 23 22 21 20 = 2910
Decimal to Other Base System
Example
• Decimal Number: 25810
• Calculating Octal Equivalent − 4028
Step Operation Result Remainder
1 258/8 32 2
2 32/8 4 0
3 4/8 0 4
Decimal to Other Base System
Example
• Decimal Number: 98410
• Calculating Hexadecimal Equivalent − 3D816
Step Operation Result Remainder
1 984/16 61 8
2 61/16 3 13 = D
3 3/16 0 3
Other Base System to Decimal
• Step 1 − Determine the column (positional) value of each digit (this
depends on the position of the digit and the base of the number
system).
• Step 2 − Multiply the obtained column values (in Step 1) by the digits
in the corresponding columns.
• Step 3 − Sum the products calculated in Step 2. The total is the
equivalent value in decimal.
Other Base System to Decimal
Example
• Binary Number: 111010111012
• Calculating Decimal Equivalent −
Step Binary Number Decimal Number
Other Base System to Decimal
Example
• Octal Number: 74028
• Calculating Decimal Equivalent −
Step Octal Number Decimal Number
Other Base System to Decimal
Example
• Hexadecimal Number: B4F16
• Calculating Decimal Equivalent −
Step Hexadecimal Decimal Number
Number
Shortcut Method ─ Binary to
Octal
• Step 1 − Divide the binary digits into groups of three (starting from
the right).
• Step 2 − Convert each group of three binary digits to one octal digit.
7/2 3 1
3/2 1 1
½ 0 1
Shortcut Method ─ Binary to
Octal
Example
• Binary Number : 101012
• Calculating Octal Equivalent −
0011/1000/1101/0101/1101/0111
= 38D5D716
Shortcut Method ─ Hexadecimal
to Binary
Example
• Octal Number : 1516
• Calculating Binary Equivalent −
Step Hexadecimal Number Binary Number