欢迎来到三一办公! | 帮助中心 三一办公31ppt.com(应用文档模板下载平台)
三一办公
全部分类
  • 办公文档>
  • PPT模板>
  • 建筑/施工/环境>
  • 毕业设计>
  • 工程图纸>
  • 教育教学>
  • 素材源码>
  • 生活休闲>
  • 临时分类>
  • ImageVerifierCode 换一换
    首页 三一办公 > 资源分类 > PPT文档下载  

    2019姜书艳数字逻辑设计及应用ppt课件.ppt

    • 资源ID:1373581       资源大小:979.02KB        全文页数:66页
    • 资源格式: PPT        下载积分:16金币
    快捷下载 游客一键下载
    会员登录下载
    三方登录下载: 微信开放平台登录 QQ登录  
    下载资源需要16金币
    邮箱/手机:
    温馨提示:
    用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)
    支付方式: 支付宝    微信支付   
    验证码:   换一换

    加入VIP免费专享
     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    2019姜书艳数字逻辑设计及应用ppt课件.ppt

    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 Design (数字设计的电子技术和软件技术),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 (数字逻辑设计及应用),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 and codes (数系与编码),数字系统只处理数字信号 0 , 1;需要将任意信息用( 0 ,1 )表达;用(0,1)表达数量: 数制 二进制 用(0,1)表达不同对象: 符号编码,Digital Logic Design and Application (数字逻辑设计及应用),6,6,How to Encode Text: ASCII, Unicode,ASCII: 7- (or 8-) bit encoding of each letter, number, or symbol,Sample ASCII encodings, ,7,7,How to Encode Text: ASCII, Unicode,Unicode: Increasingly popular 16-bit encodingEncodes characters from various world languages, ,8,8,How to Encode Numbers: Binary Numbers,Base ten (decimal)Ten symbols: 0, 1, 2, ., 8, and 9More than 9 - next positionSo each position power (幂) of 10Nothing special about base 10 - used because we have 10 fingers,Each position represents a base quantity; symbol in position means how many of that quantity,9,9,How to Encode Numbers: Binary Numbers,Base two (binary)Two symbols: 0 and 1More than 1 - next positionSo each position power(幂) of 2,Q: How much?,a,Each position represents a base quantity; symbol in position means how many of that quantity,There are only 10 types of people in the world: those who understand binary, and those who dont.,10,10,Useful to know powers of 2:,16,8,4,2,1,512,256,128,64,32,Practice counting up by powers of 2:,11,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 = d i 2i D16= d i 16i,Digital Logic Design and Application (数字逻辑设计及应用),12,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 (数字逻辑设计及应用),13,2.1 Positional Number System (按位计数制),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;,14,14,Using Digital Data in a Digital System,temperature sensor,A temperature sensor outputs temperature in binaryThe system reads the temperature, outputs ASCII code:“F” for freezing (0-32)“B” for boiling (212 or more)“N” for normal,15,15,Using Digital Data in a Digital System,temperature sensor,Digital System,display,N,A display converts its ASCII input to the corresponding letter,16,2.2 Octal and Hexadecimal Numbers (八进制和十六进制),基数,数码,特性,Octal Number (八,进制),8,07,逢,八,进一,Binary Number (二进制),2,0,1,逢二进一,Hexadecimal Number(十六进制),16,09,AF,逢十六进一,Digital Logic Design and Application (数字逻辑设计及应用),17,说 明,Digital Logic Design and Application (数字逻辑设计及应用),选择什么数制来表示信息, 对数字系统的成本和性能影响很大, 在数字电路中多使用二进制.Most Significant Bit(MSB, 最高有效位)Least Significant Bit(LSB, 最低有效位)1011100010112MSB LSB,18,Digital Logic Design and Application (数字逻辑设计及应用),表2.1 十进制、二进制、八进制与十六进制数,19,19,Base Sixteen: Another Base Used by Designers,Nice because each position represents four base-two positionsCompact way to write binary numbersKnown as hexadecimal, or just hex,Q: Write 11110000 in hex,Q: Convert hex A01 to binary,1010,0000,0001,A:,A:,20,二进制与八进制和十六进制之间的转换,位数替换法:保持小数点不变,每位八进制数对 应3位二进制数; 每位十六进制数对应4位二进制数;二进制转换时,从小数点开始向左右分组,在MSB前面和LSB后面可以加0;转换为二进制时,MSB前面和LSB后面的0不写;例:1011100010112=56138=B8B16 10111000.10112=207.548=B8.B16,1000110010012 = ( )8 = ( )16,Digital Logic Design and Application (数字逻辑设计及应用),21,21,Hex Example: RFID Tag,Batteryless(无电池) tag powered(功率) by radio fieldTransmits(发送) unique identification(鉴定) numberExample: 32 bit id(身份证明)8-bit province number, 8-bit city number, 16-bit animal numberTag contents are in binaryBut programmers use hex when writing/reading,RFID,tag,Pr,o,vince #,City #,Animal #,Pr,o,vince,:,7,City,:,160,Animal,:,513,10100000,00000111,00000010 00000001,A0,07,02 01,Tag ID in hex: 07A00201,(a),(b),(c),(d),(f),(e),22,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 )2 = ( )10 ( 7F.8 )16 = ( )10,More easy way(更简便的方法)? ( F1AC )16 = ( ( ( F16 ) +1 ) 16 + A ) 16 + C,23,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 (基数乘除法) Integer Parts (整数部分): 除 r 取余,逆序排列 Example 2:( 156 )10 = ( )2 Decimal Fraction Parts (小数部分): 乘 r 取整,顺序排列 Example 3:( 0.37 )10 = ( )2,24,2.3 General Positional-Number-System Conversion (常用按位计数制的转换),Digital Logic Design and Application (数字逻辑设计及应用),Example 4:Require 10-2 ,Complete the following conversion ( 617.28 )10 = ( )2,2-n = 10-2,思考:任意两种进位计数制之间的转换 以十进制(二进制)作为桥梁, n = 7,25,25,Converting To/From Binary by Hand: Summary,26,26,Divide-By-2 Method Common in Automatic Conversion,Repeatedly divide decimal number by 2, place remainder in current binary digit (starting from 1s column),Note: Works for any base Njust divide by N instead,27,27,Bytes, Kilobytes, Megabytes, and More,Byte: 8 bitsCommon metric prefixes: kilo (thousand, or 103), mega (million, or 106), giga (billion, 千兆or 109), and tera (trillion, 万亿or 1012), e.g., kilobyte, or KByte,28,28,Bytes, Kilobytes, Megabytes, and More,BUT, metric prefixes also commonly used inaccurately216 = 65536 commonly written as “64 Kbyte”Typical when describing memory sizesAlso watch out for “KB” for kilobyte vs. “Kb” for kilobit,29,29,Example: DIP-Switch Controlled Channel,Ceiling fan receiver should be set in factory to respond to channel “73”Convert 73 to binary, set DIP(指拨) switch accordingly,Desired value: 73,4,0,0,2,1,1,16,0,8,1,32,0,64,1,128,0,64,72,73,sum:,(b),(a),Q:,30,Example: DIP-Switch Controlled Channel,31,2.4 Addition and Subtraction of Nondecimal Numbers (非十进制数的加法和减法),Digital Logic Design and Application (数字逻辑设计及应用),Two Binary Number Arithmetic (两个二进制数的算术运算)Addition (加法): Carry (进位) 1 + 1 = 10Subtraction (减法): Borrows (借位) 10 1 = 1,32,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 (数字逻辑设计及应用),33,Digital Logic Design and Application (数字逻辑设计及应用),表2.3.1 二进制加法真值表,34,34,Adder Example: DIP-Switch-Based Adding Calculator,Goal: Create calculator that adds two 8-bit binary numbers, specified using DIP switchesDIP switch: Dual-In-line Package switch, move each switch up or downSolution: Use 8-bit adder,35,Adder Example: DIP-Switch-Based Adding Calculator,Solution: Use 8-bit adder,DIP switches,1,0,a7.a0,b7.b0,s7s0,8-bit carry-ripple adder,co,ci,0,CALC,LEDs,36,36,Adder Example: DIP-Switch-Based Adding Calculator,To prevent spurious(假的) values from appearing at output, can place register at outputActually, the light flickers(闪烁) from spurious values would be too fast for humans to detectbut the principle of registering outputs to avoid spurious values being read by external devices (which normally arent humans) applies here.,37,Adder Example: DIP-Switch-Based Adding Calculator,DIP switches,1,0,a7.a0,b7b0,s7s0,8-bit adder,8-bit register,co,ci,0,CALC,LEDs,e,clk,ld,38,Borrow in ( 借位输入 ): Bin Borrow out ( 借位输出 ): Bout Difference bit ( 本位差 ): D,2.4 Addition and Subtraction of Non-decimal Numbers (非十进制数的加法和减法),Digital Logic Design and Application (数字逻辑设计及应用),39,Digital Logic Design and Application (数字逻辑设计及应用),表2.3.2 二进制减法真值表,40,Subtractor Example: DIP-Switch Based Adding/Subtracting Calculator,Extend earlier calculator exampleSwitch f indicates whether want to add (f=0) or subtract (f=1)Use subtractor and 2x1 mux,41,Subtractor Example: DIP-Switch Based Adding/Subtracting Calculator,42,2.5 Representation of Negative Numbers (负数的表示),Digital Logic Design and Application (数字逻辑设计及应用),2.5.1 Signed-Magnitude Representation 符号 数值表示法(原码)MSB as the Sign bit (0 = plus, 1 = minus) 最高有效位表示符号位( 0 = 正,1 = 负)01111111127 111111111270010111046 1010111046000000000 100000000,43,2.5 Representation of Negative Numbers (负数的表示),Digital Logic Design and Application (数字逻辑设计及应用),2.5.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),44,2.5 Representation of Negative Numbers (负数的表示),2.5.2 Complement Number Systems (补码数制)Radix Complement (基数补码)Diminished Radix Complement 基数减1补码 (反码) ,Digital Logic Design and Application (数字逻辑设计及应用),45,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,Digital Logic Design and Application (数字逻辑设计及应用),46,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,Digital Logic Design and Application (数字逻辑设计及应用),47,47,Tens Complement,Before introducing twos complement, lets consider tens complementBut, be aware that computers DO NOT USE TENS COMPLEMENT. Introduced for intuition(直觉) only.Complements for each base ten number shown to right. Complement is the number that when added results in 10,48,48,Tens Complement,Nice feature of tens complementInstead of subtracting a number, adding its complement results in answer exactly 10 too muchSo just drop(丢下) the 1 results in subtracting using addition only,4,6,10,7,0,10,20,3,13,13,3,0,10,1,2,3,4,5,6,7,8,9,9,8,7,6,5,4,3,2,1,complements,74=3,7+6=13,Adding the complement results in an answer that is,exactly 10 too much dropping the tens column gives,the right answer.,49,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 (反码) + 1 (Why?),Digital Logic Design and Application (数字逻辑设计及应用),50,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 119补码: 1 0 0 0 1 0 0 1,51,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 (数字逻辑设计及应用),52,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 (数字逻辑设计及应用),53,2.5.4 Twos Complement Representation (二进制补码表示法),Positive number has the same: Sign-Magnitude, Ones Complement, and Twos- Complement ( 正数的原码、反码、补码相同),Digital Logic Design and Application (数字逻辑设计及应用),54,表2-6 1位十进制数与4位二进制数,55,2.5 Representation of Negative Numbers (负数的表示),2.5.6 Ones Complement Representation (二进制反码表示法) The Sign Bit doesnt change, Other Bits converse based on the Signed-Magnitude. (符号位不变,其余在原码基础上按位取反),Digital Logic Design and Application (数字逻辑设计及应用),56,56,Representing Negative Numbers: Twos Complement,Big advantage: Allows us to perform subtraction using additionThus, only need adder component, no need for separate subtractor component,57,Twos Complement Subtractor Built with an Adder,Using twos complement A B = A + (-B) = A + (twos complement of B) = A + invert_bits(B) + 1So build subtractor using adder by inverting Bs bits, and setting carry in to 1,58,Twos Complement Subtractor Built with an Adder,1,Cin,B,A,Adder,S,B,A,N-bit,59,Summary of this class (本堂课小结),Binary, Octal, and Hexadecimal Numbers (二进制、八进制、十六进制),Positional Number System (按位计数制),Digital Logic Design and Application (数字逻辑设计及应用),60,General Positional-Number-System Conversion (常用按位计数制的转换)A Number in any Radix to Radix 10 : Expanding the formula using radix-10 arithmetic (任意进制数 十进制数:利用位权展开),Digital Logic Design and Application (数字逻辑设计及应用),Summary of this class (本堂课小结),61,General Positional-Number-System Conversion (常用按位计数制的转换)A Number in Radix 10 to any Radix : Radix Multiplication or Division (十进制 其它进制:基数乘除法)Note: Decimal Fraction Parts Conversion 注意:小数部分的转换(误差),Digital Logic Design and Application (数字逻辑设计及应用),Summary of this class (本堂课小结),62,Addition and Subtraction of Nondecimal Numbers (非十进制的加法和减法) (Table 2-3) 进位输入 Cin 、进位输出 Cout 、 本位和 S 借位输入 Bin 、借位输出 Bout 、 本位差 D,Digital Logic Design and Application (数字逻辑设计及应用),Summary of this class (本堂课小结),63,Representation of Negative Numbers (负数的表示) Signed-Magnitude 符号数值(原码) Complement Number Systems (补码数制),Digital Logic Design and Application (数字逻辑设计及应用),Summary of this class (本堂课小结),64,Binary Signed-Magnitude, Ones Complement, and Twos Complement Representation (二进制的原码、反码、补码)正数的原码、反码、补码表示相同负数的原码表示:符号位为 1负数的反码表示: 符号位不变,其余在原码基础上按位取反 在 |D| 的原码基础上按位取反(包括符号位)负数的补码表示:反码 + 1,Digital Logic Design and Application (数字逻辑设计及应用),Summary of this class (本堂课小结),65,第2章作业(P5052),Digital Logic Design and Application (数字逻辑设计及应用),2.1 (e) (i)2.2 (e)2.3 (e)2.42.5 (e) (j)2.6 (f) 补充:(125.17)10=?22.7 (a),2.8 (a)2.9 (b)2.10 (c)2.11 +25 422.18 (b) (d)2.19,66,A Class Problem,Write the 8-bit Signed-magnitude, Twos-complement, and Ones- complement for each of these decimal numbers: +115 -100,Digital Logic Design and Application (数字逻辑设计及应用),

    注意事项

    本文(2019姜书艳数字逻辑设计及应用ppt课件.ppt)为本站会员(小飞机)主动上传,三一办公仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知三一办公(点击联系客服),我们立即给予删除!

    温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。




    备案号:宁ICP备20000045号-2

    经营许可证:宁B2-20210002

    宁公网安备 64010402000987号

    三一办公
    收起
    展开