CSC201: Digital Logic Design
Level 2 – 1st Semester
Digital Logic Design
Section (2)
Eng. Norhan Ahmed
CSC201: Digital Logic Design
Level 2 – 1st Semester
Application to the lecture:
1. Count.. Conversion of number systems.
2. Conversion of fraction numbers.
3. Arithmetic operations in Binary system (+,-,*,/,).
4. Arithmetic operations in Hex & Oct system (+,*).
5. 1’s & 2’s Complement.
Agenda
Practical part:
1. Create Multiplexer circuit.
CSC201: Digital Logic Design
Level 2 – 1st Semester
• A number System : defines how numbers can be represented using
distinct symbols.
• A number can be represented differently in different systems.
• For Example :
Binary Decimal Octa Hex
(0010 1010)2 (42)10 (52)8 (2A)16
Eng. Norhan Ahmed
CSC201: Digital Logic Design
Level 2 – 1st Semester
Computer number Systems :
• Binary Number System
• Octal Number System
• Decimal Number System
• Hexadecimal Number System
Eng. Norhan Ahmed
CSC201: Digital Logic Design
Level 2 – 1st Semester
Binary System:
Truth Table
Base : 2 Decimal A B
0 0 0
Digits : 0 , 1 1 0 1
2 1 0
Example : (0100)2 , (1010)2 , (01)2 3 1 1
Eng. Norhan Ahmed
CSC201: Digital Logic Design
Level 2 – 1st Semester
Truth Table
Octal System: Decimal A B C
0 0 0 0
Base : 8 1 0 0 1
2 0 1 0
Digits : 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 3 0 1 1
4 1 0 0
Example : (6)8 , (55)8 , (109)8 5 1 0 1
6 1 1 0
7 1 1 1
Eng. Norhan Ahmed
CSC201: Digital Logic Design
Level 2 – 1st Semester Truth Table
Decimal A B C D
Decimal System: 0 0 0 0 0
1 0 0 0 1
Base : 10 2 0 0 1 0
3 0 0 1 1
Digits : 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9
4 0 1 0 0
Example : (3)10 , (500)10 , (1045)10 5 0 1 0 1
6 0 1 1 0
7 0 1 1 1
8 1 0 0 0
9 1 0 0 1
Eng. Norhan Ahmed
Truth Table
CSC201: Digital Logic Design
Level 2 – 1st Semester Decimal A B1 C D
0 0 0 0 0
Hexadecimal System: 1 0 0 0 1
2 0 0 1 0
3 0 0 1 1
Base : 16
4 0 1 0 0
5 0 1 0 1
Digits : 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9, A , B , C, 6 0 1 1 0
7 0 1 1 1
D,E,F 8 1 0 0 0
9 1 0 0 1
Example : (3AB)16 , (500C)16 , (ABCD)16 A = 10 1 0 1 0
B = 11 1 0 1 1
C = 12 1 1 0 0
D = 13 1 1 0 1
E = 14 1 1 1 0
Eng. Norhan Ahmed F = 15 1 1 1 1
CSC201: Digital Logic Design
Level 2 – 1st Semester
Decimal Hexadecimal
Binary Octal
Eng. Norhan Ahmed
CSC201: Digital Logic Design
Level 2 – 1st Semester
Arithmetic
Operations in
Binary System
CSC201: Digital Logic Design
Level 2 – 1st Semester
Binary Addition:
• A numbering system used by computers and digital circuits.
• Uses 2 values: 0 or 1.
0+0=0 1
0 00 11001
0+1=1 1 01 +
10101
1+0=1 2 10
1+1=2 1 01 110
3 11
1+1+1=3
Eng. Norhan Ahmed
CSC201: Digital Logic Design
Level 2 – 1st Semester
Binary Subtraction:
• A numbering system used by computers and digital circuits.
• Uses 2 values: 0 or 1.
0 10
0-0=0
11001
0 - 1 = 1 (Borrow 1) -
10101
1-0=1
1-1=0 00 100
Eng. Norhan Ahmed
CSC201: Digital Logic Design
Level 2 – 1st Semester
Binary Multiplication:
• A numbering system used by computers and digital circuits.
• Uses 2 values: 0 or 1.
1010
0*0=0 *
101
0*1=0
+ 1010
1*0=0 00000
1*1=1 + 1010 00
110010
Eng. Norhan Ahmed
CSC201: Digital Logic Design
Level 2 – 1st Semester
Binary Division: 0 1 10
• A numbering system used by 10 - 1100
computers and digital circuits. 0
• Uses 2 values: 0 or 1. - 11
10
- 010
10
0000
Eng. Norhan Ahmed
CSC201: Digital Logic Design
Level 2 – 1st Semester
Arithmetic
Operations in
(Octa & Hex)
Systems
CSC201: Digital Logic Design
Level 2 – 1st Semester
Octal Addition: Draft
9
-
11
1 8
456 1
+
123
601 8
-
1 8
0
Eng. Norhan Ahmed
CSC201: Digital Logic Design
Level 2 – 1st Semester
Hexadecimal Addition:
4A6
+
1B3
621
59
Eng. Norhan Ahmed
CSC201: Digital Logic Design
Level 2 – 1st Semester
Hexadecimal Addition:
Draft
1
4A6 21
+ -
1B3 1 16
6 59 5
Eng. Norhan Ahmed
CSC201: Digital Logic Design Draft
Level 2 – 1st Semester
30
-
Octal MULTIPLICATION: (First Digit= 5) 8
22 20
-
3 2 8
614 22
- 12
x 25 3 8
2
14 12
3 6 74 -
14 8
-
8 4
6
Eng. Norhan Ahmed
CSC201: Digital Logic Design
Level 2 – 1st Semester
Octal MULTIPLICATION: (Second Digit= 2) Draft
8
-
1 1 1 8
614
x 0
25
+ 3 6 74 12
1 4 30 0 -
8
1
4
Eng. Norhan Ahmed
CSC201: Digital Logic Design
Level 2 – 1st Semester
Draft
Octal MULTIPLICATION: (Final Result)
9
-
1 8
614
x 1
25
11
+ 3 6 74 8
143 0 0 -
8
1
2 0 17 4 0
Eng. Norhan Ahmed
CSC201: Digital Logic Design Draft
Level 2 – 1st Semester
Hexadecimal MULTIPLICATION: 72 120
- -
16 16
(First Digit= C)
56 104
7
A101 24 56 104
x DC 7 - - -
16 16 16
78C 0 C 8 40 88
40 88
- -
16 16
24 72
Eng. Norhan Ahmed
CSC201: Digital Logic Design
Level 2 – 1st Semester
Draft
Hexadecimal MULTIPLICATION: 82 130
- -
16 16
(Second Digit= D)
34 66 114
8 -
A101 16
66 114
x DC 8 18 - -
16 16
18
+ 78C 0 C - 50 98
82D 0 D 0 16
50 98
2 - -
16 16
34 82
Eng. Norhan Ahmed
CSC201: Digital Logic Design
Level 2 – 1st Semester
Hexadecimal MULTIPLICATION: (Final Result)
Draft
A101
x
1 DC -
21
1 16
+ 78C 0 C
82D0 D0 5
8A5CDC
Eng. Norhan Ahmed
CSC201: Digital Logic Design
Level 2 – 1st Semester
Signed Numbers
CSC201: Digital Logic Design
Level 2 – 1st Semester
2. 1’s Complement:
Binary number 1’S Complement
1010 0101
11010 00101
110111 001000
1011011 0100100
Eng. Norhan Ahmed
CSC201: Digital Logic Design
Level 2 – 1st Semester
3. 2’s Complement:
Binary number 1’S Complement 2’S Complement
1010 0101 + 1 0110
11010 00101 + 1 00110
110111 001000 + 1 001001
1011011 0100100 + 1 0100101
Eng. Norhan Ahmed
CSC201: Digital Logic Design
Level 2 – 1st Semester
Practical Part
CSC201: Digital Logic Design
Level 2 – 1st Semester
Multiplexer (MUX):
Multiplexer: a circuit consisting of 2 or more inputs and 1 output used to
choose 1 input and connect it to the output.
(Number of Selectors) = Log2(Number of Inputs)
(Number of Inputs) = 2(Number of Selectors)
21 =2
22 =4
23 =8
24 = 16
Eng. Norhan Ahmed
CSC201: Digital Logic Design
Level 2 – 1st Semester
2 to 1 multiplexer:
Output = Selector Output0 + Selector Output1
Selector Output
0 Input 0
1 Input 1
Eng. Norhan Ahmed
CSC201: Digital Logic Design
Level 2 – 1st Semester
Any Questions
Eng. Norhan Ahmed
CSC201: Digital Logic Design
Level 2 – 1st Semester
Thank You
Eng. Norhan Ahmed