数字电子技术英文版.ppt
《数字电子技术英文版.ppt》由会员分享,可在线阅读,更多相关《数字电子技术英文版.ppt(67页珍藏版)》请在三一办公上搜索。
1、CHAPTER 2NUMBER SYSTEMS,OPERATIONS,AND CODES数字系统、运算和编码,2-1 DECIMAL NUMBERS十进制数,Introductory Paragraph,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.In this section,th
2、e structure of decimal numbers is reviewed.Their review will help you more easily understand the structure of the binary number system,which is important in computers and digital electronics.,Decimal Review,Numbers consist of a bunch of digits,each with a weight.,These weights are all powers of the
3、base,which is 10.We can rewrite this:,To find the decimal value of a number,multiply each digit by its weight and sum the products.,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
4、 fact that we have 10 fingers influenced this.Will a base other than 10 work?Sure.,What about base 2?,2-2 BINARY NUMBERS二进制数,Introductory Paragraph,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
5、 two digits.It may seem more 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 v
6、alue 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.,Counting in Binary,A binary count of 0 through 15 is shown below.As you will see,4 bits are required to count from 0 to 15.,Counting Tennis Bal
7、ls Going into a box from a Conveyor Belt,The 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
8、 of four bits and converts it to the corresponding decimal number in the 7-segment display.,The Weighting Structure of Binary Numbers,A 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 lef
9、t by 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 l
10、eft to right by a negative power of two for each bit.The weight structure of a binary number is,Binary-to Decimal Conversion,The 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.,2-3 DECIMAL-TO-BINARY CONVE
11、RSION,Repeated Division-by-2 Method,A systematic method of converting whole numbers from decimal to binary is the repeated devision-by-2 process.,Repeated Multiplication-by-2 Method,A systematic method of converting fractional numbers from decimal to binary is the repeated multiplication-by-2 proces
12、s.,2-4 BINARY ARITHMETIC,Binary Addition,The 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 1,Example Add 1111 and 1100.,Binary Subtraction,The four basic ru
13、les 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 0,Example Subtract 100 from 111.,Binary Multiplication,The four basic rules for multip
14、lication binary digits(bits)are as follows:,Example Multiply 1101 by 1010.,Binary Division,Division in binary follows the same procedure as division in decimal.,Example Divide 1100 by 100.,2-5 1S AND 2S COMPLEMENTS OF BINARY NUMBERS二进制的反码和补码,Finding the 1s Complement of a Binary Number,The 1s comple
15、ment 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.,Finding the 2s Complement of a Binary Number,The 2s complement of a binary number is found by adding 1 to the 1s complement.,Example Find the 2s complement of binary
16、number 10110010.,2-6 SIGNED NUMBERS带符号数,The Sign Bit,The 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 negative.,Sign-Magnitude System,When a signed binary number is represented in sign-magnitude,
17、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 determined by summing the weights in all the magnitude bit positions where there are 1s.The sign is dete
18、rmined by examination of the sign bit.,Sign-Magnitude System,Example 2-15 Determine the decimal value of this signed binary number expressed in sign-magnitude:10010101.,1s Complement System,Positive numbers in the 1s complement system are represented the same way as the positive sign-magnitude numbe
19、rs.Negative numbers,however,are the 1s complements of the corresponding positive numbers.,The decimal values of positive numbers are determined by summing the weights in all bit positions where there are 1s.The decimal values of negative numbers are determined by summing the weights in all bit posit
20、ions where there are 1s,and adding 1 to the result.The weight of the sign bit is given a negative value.,1s Complement System,Why?,1s Complement System,Example 2-16 Determine the decimal value of the signed binary numbers expressed in 1s complement:(a)00010111(b)11101000.,2s Complement System,Positi
21、ve 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 corresponding positive numbers.,The decimal values are determined by summing the weights in all bit positions where there are 1s.The weigh
22、t of the sign bit is given a negative value.,2s Complement System,Example 2-17 Determine the decimal value of the signed binary numbers expressed in 2s complement:(a)01010110(b)10101010.,2s Complement Advantage,To convert to decimalThe 2s complement system simply requires a summation of weights rega
23、rdless 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 sign bit to determine if the number is positive or negative.The 1s complement system requires adding 1 to the summation of weights for negative numb
24、ers but not for positive numbers.Also,the 1s complement system is not used because two representations of zero(00000000 or 11111111)are possible.,The Development,The 2s complement of an n-bit number x is defined by,For example,if n=8,then,The Development,and,Range of Signed Integer Numbers,The numbe
25、r of different combinations of n bits is,For 2s complement signed numbers,the range of value for n-bit numbers is,By the Way,The 8-bit grouping has been given the special name byte.,Floating-Point Numbers(浮点数),Not required!,2-7 ARITHMETIC OPERATIONS WITH SIGNED NUMBERS带符号数的算术运算,Addition(加法),The two
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 数字 电子技术 英文
链接地址:https://www.31ppt.com/p-6576979.html