The worksheet below is designed to help direct your work in assembly. We'll have a Sakai session on Saturday, again at 4:00 pm, to review these questions and talk a bit about getting started in assembly. Assembly Language Worksheet #1 This is a getting-started worksheet for assembly language. Note that each of these can be solved by browsing through the relevant section of the text, thus not (yet) requiring any coding. 1) A brief brush-up on numbering systems � given the decimal value 2001, provide the following binary and corresponding hexadecimal values (for each binary value): binary value hex value binary value one�s complement two�s complement //////////////////////////// Note for binary: 1 2 4 8 16 64 128 256 512 1024... for Hex 1 16 256 4096... so here: 2001 D, 11111010001 B, 7D1 H One's complement is for binary just fliping every one and zero: 00000101110 B, 2E H (where I just use the binary to convert) Two's compliment is one's compliment plus 1 00000101111 B, 2F H (where I just use the binary to convert) 2) How do �registers� differ from �random access memory� locations? //Registers have specific purposes... I don't know... 3) Using only the assembly instructions MOV, ADD, SUB, INC, DEC, and NEG, translate the following high-level language assignment statements to the equivalent series of assembly language instructions. Note that first, second, and third are integer variables. First := -first; // NEG First ;converts first to -first Third := first + second; // MOV AX, First // ADD AX, Second // MOV Third, AX Second := second + 7; // MOV AX, Second ;move value of second into AX // ADD AX, 7 ;add 7 to value in AX // MOV Second, AX ;move value in AX into Second First := 3 * second + third; // MOV AX, Second // ADD AX, Second // ADD AX, Second // ADD AX, Third // MOV First, AX Third := second - first; // MOV AX, Second // SUB AX, First // MOV Third, AX //Example from the book A = B - 2 x A // MOV AX, B // SUB AX, A // SUB AX, A // MOV A, AX 4) Perform the following logic operations (this actually shows up in ch. 7, but we did some in class): //A good reference for this is p321 Schrez 0011 1010 AND 0011 1010 //this is 1 if both are 1 and 0 otherwise // -> 0011 1010 0011 1010 OR 0011 1010 //this is 1 if either/both are 1 but 0 if both are 0 //-> 0011 1010 0011 1010 XOR 0011 1010 //this is 1 only if one is 0 and the other 1, else its 0 //-> 0000 0000 0010 0101 AND 1010 1010 //-> 0010 0000 NOT 1010 1111 //this inverts each bit so: 0101 0000