Digital Electronics
(EE202)
(EE202)
NUMBER
NUMBER SYSTEMS
• Decimal
0~9
• Binary
0~1
• Octal
0~7
• Hexadecimal
0~F
DECIMAL
DECIMAL
The decimal system is composed of 10 numerals or symbols. These 10 symbols are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9; using these symbols as digits of a number, we can express any quantity. The decimal system, also called the base-10 system because it has 10 digits.
EXAMPLE:
47 = (4 X 101)+(7 X 100)
= (4 X 10) + (7 X 1)
= 40+ 7
EXERCISE :
568.23 =
BINARY
BINARY
In the binary system, there are only two symbols or possible digit values, 0 and 1.
This base-2 system can be used to represent any quantity that can be represented in decimal or other number system. Binary
Binary to decimal conversion
23
22
21
20
Decimal
0
0
0
0
0
0
0
0
1
1
0
0
1
0
2
0
0
1
1
3
0
1
0
0
4
0
1
0
1
5
0
1
1
0
6
0
1
1
1
7
Dan seterusnya… ……..
……
……..
…….
8
Example 1:
Convert the binary whole number
110112 to decimal.
Weight :
Binary number :
24 23 22 21 20
1 1 0 1 12
= 16+8+0+2+1
= 2710 (decimal)
Example 2:
Convert the fractional number
0.10112 to decimal.
Weight :
2-1 2-2 2-3 2-4
Binary number : 0. 1 0 1 12
=0.5+0+0.125+0.0625
= 0.687510
Decimal
Decimal to binary conversion
Using methods:
•
Convert a decimal number to binary using
Sum-of-weight method
•
Convert a decimal whole number to binary using the repeated devison-by-2 method
•
Convert a decimal fraction to binary using the repeated multiplication-by-2 method
Sum-ofSum-of-weight method
Find binary weights that add up to decimal number.
Example:
Convert the decimal number 9 to binary
9= 8+1
23
22
21
20
8
4
2
1
1
0
0
1
Binary number for decimal is 1001
Repeated devison-byRepeated devison-by-2 method
Divide decimal number by 2 until the quotient is
0. Remainder form the binary number.
Example: Converting decimal number 25 to binary. Stop when the whole-number quotient is 0
Repeated multiplication-byRepeated