freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

第二章、計(jì)算機(jī)數(shù)據(jù)表示方法(編輯修改稿)

2024-11-22 12:32 本頁(yè)面
 

【文章內(nèi)容簡(jiǎn)介】 er 非零 1xxxx 255 0/1 表示 尾數(shù) 階碼 符號(hào)位 51 IEEE754 規(guī)格化 浮點(diǎn)數(shù)表示范圍 Emax=2046, f=… ,… 1 220461023 =21023 (2252) Emin=1, M=0, 211023 =21022 雙精度 Emax=254, f=… , … 1 2254127 = 2127 (2223) Emin=1, M=0, 21127 = 2126 單精度 最大值 最小值 格式 52 一個(gè)奇怪的程序 main() { double a,b,c。 int d。 b=。 c=。 a=b/c。 d=b/c。 printf(%f,%d,a,d)。 if (!=a) printf(\nReally? !a)。 } ,2 ?????????? Really?!=a 二進(jìn)制存儲(chǔ) 浮點(diǎn)數(shù)不是精確數(shù) 53 一個(gè)奇怪的程序 main() { float a,b,c。 int d。 b=。 c=。 a=b/c。 d=b/c。 printf(%f,%d,a,d)。 if (!=a) printf(\nYeah!)。 } ,2 54 數(shù)值數(shù)據(jù)表示方法 ?計(jì)算機(jī)數(shù)值數(shù)據(jù)表示的特點(diǎn) ?進(jìn)位制數(shù) ?數(shù)的定點(diǎn)、浮點(diǎn)表示 ?機(jī)器數(shù) 55 機(jī)器數(shù) /機(jī)器碼 ? 真值 (書(shū)寫(xiě)用 ) ? 將用 + 表示正負(fù)的二進(jìn)制數(shù)稱(chēng)為符號(hào)數(shù)的真值 ? 機(jī)器不能識(shí)別書(shū)寫(xiě)格式,計(jì)算機(jī)如何表示負(fù)數(shù)? ? 機(jī)器碼 (機(jī)器內(nèi)部使用 ) ? 將符號(hào)和數(shù)值一起編碼表示的二進(jìn)制數(shù)稱(chēng)為機(jī)器碼 ? 原碼 Signed magnitude 反碼 One’ s plement ? 補(bǔ)碼 Two’ s plement 移碼 Biased notation 56 原碼表示法( Signed magnitude) ? 計(jì)算機(jī)如何表示數(shù)的正負(fù) ? ? 增加符號(hào)位 Add a sign bit ? 最高位為符號(hào)位, 0為正, 1為負(fù),數(shù)值位不變 57 原碼表示示例 ? [+0]原 =… 0 ? [0]原 =1. 000… 0 ? []原 = ? [ ]原 = ? [ 1110]原 = 01110 ? [1110]原 = 11110 58 [X] 原 = X 0≤X2n 2n- X 2n X ≤ 0 [X] 原 = X 0≤X1 1 X 1 X ≤ 0 求值方法 x = (1)X0( x12n1 + … + xn12 +Xn) 求值方法 x = (1)X0( x121 + … + xn12(n1) +Xn2n) 原碼表示法 59 原碼在數(shù)軸上的表示 數(shù)值 0 0 7 7 15 7 編碼 ? 7~+7 7個(gè)正數(shù), 7個(gè)負(fù)數(shù),兩個(gè)零 ? (2(n1) 1) ~2(n1) 1 60 Signed Magnitude ? Both positive and negative zero ? Equal number of positives and negatives ? Easy to interpret ? First bit is the sign ? Remaining bits are number ? Sounds ideal? But… ? 01011001+11001101=??? 61 Signed Magnitude? 010110012 = 8910 + 110011012 = 7710 001001102 = 3210 If signs are different sign of result will be sign of larger operand 62 Shortings of signed magnitude? ? Arithmetic circuit plicated ? Also, two zeros ? 0x00000000 = +0ten ? 0x80000000 = –0ten ? What would two 0s mean for programming? ? Therefore sign and magnitude abandoned 63 反碼表示法 ?所謂反碼 ,就是二進(jìn)制的各位數(shù)碼取反 ?符號(hào)位表示方法與原碼相同 ? Example: 710 = 001112 ; 710 =110002 ? Called One’s Complement 64 反碼 0的表示 ? [+0]反 =… 0 ? [0]反 =… 1 ? []反 = ? []反 = ? [1110]反 =01110 ? [1110]反 =10001 65 反碼公式證明 ? 1x=0時(shí) ? 假設(shè) x=… xn ? 假 [x]反 = … xn ? [x]反 +|x|=… 1 =… 1+… … 1 =… … 1 =22n ? [x]反 =22n|x|=22n+x 66 反碼公式證明 ? 2nx=0時(shí) ? 假設(shè) x= x1x2… xn ? 假設(shè) [x]反 = 1x1x2… xn ? [x]反 +|x|= 111… 1 = 111… 1+000… 1000… 1 = 1000… 0000… 1 = 2n+11 ? [x]反 = 2n+11 |x|= 2n+11 +x 67 [X] 反 = X 0≤X2n 2n+1- 1+X 2n X ≤ 0 [X] 反 = X 0≤X1 2 2- n+X 1 X ≤ 0 求值方法 ([X]反 = x0x1 … xn1 Xn) x = x0( 2n 1) + x12n1 + … + xn12 +Xn 反碼表示法 … 68 反碼在數(shù)軸上的表示 數(shù)值 7 15 7 7 0 0 編碼 ? 7~+7 正數(shù) 7個(gè),負(fù)數(shù) 7個(gè),零兩個(gè) ? (2n 1) ~2n 1 69 原碼 amp。反碼 數(shù)值 0 0 7 7 15 7 編碼 數(shù)值 7 15 7 7 0 0 編碼 70 Shortings of One’s plement? ? Arithmetic still a somewhat plicated. ? Still two zeros ? 0x00000000 = +0ten ? 0xFFFFFFFF = 0ten ? Although used for awhile on some puter products, one’s plement was eventually abandoned because another solution was better. 71 ? 3與 1 9等效 有趣的時(shí)鐘 12 3 6 9 12 3 6 9 12 3 6 9 72 同余的概念 ? 假定有兩個(gè)數(shù) a和 b,若用某一個(gè)整數(shù) m去除,所得的余數(shù)相同,就稱(chēng) a,b兩個(gè)數(shù)對(duì) m同余 ,記作: a≡b (mod m) ? 假設(shè) X,Y,Z三個(gè)數(shù),滿(mǎn)足下列關(guān)系: Z=nX+Y (n為整數(shù) ),則稱(chēng) Z和 Y對(duì)模 X是同余的,記作: Z≡Y (mod X) Y≡Z (mod X) 73 例子 ? Z=nX+Y X為模數(shù) ? 以 12為模 ? 3=12+3=24+3=36+3 ? 3, 15, 27, 39 都是相等的 ? 9=129=3 ? 9與 3是相等的 ? 0=12 74 例子(減法變成加法) ? 7+(4) ? =7+(12
點(diǎn)擊復(fù)制文檔內(nèi)容
教學(xué)課件相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖片鄂ICP備17016276號(hào)-1