




版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
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. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經權益所有人同意不得將文件中的內容挪作商業或盈利用途。
- 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 玩具市場營銷策略優化考核試卷
- 童車制造企業生產計劃與庫存管理考核試卷
- 眼鏡行業消費升級與市場機遇考核試卷
- 航空運動賽事策劃與推廣考核試卷
- 空中交通管制設備維護與管理考核試卷
- 電氣機械系統維修與改造考核試卷
- 山東省棗莊市四十一中市級名校2024-2025學年初三畢業考試生物試題含解析
- 山東滕州市第一中學2025屆高三第二次適應性(模擬)檢測試題生物試題含解析
- 濮陽職業技術學院《人物形象塑造II》2023-2024學年第一學期期末試卷
- 江西省贛州市大余縣2025年初三下學期期末教學質量檢測試題語文試題含解析
- 國開電大 管理概論 形考任務一(畫組織結構圖)
- 2022年湖南高二學業水平合格考試政治試卷真題及答案詳解
- 三自由度并聯機器人結構設計
- 倉儲裝卸服務合同
- 式雙鉤五點安全帶培訓課件
- 名片設計 課件
- 鉗工實操評分表(凹凸配合)
- 社會組織管理概論全套ppt課件(完整版)
- 陜西省城市規劃管理技術規定(定稿)
- 部編版七年級下冊歷史復習提綱(重點考察知識點)
- 雙盤摩擦壓力機的設計(全套圖紙)
評論
0/150
提交評論