Presentation is loading. Please wait.

Presentation is loading. Please wait.

数字系统设计 Digital System Design

Similar presentations


Presentation on theme: "数字系统设计 Digital System Design"— Presentation transcript:

1 数字系统设计 Digital System Design
EE141 数字系统设计 Digital System Design ------化简与码制 王维东 Weidong Wang 浙江大学信息与电子工程学院 College of Information Science & Electronic Engineering 信息与通信工程研究所 Zhejiang University Spring ZDMC – Lec. #2

2 任课教师 王维东 TA: 浙江大学信息与电子工程学院, 信电楼306 邮箱:wdwang@zju.edu.cn
EE141 任课教师 王维东 浙江大学信息与电子工程学院, 信电楼306 College of Information Science & Electronic Engineering Zhejiang University, Hangzhou, Tel: (O) Mobile: TA: 陈 彬彬 Binbin CHEN, ; 陈 佳云 Jiayun CHEN, ; Office Hours:玉泉信电楼 308室(可以微信或邮件联系). Spring ZDMC – Lec. #1

3 Prerequisites预修课程 电子电路基础 电子线路 C语言 How to learn this Course?
Not only listening, thinking and waiting …. But Exercise, Simulation, Practice!

4 课程简介 课程代码:111C0120 参考书 阎石, 数字电子技术基础, 第6版, 高等教育出版社, 2016.
EE141 课程简介 课程代码:111C0120 参考书 阎石, 数字电子技术基础, 第6版, 高等教育出版社, 2016. 王金明著,数字系统设计与Verilog HDL,电子工业出版社,第6版 补充讲义/期中考试前预备 Stanford 大学 108A课程notes. R.H.Katz, G.Borriello, Contemporary Logic Design, second edition,电子工业出版社, 2005. M.M.Mano, 数字设计(第四版), 电子工业出版社, 2010. Spring ZDMC – Lec. #1

5 Other Course Info Website: http://mypage.zju.edu.cn/wdwd/教学工作/
Check frequently 答疑 玉泉信电楼308室/周二周五下午2:30-5:00 上课课间、课后均可 ,微信群/数字系统设计,短信均可

6 Grading (考核) Final grades will be computed approximately as follows:
平时(含课程作业、期中考试+小测验、Project、出勤等)30% Class Room Check Homework Sets 作业每周二上交截止期为课后一周内有效 Project 2 projects (1 or 2 members team) Project-2可选(总评加分1~5分,但不超过平时成绩范围) Finial Exam期末闭卷考试 - 70% 上课说明此门课程的成绩合成:平时成绩包括平时小测验、期中考试、作业、出勤、课堂讨论、论文

7 授课时间和地点: 2017年春夏学期, 地点:紫金港西1-520(多)
周二上午,第1、2节(08:00-09:35) 星期五上午,第3、4节(9:50-11:25) 地点:紫金港西1-520(多) 学在浙里/数字系统设计

8 课程结构 数字理论知识(必备) 数字电路分析与设计 脉冲电路与接口 控制器与数字系统 微处理器简介与设计 数字系统和编码、逻辑代数、门电路
EE141 课程结构 数字理论知识(必备) 数字系统和编码、逻辑代数、门电路 数字电路分析与设计 组合逻辑电路 触发器、半导体存贮器、可编程器件 时序逻辑电路 脉冲电路与接口 控制器与数字系统 状态机 控制器 微码控制器 测试和验证 微处理器简介与设计 指令集 4位CPU Spring ZDMC – Lec. #1

9 ----函数化简&数制码制

10 逻辑函数的化简法 公式化简法 卡诺图化简法 反复应用基本公式和常用公式,消去多余的乘积项和多余的因子。
将逻辑函数的最小项之和的以图形的方式表示出来。 Spring ZDMC – Lec. #2

11 逻辑函数的化简法 逻辑函数的最简形式 最简与或 ------包含的乘积项已经最少,每个乘积项的因子也最少,称为最简的与-或逻辑式。
EE141 逻辑函数的化简法 逻辑函数的最简形式 最简与或 ------包含的乘积项已经最少,每个乘积项的因子也最少,称为最简的与-或逻辑式。 Spring ZDMC – Lec. #2

12 卡诺图化简法 逻辑函数的卡诺图表示法 实质:将逻辑函数的最小项之和的以图形的方式表示出来
EE141 卡诺图化简法 逻辑函数的卡诺图表示法 实质:将逻辑函数的最小项之和的以图形的方式表示出来 以2n个小方块分别代表 n 变量的所有最小项,并将它们排列成矩阵,而且使几何位置相邻的两个最小项在逻辑上也是相邻的(只有一个变量不同),就得到表示n变量全部最小项的卡诺图。 将n变量的全部最小项各用一个小方块表示,使相邻的最小项在几何位置上也相邻地排列…… Spring ZDMC – Lec. #2

