Numbering Systems Review
Numbering Systems Review
College of Engineering
SW Eng. Department
Information Technology
Lec [2]
2018/ 2019
Numbering System
1. Decimal Number System
The number system that we use in our day-to-
day life is the decimal number system.
Decimal number system 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.
Numbering System
2. Binary Number System
• Characteristics of binary number system are as
follows:
• The possibilities:
Decimal to Any Number Base
• Take the decimal number, and divide by the
new number base
• Keep track of the quotient and remainder
• Repeat until quotient = 0
• Read number from the bottom to the top
Decimal to Binary
Converting Decimal to Binary
• Example: Convert decimal 44 to binary.
• 44 / 2 = 22 remainder = 0
• 22 / 2 = 11 remainder = 0
• 11 / 2 = 5 remainder = 1
• 5 / 2 = 2 remainder = 1
• 2 / 2 = 1 remainder = 0
• 1 / 2 = 0 remainder = 1
(44)10 = 101100B
Decimal to Binary
• (51)10 = (110011)2
H.W:
• (217)10 = (11011001)2
• (156)10 = (10011100)2
Decimal to Octal
Converting Decimal to Octal
Decimal to Octal
• Here is an example of using repeated division
to convert 638 decimal to octal:
638 8 6
79 8 7
9 8 1
1 8 1
(638)10 = (1176)8
Decimal to Hexadecimal
Decimal to Hexadecimal
Any Number Base to Decimal
• From right to left, multiply the digit of the
number-to-convert by its baseposition
• Sum all results
Converting Binary to Decimal
• Binary is base 2
• Example: convert 10110 (binary) to decimal
101102 = 1x24 + 0x23 + 1x22 + 1x21 + 0x20
= 1x16 + 0x8 + 1x4 + 1x2 + 0x1
= 16 + 0 + 4 + 2 + 0
= 22
• So 101102 = 2210
Converting Binary to Decimal
• 101012 = 10101B =
1×24+0×23+1×22+0×21+1×20 = 16+4+1= 21
• 1001012 =
• 1×25+0×24+0×23+1×22+0×21+1×20 = 32+4+1
= 37
HW:
100011102 = 14210 ???
Binary to Octal
• Technique
– Group bits in threes, starting on right
– Convert to octal digits.
10110101112 = ?8
10110101112 = 13278
Binary to Octal
Binary to Hexadecimal
• Technique
– Group bits in fours, starting on right
– Convert to hexadecimal digits.
10101110112 = ?16
10101110112 = 2BB16
Binary to Hexadecimal
Octal to Binary
• 345 O = ?? B
Octal to Hexadecimal
• 278 = 2×81+7×80
= 16+7 = 23
• 43078 = 4×83+3×82+0×81+7×80
= 2247
Octal to Binary
• Technique
– Convert each octal digit to a 3-bit equivalent
binary representation.
7058 = ?2
7058 = 1110001012
Octal to Hexadecimal
• Technique
– Use binary as an intermediary
10768 = ?16
10768 = 23E16
Hexadecimal Number System
• Each position in a hexadecimal number
represents a 0 power of the base (16).
Example 160.
• Hexadecimal is base 16
10AF16 = ?2
10AF16 = 00010000101011112
Hexadecimal to Octal
Hexadecimal to Octal
• Technique
– Use binary as an intermediary
1F0C16 = ?8
1F0C16 = 174148
Exercise with Answer