版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、1,数字逻辑设计及应用,Chapter 2 Number Systems and codes (数系与编码) 介绍在数字逻辑体系中信号的表达方式、类型,不同表达方式之间的转换,运算的规则等,Digital Logic Design and Application (数字逻辑设计及应用,2,Review of Chapter 1 (第一章内容回顾,Analog versus Digital (模拟与数字) Digital Devices (数字器件): Gates(门电路)、 Flip-flops(触发器) Electronic and Software Aspects of Digital D
2、esign (数字设计的电子技术和软件技术,Digital Logic Design and Application (数字逻辑设计及应用,3,Review of Chapter 1 (第一章内容回顾,Integrated Circuit(IC,集成电路) Programmable Logic Devices(PLA、PLD、CPLD、FPGA, 可编程逻辑器件) Application-Specific ICs(ASIC, 专用集成电路) Printed-Circuit Boards (PCB, 印制电路板,Digital Logic Design and Application (数字逻辑
3、设计及应用,4,Chapter 2 Number Systems and codes (数系与编码,Two kinds of Information (信息主要有两类): Numeric Data (数值信息) Nonnumeric Data (非数值信息,Digital Logic Design and Application (数字逻辑设计及应用,Number Systems and their Conversions (数制及其转换,Nonnumeric Data Representation Codes (非数值信息的表征 - 编码,5,Chapter 2 Number Systems
4、 and codes (数系与编码,数字系统只处理数字信号 0 , 1; 需要将任意信息用( 0 ,1 )表达; 用(0,1)表达数量: 数制 二进制 用(0,1)表达不同对象: 符号编码,Digital Logic Design and Application (数字逻辑设计及应用,6,2.1 Positional Number System (按位计数制,Any Decimal Number D Can Be Represented as the Following (任意十进制数 D 可表示如下,D = dp-1 dp-2 . d1 d0 . d-1 d-2 . d-n,推广: D2 =
5、 d i 2i D16= d i 16i,Digital Logic Design and Application (数字逻辑设计及应用,7,2.1 Positional Number System (按位计数制,按位计数制的特点 1) 采用基数(Base or Radix), R进制的基数是R 2) 基数确定数符的个数 如十进制的数符为:0、1、2、3、4、5、6、7、8、9,个数为10 二进制的数符为:0、1,个数为2 3)逢基数进一,Digital Logic Design and Application (数字逻辑设计及应用,8,2.1 Positional Number System
6、 (按位计数制,Digital Logic Design and Application (数字逻辑设计及应用,Decimal and Binary,Decimal system: base is 10, the digit may be 0 to 9,Binary system: base is 2, the digit may be 0 or 1,bit: one digit in binary system,9,2.2 Octal and Hexadecimal Numbers (八进制和十六进制,基数,数码,特性,Octal Number (八,进制,8,07,逢,八,进一,Binar
7、y Number (二进制,2,0,1,逢二进一,Hexadecimal Number(十六进制,16,09,AF,逢十六进一,Digital Logic Design and Application (数字逻辑设计及应用,为什么要用到8进制或16进制数,10,说 明,Digital Logic Design and Application (数字逻辑设计及应用,选择什么数制来表示信息, 对数字系统的成本和性能影响很大, 在数字电路中多使用二进制. Most Significant Bit(MSB, 最高有效位) Least Significant Bit(LSB, 最低有效位) 101110
8、0010112 MSB LSB,11,Digital Logic Design and Application (数字逻辑设计及应用,表2.1 十进制、二进制、八进制与十六进制数,12,二进制与八进制和十六进制之间的转换,位数替换法:保持小数点不变,每位八进制数对 应3位二进制数; 每位十六进制数对应4位二进制数; 二进制转换时,从小数点开始向左右分组,在MSB前面和LSB后面可以加0; 转换为二进制时,MSB前面和LSB后面的0不写; 例:1011100010112=56138=B8B16 10111000.10112=270.548=B8.B16,1000110010012 = ( )8
9、= ( )16,Digital Logic Design and Application (数字逻辑设计及应用,13,2.3 General Positional-Number-System Conversion (常用按位计数制的转换,Digital Logic Design and Application (数字逻辑设计及应用,A Number in any Radix to Radix 10 (任意进制数 十进制数) Method: Expanding the formula using radix-10 arithmetic (方法:利用位权展开,Example 1:( 101.01
10、)2 = ( )10 ( 7F.8 )16 = ( )10,More easy way(更简便的方法)? ( F1AC )16 = ( ( ( F16 ) +1 ) 16 + A ) 16 + C,14,2.3 General Positional-Number-System Conversion (常用按位计数制的转换,Digital Logic Design and Application (数字逻辑设计及应用,A Number in Radix 10 to any Radix (十进制 其它进制) Method:Radix Multiplication or Division (基数乘除
11、法) Integer Parts (整数部分): 除 r 取余,逆序排列 Example 2:( 156 )10 = ( )2 Decimal Fraction Parts (小数部分): 乘 r 取整,顺序排列 Example 3:( 0.37 )10 = ( )2,15,2.3 General Positional-Number-System Conversion (常用按位计数制的转换,Digital Logic Design and Application (数字逻辑设计及应用,Example 4:Require 10-2 ,Complete the following convers
12、ion ( 617.28 )10 = ( )2,2-n = 10-2,思考:任意两种进位计数制之间的转换 以十进制(二进制)作为桥梁,n = 7,16,2.4 Addition and Subtraction of Nondecimal Numbers (非十进制数的加法和减法,Digital Logic Design and Application (数字逻辑设计及应用,Two Binary Number Arithmetic (两个二进制数的算术运算) Addition (加法): Carry (进位) 1 + 1 = 10 Subtraction (减法): Borrows (借位) 1
13、0 1 = 1,17,Carry in (进位输入): C in (P.32) Carry out ( 进位输出 ) C out Sum ( 本位和 ): S,2.4 Addition and Subtraction of Non-decimal Numbers (非十进制数的加法和减法,Digital Logic Design and Application (数字逻辑设计及应用,18,Digital Logic Design and Application (数字逻辑设计及应用,表2.3.1 二进制加法真值表,19,Borrow in ( 借位输入 ): Bin Borrow out (
14、借位输出 ): Bout Difference bit ( 本位差 ): D,2.4 Addition and Subtraction of Non-decimal Numbers (非十进制数的加法和减法,Digital Logic Design and Application (数字逻辑设计及应用,20,Digital Logic Design and Application (数字逻辑设计及应用,表2.3.2 二进制减法真值表,21,2.5 Representation of Negative Numbers (负数的表示,Digital Logic Design and Applica
15、tion (数字逻辑设计及应用,2.5.1 Signed-Magnitude Representation 符号 数值表示法(原码) MSB as the Sign bit (0 = plus, 1 = minus) 最高有效位表示符号位( 0 = 正,1 = 负) 01111111127 11111111127 0010111046 1010111046 000000000 100000000,22,2.5 Representation of Negative Numbers (负数的表示,Digital Logic Design and Application (数字逻辑设计及应用,2.5
16、.1 Signed-Magnitude Representation 符号 数值表示法(原码) Two possible representations of Zero 零有两种表示(+ 0、 0) An n-bit signed-magnitude integer range is (n位二进制整数表示范围): ( 2n-1 1) + ( 2n-1 1,23,2.5 Representation of Negative Numbers (负数的表示,2.5.2 Complement Number Systems (补码数制) Radix Complement (基数补码) Diminishe
17、d Radix Complement 基数减1补码 (反码),Digital Logic Design and Application (数字逻辑设计及应用,24,2.5 Representation of Negative Numbers (负数的表示,2.5.3 Radix Complement Representation ( 基数补码表示法) The complement of an n-digit number is obtained by subtracting it from r n (n位数的补码等于从 r n 中减去该数) Example : Table 2-4 P.36,D
18、igital Logic Design and Application (数字逻辑设计及应用,25,2.5 Representation of Negative Numbers (负数的表示,Diminished Radix Complement Representation 基数减1补码表示法(反码): The Diminished Radix Complement of an n-digit number is obtained by subtracting it from r n -1 n位数的反码等于从 r n 1 中减去该数 Example : Table 2-4 2-5 P.36,
19、Digital Logic Design and Application (数字逻辑设计及应用,26,2.5.4 Twos Complement Representation (二进制补码表示法,The MSB of a number in this system serves as the sign bit(最高有效位用做符号位); The weight of the MSB is -2n-1 instead of + 2n-1 (MSB的权是-2n-1 而不是+ 2n-1 ) Obtain a Twos- Complement ( 二进制补码的求取 ): Ones Complement (
20、反码) + 1 (Why,Digital Logic Design and Application (数字逻辑设计及应用,27,2.5.4 Twos Complement Representation (二进制补码表示法,Digital Logic Design and Application (数字逻辑设计及应用,例2.5.1 若约定字长是一个字节,试求119的补码。 解:因119的绝对值11901110111,则补码可以通过下式算法得到: 全1码: 1 1 1 1 1 1 1 1 减去119绝对值: 0 1 1 1 0 1 1 1 119的反码: 1 0 0 0 1 0 0 0 加1: 1
21、 119补码: 1 0 0 0 1 0 0 1,28,2.5.4 Twos Complement Representation (二进制补码表示法,Only one representations of Zero ( 零只有一种表示 ) 00 0 0 0 0 0 0 0 逐位取反 1 1 1 1 1 1 1 1 1 约定8位 0 0 0 0 0 0 0 00,Digital Logic Design and Application (数字逻辑设计及应用,29,2.5.4 Twos Complement Representation (二进制补码表示法,An n-bit Twos- Complement range is (n位二进制补码表示范围): 2 n-1 + ( 2 n-1 1) 约定字长(8比特)后,补码表示数的范围 128127,Digital Logic Design and Application (数字逻辑设计及应用,30,2.5.4 Twos Complement Representation (二进制补码表示法,Positive number has the same: Sign-Magnitude, Ones Complement, a
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 二零二五年度智能汽车抵押贷款服务合同
- 2025年度租房转租合同租赁物权属争议解决补充协议
- 二零二五年度社区车库租赁与便民服务合同
- 二零二五年度空调设备产品责任保险合同
- 2025年度专业级雇佣保姆全面照顾二岁以下婴幼儿服务协议书
- 2025年度离婚房产分割与财产分割纠纷预防合同
- 二零二五年度少儿艺术教育责任家长协议
- 2025年度城市隧道渣土运输及环保处理服务合同
- 科技驱动的宿舍楼内学生食堂设计
- 跨部门协同下的客户关系管理策略
- 九年级上册-备战2024年中考历史总复习核心考点与重难点练习(统部编版)
- 健康指南如何正确护理蚕豆病学会这些技巧保持身体健康
- 老客户的开发与技巧课件
- 2024建设工程人工材料设备机械数据分类和编码规范
- 26个英文字母书写(手写体)Word版
- GB/T 13813-2023煤矿用金属材料摩擦火花安全性试验方法和判定规则
- DB31 SW-Z 017-2021 上海市排水检测井图集
- 日语专八分类词汇
- GB/T 707-1988热轧槽钢尺寸、外形、重量及允许偏差
- GB/T 33084-2016大型合金结构钢锻件技术条件
- 高考英语课外积累:Hello,China《你好中国》1-20词块摘录课件
评论
0/150
提交评论