Homework 1: Assembly programming Due date: June 13th, in class. Turn in the hard copy. 1. Do the following base transformations. Show all the steps of the process: (a) 1120 from decimal to binary and hexadecimal (b) 2048 from decimal to binary and hexadecimal (c) 17890 from decimal to binary and hexadecimal (d) FFFFh from hexadecimal to binary and decimal (e) ef890h from hexadecimal to binary and decimal (f) 10100100b from binary to hexadecimal and decimal 2. (a) Write an assembly program which evaluates the following expression: a + b / (c - d) Where a, b, c, d are 16 bit integers. (b) Repeat (a) with the assumption that the numbers are 8 bit integers. 3. Consider the following data: vector dw 6h, 7h, 9h, 12h, 73h vectorsize dw 5 variable dw 10h resulta dw ? resultb dw ? a) Write a small assembly program which calculates the sum of numbers of the vector. The size of the vector is given in the separate variable vectorsize. Write the result in the variable resulta. b) Write an assembly program which finds the smallest number of the vector. Write the result in the variable resultb. c) Write an assembly program which multiplies all the elements of the vector with variable. If the result would overflow the vector element, write -1 into the vector element. d) Repeat a), b), c) with 8 bit numbers by replacing the data with: vector db 6h, 7h, 9h, 12h, 73h vectorsize dw 5 variable db 10h resulta db ? resultb db ? 4. Write a short essay (about 500 words) comparing the Intel instruction set with the instruction set of the MIPS 3000 processor: Here are some of the things you will need to consider: -Which processor has more registers? -Which processor has more instructions? -Which assembly language will allow you to write shorter programs? -Which processor you think is easier to implement and manufacture? Information about the assembly languages: INTEL X86 -use the summary from the class webpage and handout or the book. MIPS (ignore the floating point instructions) http://www.xs4all.nl/~vhouten/mipsel/r3000-isa.html