File: hw2.txt Due date: Before 11:59pm Tuesday January 15 Grading: 10 Points total. To do: Answer the following questions. (1) What is your name? (2) Did you work with anyone else on this hw? Note - this includes /anyone/ other than Jeff (e.g., your cousin, the GA in the tutoring lab, a classmate, ...). List anyone who you talked to about it, or worked together. (3) Convert the following binary numbers to decimal. Show your work. Feel free to check your answers (e.g., using Wolfram Alpha). If you don't show your work, you don't get any credit. a) 1001 b) 10000000 c) 10011001 (4) What is the largest number that can be represented by the following number of bits? Explain how you got your answer, or show your work as you do it. Hint: for each one, what is the value of the binary number with that many bits, and with all bits set to 1? Hint: for 16 and 32 bits, use the formula for a geometric sum. a) 8 bits b) 16 bits c) 32 bits (5) Convert the following decimal numbers to binary. Show your work. Again, feel free to check your answers, but you must show your work to get credit. a) 151 b) 6501 (6) Using the assembler program that was shown in class, write an assembly language program to add up the numbers 777, 888, and 999. The program should compute the sum and print the result. Save your program as hw2_add.151asm, and upload/save it along with your hw2.txt file. It is a text file, so you can use Notepad or Emacs to create/edit the file. You should test your assembly program to make sure it is correct. You can do that by logging into putty and running assembler hw2_add.151asm and also assembler hw2_add.151asm step after you have created your hw2_add.151asm file. Note that you can take the average.151asm file as a starting point for your program, and just make changes to that. Extra credit, worth at most 2 points extra. (7) a) Using the assembler program that was shown in class, write an assembly language program to compute 10! = 10*9*8*7*6*5*4*3*2*1. Save the program as hw2_factorial.151asm. b) Using the assembler program that was shown in class, write an assembly language program to compute 1 + 2 + 2^2 + 2^3 + ... 2^15. Save the program as hw2_geometricsum.151asm.