13 EE141 表示最小项的卡诺图 二变量卡诺图 三变量的卡诺图 Y 4变量的卡诺图 Spring ZDMC – Lec. #2

14 EE141 表示最小项的卡诺图 二变量卡诺图 三变量的卡诺图 Y Y 4变量的卡诺图 Spring ZDMC – Lec. #2

15 表示最小项的卡诺图 二变量卡诺图 三变量的卡诺图 4变量的卡诺图 Y2 Y1 Y3 Spring 2017 ZDMC – Lec. #2
EE141 表示最小项的卡诺图 二变量卡诺图 三变量的卡诺图 Y2 Y1 Y3 4变量的卡诺图 Spring ZDMC – Lec. #2

16 五变量的卡诺图 Y Spring 2017 ZDMC – Lec. #2
EE141 五变量的卡诺图 Y 已经不能直观地用平面上的几何相邻表示逻辑相邻,以中轴左右对称的最小项也是相邻的 因此,超过4个变量后,卡诺图失去直观性的优点,一般不用这种方法表示,化简函数 Spring ZDMC – Lec. #2

17 用卡诺图表示逻辑函数 将函数表示为最小项之和的形式 。 在卡诺图上与这些最小项对应的位置上填入1,其余地方填0。
EE141 用卡诺图表示逻辑函数 将函数表示为最小项之和的形式 。 在卡诺图上与这些最小项对应的位置上填入1,其余地方填0。 Spring ZDMC – Lec. #2

18 EE141 用卡诺图表示逻辑函数 例: Spring ZDMC – Lec. #2

19 EE141 用卡诺图表示逻辑函数 Y Spring ZDMC – Lec. #2

20 用卡诺图化简函数 依据:具有相邻性的最小项可合并,消去不同因子。 在卡诺图中,最小项的相邻性可以从图形中直观地反映出来。
EE141 用卡诺图化简函数 依据:具有相邻性的最小项可合并,消去不同因子。 在卡诺图中,最小项的相邻性可以从图形中直观地反映出来。 Spring ZDMC – Lec. #2

21 合并最小项的原则: 两个相邻最小项可合并为一项,消去一对因子 四个排成矩形的相邻最小项可合并为一项,消去两对因子
EE141 合并最小项的原则: 两个相邻最小项可合并为一项,消去一对因子 四个排成矩形的相邻最小项可合并为一项,消去两对因子 八个相邻最小项可合并为一项,消去三对因子 Spring ZDMC – Lec. #2

22 两个相邻最小项可合并为一项, 消去一对因子
EE141 两个相邻最小项可合并为一项, 消去一对因子 Y Y Spring ZDMC – Lec. #2

23 用卡诺图化简函数 化简步骤: ------用卡诺图表示逻辑函数 ------找出可合并的最小项 ------化简后的乘积项相加
EE141 用卡诺图化简函数 化简步骤: ------用卡诺图表示逻辑函数 ------找出可合并的最小项 ------化简后的乘积项相加 (项数最少,每项因子最少) Spring ZDMC – Lec. #2

24 卡诺图化简的原则 化简后的乘积项应包含函数式的所有最小项, 即覆盖图中所有的1。 乘积项的数目最少,即圈成的矩形最少。
EE141 卡诺图化简的原则 化简后的乘积项应包含函数式的所有最小项, 即覆盖图中所有的1。 乘积项的数目最少,即圈成的矩形最少。 每个乘积项因子最少,即圈成的矩形最大。 Spring ZDMC – Lec. #2

25 EE141 例: Y BC 00 01 1 1 1 0 1 A Spring ZDMC – Lec. #2

26 EE141 例: Y BC 00 01 1 1 1 0 1 A Spring ZDMC – Lec. #2

27 EE141 例: Y BC 00 01 1 1 1 0 1 A Spring ZDMC – Lec. #2

28 EE141 例: Y Y 化 简 结 果 不 唯 一 Spring ZDMC – Lec. #2

29 EE141 例: Y CD 00 01 11 10 AB Spring ZDMC – Lec. #2

30 EE141 例: Y CD 00 01 11 10 1 AB Spring ZDMC – Lec. #2

31 具有无关项的逻辑函数及其化简 约束项、任意项和逻辑函数式中的无关项
EE141 具有无关项的逻辑函数及其化简 约束项、任意项和逻辑函数式中的无关项 在逻辑函数中,对输入变量取值的限制,在这些取值下为1的最小项称为约束项 约束项 任意项 逻辑函数中的无关项:约束项和任意项可以写入函数式,也可不包含在函数式中,因此统称为无关项。 在输入变量某些取值下,函数值为1或为0不影响逻辑电路的功能,在这些取值下为1的最小项称为任意项 Spring ZDMC – Lec. #2

