Download presentation
Presentation is loading. Please wait.
Published byJulian Douglas Adams Modified over 8 years ago
2
Chapter 7 Logic Circuits 2008.1 0 Electrical Engineering and Electronics II Scott
3
1. State the advantages of digital technology compared to analog technology. 2. Understand the terminology of digital circuits. 3. Convert numbers between decimal, binary, and other forms. Main Contents
4
5. Understand the binary arithmetic operations used in computers and other digital systems. 6. Interconnect logic gates of various types to implement a given logic function. 7. Use Karnaugh maps to minimize the number of gates needed to implement a logic function. 8. Understand how gates are connected together to form flip-flops and registers. Main Contents
5
Difference between analog signals and digital signals
6
Advantages of digital signals
7
Positive Logic TTL-transistor and transistor logic circuits low high
8
Advantages of the Digital Approach 1.Provided that the noise amplitude is not too large, the logic values represented by a digital signal can still be determined after noise is added. 2.With modern IC ( integrated circuit ) technology, it is possible to manufacture exceedingly complex digital circuits economically. 7.1 Basic Logic Circuit Concepts
9
Definitions Positive versus Negative Logic system Digital Words In parallel transmission, an n-bit word is transferred on n wires, one wire for each bit, plus a common or ground wire. In serial transmission, the successive bits of the word are transferred one after the other with a single pair of wires.
10
Binary Numbers Base 基数 2 权 系数 7.2 Representation of numerical Data in Binary Form Base 基数 10 权 系数
11
Conversion of decimal integer to binary form 余数 商 高位 Divide by 2 343 10 =101010111 2
12
Conversion of decimal fraction to binary form 余数 取整 低位 multip ly by 2 0.39210=0.0110012
13
Rules of binary addition
14
Hexadecimal and Octal Numbers
15
Binary-Coded decimal Format
16
Gray Code
17
Ordinary BCD 8421 码 2421 码 5421 码余3码余3码格雷码 00000 00110000 10001 01000001 20010 01010011 3 01100010 40100 01110110 50101 1000 0111 60110 1001 0101 70111 1010 0100 8100011101011 1100 9100111111100 1101 权 842124215421 中文 教材
18
Complement Arithmetic The one’s complement of a binary number is obtained by replacing 1s by 0s, and vice versa. 01001101 10110010 (one’s complement)
19
The two’s complement of a binary number is obtained by adding 1 to the one’s complement, neglecting the carry (if any) out of the most significant bit. Complements are useful for representing negative numbers and performing subtraction in computers. Two’s Complement
20
Two ways to find two’s complement Number 01001100 (72) 10 1 的补数 10110011 Method 1Method 2 2 的补数 10110100 (-72) 10
21
signed two’s complement representation using eight-bit words
22
Subtraction Using Two’s Complement Arithmetic
23
Overflow and Underflow In performing arithmetic using two’s- complement arithmetic, we must be aware of the possibility of overflow in which the result exceeds the maximum value that can be represented by the word length in use.
24
7.3 Combinatorial Logic Circuits AND Gates
25
AND Operation Logic multiplication Associative Law
26
AND Gates
27
Logical Inverter
28
Not operation
29
OR Gates
31
OR Operation Logic addition
32
Boolean algebra Mathematical theory of logic variables Different from ordinary algebra
33
Boolean algebra expressions can be implemented by interconnection of AND gates, OR gates, and inverters.
34
How to find a simpler/alternative equivalent logic expression ?
35
De Morgan’s Laws If the variables in a logic expression are replaced by their inverses, the AND operation is replaced by OR, the OR operation is replaced by AND, and the entire expression is inverted, the resulting logic expression yields the same values as before the changes.
36
According to these two expression as follows, we get other two expression as well. De Morgan’s Laws
37
Additional Logic-gate Symbols
38
NAND, NOR, and XOR Gates
39
如图为一个控制楼道路灯亮灭的电路:上楼前,用楼下 的(单刀双掷)开关打开电灯,上楼后,用楼上开关关灭 电灯;或者在下楼前,用楼上开关打开电灯,下楼后,用 楼下开关关灭电灯。试问该电路实现何种逻辑功能? 设楼上开关为 A ,楼下开关为 B ,灯泡为 Y 。并设 A 、 B 掷 向下为 0 ,掷向上时为 1 ;灯亮时 Y 为 1 ,灯灭时 Y 为 0 。根据 逻辑要求列出真值表。 Y
40
1)NAND Gates Common IC
41
2 ) Inverters Common IC
42
3 ) NOR Gates Common IC
43
4 ) 与或非门 Common IC
44
Logical Sufficiency of NAND Gates or NOR Gates alone Any boolean function can be implemented by NAND gates alone A+B=?? AB=??
45
Any boolean function also can be implemented by NOR gates alone. Logical Sufficiency of NAND Gates or NOR Gates alone
46
Sum-of-Products Implementation Product terms that include all of the input variables (or their inverses) are called minterms. In a sum-of-products expression, we form a product of all the input variables (or their inverses) for each row of the truth table for which the result is logic 1. The output is the sum of these products. 7.4 Synthesis of Logic Circuits
47
The output is the sum of these products (part of minterms).
49
Product-of-Sums POS Implementation Sum terms that include all of the input variables (or their inverses) are called maxterms. In a product-of-sums expression, we form a sum of all the input variables (or their inverses) for each row of the truth table for which the result is logic 0. The output is the product of these sums.
50
The output is the product of these sums (maxterms)
52
According to De Morgen Law, we get
53
Show two ways to realize the exclusive-OR (XOR) operation by using AND, OR and NOT gates. Can you show one way to realize the exclusive-OR (XOR) operation with fewest NAND gates?
54
Show two ways to realize the exclusive-OR (XOR) operation by using AND, OR and NOT gates. Can you show one way to realize the exclusive-OR (XOR) operation with fewest NAND gates? Only 4 NAND gates are needed.
55
Only one of people A 、 B 、 C 、 D did a good deed, A said: I did not do it; B said: C did it; C said B lies; D said B did it. Then, if only one tells truth, who did the good deed, and who tells truth? If only one lies, who did the good deed, and who lies ? Answer: 1) A did; C tells truth. 2) B lies; B did it.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.