Logic Circuit and Switching Theory: Sultan Kudarat State University

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 8

LOGIC CIRCUIT AND

SWITCHING THEORY
CT 211

SULTAN KUDARAT STATE UNIVERSITY


INFORMATION TECHNOLOGY DEPARTMENT
LESSON 1 LOGIC CIRCUIT AND SWITCHING THEORY

NUMBER SYSTEM AND CONVERSION


Objective:
When you complete this lesson, you should be able to solve the following types of
problems:
a. Given a positive integer, fraction, or mixed number in any base (2 through 16);
convert to any other base. Justifying the procedure used by using a power series
expansion for the number.
b. Add, subtract, multiply, and divide position binary numbers. Explain the addition
and subtraction process it terms of carries and borrows.

Number System and Conversion

Table 1.1. Number with different bases

Decimal base Binary base 2 Octal base 8 Hexadecimal


10 base 16
00 0000 00 0
01 0001 01 1
02 0010 02 2
03 0011 03 3
04 0100 04 4
05 0101 05 5
06 0110 06 6
07 0111 07 7
08 1000 10 8
09 1001 11 9
10 1010 12 A
11 1011 13 B
12 1100 14 C
13 1101 15 D
14 1110 16 E
15 1111 17 F

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

SULTAN KUDARAT STATE UNIVERSITY


INFORMATION TECHNOLOGY DEPARTMENT
LESSON 1 LOGIC CIRCUIT AND SWITCHING THEORY

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.

SULTAN KUDARAT STATE UNIVERSITY


INFORMATION TECHNOLOGY DEPARTMENT
LESSON 1 LOGIC CIRCUIT AND SWITCHING THEORY

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 //

Note: In converting Hexadecimal to Decimal refer to Table 1.1.

SULTAN KUDARAT STATE UNIVERSITY


INFORMATION TECHNOLOGY DEPARTMENT
LESSON 1 LOGIC CIRCUIT AND SWITCHING THEORY

Decimal to Hexadecimal

Example 1.8
1374 = 55E
10 16

1374/16 = 14
85/16 = 5
5/16 =5
0/16 =0

Note: Number (14) in Table 1.1 the equivalent Hexadecimal is (E)

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)

SULTAN KUDARAT STATE UNIVERSITY


INFORMATION TECHNOLOGY DEPARTMENT
LESSON 1 LOGIC CIRCUIT AND SWITCHING THEORY

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

SULTAN KUDARAT STATE UNIVERSITY


INFORMATION TECHNOLOGY DEPARTMENT
LESSON 1 LOGIC CIRCUIT AND SWITCHING THEORY

**********
Exercises
1. Convert the following:

1.1. BEEF =________________


16 7
1.2. =________________
10
1.3. =________________
4
1.4. =________________
6

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.

SULTAN KUDARAT STATE UNIVERSITY


INFORMATION TECHNOLOGY DEPARTMENT
LESSON 1 LOGIC CIRCUIT AND SWITCHING THEORY

SULTAN KUDARAT STATE UNIVERSITY


INFORMATION TECHNOLOGY DEPARTMENT

You might also like