32 无关项在化简逻辑函数中的应用 合理地利用无关项,可得更简单的化简结果。 加入(或去掉)无关项,应使化简后的项数最少,每项因子最少······
EE141 无关项在化简逻辑函数中的应用 合理地利用无关项,可得更简单的化简结果。 加入(或去掉)无关项,应使化简后的项数最少,每项因子最少······ 从卡诺图上直观地看,加入无关项的目的是为矩形圈最大,矩形组合数最少。 Spring ZDMC – Lec. #2

33 EE141 Y CD 00 01 11 10 1 AB Spring ZDMC – Lec. #2

34 EE141 Y CD 00 01 11 10 1 x AB Spring ZDMC – Lec. #2

35 EE141 Y CD 00 01 11 10 1 x AB Spring ZDMC – Lec. #2

36 EE141 例: Y CD 00 01 11 10 1 x AB Spring ZDMC – Lec. #2

37 原码、反码与补码 原码 反码 补码 符号位 0为+ 1为- 00011010 10101101 1000 N=N 正数
N=(2n-1)-N负数 每位取反,1的补码 1111 补码 N=N 正数 N=2n-N负数 反码加1 1000 Spring ZDMC – Lec. #2

38 数制与编码(复习) NUMBER SYSTEMS AND CODES
二进-十进制转换BINARY-TO-DECIMAL CONVERSIONS 例1 例2 Spring ZDMC – Lec. #2

39 二进制和中国古代八卦图 莱布尼茨自己的说法 二进制就是这样诞生的.
18世纪初,莱布尼茨收到耶酥会士白晋所寄的伏羲八卦图,正式研究八卦符号,以此完善了自己的二进制体系,然后写了论文《二进位算术的阐述—关于只用0和1兼论其用处及伏羲氏所用数字的意义》,发表在法国《皇家科学院院刊》上。 二进制就是这样诞生的. 八卦图衍生自汉族古代的《河图》与《洛书》,传为伏羲所作。其中《河图》演化为先天八卦,《洛书》演化为后天八卦。八卦各有三爻,“乾、坤、震、巽、坎、离、艮、兑”分立八方,象征“天、地、雷、风、水、火、山、泽”八种性质与自然现象,象征世界的变化与循环,分类方法如同五行,世间万物皆可分类归至八卦之中。

40 太极八卦 太极八卦即是阐明宇宙从无极而太极,以至万物化生的过程。 其中的太极即为天地未开、混沌未分阴阳之前的状态。
两仪即为太极的阴、阳二仪。 《系辞》又说:“两仪生四象,四象生八卦”。

41 数制 十进-二进制转换DECIMAL-TO-BINARY CONVERSIONS 例1 例2
Spring ZDMC – Lec. #2

42 十六进制 HEXADECIMAL NUMBER SYSTEM
16位数字 0,1,2,3,4,5,6,7,8,9, A=10, B=11, C=12, D=13, E=14, F=15 Spring ZDMC – Lec. #2

43 十六进制转换 Hex-to-Decimal Conversion Spring ZDMC – Lec. #2

44 十六进制转换 Decimal-to-Hex Conversion Spring ZDMC – Lec. #2

45 十六进制转换 Hex-to-Binary Conversion Binary-to-Hex Conversion
Spring ZDMC – Lec. #2

46 十六进制 Counting in Hexadecimal
With N hex digit positions, we can count from decimal 0 to 16N-1, for a total of 16N different values. For example, with three hex digits, we can count from to FFF16, which is 010 to , for a total of 4096=163 different values. Spring ZDMC – Lec. #2

47 码制 When numbers, letters, or words are represented by a special group of symbols, we say that they are being encoded, and the group of symbols is called a code. BCD CODE a decimal number is represented by its equivalent binary number straight binary coding Binary-Coded-Decimal Code Digital systems all use some form of binary numbers for their internal operation, but the external world is decimal in nature. each digit of the decimal number by a four-bit binary number. The BCD code does not use the numbers 1010, 1011, 1100, 1101, 1110, and 1111. Spring ZDMC – Lec. #2

48 BCD CODE Comparison of BCD and Binary
The main advantage of the BCD code is the relative ease of converting to and from decimal. Spring ZDMC – Lec. #2

