V22.0201-001: Comp. Sys. Org. I (Honors)

Mid-term Study Guide

Exam Rules

1. The mid-term exam will be on Wednesday, October 22, 2003.

2. It will be worth 14 points (out of a total of 100 for the course).

3. It will cover the material in chapters 1 8 of the Dewar notes, with the exception of sections 7.2 and 7.3 (multiplication and division).

4. It will consist of one question in which you have to write an x86 procedure (roughly 20 lines), and a series of short-answer questions about x86 instructions.

Although anything from chapters 1 8 is fair game (except sections 7.2 and 7.3), the emphasis will be on two's complement arithmetic, arrays, bit manipulation (shifting and logical operations), and procedures. You should study that material thoroughly. In particular, it is a good idea to review the extended examples which appear at the end of most chapters.  There may also be a question which asks you to convert one or two machine language instructions to binary -- in particular, a jump instruction.

You will be allowed the entire period.  It will be an open-book, open-notes exam.

Programs are graded primarily on correctness. There will be no penalty for small differences in efficiency, although we may penalize for grossly inefficient programs or programs with totally useless instructions. Comments on the programs are encouraged, both to make grading easier, and to allow for assignment of partial credit.

Study Suggestions

a.  Read the Dewar notes.  It's an open book exam, so you don't have to memorize stuff, but be sure you know where to look something up if you need it.

b.  You are now "responsible" for four flags:  Z, C, S, and O.  To check your understanding of these flags, try a simple program such as  MOV  AL,50H / ADD   AL,50H / HLT   with the Dewar Debugger.  See if you can correctly predict what the flag values will be after the program halts.  Try this for a few constants.

c.  Exercise 6.1. is a good check that you understand what the logical and shift instructions do.  Again, if you're not sure of the answers, type the code in and run it with DDB.

d.  Be sure you understand how to use masking and/or shifting to extract some of the bits from a byte -- for example, how to get the three high-order (or the three low-order) bits of a byte [presumably something you had to do for assignment 2].

e.  Be sure you can 'assemble' a jump instruction to binary;  if in doubt, check your results using DAS.

f.   Be sure you can convert a negative number to two's complement;  again, if in doubt, check your results using DAS.

g.  Be sure you understand the difference between the binary representation of a digit and ASCII representations of the same digit; for example, the character '2' is represented as 32H in ASCII.  You may want to look at the binary to ASCII conversion code, sec. 2.5.4.