### Quiz #1 Review Sheet

The first quiz of the course will be given on Monday, October 18th.  It is worth 15 points towards your final grade.

You will have all period for the quiz.  It is an open book quiz ... you may bring your textbook and any other written materials.  You may not exchange materials with anyone else during the quiz.  You may not bring any calculating device to this quiz.

The quiz will cover

#### number representation

• number conversion between bases 2, 10, and 16
• representation of signed numbers
ex:  represent -5 as a 6-bit binary two's complement number
ex:  compute the 4-bit sum of 01012 and 11002 where these are two's complement numbers
do the same when both are unsigned binary numbers
• whether a particular example of addition (signed or unsigned) results in overflow
ex:  did the examples just above result in overflow?

#### instruction representation

• given an instruction in assembly language and the address where it is stored, to determine its binary representation
ex:  suppose QUACK is address x3010, give the binary representation of  LD R5,QUACK if the instruction is stored at address x3001
ex:  suppose MOO is address x3001, give the binary representation of  BRP MOO if the instruction is stored at address x3010

#### LC-3 programming

• given an instruction (in binary or assembly format), to state its effect on the registers or memory
ex:  if R2 = 7, what is its value after executing the instruction 0101010010100001?
• given a small program (in assembler), to tell what it does
• to write an LC-3 instruction to perform a particular function
ex:  write an instruction to subtract 2 from R2
• to write a small complete program in LC-3 assembler
ex:  a code segment to branch to label LETTER if R1 contains the ASCII representation of a letter
ex:  a program to search for a '5' in an array of integers (text, p. 169)

#### assemblers

• a short-answer question about how assemblers work
ex:  why two passes are needed;  why .ORIG must come first;  filling a symbol table given a program;  identifying an assembly error in an assembly language program

#### input - output

• a short-answer question about IO (chapter 8).  We will not ask you to write code involving IO.

Doing the homework and reading the book are the best preparation for the quiz.
Extra pre-quiz office hours:  Friday 10:45 - 11:15 and Monday 11 - 12.