Professional Documents
Culture Documents
نظم رقمية 1
نظم رقمية 1
1
Generally:
2. Binary System: In this System, there are only two symbols or possible digit
values, i.e., 0 and 1.
The decimal number is equal to the sum of binary digits (dn) times their power of 2
(2n):
binary number: 1 1 1 0 0 1
power of 2: 25 24 23 22 21 20
13/2 6 1 0
6/2 3 0 1
3/2 1 1 2
1/2 0 1 3
So [13]10 = [1101]2
174/2 87 0 0
87/2 43 1 1
43/2 21 1 2
21/2 10 1 3
10/2 5 0 4
5/2 2 1 5
2/2 1 0 6
1/2 0 1 7
So [174]10 = [10101110]2
3
Example 3: Convert the decimal number [27.15] to binary number
27/2 13 1 0
13/2 6 1 1
6/2 3 0 2
3/2 1 1 3
1/2 0 1 4
Then [27] 10= [11011]2
Note:
22/4 5 2 0
5/4 1 1 1
So [22.5]10= [112.2] 4
3. Octal number system: It is said to be of base (8) since it uses 8 digits {0,
1, 2, ….,7}.
Example 1: Convert [560]10 to [ ]8.
560/8 70 0 0
70/8 8 6 1
8/8 1 0 2
1/8 0 1 3
5
Example 2: Convert (0.52)10 into an octal number.
0.28×8=2.24 2 0.24 2
0.24×8=1.92 1 0.92 3
0.92×8=7.36 7 0.36 4
Example: Suppose 2158 is an octal number, then it’s decimal form will be,
2158 = 2 × 82 + 1 × 81 + 5 × 80 = 2 × 64+ 1 × 8 + 5 × 1 = 128 + 8 + 5 = 14110
6
Take binary number
Divide the binary digits into groups of three (starting from
right) for integer part and start from left for fraction part.
Convert each group of three binary digits to one octal digit.
7
1. Take the integer part
165/16 A 5 0
A/16 0 A 1
3. So [165.25]10=[A5.4]16
8
Take binary number
Divide the binary digits into groups of four (starting from right) for
integer part and start from left for fraction part.
Convert each group of four binary digits to one hexadecimal digit.
9
Example 4: Convert binary number 001100101.110111 into hexadecimal number. Since
there is binary point here and fractional part. So,
10
Let’s count from zero to twenty using decimal, binary, octal, and hexadecimal to
contrast these systems of numeration:
11
Homework
12