49 码制 THE GRAY CODE Digital systems operate at very fast speeds and respond to changes that occur in the digital inputs. When multiple input conditions are changing at the same time, the situation can be misinterpreted and cause an erroneous reaction. In order to reduce the likelihood of a digital circuit misinterpreting a changing input, the Gray code has been developed as a way to represent a sequence of numbers. Spring ZDMC – Lec. #2

50 Gray code the Gray code To convert binary to Gray
only one bit ever changes between two successive numbers in the sequence. To convert binary to Gray the most significant bit use as the Gray MSB. compare the MSB binary with the next binary bit (B1). If they are the same, then G1=0. If they are different, then G1=1. G0 can be found by comparing B1 with B0. Spring ZDMC – Lec. #2

51 PUTTING IT ALL TOGETHER
Spring ZDMC – Lec. #2

52 THE BYTE, NIBBLE, AND WORD
Bytes binary data and information in groups of eight bits A byte always consists of eight bits it can represent any of numerous types of data or information Nibbles Binary numbers are often broken down into groups of four bits, Because it is half as big as a byte, it was named a nibble. Words The size of the word depends on the size of the data pathway in the system that uses the information the computer in your microwave oven can probably handle only one byte at a time. It has a word size of eight bits. the personal computer on your desk can handle eight bytes at a time, so it has a word size of 64 bits. Spring ZDMC – Lec. #2

53 ALPHANUMERIC CODES A complete alphanumeric code would include
the 26 lowercase letters, 26 uppercase letters, 10 numeric digits, 7 punctuation marks, and anywhere from 20 to 40 other characters, such as , /, #, %, *, and so on. ASCII Code American Standard Code for Information Interchange (ASCII). Spring ZDMC – Lec. #2

54 ASCII Code The ASCII code pronounced “askee” is a seven-bit code
so it has 27=128 possible code groups Spring ZDMC – Lec. #2

55 PARITY METHOD FOR ERROR DETECTION
The movement of binary data and codes from one location to another as it does at point x, the receiver may incorrectly interpret that bit as a logic 1, many digital systems employ some method for detection (and sometimes correction) of errors. One of the simplest and most widely used schemes for error detection is the parity method. Spring ZDMC – Lec. #2

56 ERROR DETECTION Parity Bit even-parity method
an extra bit that is attached to a code group The parity bit is made either 0 or 1, depending on the number of 1s that are contained in the code group even-parity method total number of 1s in the code group (including the parity bit) is an even number. The new code group, including the parity bit add a parity bit of 1 to make the total number of 1s an even number Spring ZDMC – Lec. #2

57 Parity Bit The odd-parity method
the total number of 1s (including the parity bit) is an odd number the parity bit becomes an actual part of the code word Regardless of whether even parity or odd parity is used, For example adding a parity bit to the seven-bit ASCII code produces an eight-bit code Spring ZDMC – Lec. #2

58 parity bit The parity bit is issued to detect any single-bit errors that occur during the transmission of a code from one location to another. For example Suppose that the character “A” is being transmitted and odd parity is being used. The transmitted code would be When the receiver circuit receives this code, it will check that the code contains an odd number of 1s (including the parity bit). If so, the receiver will assume that the code has been correctly received. Spring ZDMC – Lec. #2

59 parity bit For example The transmitted code would be
suppose that because of some noise or malfunction the receiver actually receives the following code: The receiver will find that this code has an even number of 1s. This tells the receiver that there must be an error in the code because presumably the transmitter and receiver have agreed to use odd parity. It should be apparent that this parity method would not work if two bits were in error, Spring ZDMC – Lec. #2

60 parity bit For example Spring ZDMC – Lec. #2

61 复习 常见十进制代码 有什么特点? 有什么用途? 8421码 余3码 2421码 5211码 余3循环码
Spring ZDMC – Lec. #2

62 课后作业 调查: 作业: 阅读 国际上的数字相关集成电路公司有哪些芯片? 图书馆资源:电子器件天地 《数字系统设计I》作业
EE141 课后作业 调查: 国际上的数字相关集成电路公司有哪些芯片? TI, Philips, Toshiba, Fairchild, Motorola…… 图书馆资源:电子器件天地 作业: 《数字系统设计I》作业 ① 2.16(5,7), 2.17(2,4,5),2.20(1,3), 2.21(2,4), 2.27(2,4); ②1.11 (2,3),1.12 (2,5),1.13 (3,6,8), 1.14 (3,7,8);原码、补码、反码变换及运算 ( 3月14日上交) 阅读 组合电路 Spring ZDMC – Lec. #2

63 什么是电子设计竞赛?什么是SRTP? 了解规则 了解课题 组队 联系指导教师 申报 go


Download ppt "数字系统设计 Digital System Design"

Similar presentations


Ads by Google