ࡱ> y bjbj .{{FFFFFZZZZ< Z"4}}}!!!!!!!$9#%!F}}}}}!FF!}FF!}!: , h@ޔ.H p!!0"R Rs&ns& s&F }}}}}}}!!/n}}}"}}}}s&}}}}}}}}} : CSC 362 Homework Assignment #1 answer key Convert 10110011 to decimal assuming the number is stored in each of the following representations: Unsigned magnitude: 128 + 32 + 16 + 2 + 1 = 179 Signed magnitude: -(32 + 16 + 2 + 1) = -51 Ones complement: negative, flip all bits ( 01001100 = 64 + 8 + 4 = 76, so -76 Twos complement: negative, flip all bits and add 1 ( 01001101 = 64 + 8 + 4 + 1 = 77, so -77 Convert 1101100110101000 to decimal assuming that the number is stored in Signed magnitude: -(16384 + 4096 + 2048 + 256 + 128 + 32 + 8) = -22952 Twos complement: negative, flip all bits and add 1 ( 0010011001011000 = 8192 + 1024 + 512 + 64 + 16 + 8 = 9816, so -9816 Do the following conversions -25 to 8-bit 2s complement: 25 = 16 + 8 + 1 = 00011001, for -25, flip all bits and add 1, so -25 = 11100111 -1678 to 16-bit 1s complement: 1678 = 1024 + 512 + 128 + 8 + 4 + 2 = 0000011010001110, for -1678, flip all bits, so -1678 = 1111100101110001 -17235 to 16-bit signed magnitude: 17235 = 16384 + 512 + 256 + 64 + 16 + 2 + 1 = 0100001101010011, for -17235, add leading sign bit of 1, so -17235 = 1100001101010011 1111000011111101 from 1s complement to decimal: negative, flip all bits for positive: 0000111100000010 = 2048 + 1024 + 512 + 256 + 2 = 3842, so -3842 1101101100111000 from 2s complement to decimal: negative, flip all bits and add 1: 0010010011001000 = 8192 + 1024 + 128 + 64 + 8 = 9416, so -9416 01011110000111 to decimal: sign bit = 0 (positive), exponent = 10111, mantissa = 10000111, or +.10000111*210111, the exponent is in excess 16, so it is really 7 which gives us +.10000111*27 = 1000011.1 = 64 + 2 + 1 + .5 = 67.5. -3.15625 to binary: sign bit = 1, convert 3.15625 to binary = 2 + 1 + 1/8 + 1/32 = 11.00101. Normalize by shifting the decimal point before the first 1 gives us .11001010 * 22. Converting the exponent into excess 16 gives us 10010, so our exponent is 10010 and our mantissa is 11001010. The number is then 11001011001010, or 1 10010 11001010 for readability. 10111011011000 to decimal: sign bit = 1 (negative), exponent = 011011, mantissa = .11011000 = -(.11011 * 201110). The exponent, 01110 is in excess 16, which is really -2. So our value is (.11011*2-2) = -.0011011 = -(1/8 + 1/16 + 1/64 + 1/128) = -.2109375. 9.8 to binary = 8 + 1 + 1/2 + 1/4 + 1/32 + 1/64 + 1/256 + 1/2048 + Unfortunately, we will have run out of precision as we only get 8 bits for the mantissa. So 9.8 = 8 + 1 + 1/2 + 1/4 = 1001.1100. We cannot store the rest of the fractional portion. 1001.1100 = .10011100 * 24 = .10011100 * 210100, so our floating point value = 01010010011100 or 0 10100 10011100 for readability. We have lost .05 in precision! 11010 * 10111 (unsigned) CAQM = 1011100000011010Q0 = 0, right shift00000001101Q0 = 1, C||A = A + M01011101101Right shift00101110110Q0 = 0, right shift00010111011Q0 = 1, C||A = A + M01110111011Right shift00111001101Q0 = 1, C||A = A + M10010101101Right shift01001010110Done11010 * 10111 = 1001010110 (26 * 23 = 598) 10110 * 00101 c. 10101 * 10011 AQQ-1M=00101, -M=1101100000101100Q0Q-1=00, arithmetic right shift00000010110Q0Q-1=10, A = A M11011010110Arithmetic right shift11101101011Q0Q-1=11, arithmetic right shift11110110101Q0Q-1=01, A = A + M00011110101Arithmetic right shift00001111010Q0Q-1=10, A = A M11100111010Arithmetic right shift11110011101Done AQQ-1M=10011, -M=0110100000101010Q0Q-1=10, A = A M01101101010Arithmetic right shift00110110101Q0Q-1=01, A = A + M11001110101Arithmetic right shift11100111010Q0Q-1=10, A = A - M 01001111010Arithmetic right shift00100111101Q0Q-1=01, A = A + M10111111101Arithmetic right shift11011111110Q0Q-1=10, A = A M01000111110Arithmetic right shift00100011111Done10110 * 00101 = 1111001110 (-10 * 5 = -50) 10101 * 10011 = 0010001111 (-11 * -13 = 143) 110011 / 000101 (unsigned) AQM = 000101000000110011Left shift00000110011_A < M, Q0 = 0000001100110Left shift00001100110_A < M, Q0 = 0000011001100Left shift00011001100_A >= M, Q0 = 1, A = A M000001011001Left shift00001011001_A < M, Q0 = 0000010110010Left shift00010110010_A >= M, Q0 = 1, A = A M000000100101Left shift00000100101_A < M, Q0 = 0000001001010Done110011 / 000101 = 001010 with a remainder of 000001 (51 / 5 = 10 with a remainder of 1) 111101 / 000011 (unsigned) AQM = 000011000000111101Left shift00000111101_A < M, Q0 = 0000001111010Left shift00001111010_A >= M, Q0 = 1, A = A M000000110101Left shift00000110101_A < M, Q0 = 0000001101010Left shift00001101010_A >= M, Q0 = 1, A = A M000000010101Left shift00000010101_A < M, Q0 = 0000000101010Left shift00000101010_A < M, Q0 = 0000001010100Done 111101 / 000011 = 010100 with a remainder of 000001 (61 / 3 = 20 with a remainder of 1) )5>?@IJKLPQR  . / R c ||qfhhQCJaJhh+CJaJ jhh{CJaJhh{CJaJhhCJaJhh2jCJaJhhQPCJaJhh#CJaJhh} CJaJhhwF CJaJhhR97CJaJhhpCJaJhsCJaJhhPCJaJ$@A S D K   $ & Fa$gd2 $h^ha$gds $ & Fa$gd+$ & Fa$$ & Fa$$a$ C T y z J K L M P Q i ɾɾɥԥԥԥԄ߄ԥhhQCJaJhh CJaJhh[CJaJhhPCJaJ jhh{CJaJhh{CJaJhh+CJaJhh#CJaJhhCJaJhh2jCJaJhhnCJaJ4        # $ & ' * + I !noFG  ɾɾɳɳ߳ɳɾ꜐ɳ߳ɜhhVCJH*aJhhVCJaJhh{CJH*aJhhQPCJaJhh2jCJaJhhCJaJhhQCJaJhh#CJaJhhPCJaJhh{CJaJ5  lq ?-2ɽɽԲ߲ɧꐅzꐅoghPCJaJhh CJaJhh&CJaJhh2jCJaJhhQPCJaJhhCJH*aJhhCJaJhhCJaJhhVCJH*aJhhVCJaJhhPCJaJhhQCJaJhh#CJaJhhKJCJaJ% $$Ifa$gds$ & Fa$$a$$ & Fa$F:::: $$Ifa$gdskd$$Ifl\$ N d* t0644 la8p(yt$TiF:::: $$Ifa$gdskd$$Ifl\$ N d* t0644 la8p(yt$Ti!'3F:::: $$Ifa$gdskd$$Ifl\$ N d* t0644 la8p(yt$Ti346<BVF:::: $$Ifa$gdskd|$$Ifl\$ N d* t0644 la8p(yt$TiVWY_ezF:::: $$Ifa$gdskdP$$Ifl\$ N d* t0644 la8p(yt$Tiz{}F:::: $$Ifa$gdskd$$$Ifl\$ N d* t0644 la8p(yt$TiF:::: $$Ifa$gdskd$$Ifl\$ N d* t0644 la8p(yt$TiF:::: $$Ifa$gdskd$$Ifl\$ N d* t0644 la8p(yt$TiF:::: $$Ifa$gdskd$$Ifl\$ N d* t0644 la8p(yt$TimoF:2& $$Ifa$gds$ & Fa$ $8^8a$gdkdt$$Ifl\$ N d* t0644 la8p(yt$Ti !"lm  /167<=>?R׫⠘hshooCJaJhPCJaJh$TiCJaJhhQCJaJhh2jCJaJhhQPCJaJhhz CJaJhh#CJaJhhCJaJhh CJaJhCJaJhshCJaJ4oqu<kdH$$Ifl\eG v@ t0644 lap(yt$Ti $$Ifa$gds<kd $$Ifl\eG v@ t0644 lap(yt$Ti $$Ifa$gds<kd $$Ifl\eG v@ t0644 lap(yt$Ti $$Ifa$gds 0H<<<< $$Ifa$gdskd $$Ifl\eG v@ t0644 lap(yt$Ti017=?SH<<<< $$Ifa$gdskd $$Ifl\eG v@ t0644 lap(yt$TiSTZ`byH<<<< $$Ifa$gdskdS $$Ifl\eG v@ t0644 lap(yt$TiRTYZ_`abxzuǼϡumhQCJaJhhQCJaJhh#CJaJhhCJaJhh2jCJaJhhz CJaJh$TiCJaJhPCJaJhhooCJaJhCJaJhooCJaJhsh$TiCJaJh$Tih$Ti<hshooCJaJhshCJaJ'yzH<<<< $$Ifa$gdskd" $$Ifl\eG v@ t0644 lap(yt$TiH<<<< $$Ifa$gdskd $$Ifl\eG v@ t0644 lap(yt$TiH<<<< $$Ifa$gdskd$$Ifl\eG v@ t0644 lap(yt$TiHC...$$.&#$/Ifa$gd$Tigd$Tikd$$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a$gdskd$$IflF4 0 t06    44 lapyts`TTT $$Ifa$gdskd $$IflF4 0 t06    44 lapyts -`TTT $$Ifa$gdskde!$$IflF4 0 t06    44 lapyts-.5<G`TTT $$Ifa$gdskd"$$IflF4 0 t06    44 lapytsGHOVd`TTT $$Ifa$gdskd"$$IflF4 0 t06    44 lapytsdelsx`TTT $$Ifa$gdskd#$$IflF4 0 t06    44 lapytsxy`TTI== $$Ifa$gds $ & Fa$gd$Ti $^a$gdookdA$$$IflF4 0 t06    44 lapyts Tkd$$$IflF4 0 t06    44 lapyts $$Ifa$gds%3`TTT $$Ifa$gdskd%$$IflF4 0 t06    44 lapyts34;BM`TTT $$Ifa$gdskdf&$$IflF4 0 t06    44 lapytsMNU\v`TTT $$Ifa$gdskd'$$IflF4 0 t06    44 lapytsvw~`TTT $$Ifa$gdskd'$$IflF4 0 t06    44 lapyts`TTT $$Ifa$gdskd($$IflF4 0 t06    44 lapyts`TTT $$Ifa$gdskdB)$$IflF4 0 t06    44 lapyts`TTT $$Ifa$gdskd)$$IflF4 0 t06    44 lapyts `TTT $$Ifa$gdskd*$$IflF4 0 t06    44 lapyts  '`TTT $$Ifa$gdskdg+$$IflF4 0 t06    44 lapyts'(/6A`TTT $$Ifa$gdskd,$$IflF4 0 t06    44 lapytsABIP^`TTT $$Ifa$gdskd,$$IflF4 0 t06    44 lapyts^_fmr`TTT $$Ifa$gdskd-$$IflF4 0 t06    44 lapytsrs`T $8^8a$gdQkdC.$$IflF4 0 t06    44 lapyts,1h/ =!"#$% $$If8!vh#v#v#v*#v:V l t06555*5a8p(yt$Ti$$If8!vh#v#v#v*#v:V l t06555*5a8p(yt$Ti$$If8!vh#v#v#v*#v:V l t06555*5a8p(yt$Ti$$If8!vh#v#v#v*#v:V l t06555*5a8p(yt$Ti$$If8!vh#v#v#v*#v:V l t06555*5a8p(yt$Ti$$If8!vh#v#v#v*#v:V l t06555*5a8p(yt$Ti$$If8!vh#v#v#v*#v:V l t06555*5a8p(yt$Ti$$If8!vh#v#v#v*#v:V l t06555*5a8p(yt$Ti$$If8!vh#v#v#v*#v:V l t06555*5a8p(yt$Ti$$If8!vh#v#v#v*#v:V l t06555*5a8p(yt$Ti$$If!vh#v#v#vv#v@ :V l t06555v5@ ap(yt$Ti$$If!vh#v#v#vv#v@ :V l t06555v5@ ap(yt$Ti$$If!vh#v#v#vv#v@ :V l t06555v5@ ap(yt$Ti$$If!vh#v#v#vv#v@ :V l t06555v5@ ap(yt$Ti$$If!vh#v#v#vv#v@ :V l t06555v5@ ap(yt$Ti$$If!vh#v#v#vv#v@ :V l t06555v5@ ap(yt$Ti$$If!vh#v#v#vv#v@ :V l t06555v5@ ap(yt$Ti$$If!vh#v#v#vv#v@ :V l t06555v5@ ap(yt$Ti$$If!vh#v#v#vv#v@ :V l t06555v5@ ap(yt$Ti$$If!vh#v#v#vv#v@ :V l t06555v5@ ap(yt$Ti$$If!vh#v#v#vv#v:V l t 6.06555v5p(yt$Ti$$If!vh#v#v#vv#v:V l t 6.06555v5p(yt$Ti$$If!vh#v#v#vv#v:V l t 6.06555v5p(yt$Ti$$If!vh#v#v#vv#v:V l t 6.06555v5p(yt$Ti$$If!vh#v#v#vv#v:V l t 6.06555v5p(yt$Ti$$If!vh#v#v#vv#v:V l t 6.06555v5p(yt$Ti$$If!vh#v#v#vv#v:V l t 6.06555v5p(yt$Ti$$If!vh#v#v#vv#v:V l t 6.06555v5p(yt$Ti$$If!vh#v#v#vv#v:V l t 6.06555v5p(yt$Ti$$If!vh#v#v#vv#v:V l t 6.06555v5p(yt$Ti$$If!vh#v#v#vv#v:V l t 6.06555v5p(yt$Ti$$If!vh#v#v#vv#v:V l t 6.06555v5p(yt$Ti$$If!vh#v#v0#v :V l t065505 apyts$$If!vh#v#v0#v :V l t065505 apyts$$If!vh#v#v0#v :V l t065505 apyts$$If!vh#v#v0#v :V l t065505 apyts$$If!vh#v#v0#v :V l t065505 apyts$$If!vh#v#v0#v :V l t065505 apyts$$If!vh#v#v0#v :V l t065505 apyts$$If!vh#v#v0#v :V l t065505 apyts$$If!vh#v#v0#v :V l t065505 apyts$$If!vh#v#v0#v :V l t065505 apyts$$If!vh#v#v0#v :V l t065505 apyts$$If!vh#v#v0#v :V l t065505 apyts$$If!vh#v#v0#v :V l t065505 apyts$$If!vh#v#v0#v :V l t065505 apyts$$If!vh#v#v0#v :V l t065505 apyts$$If!vh#v#v0#v :V l t065505 apyts$$If!vh#v#v0#v :V l t065505 apyts$$If!vh#v#v0#v :V l t065505 apyts$$If!vh#v#v0#v :V l t065505 apyts$$If!vh#v#v0#v :V l t065505 apyts$$If!vh#v#v0#v :V l t065505 apyts$$If!vh#v#v0#v :V l t065505 apyts$$If!vh#v#v0#v :V l t065505 apyts$$If!vh#v#v0#v :V l t065505 apyts$$If!vh#v#v0#v :V l t065505 apyts$$If!vh#v#v0#v :V l t065505 apyts$$If!vh#v#v0#v :V l t065505 apyts$$If!vh#v#v0#v :V l t065505 apyts^ 2 0@P`p2( 0@P`p 0@P`p 0@P`p 0@P`p 0@P`p 0@P`p8XV~_HmH nH sH tH @`@ NormalCJ_HaJmH sH tH DA D Default Paragraph FontVi@V  Table Normal :V 44 la (k (No List jj  Table Grid7:V0PK![Content_Types].xmlN0EH-J@%ǎǢ|ș$زULTB l,3;rØJB+$G]7O٭V$ !)O^rC$y@/yH*񄴽)޵߻UDb`}"qۋJחX^)I`nEp)liV[]1M<OP6r=zgbIguSebORD۫qu gZo~ٺlAplxpT0+[}`jzAV2Fi@qv֬5\|ʜ̭NleXdsjcs7f W+Ն7`g ȘJj|h(KD- dXiJ؇(x$( :;˹! I_TS 1?E??ZBΪmU/?~xY'y5g&΋/ɋ>GMGeD3Vq%'#q$8K)fw9:ĵ x}rxwr:\TZaG*y8IjbRc|XŻǿI u3KGnD1NIBs RuK>V.EL+M2#'fi ~V vl{u8zH *:(W☕ ~JTe\O*tHGHY}KNP*ݾ˦TѼ9/#A7qZ$*c?qUnwN%Oi4 =3N)cbJ uV4(Tn 7_?m-ٛ{UBwznʜ"Z xJZp; {/<P;,)''KQk5qpN8KGbe Sd̛\17 pa>SR! 3K4'+rzQ TTIIvt]Kc⫲K#v5+|D~O@%\w_nN[L9KqgVhn R!y+Un;*&/HrT >>\ t=.Tġ S; Z~!P9giCڧ!# B,;X=ۻ,I2UWV9$lk=Aj;{AP79|s*Y;̠[MCۿhf]o{oY=1kyVV5E8Vk+֜\80X4D)!!?*|fv u"xA@T_q64)kڬuV7 t '%;i9s9x,ڎ-45xd8?ǘd/Y|t &LILJ`& -Gt/PK! ѐ'theme/theme/_rels/themeManager.xml.relsM 0wooӺ&݈Э5 6?$Q ,.aic21h:qm@RN;d`o7gK(M&$R(.1r'JЊT8V"AȻHu}|$b{P8g/]QAsم(#L[PK-![Content_Types].xmlPK-!֧6 0_rels/.relsPK-!kytheme/theme/themeManager.xmlPK-!0C)theme/theme/theme1.xmlPK-! ѐ' theme/theme/_rels/themeManager.xml.relsPK]  R%@3Vzo0Sy<^m$Aat9Sp-Gdx3Mv 'A^r !"#$&'()*+,-./0123456789:;<=>?ABCDEFGHIJKLMNOPQRSTU8@0(  B S  ? `b 33 " l uu$$%24:;ABLNTU[\uw}~  &(./56@BHIOP]_eflmqs " l uu$$%24:;ABLNTU[\uw}~  &(./56@BHIOP]_eflmqs]>7VIcww X ^`o(hH. ^`hH. pL^p`LhH. @ ^@ `hH. ^`hH. L^`LhH. ^`hH. ^`hH. PL^P`LhH.^`o()^`.$ $ ^$ `OJPJQJ^Jo(-@ @ ^@ `.^`.L^`L.^`.^`.PLP^P`L.cww]>7V        v, <|      -,wF *7} #&3R97 0JKJC2My;MQPQz|T#jY[Tog$Ti9qv y2cNsG*Nfj} +p eh{Vz Pn2joon@^^^^@UnknownG*Ax Times New Roman5Symbol3. *Cx Arial;WingdingsA$BCambria Math"1h '2 # #!43QHP ?Nf2!xx CSC 362 Homework Assignment #1foxr Administrator  Oh+'0|  8 D P\dlt CSC 362 Homework Assignment #1foxr Normal.dotmAdministrator4Microsoft Office Word@#@83@ޔ՜.+,0 hp|  NKU#  CSC 362 Homework Assignment #1 Title  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVXYZ[\]^_`abcdefghijklmnpqrstuvwxyz{|}~Root Entry FJ@ޔData W.1Tableo&WordDocument .SummaryInformation(DocumentSummaryInformation8MsoDataStore @ޔh@ޔNOJUY==2 @ޔh@ޔItem  PropertiesUCompObj r   F Microsoft Word 97-2003 Document MSWordDocWord.Document.89q