数字电子技术英文.pptx
《数字电子技术英文.pptx》由会员分享,可在线阅读,更多相关《数字电子技术英文.pptx(67页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、2-1 DECIMAL NUMBERS十进制数第1页/共67页 Introductory ParagraphYou 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.In this section,the structure of decimal numbers is reviewed.Their
2、 review will help you more easily understand the structure of the binary number system,which is important in computers and digital electronics.第2页/共67页Decimal ReviewNumbers consist of a bunch of digits,each with a weight.These weights are all powers of the base,which is 10.We can rewrite this:To fin
3、d the decimal value of a number,multiply each digit by its weight and sum the products.第3页/共67页Nothing Special about 10!Decimal system(and the idea of“0”)was invented in India around 100-500AD.Why did they use 10?Anything special about it?Not really.Probably the fact that we have 10 fingers influenc
4、ed this.Will a base other than 10 work?Sure.What about base 2?第4页/共67页2-2 BINARY NUMBERS二进制数第5页/共67页 Introductory ParagraphThe 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 m
5、ore difficult at first because it is unfamiliar to you.The decimal system with its ten digits is a base-ten system;the binary system with its two digits is a base-two system.The two 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,ju
6、st 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.第6页/共67页 Counting in BinaryA binary count of 0 through 15 is shown below.As you will see,4 bits are required to count from 0 to 15.第7页/共67页 Counting Tennis Balls Going i
7、nto a box from a Conveyor BeltThe counter counts the pulses from a sensor that detects the passing of a ball and produces a sequence of logic levels(digital waveforms)on each of its four parallel outputs.Each set of logic levels represent a 4-bit binary number.The decoder decodes each set of four bi
8、ts and converts it to the corresponding decimal number in the 7-segment display.第8页/共67页 The Weighting Structure of Binary NumbersA binary number is a weighted number(加权数).The right-most bit is the LSB(最低有效位)in a binary whole number and has a weight of 20=1.The weights increase from right to left by
9、 a power of two for each bit.The left-most bit is the MSB(最高有效位).Fractional numbers(小数)can also be represented in binary by placing bits to the right of the binary point.The left-most bit is the MSB in a binary fractional number and has a weight of 2-1=0.5.The fractional weights decreases from left
10、to right by a negative power of two for each bit.The weight structure of a binary number is第9页/共67页 Binary-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.第10页/共67页2-3 DECIMAL-TO-B
11、INARY CONVERSION第11页/共67页Repeated Division-by-2 MethodA systematic method of converting whole numbers from decimal to binary is the repeated devision-by-2 process.第12页/共67页Repeated Multiplication-by-2 MethodA systematic method of converting fractional numbers from decimal to binary is the repeated m
12、ultiplication-by-2 process.第13页/共67页2-4 BINARY ARITHMETIC第14页/共67页Binary AdditionThe four basic rules for adding binary digits(bits)are as follows:0+0=0 Sum of 0 with a carry of 00+1=1 Sum of 1 with a carry of 01+0=1 Sum of 1 with a carry of 01+1=0 Sum of 0 with a carry of 1Example Add 1111 and 1100
13、.第15页/共67页Binary SubtractionThe four basic rules for subtraction binary digits(bits)are as follows:0-0=0 Difference of 0 with a borrow of 00-1=1 Difference of 1 with a borrow of 11-0=1 Difference of 1 with a borrow of 01-1=0 Difference of 0 with a borrow of 0Example Subtract 100 from 111.第16页/共67页Bi
14、nary MultiplicationThe four basic rules for multiplication binary digits(bits)are as follows:Example Multiply 1101 by 1010.第17页/共67页Binary DivisionDivision in binary follows the same procedure as division in decimal.Example Divide 1100 by 100.第18页/共67页2-5 1S AND 2S COMPLEMENTS OF BINARY NUMBERS二进制的反
15、码和补码第19页/共67页Finding the 1s Complement of a Binary NumberThe 1s complement of a binary number is found by changing all 1s to 0s and all 0s to 1s.Example Find the 1s complement of binary number 10110010.第20页/共67页Finding the 2s Complement of a Binary NumberThe 2s complement of a binary number is found
16、 by adding 1 to the 1s complement.Example Find the 2s complement of binary number 10110010.第21页/共67页2-6 SIGNED NUMBERS带符号数第22页/共67页The Sign BitThe left-most bit in a signed 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 neg
17、ative.第23页/共67页Sign-Magnitude SystemWhen a signed binary number is represented in sign-magnitude,the left-most bit is the sign bit and the remaining bits are the magnitude bits.The magnitude bits are in true(uncomplemented)binary for both positive and negative numbers.The decimal values are determin
18、ed by summing the weights in all the magnitude bit positions where there are 1s.The sign is determined by examination of the sign bit.第24页/共67页Sign-Magnitude SystemExample 2-15 Determine the decimal value of this signed binary number expressed in sign-magnitude:10010101.第25页/共67页1s Complement System
19、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.nThe decimal values of positive numbers are determined by summing the weights in all bit positions wh
20、ere there are 1s.The decimal values of negative numbers are determined by summing the weights in all bit positions where there are 1s,and adding 1 to the result.The weight of the sign bit is given a negative value.第26页/共67页1s Complement SystemWhy?第27页/共67页1s Complement SystemExample 2-16 Determine t
21、he decimal value of the signed binary numbers expressed in 1s complement:(a)00010111 (b)11101000.第28页/共67页2s Complement SystemPositive numbers in the 2s complement system are represented the same way as in sign-magnitude and 1s complement systems.Negative numbers are the 2s complements of the corres
22、ponding positive numbers.The decimal values are determined by summing the weights in all bit positions where there are 1s.The weight of the sign bit is given a negative value.第29页/共67页2s Complement SystemExample 2-17 Determine the decimal value of the signed binary numbers expressed in 2s complement
23、:(a)01010110 (b)10101010.第30页/共67页2s Complement AdvantageTo convert to decimalThe 2s complement system simply requires a summation of weights regardless of whether the number is positive or negative.The sign-magnitude system requires two steps sum the weights of the magnitude bits and examine the si
24、gn bit to determine if the number is positive or negative.The 1s complement system requires adding 1 to the summation of weights for negative numbers but not for positive numbers.Also,the 1s complement system is not used because two representations of zero(00000000 or 11111111)are possible.第31页/共67页
25、The DevelopmentThe 2s complement of an n-bit number x is defined byFor example,if n=8,then第32页/共67页The Developmentand1s complement第33页/共67页Range of Signed Integer NumbersThe number of different combinations of n bits isFor 2s complement signed numbers,the range of value for n-bit numbers is第34页/共67页
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 数字 电子技术 英文
限制150内