Logic Circuit and Switching Theory: Sultan Kudarat State University
Logic Circuit and Switching Theory: Sultan Kudarat State University
Logic Circuit and Switching Theory: Sultan Kudarat State University
SWITCHING THEORY
CT 211
When writing decimal (base 10) numbers, use a positional notation; each
digit is multiplied by an appropriate power of 10 depending on its position in the
number.
Example 1.1 2 1 0 -1 -2
953.7810 = 9x10 + 5x10 + 3x10 +7x10 + 8x10
Similar, for binary (base 2) numbers, each binary digit is multiplied by the
appropriate power of 2.
Example 1.2
3 2 1 0 -1 -2
1011.112 = 1x2 + 0x2 + 1x2 + 1x2 + 1x2 + 1x2
=8+0+2+1+½+¼
= 11 ¾
= 11.25 //
10
Note: That the binary point separate the positive and negative power of 2
just as the decimal point separate the positive and negative powers of 10 for decimal
numbers.
CONVERSION
Binary to Decimal
Example 1.3
1010112 = 4310
= 1x2 + 0x2 + 1x2 + 0x2 + 1x2 + 1x 2
= 32 + 8 + 2 + 1
= 4310 //
Decimal to Binary
Example 1.4
37410 = 1011101102
374/2 = 0
187/2 = 1
93/2 = 1
44/2 = 0
23/2 = 1
11/2 = 1
5/2 = 1
2/2 = 0
Note: What will be the remainder that would be
½ =1
the equivalent answer in each division.
Decimal to Octal
Example 1.5
37410 = 566
8
374/8 =6
46/8 =6
5/8 =5
0/8 =0
Note: To check the answer in converting decimal to octal use the procedure
in converting binary to decimal.
Octal to Binary
Example 1.6
75348 = 1111010111002
3 2 1 0
7x8 + 5x8 + 3x8 + 4x8 = 393210
3932/2 = 0
1966/2 = 0
983/2 = 1
490/2 = 1
245/2 = 1
122/2 = 0 Note: Before converting Octal to Binary convert
61/2 = 1 the number first to decimal similar in Example
30/2 = 1 1.3.
15/2 = 1
7/2 =1
3/2 =1
½ =1
Hexadecimal to Decimal
Example 1.7
CAFÉ 16 = 51 96610
3 2 1 0
12x16 + 10x16 + 15x16 + 14x16
= 51 96610 //
Decimal to Hexadecimal
Example 1.8
1374 = 55E
10 16
1374/16 = 14
85/16 = 5
5/16 =5
0/16 =0
Hexadecimal to Octal
Example 1.9
55E = 2536
16 8
010101011110
2 5 3 6
Note: In converting Hexadecimal to Octal group the binary digit into three (3)
Octal to Hexadecimal
Example 1.10
25368 = 55E 16
010101011110
5 5 E
Note: In converting Octal to decimal group the binary digit into four (4)
BINARY ARITHMETIC
Reminder:
1 + 1 = 10 0 – 1 = 10 1x1=1
1+0=1 1–1=0 1x0=0
10 = 2 1–0=1 0x1=0
Addition
Example 1.11
1010101 - 64 + 16 + 4 + 1 = 85
+1101101 - 64 + 32 + 8 + 4 + 1 = 109
11000010 = 194
Subtraction
Example 1.12
1011101 - 93
- 0111011 - 59
0100010 – 34
**********
Exercises
1. Convert the following:
2. Binary arithmetic
2.1. 1011101110
+1001100111
2.2. 0001111011
+1101111111
2.3. 11111001110
+1100101101
2.4. 10001110011
+00110001111
2.5. 110011110011
+111101101101
**************************************************************************************
Reference:
Fundamentals of Logic Design (Fifth Edition): Charles H. Roth, Jr.