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

📄 chap.2.infocoding.ps

📁 嵌入开发笔记 用ps阅读器打开
💻 PS
📖 第 1 页 / 共 5 页
字号:
1012(note)X1204(that)X1375(in)X1476(forming)X1812(the)X1956(above)X2212(difference)X2629(that)X2800(the)X2944(\256rst)X3120(step)X3302(was)X3478(to)X3580(borrow)X3884(from)X4098(the)X4243(1)X576 1391(in)N686(the)X839(left-most)X1222(bit)X1359(of)X1474(the)X1626(top)X1783(number)X2111(to)X2220(create)X2485(the)X2637(bit)X2773(by)X2903(bit)X3039(complement)X3550(of)X3664(the)X3816(number,)X4168(but)X576 1503(with)N777(a)X850(binary)X1126(`10`)X1316(\(or)X1458(a)X1531(decimal)X1867(2\))X1977(in)X2082(the)X2230(low)X2404(order)X2637(bit)X2769(position.)X3134(Then)X3363(the)X3512(subtraction)X3971(is)X4066(easily)X576 1615(carried)N868(out.)X776 1755(Another)N1128(way)X1325(to)X1437(think)X1672(of)X1789(this)X1965(operation)X2366(is)X2467(as)X2585(follows.)X2935(Consider)X3320(the)X3476(value)X3723(2)X9 s1717(8)Y2 f12 s9 f3815 1755(-)N1 f3868(1)X3954(which)X4227(is)X576 1867(represented)N1047(by)X1170(the)X1315(binary)X1588(value)X1824(11111111.)X2283(Now,)X2520(if)X2605(we)X2743(subtract)X3074(the)X3218(unsigned)X3591(binary)X3863(representa-)X576 1979(tion)N750(of)X854(45,)X7 f1098 2139(11111111)N1040 2251 0.4219(-00101101)AN1040 2291 0.4219(_________)AN1098 2403(11010010)N1 f576 2591(we)N712(arrive)X961(at)X1055(the)X1197(difference)X1056 2751(\(2)N9 s1136 2713(8)N2 f12 s9 f1204 2751(-)N1 f1281(1\))X2 f9 f1385(-)X1 f1462(45.)X576 2939(However,)N977(this)X1141(is)X1230(smaller)X1539(\(by)X1692(one\))X1889(than)X2081(the)X2225(value)X2460(needed)X2759(to)X2860(form)X3073(the)X3217(2's)X3360(complement)X3863(representa-)X576 3051(tion)N750(of)X2 f9 f854(-)X1 f907(45.)X1051(Therefore,)X1479(by)X1599(adding)X1885(1)X1957(to)X2056(11010010,)X2488(we)X2624(will)X2798(arrive)X3047(at)X3141(the)X3283(desired)X3585(result.)X3847(Thus,)X7 f1098 3211(11010010)N1040 3323(+)N1504(1)X1040 3363 0.4219(_________)AN1098 3475(11010011)N1736(<-)X1910(2`s)X2142(comp.)X2490(repr.)X2838(of)X3012(-45.)X1 f576 3663(What)N817(we)X961(have)X1175(just)X1346(shown)X1628(is)X1725(the)X1876(well-known)X2368(method)X2690(of)X2803(taking)X3077(the)X3228(bit-by-bit)X3625(complement)X4135(of)X4248(a)X576 3775(number)N898(and)X1065(adding)X1355(1)X1431(to)X1534(form)X1749(the)X1895(2's)X2040(complement)X2545(of)X2653(a)X2724(number.)X3070(It)X3157(should)X3441(also)X3624(be)X3743(clear)X3959(how)X4152(this)X576 3887(``trick'')N905(relates)X1181(to)X1280(the)X1422(formal)X1703(de\256nition)X2096(given)X2334(by)X2454(equation)X2810(\(11\).)X776 4027(So)N917(far,)X1088(we)X1241(have)X1464(de\256ned)X1788(\(in)X1936(equation)X2309(\(11\)\))X2542(the)X2701(method)X3031(for)X3184(\256nding)X3497(the)X3656(2`s)X3814(complement)X576 4139(representation)N1164(of)X1286(a)X1371(number,)X1730(but)X1894(the)X2053(other)X2292(two)X2477(issues)X2747(left)X2917(to)X3033(discuss)X3351(are)X3510(the)X3669(range)X3924(of)X4045(values)X576 4251(represented,)N1073(and)X1241(how)X1435(to)X1539(perform)X1879(arithmetic.)X2349(The)X2529(simplest)X2880(way)X3070(to)X3175(illustrate)X3543(the)X3691(range)X3935(of)X4045(values)X576 4363(representable)N1134(in)X1253(2`s)X1414(complement)X1935(is)X2043(to)X2162(refer)X2388(to)X2507(the)X2668(modulo-16)X3133(``clock'')X3513(of)X3636(Figure)X3930(2.1.)X4141(The)X576 4475(unsigned)N954(decimal)X1291(values)X1568(\(0-15\))X1839(appear)X2127(on)X2254(the)X2403(outermost)X2819(ring)X3005(of)X3116(numbers.)X3502(On)X3650(the)X3799(inside)X4061(of)X4173(the)X576 4587(clock,)N840(are)X989(the)X1138(decimal)X1474(values)X1750(corresponding)X2330(to)X2435(the)X2583(2's)X2730(complement)X3237(interpretation)X3787(of)X3897(the)X4045(binary)X576 4699(values)N846(0000)X9 f(->)174 987 oc1 f1133(1111.)X776 4839(Note)N992(\256rst,)X1194(that)X1368(it)X1451(is)X1544(simple)X1830(to)X1934(determine)X2350(the)X2498(sign)X2688(of)X2798(a)X2871(2's)X3018(complement)X3525(number)X3849(by)X3975(examin-)X576 4951(ing)N724(the)X867(leftmost)X1208(bit)X1334(position.)X1692(As)X1822(with)X2017(our)X2169(S/M)X2358(representation,)X2952(a)X3019('1')X3155(signi\256es)X3499(negative,)X3874(while)X4112(a)X4179('0')X576 5063(signi\256es)N921(positive.)X1275(Note)X1487(also,)X1691(that)X1862(the)X2006(2's)X2149(complement)X2652(of)X2758(zero)X2950(\(i.e.,)X3150(0000\))X3400(is)X3490(still)X3661(the)X3805(same)X4029(encod-)X576 5175(ing)N728(of)X837(the)X984(value)X1221(zero.)X1439(Thus,)X1683(unlike)X1952(S/M,)X2169(where)X2432(we)X2572(had)X2739(two)X2911(different)X3271(representations)X3882(for)X4022(+0)X4152(and)X2 f9 f576 5287(-)N1 f629(0,)X733(2's)X882(complement)X1391(provides)X1754(no)X1882(such)X2090(confusion.)X2526(Finally,)X2856(notice)X3125(that)X3303(the)X3454(largest)X3744(positive)X4082(value)X576 5399(representable)N1127(is)X1227(7,)X1335(while)X1585(the)X1739(smallest)X2091(negative)X2454(value)X2699(is)X2 f9 f2799(-)X1 f2852(8.)X2984(In)X3100(general,)X3444(for)X3592(an)X2 f3719(n)X1 f(-digit,)S4036(base)X2 f4243(b)X1 f576 5511 0.2125(radix-complement)AN1308(system,)X1624(the)X1767(range)X2006(of)X2111(numbers)X2467(is)X2556(from)X2768(the)X2911(smallest)X3252(value)X3487(of)X2 f9 f3593(-)X2 f3646(b)X9 s3706 5473(n)N9 f3754(-)X1 f3794(1)X12 s3864 5511(to)N3965(the)X4109(larg-)X576 5623(est)N707(value)X940(of)X1044(\()X2 f1076(b)X9 s1136 5585(n)N9 f1184(-)X1 f1224(1)X12 s2 f9 f1292 5623(-)N1 f1369(1\).)X11 p%%Page: 11 812 s 0 xH 0 xS 1 f3 f576 400(57:017)N872(CIE)X1 f2329(-)X2385(11)X2505(-)X3 f3717(Lecture)X4062(Notes)X2 f10 s1880 3963 MXY0 -679 Dl1232 0 Dl0 679 Dl-1232 0 Dl1 f2335 3411(KEY)N2141 3625(Unsigned)N2488(Decimal)X2141 3741(Unsigned)N2468(Binary)X2141 3858(2's)N2259(Comp)X2474(Decimal)X1947 3508(3)N2007(numbers)X2303(shown)X2532(at)X2610(each)X2778(position)X2 f2076 1596 MXY301 393 -268 416 Da2052 2388 MXY56 19 Dl2068 2364 MXY40 43 Dl2961 2365 MXY-42 41 Dl2976 2390 MXY-57 16 Dl2407 MY-232 -396 199 -413 Da1551 2018 MXY1827 Dc2465 1078 MXY0 65 Dl3340 1985 MXY65 0 Dl3113 1305 MXY-64 65 Dl2821 1110 MXY-32 97 Dl3243 1661 MXY97 -65 Dl2465 2892 MXY0 65 Dl1525 1985 MXY64 0 Dl1882 2633 MXY-65 65 Dl2173 2828 MXY-32 96 Dl1590 2407 MXY97 -65 Dl1817 1305 MXY65 97 Dl2109 1110 MXY32 97 Dl1590 1596 MXY97 65 Dl3074 2607 MXY64 97 Dl3275 2309 MXY96 64 Dl2821 2796 MXY32 96 Dl1 f2012 1059(1111)N1687 1266(1110)N1428 1570(1101)N1299 2005(1100)N1396 2439(1011)N1623 2808(1010)N2044 3016(1001)N2400 3093(1000)N2821 3009(0111)N3113 2828(0110)N3405 2484(0101)N3502 2011(0100)N3405 1603(0011)N3146 1259(0010)N2821 1046(0001)N2400 981(0000)N2012 948(15)N1720 1156(14)N1461 1460(13)N1331 1895(12)N1687 2925(10)N2109 3132(9)N2465 3210(8)N2886 3126(7)N3178 2944(6)N2465 852(0)N2886 936(1)N3210 1149(2)N3437 1493(3)N3567 1901(4)N3469 2601(5)N1428 2555(11)N2465 1273(0)N2757 1357(1)N2983 1506(2)N3146 1720(3)N3243 2031(4)N3178 2309(5)N2983 2555(6)N2789 2737(7)N2400 2796(-8)N2173 2750(-7)N1914 2575(-6)N1752 2335(-5)N1655 2031(-4)N1720 1759(-3)N1914 1519(-2)N2141 1344(-1)N1947 1855(SUBTRACT)N2886 1843(ADD)N3 f12 s1318 4190(Figure)N1615(2.1.)X1783(Radix-Complement)X2612(Modulo)X2956(16)X3076(Arithmetic.)X1 f1659 4302(\(Unsigned)N2083(and)X2246(2's)X2387(Complement)X2909(Shown\))X776 4462(The)N951(\256nal,)X1171(and)X1335(in)X1435(many)X1674(ways)X1896(most)X2108(important,)X2532(issue)X2749(is)X2838(that)X3009(of)X3115(performing)X3574(basic)X3798(arithmetic)X4216(in)X576 4574(radix)N798(complement.)X1323(Some)X1566(examples)X1954(will)X2128(be)X2243(used)X2443(to)X2542(illustrate.)X7 f1098 4734(0011)N1504(\(3\))X1040 4846(+0100)N1504(\(4\))X1040 4886 0.4219(_________)AN1098 4998(0111)N1504(\(7\))X1 f576 5186(In)N687(this)X857(\256rst)X1037(very)X1239(simple)X1527(example,)X1909(we)X2052(add)X2222(3)X2301(and)X2471(4)X2550(to)X2656(produce)X2997(7.)X3100(Shown)X3398(here)X3596(are)X3746(the)X3896(binary)X4174(2's)X576 5298(complement)N1080(representations)X1689(of)X1795(3)X1869(and)X2034(4,)X2132(and)X2297(the)X2441(result)X2681(corresponds)X3171(to)X3272(the)X3416(the)X3560(binary)X3832(2's)X3975(comple-)X576 5410(ment)N793(representation)X1363(of)X1467(7.)X1587(Referring)X1980(to)X2079(Figure)X2354(2.1,)X2522(we)X2658(begin)X2896(at)X2990(3,)X3086(and)X3249(count)X3488(in)X3588(a)X3656(clockwise)X4066(direc-)X576 5522(tion)N750(4)X822(positions)X1193(to)X1292(arrive)X1541(at)X1635(7.)X1731(Now)X1941(let's)X2131(consider)X2481(a)X2548(slightly)X2861(more)X3083(complex)X3439(example.)X12 p%%Page: 12 912 s 0 xH 0 xS 1 f3 f576 400(57:017)N872(CIE)X1 f2329(-)X2385(12)X2505(-)X3 f3717(Lecture)X4062(Notes)X7 f1098 803(0110)N1504(\(6\))X2258(0110)X2664(\(6\))X1040 915(-0100)N1504(\(4\))X1852(<=>)X2200(+1100)X2664(\(-4\))X1040 955 0.4219(_________)AN2200(________)X1098 1067(0010)N1504(\(2\))X2258(0010)X2664(\(2\))X1 f576 1255(In)N684(this)X851(example,)X1230(we)X1370(subtract)X1703(4)X1779(from)X1994(6)X2070(to)X2173(produce)X2511(2.)X2611(Shown)X2905(here)X3099(are)X3246(the)X3393(binary)X3668(2's)X3814(complement)X576 1367(representations)N1210(of)X1341(6)X1440(and)X1630(4,)X1753(and)X1943(the)X2112(result)X2376(corresponds)X2890(to)X3015(the)X3183(the)X3351(binary)X3647(2's)X3814(complement)X576 1479(representation)N1154(of)X1266(2.)X1394(There)X1651(are)X1801(two)X1977(ways)X2207(to)X2315(view)X2535(this)X2707(operation.)X3152(First,)X3385(referring)X3755(to)X3863(Figure)X4147(2.1,)X576 1591(we)N715(begin)X956(at)X1053(6,)X1152(and)X1318(count)X1558(in)X1659(a)X1728(counter-clockwise)X2460(direction)X2829(4)X2903(positions)X3276(to)X3377(arrive)X3628(at)X3724(2.)X3846(Second,)X4179(we)X576 1703(may)N768(view)X981(the)X1125(same)X1349(operation)X1739(as)X1845(an)X1962(addition)X2304(of)X2411(6)X2486(and)X2 f9 f2652(-)X1 f2705(4)X2780(to)X2882(produce)X3219(2.)X3318(Shown)X3611(are)X3756(the)X3901(binary)X4174(2's)X576 1815(complement)N1084(representations)X1698(of)X1809(6)X1888(and)X2 f9 f2058(-)X1 f2111(4,)X2214(and)X2383(the)X2531(result)X2775(corresponds)X3269(to)X3374(the)X3522(the)X3670(binary)X3946(2's)X4093(com-)X576 1927(plement)N922(representation)X1503(of)X1618(2.)X1749(Note)X1972(that)X2153(now,)X2378(the)X2532(binary)X2814(values)X3096(are)X3250(added)X3516(just)X3691(as)X3807(if)X3902(they)X4104(were)X576 2039(unsigned)N954(binary)X1230(values,)X1530(and)X1699(the)X1847(carry)X2075(of)X2185(a)X2258(1)X2336(out)X2489(of)X2599(the)X2747(high)X2948(order)X3181(bit)X3313(of)X3423(the)X3571(sum)X3761(is)X3855(simply)X4147(dis-)X576 2151(carded.)N884(The)X1061(fact)X1233(that)X1405(one)X1571(addend)X1876(of)X1983(this)X2149(sum)X2336(is)X2427(negative,)X2805(or)X2912(that)X3084(the)X3229(original)X3557(operation)X3949(was)X4126(sub-)X576 2263(traction,)N926(does)X1132(not)X1285(affect)X1535(the)X1683(way)X1873(the)X2021(2)X2099(binary)X2375(values)X2651(0100)X2873(and)X3042(1100)X3264(are)X3412(added.)X3720(To)X3857(graphically)X576 2375(illustrate,)N969(refer)X1182(to)X1288(Figure)X1570(2.1,)X1745(and)X1915(begin)X2160(at)X2262(6,)X2366(counting)X2735(in)X2842(a)X2917(clockwise)X3334(direction)X3709(12)X3837(positions)X4216(to)X576 2487(arrive)N829(at)X927(2.)X1027(12)X1151(is)X1243(the)X1389(unsigned)X1764(binary)X2038(interpretation)X2586(of)X2694(1100.)X2937(Note,)X3175(in)X3277(this)X3443(counting)X3807(process,)X4146(that)X576 2599(the)N723(top)X875(of)X985(the)X1133(clock)X1372(was)X1551(passed.)X1885(This)X2086(event)X2325(corresponds)X2819(to)X2924(the)X3072(carry)X3300(of)X3410(1)X3488(that)X3663(was)X3842(disregarded)X576 2711(when)N808(adding)X1094(0110)X1310(and)X1473(1100.)X1737(We)X1895(now)X2084(look)X2279(at)X2373(one)X2536(more)X2758(example.)X7 f1098 2871(1101)N1504(\(-3\))X1040 2983(+0001)N1504(\(1\))X1040 3023 0.4219(_________)AN1098 3135(1110)N1504(\(-2\))X1 f576 3323(Here,)N813(we)X951(add)X1116(1)X1190(to)X2 f9 f1292(-)X1 f1345(3)X1420(to)X1522(produce)X

⌨️ 快捷键说明

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