Digital Design - EE2130E
Digital Design - EE2130E
Digital Design - EE2130E
• In Binary system:
– The Most Significant Bit
(MSB) is the leftmost bit
(largest weight)
– The Least Significant Bit
(LSB) is the rightmost bit
(smallest weight)
Octal
(base 8)
Decimal Binary
(base 10) (base 2)
Hexadecimal
(base 16)
12
Trần Thị Anh Xuân – 3I – SEE – HUST [email protected]
Chapter 1: Basic knowledge
Number Systems Conversion
• Each digit carries a certain weight based on its position
base point
… r4 r3 r2 r1 r0 . r-1 r-2 …
• For example:
N
Q1 , remainder a0
r
Q1
Q2 , remainder a1
R
Q2
Q3 , remainder a2
R
Trần Thị Anh Xuân – 3I – SEE – HUST [email protected]
Chapter 1: Basic knowledge
Decimal to Base-r Conversion
• a positive number N of radix 10:
2 1 rem. = 1 = a4
0 rem. = 1 = a5 MSB
– Example:
– How to find?
• Reverse all bits of the binary number
– Example:
45
Trần Thị Anh Xuân – 3I – SEE – HUST [email protected]
Chapter 1: Basic knowledge
Boolean Constants and variables
• 0/1 and Low/High are used most of the time.
46
Trần Thị Anh Xuân – 3I – SEE – HUST [email protected]
Chapter 1: Basic knowledge
Boolean Constants and variables
• Boolean variables are designated by letters of the alphabet, such as A,
B, C, x, y, z,…with each variable having two and only two distinct
possible values: 1 and 0
47
Trần Thị Anh Xuân – 3I – SEE – HUST [email protected]
Chapter 1: Basic knowledge
Truth Tables
• How a logic circuit’s output depends on the logic levels present
at the inputs.
48
Trần Thị Anh Xuân – 3I – SEE – HUST [email protected]
Chapter 1: Basic knowledge
Boolean Constants and variables
• Three basic Logic operations: AND, OR, NOT
• Logic Gates
– Digital circuits constructed from diodes, transistors, and resistors
whose output is the result of a basic logic operation(OR, AND, NOT)
performed on the inputs.
49
Trần Thị Anh Xuân – 3I – SEE – HUST [email protected]
Chapter 1: Basic knowledge
AND Operation with AND Gates
• Truth table and Gate Symbol
• Expression: Q(A,B) = A.B
A B Q
0 0 0
0 1 0
1 0 0
1 1 1
51
Trần Thị Anh Xuân – 3I – SEE – HUST [email protected]
Chapter 1: Basic knowledge
AND Operation with AND Gates
• IC 7408: 4 AND gates
A B Q
0 0 0
0 1 1
1 0 1
1 1 1
54
Trần Thị Anh Xuân – 3I – SEE – HUST [email protected]
Chapter 1: Basic knowledge
NOT Operation with NOT Gates
A Q
0 1
1 0
A B Q
0 0 1
0 1 1
1 0 1
1 1 0
57
Trần Thị Anh Xuân – 3I – SEE – HUST [email protected]
Chapter 1: Basic knowledge
NOR Gates
A B Q
0 0 1
0 1 0
1 0 0
1 1 0
59
Trần Thị Anh Xuân – 3I – SEE – HUST [email protected]
Chapter 1: Basic knowledge
XOR Gates (Exclusive-OR)
• Truth table and Symbol
• Expression:
A B Q
0 0 0
0 1 1
1 0 1
1 1 0
61
Trần Thị Anh Xuân – 3I – SEE – HUST [email protected]
Chapter 1: Basic knowledge
XNOR Gates
• Truth table and Symbol
• Expression:
A B Q
0 0 1
0 1 0
1 0 0
1 1 1
63
Trần Thị Anh Xuân – 3I – SEE – HUST [email protected]
Chapter 1: Basic knowledge
Equivalent Gates transformation
• Example:
A A A A A A
A
A
A
A
1 0
A
A Q A
Q Q
B B B
A
A Q A Q
Q
B B B
• Associativity:
A.B.C = A.(B.C) = (A.B).C
A + B + C = A + (B + C) = (A + B) + C
• Distributivity:
A.(B+C) = A.B+A.C
A + (B.C) = (A+B).(A+C)
Demorgan Theory:
B A C B A C B A C B A C
0 0 Hi-Z 0 0 Hi-Z 0 0 0 0 0 1
0 1 Hi-Z 0 1 Hi-Z 0 1 1 0 1 0
1 0 0 1 0 1 1 0 Hi-Z 1 0 Hi-Z
1 1 1 1 1 0 1 1 Hi-Z 1 1 Hi-Z
TrầnThị
Trần ThịAnh
Anh Xuân
Xuân - 3i– 3I – SEE – HUST [email protected] 108
Combinational Circuit Design
• Mạch logic tổ hợp (Combinational Logic Circuit)
PLD
IC 74LS42
M N K O1 O2
TrầnThị
Trần ThịAnh
Anh Xuân
Xuân - 3i– 3I – SEE – HUST [email protected] 123
Chapter 3: Combinational Logic Circuit
BCD-to-Seven Segment (BCD/7SEG) Decoder
• BCD/7SEG Decoder
– Seven Segment LED: 2 types
• Common – Anode
• Common - Cathode
GND