⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 chap.2.infocoding.ps

📁 嵌入开发笔记 用ps阅读器打开
💻 PS
📖 第 1 页 / 共 5 页
字号:
2409(6)X2481(-)X3 f3717(Lecture)X4062(Notes)X2 f1056 895(A)N9 f1147(=)X9 s2 f1232 995(i)N9 f1264(=)X1 f1304(0)X17 s9 f1246 923(S)N2 f9 s1224 807(n)N9 f1272(-)X1 f1312(1)X2 f12 s895(a)Y9 s914(i)Y10 s9 f1448 895(\264)N12 s2 f1516(b)X9 s1576 857(i)N12 s9 f1628 895(+)N9 s2 f1705 995(i)N9 f1737(=-)X2 f1817(m)X1 f17 s9 f1747 923(S)N2 f9 s9 f1749 807(-)N1 f1789(1)X2 f12 s1869 895(a)N9 s914(i)Y10 s9 f1969 895(\264)N12 s2 f2037(b)X9 s2097 857(i)N1 f12 s4179 895(\(5\))N776 1164(Converting)N1238(between)X1588(bases)X1825(always)X2121(seems)X2385(mysterious,)X2860(but)X3012(with)X3212(the)X3359(de\256nitions)X3794(given)X4037(above,)X576 1276(the)N735(concept)X1076(is)X1181(very)X1393(simple.)X1715(To)X1863(convert)X2193(from)X2421(any)X2601(other)X2840(base)X3052(into)X3243(base)X3455(10,)X3616(simply)X3919(apply)X4173(the)X576 1388(expression)N1011(in)X1110(equation)X1466(\(5\).)X1650(Going)X1914(from)X2125(base)X2320(10)X2440(to)X2539(some)X2766(other)X2988(base)X3184(is)X3273(a)X3341(little)X3544(more)X3767(awkward,)X4168(but)X576 1500(conceptually)N1093(just)X1256(as)X1360(simple.)X776 1640(To)N918(illustrate)X1291(the)X1444(concept,)X1803(we)X1950(\256rst)X2134(begin)X2383(by)X2514(rewriting)X2902(equation)X3269(\(1\))X3416(in)X3526(a)X3604(different)X3972(form)X4195(by)X576 1752(using)N808(``Horner's)X1237(Rule''.)X1531(Thus,)X2 f1056 1912(A)N9 f1147(=)X1 f1224(\(\()X1312 1884(.)N1360(.)X1408(.)X1456 1912(\()N2 f1488(a)X9 s1931(n)Y9 f1584(-)X1 f1624(1)X2 f10 s9 f1692 1912(\264)N12 s2 f1760(b)X9 f1840(+)X2 f1917(a)X9 s1931(n)Y9 f2013(-)X1 f2053(2)X12 s2097 1912(\))N2 f10 s9 f2153(\264)X12 s2 f2221(b)X9 f2301(+)X1 f2402 1884(.)N2450(.)X2498(.)X2546 1912(\))N2 f10 s9 f2602(\264)X12 s2 f2670(b)X9 f2750(+)X2 f2827(a)X1 f9 s2887 1931(1)N12 s2931 1912(\))N2 f10 s9 f2987(\264)X12 s2 f3055(b)X9 f3135(+)X2 f3212(a)X1 f9 s3272 1931(0)N12 s4179 1912(\(6\))N576 2072(Now,)N810(if)X893(we)X1029(divide)X1294(by)X2 f1414(b)X1 f(,)S1510(the)X1652(resulting)X2013(quotient)X2353(Q,)X2470(and)X2633(remainder)X3048(R)X3136(are)X2 f1056 2232(Q)N9 f1157(=)X1 f1234(\()X1290 2204(.)N1338(.)X1386(.)X1434 2232(\()N2 f1466(a)X9 s2251(n)Y9 f1562(-)X1 f1602(1)X2 f10 s9 f1670 2232(\264)N12 s2 f1738(b)X9 f1818(+)X2 f1895(a)X9 s2251(n)Y9 f1991(-)X1 f2031(2)X12 s2075 2232(\))N2 f10 s9 f2131(\264)X12 s2 f2199(b)X9 f2279(+)X1 f2380 2204(.)N2428(.)X2476(.)X2524 2232(\))N2 f10 s9 f2580(\264)X12 s2 f2648(b)X9 f2728(+)X2 f2805(a)X1 f9 s2865 2251(1)N12 s4179 2232(\(7\))N576 2392(and)N2 f1056 2552(R)N1 f9 s1127 2571(0)N2 f12 s9 f1195 2552(=)N2 f1272(a)X1 f9 s1332 2571(0)N12 s4179 2552(\(8\))N576 2712(Now,)N810(if)X893(we)X1029(divide)X1294(again)X1527(by)X2 f1647(b)X1 f(,)S1743(the)X1885(resulting)X2246(quotient)X2586(Q,)X2703(and)X2866(remainder)X3281(R)X3369(are)X2 f1056 2872(Q)N9 f1157(=)X1 f1234(\()X1290 2844(.)N1338(.)X1386(.)X1434 2872(\()N2 f1466(a)X9 s2891(n)Y9 f1562(-)X1 f1602(1)X2 f10 s9 f1670 2872(\264)N12 s2 f1738(b)X9 f1818(+)X2 f1895(a)X9 s2891(n)Y9 f1991(-)X1 f2031(2)X12 s2075 2872(\))N2 f10 s9 f2131(\264)X12 s2 f2199(b)X9 f2279(+)X1 f2380 2844(.)N2428(.)X2476(.)X2524 2872(\))N2 f10 s9 f2580(\264)X12 s2 f2648(b)X9 f2728(+)X2 f2805(a)X1 f9 s2865 2891(2)N12 s4179 2872(\(9\))N576 3032(and)N2 f1056 3192(R)N1 f9 s1127 3211(1)N2 f12 s9 f1195 3192(=)N2 f1272(a)X1 f9 s1332 3211(1)N12 s4131 3192(\(10\))N576 3380(Therefore,)N1011(if)X1101(we)X1244(desire)X1505(to)X1611(convert)X1931(some)X2166(base)X2369(10)X2497(number)X2823(to)X2930(a)X3005(number)X3331(in)X3438(base)X2 f3641(b)X1 f(,)S3745(we)X3889(repeatedly)X576 3492(divide)N847(by)X973(the)X1121(desired)X1429(base,)X1654(keeping)X1989(the)X2136(remainders)X2593(as)X2702(the)X2849(digits)X3092(of)X3201(the)X3348(converted)X3757(number.)X4104(Note)X576 3604(the)N718(digits)X956(obtained)X1312(are)X1454(derived)X1767(least)X1968(signi\256cant)X2393(\256rst.)X776 3744(Before)N1069(going)X1320(on)X1448(to)X1555(more)X1785(complex)X2149(aspects)X2459(of)X2571(numerical)X2989(information)X3476(coding,)X3794(we)X3938(point)X4168(out)X576 3856(some)N808(convenient)X1259(shorthand)X1666(notation)X2010(for)X2150(binary)X2424(numbers.)X2807(Two)X3011(other)X3237(commonly)X3677(used)X3881(bases)X4117(\(i.e.,)X576 3968(other)N798(than)X988(base)X1183(2)X1255(or)X1359(10\))X1511(are)X1653(base)X1848(8)X1944(\()X2 f1976(octal)X1 f2169(\))X2225(and)X2388(base)X2583(16)X2703(\()X2 f2735(hexadecimal)X1 f3222(\).)X776 4108(In)N885(base)X1085(8,)X1186(we)X1327(represent)X1709(numbers)X2069(as)X2178(sequences)X2597(of)X2706(octal)X2923(digits.)X3190(The)X3369(allowed)X3703(digits)X3946(and)X4114(their)X576 4220(binary)N846(equivalents)X1309(are:)X3 f864 4332(Binary)N1728(Octal)X1 f864 4444(000)N1728(0)X864 4556(001)N1728(1)X864 4668(010)N1728(2)X864 4780(011)N1728(3)X864 4892(100)N1728(4)X864 5004(101)N1728(5)X864 5116(110)N1728(6)X864 5228(111)N1728(7)X576 5368(Following)N995(are)X1137(two)X1305(examples)X1693(of)X1797(equivalent)X2223(representations)X2830(in)X2929(bases)X3161(10,)X3305(2)X3377(and)X3540(8.)X1056 5528(23)N9 s5547(10)Y2 f12 s9 f1256 5528(=)N1 f1333(010111)X9 s5547(2)Y2 f12 s9 f1689 5528(=)N1 f1766(27)X9 s5547(8)Y12 s1056 5680(226)N9 s5699(10)Y2 f12 s9 f1304 5680(=)N1 f1381(011100010)X9 s5699(2)Y2 f12 s9 f1881 5680(=)N1 f1958(342)X9 s5699(8)Y7 p%%Page: 7 49 s 0 xH 0 xS 1 f12 s3 f576 400(57:017)N872(CIE)X1 f2353(-)X2409(7)X2481(-)X3 f3717(Lecture)X4062(Notes)X1 f776 803(In)N898(base)X1111(16,)X1274(we)X1429(represent)X1825(numbers)X2199(as)X2322(sequences)X2755(of)X2878(hexadecimal)X3409(\(or)X3564(simply)X3869(``hex'')X4179(for)X576 915(short\))N824(digits.)X1110(The)X1284(allowed)X1613(digits)X1851(and)X2014(their)X2215(binary)X2485(equivalents)X2948(are:)X3 f864 1027(Binary)N1728(Hexadecimal)X1 f864 1139(0000)N1728(0)X864 1251(0001)N1728(1)X864 1363(0010)N1728(2)X864 1475(0011)N1728(3)X864 1587(0100)N1728(4)X864 1699(0101)N1728(5)X864 1811(0110)N1728(6)X864 1923(0111)N1728(7)X864 2035(1000)N1728(8)X864 2147(1001)N1728(9)X864 2259(1010)N1728(A)X864 2371(1011)N1728(B)X864 2483(1100)N1728(C)X864 2595(1101)N1728(D)X864 2707(1110)N1728(E)X864 2819(1111)N1728(F)X576 2959(with)N781(the)X933(alphabetic)X1364(characters)X1789(A-F)X1977(representing)X2487(the)X2639(decimal)X2979(values)X3259(10-15.)X3565(Following)X3994(are)X4147(two)X576 3071(examples)N964(of)X1068(equivalent)X1494(representations)X2101(in)X2200(bases)X2432(10,)X2576(2)X2648(and)X2811(16.)X1056 3231(23)N9 s3250(10)Y2 f12 s9 f1256 3231(=)N1 f1333(010111)X9 s3250(2)Y2 f12 s9 f1689 3231(=)N1 f1766(17)X9 s3250(16)Y12 s1056 3383(226)N9 s3402(10)Y2 f12 s9 f1304 3383(=)N1 f1381(11100010)X9 s3402(2)Y2 f12 s9 f1833 3383(=)N1 f1910(E)X1985(2)X9 s3402(16)Y12 s576 3543(To)N712(verify)X971(the)X1118(above)X1377(examples,)X1795(simply)X2087(reapply)X2406(equation)X2768(\(1\))X2910(making)X3229(certain)X3522(to)X3627(use)X3785(the)X3933(appropri-)X576 3655(ate)N739(base.)X984(Typically,)X1428(however,)X1833(these)X2080(notations)X2482(will)X2681(only)X2901(be)X3041(employed)X3470(to)X3594(abbreviate)X4045(binary)X576 3767(numbers,)N959(and)X1126(it)X1208(is)X1300(obviously)X1707(a)X1778(trivial)X2037(task)X2220(to)X2323(convert)X2640(from)X2855(binary)X3129(to)X3232(either)X3480(hex)X3647(or)X3755(octal.)X3995(Be)X4131(sure)X576 3879(to)N675(convince)X1047(yourself)X1386(of)X1490(this)X1653(fact.)X3 f576 4103(2.2.2.)N840(Fixed)X1094(Point)X1337(Systems)X1 f776 4243(In)N883(pure)X1081(mathematics,)X1620(there)X1840(is)X1931(the)X2076(notion)X2349(of)X2456(real)X2629(numbers)X2988(versus)X3261(integers.)X3618(In)X3726(computers,)X4179(we)X576 4355(think)N809(of)X924(\256xed)X1151(versus)X1431(\257oating)X1760(point)X1993(numbers.)X2383(The)X2568(basic)X2801(distinction)X3243(between)X3598(pure)X3803(mathematics)X576 4467(and)N756(computers)X1198(is)X2 f1303(precision)X1 f1661(.)X1726(Pure)X1943(mathematics)X2472(is)X2 f2577(in\256nitely)X2956(precise)X1 f3234(.)X3323(Computers)X3786(have)X4009(a)X4093(\256nite)X576 4579(amount)N898(of)X1010(memory,)X1387(and)X1558(therefore,)X1962(cannot)X2251(precisely)X2631(represent)X3016(many)X3262(pure)X3465 0.3409(mathematical)AX4018(quanti-)X576 4691(ties.)N760(For)X919(example,)X1296(the)X1440(exact)X1670(value)X1905(of)X9 f2011(p)X1 f2090(is)X2180(precisely)X2554(determined)X3015(by)X3138(the)X3283(ratio)X3487(of)X3594(the)X3739 0.2552(circumference)AX576 4803(of)N690(a)X767(circle)X1016(to)X1125(its)X1250(diameter.)X1646(Well)X1868(enough.)X2209(That)X2420(is,)X2542(until)X2753(you)X2931(try)X3072(to)X3181(write)X3413(it)X3501(down,)X3772(or)X3886(worse)X4149(yet,)X576 4915(store)N797(it)X885(in)X994(the)X1146(memory)X1501(of)X1615(a)X1692(computer.)X2114(The)X2298(precise)X2605(value)X2848(of)X9 f2963(p)X1 f3051(cannot)X3343(be)X3469(stored)X3739(in)X3849(a)X3927(computer)X576 5027(even)N790(if)X881(we)X1025(combined)X1437(all)X1566(the)X1716(memories)X2128(of)X2240(all)X2369(the)X2519(computers)X2951(in)X3057(the)X3206(world.)X3509(Therefore,)X3944(we)X4087(settle)X576 5139(for)N716(an)X835(approximation.)X1474(However,)X1879(we)X2020(can)X2183(represent)X2565 0.3409(mathematical)AX3115(integers)X3449(precisely.)X3874(That)X4080(is)X4173(the)X576 5251(next)N766(topic.)X1031(We)X1189(will)X1363(discuss)X1664(\257oating)X1982(point)X2204(representations)X2811(later.)X3 f576 5475(2.2.2.1.)N912(Unsigned)X1319(\(Positive\))X1728(Numbers)X1 f776 5615(When)N1031(we)X1168(begin)X1407(to)X1507(discuss)X1809(either)X2054(\256xed)X2271(or)X2376(\257oating)X2695(point)X2919(representations,)X3552(we)X3690(\256rst)X3865(must)X4078(know)X576 5727(how)N773(many)X1019(digit)X1228(positions)X1607(we)X1751(are)X1901(allowed)X2238(to)X2345(use)X2505(for)X2649(each)X2858(number.)X3208(The)X3390(\256rst)X3570(implication)X4041(of)X4152(this)X576 5839(fact)N746(is)X835(that)X1006(there)X1225(is)X1315(a)X1384(maximum)X1801(value)X2036(we)X2174(can)X2334(represent)X2713(for)X

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -