




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
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等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年計(jì)算機(jī)二級(jí)C語言考試全景盤點(diǎn)試題及答案
- 2025版高考數(shù)學(xué)大一輪復(fù)習(xí)第十章概率第3講幾何概型分層演練文
- 財(cái)務(wù)決策中的邏輯思考練習(xí)試題及答案
- 公寓消防維保合同協(xié)議書
- 酒店入住預(yù)定合同協(xié)議書
- VFP備考過程中對(duì)知識(shí)的融合與應(yīng)用分析試題及答案
- 算法復(fù)雜度分析C語言試題及答案
- 2025版七年級(jí)道德與法治下冊(cè)第1單元青春時(shí)光第1課青春的邀約第2框成長(zhǎng)的不僅僅是身體教案新人教版
- 財(cái)務(wù)成本管理邏輯應(yīng)用題的解題技巧與試題及答案
- 測(cè)試中的及時(shí)反饋與項(xiàng)目迭代策略試題及答案
- 2025年標(biāo)準(zhǔn)課件《維護(hù)祖國統(tǒng)一》
- 區(qū)委巡察辦2025年上半年工作總結(jié)
- 認(rèn)識(shí)新商業(yè)(慕課版) 課后自測(cè)題答案(陸婷)+期末試題
- 籃球教練禮儀培訓(xùn)
- 《Art-Deco建筑風(fēng)格》課件
- GB/T 6075.6-2024機(jī)械振動(dòng)在非旋轉(zhuǎn)部件上測(cè)量評(píng)價(jià)機(jī)器的振動(dòng)第6部分:功率大于100 kW的往復(fù)式機(jī)器
- 外貿(mào)業(yè)務(wù)員內(nèi)部培訓(xùn)
- 石英砂采購合同
- 電腦和打印機(jī)維保服務(wù)投標(biāo)文件、方案
- 玉米病蟲害監(jiān)測(cè)與預(yù)警系統(tǒng)-洞察分析
- 山西建投考試題
評(píng)論
0/150
提交評(píng)論