0% found this document useful (0 votes)
5 views

1+ +Introduction+to+Number+System

Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

1+ +Introduction+to+Number+System

Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 24

Introduction to

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.

The value of each digit in a number can be determined using −


1. The digit
2. The position of the digit in the number
3. The base of the number system (where the base is defined as the total
number of digits available in the number system)
Decimal Numbers
• The number system that we use in our day-to-day life is the decimal
number system.
• It has base 10 as it uses 10 digits from 0 to 9. In decimal number
system, the successive positions to the left of the decimal point
represent units, tens, hundreds, thousands, and so on.
Number System and Description

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 −

• Uses eight digits, 0,1,2,3,4,5,6,7


• Also called as base 8 number system
• Each position in an octal number represents a 0 power of the base (8).
Example 80
• Last position in an octal number represents a x power of the base (8).
Example 8x where x represents the last position - 1
Octal Number System
Example
• Octal Number: 125708
• Calculating Decimal Equivalent −

1 2 5 7 08
84 83 82 81 80
4096 512 64 8 1

4096 +1024 + 320 + 56 + 0 = 549610


Hexadecimal Number System
Characteristics of hexadecimal number system are as follows −
• Uses 10 digits and 6 letters, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
• Letters represent the numbers starting from 10. A = 10. B = 11, C = 12,
D = 13, E = 14, F = 15
• Also called as base 16 number system
• Each position in a hexadecimal number represents a 0 power of the
base (16). Example, 160
• Last position in a hexadecimal number represents a x power of the
base (16). Example 16x where x represents the last position - 1
Hexadecimal Number System
Example
• Hexadecimal Number: 19FDE16
• Calculating Decimal Equivalent −
1 9 F D E16
164 163 162 161 160
65536 4096 256 16 1
65536 + 36864 + 3840 +208 + 14 = 10646210
Number Conversion
There are many methods or techniques which can be used to convert
numbers from one base to another. In this chapter, we'll demonstrate
the following −
• Decimal to Other Base System
• Other Base System to Decimal
• Other Base System to Non-Decimal
• Shortcut method - Binary to Octal
• Shortcut method - Octal to Binary
• Shortcut method - Binary to Hexadecimal
• Shortcut method - Hexadecimal to Binary
Decimal to Other Base System
• Step 1 − Divide the decimal number to be converted by the value of the new
base.
• Step 2 − Get the remainder from Step 1 as the rightmost digit (least
significant digit) of the new base number.
• Step 3 − Divide the quotient of the previous divide by the new base.
• Step 4 − Record the remainder from Step 3 as the next digit (to the left) of
the new base number.
Repeat Steps 3 and 4, getting remainders from right to left, until the quotient
becomes zero in Step 3.
The last remainder thus obtained will be the Most Significant Digit (MSD) of
the new base number.
Decimal to Other Base System
Example
• Decimal Number: 2910
• Calculating Binary Equivalent − 111012
Step Operation Result Remainder
1 29/2 14 1
2 14/2 7 0
3 7/2 3 1
4 3/2 1 1
5 1/0 0 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 −

010 / 101 111/010/111/011/0112


=258 = 7 2 7 3 3
= 727338
Shortcut Method ─ Octal to
Binary
Example
• Octal Number : 258
• Calculating Binary Equivalent − =4-2-1
=2 58 =763028
=010 101 =1111100110000108
=101012
Shortcut Method ─ Binary to
Hexadecimal
Example
• Binary Number : 101012 8–4–2–1
• Calculating Octal Equivalent −
15/2 7 1
0001/0101
7/2 3 1
3/2 1 1 = 15
1/2 0 1

0011/1000/1101/0101/1101/0111
= 38D5D716
Shortcut Method ─ Hexadecimal
to Binary
Example
• Octal Number : 1516
• Calculating Binary Equivalent −
Step Hexadecimal Number Binary Number

You might also like