数字电路英文版PPT--第二单元讲课教案课件

上传人:txadgkn****dgknqu... 文档编号:241601141 上传时间:2024-07-08 格式:PPT 页数:107 大小:444.49KB
返回 下载 相关 举报
数字电路英文版PPT--第二单元讲课教案课件_第1页
第1页 / 共107页
数字电路英文版PPT--第二单元讲课教案课件_第2页
第2页 / 共107页
数字电路英文版PPT--第二单元讲课教案课件_第3页
第3页 / 共107页
点击查看更多>>
资源描述
数字电路英文版PPT-第二单元数字电路英文版PPT-第二单元Weight 权 Carry 进位 Remainder 余数 Quotient 商 Integer 整数 Fraction 小数 1Complement 反码 2Complement 补码 Format 格式 Precision 精度 Mantissa 尾数 Weight 权 Carry 进位 KEY TERMSAlphanumeric:Consisting of numerals,letters,and other characters.ASCII:American Standard Code for Information Interchange;the most widely used alphanumeric code.KEY TERMSAlphanumeric:ConsisBCD:Binary coded decimal;a digital code in which each of the decimal digits,0 through 9,is represented by group of four bits.Byte:A group of eight bits.Carry:The digit generated when the sum of two binary digits exceeds 1.BCD:Binary coded decimal;a Complement:The inverse or opposite of a number.Decimal:Describes a number system with a base of ten.Digit:A symbol used to express a quantity.Exponent:The part of a floating-point number that represents the number of places that the decimal point is to be moved.Complement:The inverse or opFloating-point number:A number representation based on scientific notation in which the number consists of an exponent and a mantissa.Gray code:An unweighted digital code characterized by a single bit change between adjacent code number in a sequence.Floating-point number:A numbHexadecimal:Describes a number system with a base of 16.Integer:A whole number.Least significant bit(LSB):Generally,the right most bit in a binary whole number or code.Mantissa:The magnitude of a floating-point number.Hexadecimal:Describes a numbMost significant bit(MSB):The left most bit in a binary whole number or code.Octal:Describes a number system with a base of eight.Overflow:The condition that occurs when the number of bits in a sum exceeds the number of bits in each of the numbers added.Most significant bit(MSB):TParity:In relation to binary codes,the condition of evenness or oddness of the number of 1s in a code group.Sign bit:The left-most bit of a binary number that designates whether the number is positive(0)or negative(1).Weight:The value of a digit in a number based on its position in the number.Parity:In relation to binary You are familiar with the decimal number system because you use decimal numbers every day.Although decimal numbers are commonplace,their weighted structure is often not understood.2.1 DECIMAL NUMBERS 2.1 DECIMAL NUMBERS You are familiar with t In this section,the structure of decimal numbers is reviewed.This review will help more easily understand the structure of the binary number system,which is important in computers and digital electronics.In the decimal number system each of the ten digits,0 through 9,represents a certain quantity.Stated anther way:A base10 number system.3.In this section,the struEXAMPLE 2-1 Express the number 47 as a sum of the values of each digit.Solution The digit 4 has a weight of 101,as indicated by its position.The digit 7 has a weight of 1,which is 100,as indicated by its position.47=(4 X 101)+(7 X 100)=(4 X 10)+(7 X 1)=40+7Related Problem Determine the value of each digit in 939.EXAMPLE 2-1 Express the nu The binary number system is simply another way to represent quantities.The binary system is less complicated than the decimal system because it has only two digits.It may seem more difficult at first because it is unfamiliar to you.The decimal system with its ten digits is a baseten system;2.2 BINARY NUMBERS 2.2 BINARY NUMBERS 4.The binary number system the binary system with its two digits is a basetwo system.The two binary digits (bits)are 1 and 0.The position of a 1 or 0 in a binary number indicates its weight,or value within the number,just as the position of a decimal digit determines the value of that digit.The weights in a binary number are based on powers of two.5.the binary system withCounting in Binary Decimal Number Binary Number 01234567810119121314150000000100101100 0 1 0 1 0 1 1 0 0 1 1 1 0 1 0 0 1 1 1 1 1 1 1 0 1 1 0 1 1 1 0 0 1 0 1 1 1 0 1 0 1 0 0 1 1 0 0 0 6.Counting in Binary Decimal As you have seen in above table,four bits are required to count from zero to 15.In general,with n bits you can count up to a number equal to 2n 1.Largest decimal number=2n 1 if n=5 ,25 1=32 1=31 if n=6 ,26 1=64 1=63 As you have seen in above tablThe Weighting Structure of Binary NumbersThe right-most bit is the least significant bit in a binary whole number and has a weight of 20=1.The left-most bit is the most significant bit;its weight depends on the size of binary number.The Weighting Structure of BinBinary weight Positive Power of Two Negative Power of Two28 27 26 25 24 23 22 21 20 2-1 2-2 2-3 2-4 2-5 2-6 256 128 64 32 16 8 4 2 1 1/2 1/4 1/8 1/16 1/32 1/64 0.5 0.25 0.125 0.0625 0.03125 0.015625 Binary weightBinary-to-Decimal ConversionThe decimal value of any binary number can be found by adding the weights of all bits that are 1 and discarding the weights of all bits that are 0.EXAMPLE 2-3 Convert the binary whole number 1101101 to decimal.Weight:26 25 24 23 22 21 20 Binary number:1 1 0 1 1 0 1 1101101=26+25+23+22+20 =64+32+8+4+1=109Related Problem Convert the binary number 10010001 to decimal.Binary-to-Decimal ConversionIn Section 22 you learned how to convert a binary number to the equivalent decimal number.Now you will learn two ways of converting from a decimal number to a binary number.2.3 DECIMAL TO-BINARY 2.3 DECIMAL TO-BINARY CONVERSION CONVERSION 7.In Section 22 you learned1.Sum-of-Weights MethodList of eight binary weight128,64,32,16,8,4,2,1 27,26,25,24,23,22,21,20 9 =8 +1 1 0 0 1125=64+32+16+8+4+0+1 1 1 1 1 1 0 11.Sum-of-Weights MethodEXAMPLE 2-5 Convert the following decimal numbers to binary:(a)12 (b)25 (c)58 (d)82Solution(a)12=8+4=23+22 1100(b)25=16+8+1=24+23+20 11001 (c)58=32+16+8+2=25+24+23+21 111010 (d)82=64+16+2=26+24+21 1010010Related Problem Convert the decimal number 125 to binary.EXAMPLE 2-5 Convert the fol2.Repeated Division-by-2 Method 2 12 0 LSB 2 6 0 2 3 1 2 1 1 MSB 0 2.Repeated Division-by-2 MethBinary arithmetic is essential in all digital computers and in many other types of digital systems.To understand digital system,you must know the basics of binary addition,subtraction,multiplication,and division.2.4 BINARY ARITHMETIC 2.4 BINARY ARITHMETIC 8.Binary arithmetic is ess This section provides an introduction that will be expanded in later sections.Remember in binary 1+1=10,not 2.Remember in binary 10-1=1,not 9.This section provides Binary AdditionThe four basic rules for adding binary digits are as follows:0+0=0 Sum of 0 with a carry of 0 0+1=1 Sum of 1 with a carry of 0 1+0=1 Sum of 1 with a carry of 0 1+1=10 Sum of 0 with a carry of 1Binary AdditionEXAMPLE 2-7 Add the following binary numbers:(a)11+11 (b)100+10 (c)111+11 Solution (a)11 3 (b)100 4 (c)111 7 +11 +3 +10 +2 +11 +3 110 6 110 6 1010 10 Related Problem Add 1111 and 1100EXAMPLE 2-7 Add the folloBinary SubtractionThe four basic rules for subtracting bits are as follows:0-0=0 1-1=0 1-0=1 10-1=1 0 1 with a borrow of 1Binary SubtractionEXAMPLE 2-8(9)Perform the following binary subtraction:(a)11-01 (b)11-10 (c)101-011 Solution (a)11 3 (b)11 3 (c)101 5 -01 -1 -10 -2 -11 -3 10 2 01 1 010 2 Related Problem Subtract 100 from 111.Subtract 101 from 110.EXAMPLE 2-8(9)Perform thBinary MultiplicationThe four basic rules for multiplying bits are as follows:0 0=0 0 1=0 1 0=0 1 1=1 Multiplication is performed with binary numbers in the same manner as with decimal numbers.Binary MultiplicationEXAMPLE 2-10 Perform the following binary multiplications:(a)11 11 (b)101 111Solution(a)11 3 (b)111 7 11 3 101 5 11 9 111 35 +11 000 1001 +111 100011EXAMPLE 2-10 Perform the foRelated Problem Multiply 1101 1010 (13 10=130)Related Problem Multiply 11Binary Division Division in binary follows the same procedure as division in decimal.Perform the following binary division:(a)110 11 (b)110 10 Solution(a)10 2 11 3 11110 3 6 10110 26 11 6 10 6 000 0 10 0 10 00Binary Division Related problem Divide 1100 by 100 (12 4=3)Related problem Divide 1100 bThe 1s complement and the 2s complement of a binary number are important because they permit the representation of negative numbers.The method of 2s complement arithmetic is commonly used in computers to handle negative numbers.2.5 1s AND 2s 2.5 1s AND 2s COMPLEMENTSCOMPLEMENTS OF BINARY NUMBERS OF BINARY NUMBERS 9.The 1s complement and the 2sFinding the 1s complement of a Binary number 1 0 1 1 0 0 1 0 Binary number 0 1 0 0 1 1 0 1 1s complement(to use parallel inverters,NOT gate)Finding the 1s complement of Finding the 2s Complement of a Binary Number2s complement=(1s complement)+1EXAMPLE 2-12 Find the 2s complement of 10110010.Solution 10110010 Binary number 01001101 1s complement +1 Add 1 01001110 2s complementRelated Problem Determine the 2s complement of 11001011.Finding the 2s Complement of An alternative method of finding the 2s complement of a binary number is as follows:1.Start at the right with the LSB and write the bits as they are up to and including the first 1.2.Take the 1s complements of the remaining bits.An alternative method of findiEXAMPLE 2-13 Find the 2s complement of 10111000 using the alternative method.Solution 10111000 Binary number 1s complements 01001000 2s complement of original bits These bits stay the same.Related Problem Find the 2s complement of 11000000.EXAMPLE 2-13 Find the 2s cFigure 2-3 Example of obtaining the 2s complement of a negative binary number.Thomas L.FloydDigital Fundamentals,8eCopyright 2003 by Pearson Education,Inc.Upper Saddle River,New Jersey 07458All rights reserved.Figure 2-3 Example of obtaDigital system,such as the computer,must be able to handle both positive and negative numbers.A signed binary number consists of both sign and magnitude information.The sign indicates whether a number is positive or negative and the magnitude is the value of the number.2.6 SIGNED NUMBERS 2.6 SIGNED NUMBERS 10.Digital system,such as There are three ways in which signed integer numbers can be represented in binary form:sign-magnitude,1s complement,and 2s complement.Noninteger and very large or small numbers can be expressed in floating-point format.11.There are three ways The left-most bit in a signal binary number is the sign bit,which tells you whether the number is positive or negative.A 0 is for positive,and a 1 is for negative.00011001 25 10011001 -25 The left-most bit in a signal In the sign-magnitude system,a negative number has the same magnitude bits as the corresponding positive number but the sign bit is a 1 rather than 0.00011001 25 10011001 -25 In the sign-magnitude 1s Complement System Positive numbers in the 1s complement system are represented the same way as the positive sign-magnitude numbers.Negative numbers,however,are the 1s complements of the corresponding positive numbers.+25 00011001 00011001 1s complement -25 10011001 11100110 1s complement1s Complement System2s Complement System Positive numbers in the 2s complement system are represented the same way as in the sign-magnitude and 1s complement systems.Negative numbers are the 2s complements of the corresponding positive numbers.+25 00011001 00011001 2s complement -25 10011001 11100111 2s complement2s Complement SystemEXAMPLE 2-14 Express the decimal number-39 as an 8-bit number in the sign-magnitude,1s complement,and 2s complement.Solution +39 00100111 -39 10100111 sign-M 11011000 1s Com 11011001 2s ComRelated Problem Express+19 and-19 in sign-magnitude,1s complement,and 2s complement.EXAMPLE 2-14 Express the Related Problem Express+19 and-19 in sign-magnitude,1s complement,and 2s complement.Solution +19 00010011 -19 10010011 sign-M 11101100 1s Com 11101101 2s ComRelated Problem Express+The Decimal Value of Signed NumbersEXAMPLE 2-15 Determine the decimal value of this signed binary number expressed in sign-magnitude:10010101=-21Related Problem Determine the decimal value of the sign-magnitude number 01110111.(11910)The Decimal Value of Signed NuEXAMPLE 2-16 Determine the decimal value of this signed binary numbers expressed in 1s complement:(a)00010111 (b)11101000Solution (a)23 (b)-128+64+32+8=-24 -24+1=-23 Related Problem Determine the decimal value of the 1s complement number 11101011.(-2010)EXAMPLE 2-16 Determine EXAMPLE 2-17 Determine the decimal value of this signed binary numbers expressed in 2s complement:(a)01010110 (b)10101010Solution (a)86 (b)-128+32+8+2=-86 Related Problem Determine the decimal value of the 2s complement number 11010111.(-4110)EXAMPLE 2-17 Determine In the last section,you learned how signed numbers are represented in three different systems.In this section,you will learn how signed numbers are added,subtracted,multiplied,and divided.2.7 ARITHMETIC OPERATIONS 2.7 ARITHMETIC OPERATIONS WITH SIGNED NUMBERS WITH SIGNED NUMBERS 12.In the last section,youBecause the 2s complement system for representing signed numbers is the most widely used in computers and microprocessorbased systems,the coverage in this section is limited to 2s complement arithmetic.The processes covered can be extended to the other systems if necessary.13.Because the 2s complemenAddition 1.Both numbers positive2.Positive number with magnitude larger than negative number3.Negative number with magnitude larger than positive number4.Both numbers negativeAddition 1.Both numbers positBoth numbers positive:00000111 7 +00000100 +4 00001011 1 1Positive number with magnitude larger than negative number:00001111 1 5 +11111010 +-6 1 00001001 9Discard carryBoth numbers positive:Negative number with magnitude larger than positive number:00010000 1 6 +11101000 +-2 4 11111000 -8Both numbers negative:11111011 -5 +11110111 +-9 1 11110010 -1 4Discard carryNegative number with magnitudeEXAMPLE 2-19 Add the signed numbers:01000100,00011011,00001110,and 00010010.Solution 68 01000100 +27 +00011011 95 01011111 +14 +00001110 109 01101101 +18 +00010010 127 01111111EXAMPLE 2-19 Add the signedRelated Problem Add 00110011,10111111,and 01100011.These are signed numbers.51 00110011 -65 +10111111 -14 11110010 +99 +01100011 85 1 01010101 Discard carryRelated Problem Add 0011001Subtraction:It is a special case of addition.The sign of a positive or negative binary number is changed by taking its 2s complement.To subtract two signed numbers,take the 2s complement of the subtrahend and add.Discard any final carry bit.Subtraction:EXAMPLE 2-20 Perform each of the following subtraction of the signed numbers:(a)00001000 00000011 (b)00001100 11110111(c)11100111 00010011 (d)10001000 11100010Solution(a)In this case,8 3=8+(-3)=5 00001000 Minuend(+8)+11111101 2s Com of subtrahend Discard carry 100000101 Difference(+5)EXAMPLE 2-20 Perform each of(b)In this case,12 (-9)=12+9=21 00001100 Minuend(+12)+00001001 2s Com of subtrahend(9)00010101 Difference(+21)(c)In this case,-25 (+19)=-25+(-19)=-44 11100111 Minuend(-25)+11101101 2s Com of subtrahend(-19)Discard carry 111010100 Difference(-44)(b)In this case,12 (-9)=(d)In this case,-120 (-30)=-120+30=-90 10001000 Minuend(-120)+00011110 2s Com of subtrahend(30)10100110 Difference(-90)Related Problem Subtract 01000111 from 01011000(d)In this case,-120 (-30)Related Problem Subtract 01000111 from 01011000In this case,88 71=88+(-71)=17 01001000 Minuend(88)+10111001 2s Com of subtrahend(-71)Discard carry 100010001 Difference(-90)Related Problem Subtract 01The hexadecimal number system has sixteen digits and is used primarily as a compact way of displaying or writing binary numbers because it is very easy to convert between binary and hexadecimal.As you are probably aware,long binary numbers are difficult to read and write because it is easy to drop or transpose a bit.2.8 HEXADECIMAL NUMBERS 2.8 HEXADECIMAL NUMBERS 14.The hexadecimal number sysSince computers and microprocessors understand only 1s and 0s,it is necessary to used these digits when you program in “machine language.”Imagine writing a sixteen bit instruction for a microprocessor system in 1s and 0s.It is much more efficient to use hexadecimal or octal;octal numbers are covered in Section 29.Hexadecimal is widely used in computer and microprocessor application.15.Since computers and mic Decimal Binary Hexadecimal 0 0000 0 1 0001 1 2 0010 2 3 0011 3 4 0100 4 5 0101 5 6 0110 6 7 0111 722.Decimal Decimal Binary Hexadecimal 8 1000 8 9 1001 9 10 1010 A 11 1011 B 12 1100 C 13 1101 D 14 1110 E 15 1111 F Decimal Counting in Hexadcimal0 to 9 A,B,C,D,E,F,10,11,12,13,14,15,16,17,18,19,1A,1B,1C,1D,1E,1F,20,21,22,23,24,25,26,27,28,29,2A,2B,2C,2D,2E,2F,30,31,32,.Counting in HexadcimalEXAMPLE 2-24 Convert the following binary numbers to hexadecimal:(a)1100101001010111 (b)111111000101101001 Solution(a)1100101001010111 (b)00111111000101101001 C A 5 7 3 F 1 6 9Related Problem Convert the binary number 1001111011110011100 to hexadecimal.EXAMPLE 2-24 Convert the foRelated Problem Convert the binary number 1001111011110011100 to hexadecimal.Solution 01001111011110011100 4 F 7 9 CRelated Problem Convert theHexadecimal-to-Binary ConversionTo reverse the processEXAMPLE 2-25 Determine the binary numbers for the following hexadecimal numbers:(a)10A416 (b)CF8E16 (c)974216Solution(a)1 0 A 4 (b)C F 8 E 1 000010100100 1100111110001110Hexadecimal-to-Binary Conversi(c)9 7 4 2 1001011101000010Related Problem Convert the hexadecimal number 6BD3 to binary.Solution 6 B D 3 110101111010011(c)9 7 4 Hexadecimal-to-Decimal Conversion One way to find the decimal equivalent of a hexadecimal number is to first convert the hexadecimal number to binary and then convert from binary to decimal.Hexadecimal-to-Decimal ConversEXAMPLE 2-26 Convert the following hexadecimal numbers to decimal:(a)1C16 (b)A8516Solution(a)1 C 00011100=24+23+22=16+8+4=2810(b)A 8 5 101010000101=211+29+27+22+20 =2048+512+128+4+1 =269310EXAMPLE 2-26 Convert the f数字电路英文版PPT-第二单元讲课教案课件数字电路英文版PPT-第二单元讲课教案课件 Like the hexadecimal system,the octal system provides a convenient way to express binary numbers and codes.However,it is used less frequently than hexadecimal in conjunction with computers and microprocessors to express binary quantities for input and output purposes.2.9 OCTAL NUMBERS 2.9 OCTAL NUMBERS 16.Like the hexadecimaThe OCTAL number system is composed of eight digits,which are 0,1,2,3,4,5,6,7To count above 7,begin another column and start over:10,11,12,13,14,15,16,17,20,21 and so on.A base8 number system.17.The OCTAL number system is comBinary coded decimal (BCD)is a way to express each of the decimal digits with a binary code.Since there are only ten code groups in the BCD system,it is very easy to convert between decimal and BCD.Because we like to read and write in decimal,the BCD code provides an excellent interface to binary systems.Examples of such interfaces are keypad inputs and digital readouts.2.10 BINARY CODED DECIMAL(BCD)2.10 BINARY CODED DECIMAL(BCD)18.Binary coded decimal (BCDecimal/BCD conversionDecimal Digit 0 1 2 3 4BCD 0000 0001 0010 0011 0100Decimal Digit 5 6 7 8 9BCD 0101 0110 0111 1000 100119.Decimal/BCD conversion19.Decimal BCD 2421code excess-3 code 0 0000 0000 0011 1 0001 0001 0100 2 0010 0010 0101 3 0011 0011 0110 4 0100 0100 0111 5 0101 1011 1000 6 0110 1100 1001 7 0111 1101 1010 8 1000 1110 1011 9 1001 1111 1100 Decimal BCD 2There are many specialized codes used in digital systems.You have just learned about the BCD code;now lets look at a few others.Some codes are strictly numeric,like BCD,and others are alphanumeric;that is,they are used to represent numbers,letters,symbols,and instructions.The codes introduced in this section are the Gray code and ASCII code.Also,the detection of errors in codes using a parity bit is covered.2.11 DIGITAL CODES AND PARITY 2.11 DIGITAL CODES AND PARITY20.There are many specialized codThe Gray CodeThe Gray Code is unweighted and is not an arithmetic code;that is,there are no specific weights assigned to the bit positions.The important feature of the Gray code is that it exhibits only a single bit change from one code number to the next.21.The Gray Code21.The Gray Code Decimal Binary Gray Code 0 0000 0000 1 0001 0001 2 0010 0011 3 0011 0010 4 0100 0110 5 0101 0111 6 0110 0101 7 0111 010022.The Gray Code Decimal Decimal Binary Gray
展开阅读全文
相关资源
相关搜索

最新文档


当前位置:首页 > 办公文档 > 教学培训


copyright@ 2023-2025  zhuangpeitu.com 装配图网版权所有   联系电话:18123376007

备案号:ICP2024067431-1 川公网安备51140202000466号


本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!