ࡱ> 463y Tbjbj 4 {{T||4Z\\\\\\$ " ZZV@BX^R F0^xQ#U:Q#Q#pQ#| : CSC 362: Some Example Conversions Convert 10111001 from 8-bit binary to decimal assuming the number was originally stored in unsigned magnitude: 128 + 32 + 16 + 8 + 1 = 185 signed magnitude: leading bit represents a negative, so we have (32 + 16 + 8 + 1) = -57 1s complement: leading bit indicates a negative number, obtain its positive version by flipping all bits to get 01000110 = 64 + 4 + 2 = 70, so the original number is -70 2s complement: again, a negative, get the positive by flipping all the bits and adding 1, or 01000111 = 64 + 4 + 2 + 1 = 71, so the original number is -71 Convert -2916 to 16 bit signed magnitude, ones complement and twos complement. Before starting, note that 2916 = 2048 + 512 + 256 + 64 + 32 + 4, or 0000101101100100. -2916 in signed magnitude replaces the leading bit with a 1 for negative, or 1000101101100100 In ones complement, we take 2916 and flip all of the bits giving us 1111010010011011 In twos complement, take 2916, flip all of the bits and add 1, or just add 1 to the ones complement number, giving 1111010010011100 What are the largest and smallest values that can be represented in 16 bit unsigned magnitude, signed magnitude, ones complement and twos complement? For unsigned magnitude, the largest number is all 1s or 1111111111111111 = 65535 and the smallest is all 0s or 0000000000000000 which is 0. For signed magnitude, we have 0111111111111111 and 1111111111111111 as the largest and smallest values which are 32767 and -32767. For ones complement, the largest value is 0111111111111111 which is 32767. The smallest value is not 1111111111111111, which is -0, but is instead 1000000000000000 which is -32767. For twos complement, the largest value is 0111111111111111 which is 32767 just as above. The smallest value is 1000000000000000. Lets convert this to a positive number by flipping all bits and adding 1 giving us 0111111111111111 + 1 = 1000000000000000 which is -32768. Notice here that we have one more value in our representation that signed magnitude and ones complement do not have! Convert 13.625 to the 14-bit floating point notation: 13.625 = 8 + 4 + 1 + + 1/8 = 1101.1010, now shift the decimal point to get .11011010 * 24, so we have a mantissa of 11011010 and an exponent of 4, which in bias-16 is 10100, giving us 0 10100 11011010 Convert 25.75 to 14-bit floating point notation: 25.75 = 16 + 8 + 1 + + = 11001.11 = .11001110 * 25 = .11001110 * 210101 ( 25.75 = 0 10101 11001110 = 01010111001110 Convert -6.9 to 14-bit floating point notation: -6.9 = 4 + 2 + + + 1/8 + 1/64 + 1/128 + 1/1024 + ( 110.1110011001 but we only have 8 digits, so we store 110.11100 = .11011100 * 23 = .11011100 * 210011 ( 1 10011 11011100 = 11001111011100. If we convert this back, we wind up with -6.875, so we have a loss of precision of .025 which is a loss of about .4%. Convert 11111111111111 from 14-bit floating point notation to decimal: 1 11111 11111111 = -.11111111 * 211111 = -.11111111 * 215 = -111111110000000.0 = -(128 + 256 + 512 + 1024 + 2048 + 4096 + 8192 + 16384) = -32640.0 Convert 10001110000000 from 14-bit floating point notation to decimal: 1 00011 10000000 = -.10000000 * 200011 = -.10000000 * 2-13 = -2-14 = -1/214 = -1/16384 = -0.00006103515625 Convert 11100010000011 from 14-bit floating point notation to decimal: 1 11000 10000011, a negative number, the exponent is 8, so we have .10000011 * 28 = 10000011.0 = 128 + 2 + 1 = 131.0, so we have -131. NOTE: this answer was corrected on 9/10/08. Convert 10110111000000 from 14-bit floating point notation to decimal: 1 01101 11000000, negative number, exponent is -3,, so .11000000*2-3 = 0.00011 = 1/16 + 1/32 = .09375, so we have -.09375. Convert 01011010000110 from 14-bit floating point notation to decimal: 0 10110 10000110 is a positive number with an exponent of 6, so we have .10000110 * 26 = 100001.10 = 32 + 1 + = 33.5.  "#   [ \ Y Z 6 L Y  3 Y \ FLUW$89ܸܸܸܸhA,Vh?2H* jh?2h)Xh?2H* h?2H*h%h%H*h?2h}h GXh%h/h~Fh@<h=h+H#$ P Q Z 6 7 ]  #$gd?2$a$gd= $ & Fa$gd/ $ & Fa$gd/ $ & Fa$gd/$a$gd/?@T$a$gd=$a$gd/gd?2 *+jk{~ "#&'*9:DFHIJORSZ[\inrtx}12ST hmH*h GXh GXH*h GXhmh_h%h%H*h=h%h?2h0h?2H*J21h:p// =!"#$% ^ 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 FontRiR  Table Normal4 l4a (k (No List PK![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+[}`jzAV2Fi@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] T T T 8@0(  B S  ?V$'"$| u y IKV3333333|| V||Vr4~H5D>]kN+ZY\^`o(. ^`hH. pLp^p`LhH. @ @ ^@ `hH. ^`hH. L^`LhH. ^`hH. ^`hH. PLP^P`LhH.^`o(. ^`hH. pLp^p`LhH. @ @ ^@ `hH. ^`hH. L^`LhH. ^`hH. ^`hH. PLP^P`LhH.^`o(. ^`hH. pLp^p`LhH. @ @ ^@ `hH. ^`hH. L^`LhH. ^`hH. ^`hH. PLP^P`LhH.r45DN+ZY                           VU_+D|cJUD3"A@#gY# $ %*)L/[264\4<9F;=)]=wC@,C2,D]G:JXKRL)6POV GXd]m^nK:u`{ }}K}U~[,HrS6i@%zmK@<xF^ Add|?2}[]XG#/7esnps;x~Fvv8 t1AkVTTV@T@UnknownG*Ax Times New Roman5Symbol3. *Cx Arial;WingdingsA$BCambria Math"h-۸&+# GI I !x24MM3QHP ?+2!xx "CSC 362: Some Example Conversionsfoxr Administrator   Oh+'0  $0 P \ ht|$CSC 362: Some Example Conversionsfoxr Normal.dotmAdministrator5Microsoft Office Word@0@N@XI ՜.+,0  hp|  oitM #CSC 362: Some Example Conversions Title  !"$%&'()*,-./0125Root Entry F`X71Tablei#WordDocument4 SummaryInformation(#DocumentSummaryInformation8+CompObjr  F Microsoft Word 97-2003 Document MSWordDocWord.Document.89q