ࡱ> ` 0bjbj 4ztZZZZZZZnBBBB<RBDn PCCCCC}D}D}D~OOOOOOO$Ph_SO!Z}D}D}D}D}DOZZCCOFFF}D:ZCZC~OF}D~OFFHZZFICC 0ʶԔBD IrJ O0 PI,SDSFISZFI,}D}DF}D}D}D}D}DOOuF }D}D}D P}D}D}D}DnnnR#nnnR#nnnZZZZZZ Homework #1 Chapter 1 Basic Concepts Solution Due: Monday, August 30th Instructions: Complete the following problems showing all work. Please write as legibly as possible. If your handwriting is a problem use a text editor. What is the 8 bit binary (twos complement) representation of each of the following signed decimal integers? -72 => 1011 1000 abs -72 = 72, convert to binary (repeated division) DivisionQuotientRemainder72/2360 (LSB)36/218018/2909/2414/2202/2101 /201 0100 1000apply 2s complement because number was negative toggle (reverse) bits => 1011 0111 add 1 => 1011 1000 -98 => 1001 1110 abs -98 = 98, convert to binary (repeated division) DivisionQuotientRemainder98/2490 (LSB)49/224124/212012/2606/2303/2111 /201 0110 0010apply 2s complement because number was negative toggle (reverse) bits => 1001 1101 add 1 => 1001 1110 -5 => 1111 1011 abs -5 = 5, convert to binary (repeated division) DivisionQuotientRemainder5/221 (LSB)2/2101 /201 0000 0101apply 2s complement because number was negative toggle (reverse) bits => 1111 1010 add 1 => 1111 1011 What is the 16-bit hexadecimal representation of each signed decimal integer? -32 => FFE0 abs -32 = 32, convert to hex (repeated division) DivisionQuotientRemainder32/1620 (LSB)2/16020020apply 2s complement because number was negative hex subtraction (F) => FFDF add 1 => FFE0 -60 => FFC4 abs -60 = 60, convert to hex (repeated division) DivisionQuotientRemainder60/163C (LSB)3/1603003Capply 2s complement because number was negative hex subtraction (F) => FFC3 add 1 => FFC4 Encode Karl in ASCII format in both hexadecimal and decimal. 4B 61 72 6C (hex) 75 97 114 108 (dec) What is the decimal representation of the following signed binary numbers? 10110101 => -75 Check MSB to determine if negative. Number is negative. Negative, apply 2s complement toggle bits (1s complement) => 0100 1010 add 1 => 0100 1011 decode using expansion => 1x26 + 1x23 + 1x22 + 1 = - 75 00101010 => 42 Check MSB to determine if negative. Number is non negative. decode using expansion => 1x25 + 1x23 + 1x21 = 42 11001100 => -52 Check MSB to determine if negative. Number is negative. Negative, apply 2s complement toggle bits (1s complement) => 0011 0011 add 1 => 0011 0100 decode using expansion => 1x25 + 1x24 + 1x23 + 1 = - 52 What is the binary representation of the following hexadecimal numbers? E5B6AED7 => 1110 0101 1011 0110 1010 1110 1101 0111 234B6D92 => 0010 0011 0100 1011 0110 1101 1001 0010 What is the unsigned decimal representation of each hexadecimal integer? 1C9 => 1x162 = 12x16 + 9 = 457 6A5B => 6x163 + 10x162 + 5x16 + 11 = 27,227 What is the minimum number of binary bits needed to represent each of the following unsigned decimal integers? 65 => 7 bits 0 to 27- 1 (127) 256 =>9 bits 0 to 29- 1 (511) 127 7 bits 0 to 27- 1 (127) What is the hexadecimal representation of each of the following binary numbers 1100 1101 0010 0001 => CD21 0111 1001 0110 1010 => 796A What is the minimum number of binary bits needed to represent each of the following signed decimal integers? n bits has a range of -2n-1 to 2n-1 - 1 -64 => n = 7 -26 to 26-1 (-64 to 63) -127 => n = 8 -27 to 27-1 (-128 to 127) Given the following binary sequence, mark the LSB and MSB 0MSB 0 1LSB 1 MSB 100 001 1 LSB What is the decimal representation of each of the following unsigned binary integers? 1111 0011 => 243 0110 1101 => 109 What is the sum of each pair of binary integers? 1010 1111 + 1101 1011 => 1 1000 1010 1001 0111 + 0011 1100 => 1101 0011 What is the sum of each pair of hexadecimal integers? F8 1A + 02 E6 => FB00 8B CD + 31 FA => BDC7 How many bytes are in each of the following data types? Word 2 bytes Doubleword 4 bytes Quadword 8 bytes What is the value of the Boolean expression F T => T ^ F = F What is the value of the Boolean expression (F  T) => F  T => T ^ F = F Create a truth table to show all possible inputs and outputs for the Boolean function described by (A  B) AABBA  B01011011001001010100   $%.4:CEGvU V b   A B Y [ \ e k z { |  ̷ӳӳvnvffh}IB*phhB*phhhB*phh}IhH>*B*phh}Ih-"AB*phh}IhHB*phh}Ih}IB*phh}Ih-"AhAhA5H*\hAhA5\ h@5\hAh7h7CJ0aJ0hACJ aJ hAhDHCJ aJ hAhACJ aJ ( %./HIR c r $IfgdH & FgdH & FgdH & Fgd-"Agd@$a$gdA tkkk $IfgdHkd$$IflF ,"   t06    44 la tkkk $IfgdHkdT$$IflF ,"   t06    44 la tkkk $IfgdHkd$$IflF ,"   t06    44 la tkkk $IfgdHkd$$IflF ,"   t06    44 la tkkk $IfgdHkdP$$IflF ,"   t06    44 la tkkk $IfgdHkd$$IflF ,"   t06    44 la  tkkk $IfgdHkd$$IflF ,"   t06    44 la     tkkk $IfgdHkdL$$IflF ,"   t06    44 la  B f | tldd\llSS $Ifgd}I & Fgd}I & Fgd}I & Fgd}Ikd$$IflF ,"   t06    44 la kkd$$IflF ,"   t06    44 la $Ifgd}I                  ! " $ ( 1 9          " & / 8 ļļļļļļļļļļļļļh&TTB*phh}Ih&TTB*phh&TTh-"Ah}Ih}I>*B*phhB*phh}IB*phh}Ih}IB*phF tkkk $Ifgd}IkdH$$IflF ,"   t06    44 la    tkkk $Ifgd}Ikd$$IflF ,"   t06    44 la    tkkk $Ifgd}Ikd$$IflF ,"   t06    44 la     tkkk $Ifgd}IkdD$$IflF ,"   t06    44 la   ! # tkkk $Ifgd}Ikd$$IflF ,"   t06    44 la# $ ) + . tkkk $Ifgd}Ikd$$IflF ,"   t06    44 la. / 0 1 ; tkkk $Ifgd}Ikd@$$IflF ,"   t06    44 la; < n tldd\TTK $Ifgd&TT & Fgd&TT & Fgd&TT & Fgd & Fgd}Ikd$$IflF ,"   t06    44 la    hkd$$IflF ,"   t06    44 la $Ifgd&TT    ! qhhh $Ifgd&TTkdA$$IflF ,"   t06    44 la! " ' ) , qhhh $Ifgd&TTkd$$IflF ,"   t06    44 la, - . / 9 qhhh $Ifgd&TTkd$$IflF ,"   t06    44 la9 : l  3 qiaaYQII & Fgd)! & Fgd)! & Fgd-"A & Fgd&TT & Fgd&TTkdL$$IflF ,"   t06    44 la     P U V W X Y a e f g h i m q /45678@DEFGHLPih7h7B*phh7h)!h-"AB*phh&TTh)!B*phh)!B*phh}Ih)!B*phh)!h-"Ah&TTh-"AB*phG3 < E O P V X ` hkd$$IflF ,"   t06    44 la $Ifgd)!` a f h j qhhh $Ifgd)!kd$$IflF ,"   t06    44 laj k l m r qhhh $Ifgd)!kdW$$IflF ,"   t06    44 lar s $qiaaYiiPP $Ifgd)! & Fgd)! & Fgd)! & Fgd)!kd$$IflF ,"   t06    44 la $./57?hkd $$IflF ,"   t06    44 la $Ifgd)!?@EGIqhhh $Ifgd)!kdb $$IflF ,"   t06    44 laIJKLQqhhh $Ifgd)!kd $$IflF ,"   t06    44 laQRaqqiaaYYQI & Fgd4 & Fgd-"A & Fgd-"A & Fgd)! & Fgd)!kd $$IflF ,"   t06    44 laijpq%&,-34@HILN}EN[_`d!"Lշìììշշ՝hJZhJZB*phhJZhq"Yhq"YB*phh4hq"YB*phhq"Yhq"YB*phhq"YB*H*phh4B*phh-"Ah4h4B*H*phh4h-"AB*phh4h4B*phh44@O%OeMP & FgdJZ & Fgd-"A & Fgd-"A & Fgdq"Y & Fgdq"Y & Fgdq"Y & Fgd4 & Fgd4 & Fgd4RSdfhirsvw!56=ʿʿʿh2h2B*phh2hVh8 B*phh8 h ah[Eh[EB*H*phh[Eh[EB*H*phh[Eh[EB*phh[EhJZB*H*phhJZB*phhJZh-"AhJZhJZB*phhJZhJZB*H*ph3Ps"> Zfz#Hk & FgdCS & FgdCS & Fgd$U & Fgd2 & Fgd a & Fgd a & Fgd-"A & Fgd[E  [^_`abeghklstuvy!"#89G]^j䵹hV^hV^B*phhV^hCShw^hdB*phh$UhdhVbhVbH*hVb hVbH*h2B*H*phh2B*phh2h ah2h2B*phh2h2B*H*ph;  &/07iklxhjrtvhChC5B*\phhChCB*phhChV^hCSB*phhumhV^hCShV^hV^B*ph!'8yvz $IfgdC & FgdCS & FgdCS KBBBBB $IfgdCkdm $$Iflrp@ ,< t0644 laKBBBBB $IfgdCkd $$Iflrp@ ,< t0644 laKBBBBB $IfgdCkdw $$Iflrp@ ,< t0644 laKBBBBB $IfgdCkd $$Iflrp@ ,< t0644 laKFgd7kd $$Iflrp@ ,< t0644 la21h:p7/ =!"#8$% R$$If!vh5 5 5 #v :Vl t65 R$$If!vh5 5 5 #v :Vl t65 R$$If!vh5 5 5 #v :Vl t65 R$$If!vh5 5 5 #v :Vl t65 R$$If!vh5 5 5 #v :Vl t65 R$$If!vh5 5 5 #v :Vl t65 R$$If!vh5 5 5 #v :Vl t65 R$$If!vh5 5 5 #v :Vl t65 R$$If!vh5 5 5 #v :Vl t65 R$$If!vh5 5 5 #v :Vl t65 R$$If!vh5 5 5 #v :Vl t65 R$$If!vh5 5 5 #v :Vl t65 R$$If!vh5 5 5 #v :Vl t65 R$$If!vh5 5 5 #v :Vl t65 R$$If!vh5 5 5 #v :Vl t65 R$$If!vh5 5 5 #v :Vl t65 R$$If!vh5 5 5 #v :Vl t65 R$$If!vh5 5 5 #v :Vl t65 W$$If!vh5 5 5 #v :Vl t65 W$$If!vh5 5 5 #v :Vl t65 W$$If!vh5 5 5 #v :Vl t65 W$$If!vh5 5 5 #v :Vl t65 W$$If!vh5 5 5 #v :Vl t65 W$$If!vh5 5 5 #v :Vl t65 W$$If!vh5 5 5 #v :Vl t65 W$$If!vh5 5 5 #v :Vl t65 W$$If!vh5 5 5 #v :Vl t65 W$$If!vh5 5 5 #v :Vl t65 W$$If!vh5 5 5 #v :Vl t65 W$$If!vh5 5 5 #v :Vl t65 W$$If!vh5 5 5 #v :Vl t65 $$If!vh5<5555#v<#v#v:Vl t65<55$$If!vh5<5555#v<#v#v:Vl t65<55$$If!vh5<5555#v<#v#v:Vl t65<55$$If!vh5<5555#v<#v#v:Vl t65<55$$If!vh5<5555#v<#v#v:Vl t65<55@@@ NormalCJ_HaJmH sH tH DAD Default Paragraph FontRi@R  Table Normal4 l4a (k@(No Listj@j H Table Grid7:V0H@H 7 Balloon TextCJOJQJ^JaJtz %./HIRcrBf| !#$)+./01;<n  !"'),-./9:l3<EOPVX`afhjklmrs$./57?@EGIJKLQRaq@O % O e  M P s  " > Z f z #Hk'8y469;>FGIKMOQRTVXZ\]_aceghjlnprsv00000000 0 0 0R 0R0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0000  0R 0 0 0 0| 0|@0 @0 @0 @0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0  0| 0< 0< 0 0 0@0 @0 @0 @0 0 0 0 0 0 0 0 0 0 @0 @0 @0 @0 @0 0 @0  0 0: 0: 0 0 0 0@0 @0 @0 @0 0 0 0 0 0 0 0 0 0 @0 0 0  0 0s 0s 0 0 0@0 @0 @0 @0 0 0 0 0 0 0 0 0 @0 @0 0 @0  0 0R 0R 0 0 0 0a 0a 0 0 0a 0 0@ 0@ 0 0 0 0  0  0 0 0  0  0 0M  0M  0 0  0  0  0 0  0  0 0>  0>  0  0  0  0  0z  0z  0  0  0  0  0k 0k 0  0 0 0 0 0 00 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ./HIRcrBf| !#$)+./01;<n  !"'),-./9:l3<EOPVX`afhjklmrs$./57?@EGIJKLQRaq@O % O e  M P s  " > Z f z #Hk'8y469;>FGIKMOQRTVXZ\]_aceghjlnprsv0000000 0 0 0I 0I0 0 0 0 0 0 0 00 0 0 00 0 0 00 0 0 00 0 0 00 0 0 00 0 0 00 0 0 0  0I 0 0 0 0s 0s@0 @0 @0 @0 0 0 @0 @00 0 0 @00 0 0 @00 0 0 @00 0 0 @00 @0 0 @00 @0 0 @00 0 0 0  0s 03 03 0 0 0@0 @0 @0 @0 0 0 0 @00 0 0 @00 @0 @0 @0@0 @0 0 @0  0 01 01 0 0 0 0@0 @0 @0 @0 0 @0 0 @00 0 0 @00 @0 0 0 0 0j 0j 0 0 0@0 @0 @0 @0 0 0 0 @00 0 0 @00 @0 0 0 0 0I 0I 0 0 0 01 01 0y 0y 01 0 0 0 0 0 0 0 0 0 0 0m  0m  0 0  0  0 0  0  0  0 0  0  0 0  0  0  0  0  0  0J  0J  0  0  0  0  0; 0; 0  0 0 0 0 0 0y000y000y000y0y0y0y0y00y0 y0 y0 y0 y00y0y0y0y0y00y0y0y0y0y00{00 i (1356      # . ;  ! , 9 3 ` j r $?IQP !"#$%&')*+,-./024789:;<8@0(  B S  ?J N '/vv$%IRrB/1<n:l3kmqR@Ose M P  > Z z #k4svvATEp^`o(. ^`hH. pLp^p`LhH. @ @ ^@ `hH. ^`hH. L^`LhH. ^`hH. ^`hH. PLP^P`LhH.ATE         EDWEJZ!7hCSfE 6Rd[x8 SV2HAp$k(xR;(>ex>-"AwBgGN H)HDH<{HQJ5#Q&TT$Uq"YI[w^gc_um}{}I6VbU6Ztg~h[E)!C4/ a7NbE$Ub+?h +J8V^/bJ@ !#$)+./01;<  !"'),-./9:3<EOPVX`afhjklmrs$./57?@EGIJKLQR469;>FGIKMOQRTVXZ\]_aceghjlnprsv@ssPbssytP@PUnknownG: Times New Roman5Symbol3& : Arial5& zaTahoma"qhi4&:F9Fd d $8r4d 2Q HX)?A2 Homework #1Dr. Karl Ricanek, Jr.Dr. Karl Ricanek, Jr. Oh+'0 (4 T ` l x Homework #1Dr. Karl Ricanek, Jr.NormalDr. Karl Ricanek, Jr.18Microsoft Office Word@3@є@~03Z@dԔd ՜.+,0 hp  UNCW Computer Science  Homework #1 Title  !"#$%&'()*+,-./0123456789:;<=?@ABCDEGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnoprstuvwxz{|}~Root Entry F`ԔData >1TableFTWordDocument4zSummaryInformation(qDocumentSummaryInformation8yCompObjq  FMicrosoft Office Word Document MSWordDocWord.Document.89q