hw7920 -- some solutions

23. Convert the following numbers from the base shown to the base ten.
	a. 111 (base 2)
				4 + 2 + 1
	b. 777 (base 8)
				7 * 8^2   +  7 * 8    +  7
	c. FEC (base 16)
				15 * 16^2  +  14 * 16   +  12
	d. 777 (base 16)
				7 * 16^2   +  7 * 16    +  7
	e. 111 (base 8) 
				1*8^2  +  1*8  + 1

31. Convert the following octal numbers to hexadecimal: a. 0777 000 111 111 111 = 0001 1111 1111 b. 0605 000 110 000 101 = 0001 1000 0101 c. 0443 000 100 100 011 = 0001 0010 0011 d. 0521 000 101 010 001 = 0001 0101 0001 e. 1 1 = 1
34. Convert the following decimal numbers to hexadecimal: a. 1066 [Battle of Hastings; Norman conquest] [WORK UPWARD!] 0 R 1 zero (done!) 2 ) 1 R 0 odd 0/2 = 0 2 ) 2 R 0 even 2/2 = 1 2 ) 4 R 0 even 4/2 = 2 2 ) 8 R 0 even 8/2 = 4 2 ) 16 R 1 even 16/2 = 8 2 ) 33 R 0 odd 32/2 = 16 2 ) 66 R 1 even 66/2 = 33 2 ) 133 R 0 odd 132/2 = 66 2 ) 266 R 1 even 266/2 = 133 2 ) 533 R 0 odd 532/2 = 266 2 ) 1066 even 1066/2 = 533 [READ DOWN] 10000101010 Hex: 100 0010 1010 0x42A Octal: 10 000 101 010 02052 b. 1939 [Invasion of Poland; WW II] _0 R 1 2 )_1 R 1 2 )_3 R 1 2 )_7 R 1 2 )_15 R 0 2 )_30 R 0 2 )_60 R 1 2 )_121 R 0 2 )_242 R 0 2 )_484 R 1 2 )_969 R 1 2 ) 1939 [READ DOWN] 11110010011 Hex: 111 1001 0011 0x793 Octal: 11 110 010 011 03623 c. 1 _0 R 1 2 )_1 d. 998 [Otto III retakes Rome.] _0 R 1 2 )_1 R 1 2 )_3 R 1 2 )_7 R 1 2 )_15 R 1 2 )_31 R 0 2 )_62 R 0 2 )_124 R 1 2 )_249 R 1 2 )_499 R 0 2 )_998 1111100110 11 1110 0110 0x3E6 1 111 100 110 01746 e. 43 [One more than the answer.] _0 R 1 2 )_1 R 0 2 )_2 R 1 2 )_5 R 0 2 )_10 R 1 2 )_21 R 1 2 )_43 101011 10 1011 0x2B [OR not 2B?] 101 011 053
37. Perform the following OCTAL additions: a. 0770 + 0665 '' (carrys) 0770 +_0665_ 1655 b. 0101 + 0707 ' ' (carrys) 0101 +_0707_ 1010 c. 0202 + 0667 ' ' (carrys) 0202 +_0667_ 1071
38. Perform the following HEXADECIMAL additions: a. 19ABE + 43 '' (carrys) 19ABE +____43 19B01 b. AE9 + F ' (carrys) AE9 +___F AF8 c. 1066 + ABCD '' (carrys) 1066 +_ABCE_ BC34
40. Perform the following HEXADECIMAL subtractions: a. ABC - 111 (no carrys) ABC -_111_ 9AB b. 9988 - AB 9988 -___AB_ 98DD 13 check: +___AB_ +_11_ 9988 24 =0x18 D+B is 13+11 =24 = 0x18 c. A9F8 - 1492 [Columbus] A9F8 -_1492_ 9566 check: +_1492 A9F8_
41. Why are binary numbers important in computing?