版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
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)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年度文化產(chǎn)業(yè)園區(qū)建設(shè)融資擔(dān)保合同3篇
- 2025年度休閑農(nóng)業(yè)園區(qū)場地租賃與鄉(xiāng)村旅游服務(wù)合同4篇
- 智能農(nóng)業(yè)裝備研發(fā)-第3篇-深度研究
- 2025年版?zhèn)€人獨資企業(yè)股權(quán)轉(zhuǎn)讓法律文件2篇
- 2025年度代持股及并購重組顧問服務(wù)合同4篇
- 2025版高性能節(jié)能門窗施工勞務(wù)合作合同范例4篇
- 2025年度個人藝術(shù)品收藏評估與交易服務(wù)協(xié)議4篇
- 二零二五年度農(nóng)業(yè)用地土地租賃與農(nóng)業(yè)觀光服務(wù)合同3篇
- 2025年度農(nóng)產(chǎn)品質(zhì)量安全培訓(xùn)合同4篇
- 2025年度女方懷孕期間離婚協(xié)議書撰寫指南與樣本4篇
- 第十七章-阿法芙·I·梅勒斯的轉(zhuǎn)變理論
- 焊接機(jī)器人在汽車制造中應(yīng)用案例分析報告
- 合成生物學(xué)在生物技術(shù)中的應(yīng)用
- 中醫(yī)門診病歷
- 廣西華銀鋁業(yè)財務(wù)分析報告
- 無違法犯罪記錄證明申請表(個人)
- 大學(xué)生勞動教育PPT完整全套教學(xué)課件
- 繼電保護(hù)原理應(yīng)用及配置課件
- 《殺死一只知更鳥》讀書分享PPT
- 蓋洛普Q12解讀和實施完整版
- 2023年Web前端技術(shù)試題
評論
0/150
提交評論