數字電子技術chapter_第1頁
數字電子技術chapter_第2頁
數字電子技術chapter_第3頁
數字電子技術chapter_第4頁
數字電子技術chapter_第5頁
已閱讀5頁,還剩62頁未讀 繼續(xù)免費閱讀

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領

文檔簡介

1、 These weights are all powers of the base, which is 10. We can rewrite this:162.375Digits10210110010-110-210-3Weights To find the decimal value of a number, multiply each digit by its weight and sum the products.162.375 105 10 7 10 3 10 2 10 6 10 1-3-2-10121 6 2 . 3 7 5 Digits 100 10 1 1/10 1/100 1/

2、1000 Weights 10 basein 284959493 9 basein 345012 What about base 2?3210123222.22220 + 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.0 - 0 = 0 Difference of 0 with a borrow of 00 -

3、 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.111001010000 Example Multiply 1101 by 1010. Example Divide 1100 by 100. Example Find the 1s complement of binary number 10110010. Example Fi

4、nd the 2s complement of binary number 10110010. 25250011001100110010bitsMagnitudebitSignbitsMagnitudebitSign The decimal values are determined by summing the weights in all the magnitude bit positions where there are 1s. The sign is determined by examination of the sign bit.21.- isnumber decimal the

5、, therefore1; isbit sign The212221s, are therewhere positionsbit magnitude theallin weights theSumming.024Solution 25251110011000011001nThe 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 det

6、ermined 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. 25251110011000011001100100011000000001100100011111111101101110122222101101100000100010000000010110110000010001000000001011011101001000112567-23124

7、-result the to1 Adding2422221s, are therewhere positionsbit magnitude theallin weights theSumming (b)2322221s, are therewhere positionsbit magnitude theallin weights theSumming (a).35670124Solution 25251110011100011001 The decimal values are determined by summing the weights in all bit positions whe

8、re there are 1s. The weight of the sign bit is given a negative value.8622221s, are therewhere positionsbit magnitude theallin weights theSumming (b)8622221s, are therewhere positionsbit magnitude theallin weights theSumming (a).13571246Solution0,20,2xxxxxnc For example, if n=8, then0111111101111111

9、0000001000000010000000010000000100000000000000002222cccc11111110111111011)0000001011111111(100000010)111111111 (000000101000000000000001011111111111111101)0000000111111111(100000001)111111111 (000000011000000000000000122cc1s complement For 2s complement signed numbers, the range of value for n-bit n

10、umbers isnnscombinatioTotal2) 12(211nntocccyxyx222 The addition process is stated as follows: add the two numbers and discard any final carry bit. Example(a) 00000111 + 00000100 = ?(b) 00001111 + 11111010 = ?(c) 00010000 + 11101000 = ?(d) 11111011 + 11110111 = ? Example(a) 01111101 + 00111010 = ?(b)

11、 10001000 + 11101101 = ?ccccyxyxyx2222)( The subtraction process is stated as follows: take the 2s complement of the subtrahend and add. Disiscard any final carry bit. Example (a) 0001000 - 00000011 = ?(b) 11100111 - 00010011 = ? The multiplication operation in most computers is accomplished using p

12、artial product method(部分積方法). The basic steps in the process are as follows: Determine if the signs of the two numbers are the same. This determines what the sign of the product will be. Change any negative number to true (uncomplemented) form. Starting with the LSB of the multiplier, generate the p

13、artial products. Shift each successive partial product one bit to the left. Add each partial product to the sum of the previous partial products to get the final product. If the sign of the product is negative, take the 2s complement of the product. Attach the sign bit to the product. The basic step

14、s in a division the process are as follows: Determine if the signs of the two numbers are the same. This determines what the sign of the quotient will be. Initialize the quotient to zero and initialize the partial remainder to the dividend. Subtract the divisor from the partial remainder using 2s co

15、mplement addition to get the next partial remainder. If the result is positive, add 1 to the quotient and repeat for the next partial remainder; otherwise, the division is complete. The designation 8421 indicates the binary weights of the four bits. 1010, 1011, 1100, 1101, 1110, and 1111 are invalid codes. The 8421 code is the predominant BCD code, and when we refer to BCD, we always mean the 8421 code unless otherwise stated. To determine a decimal number from a BCD

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
  • 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論