Quiz #1 Review Sheet

The first quiz of the course will be given on Tuesday, 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

• representation of signed numbers;  sign extension
• <>binary addition of signed and unsigned numbers;  identifying cases of overflow for each
<> <>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;
did either or both of these examples 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 one or two instructions (in binary or assembly format), to state its/their effect on the registers or memory
ex:  if R2 = 7, what is its value after executing the instruction 0101010010100001?
ex:  what is the value of R7 after executing the instruction 0010111111111111?
• 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
ex:  write an instruction to clear the low bit of R2
ex:  write a sequence of two instructions to set the low bit of R2
• to write a complete program in LC-3 assembler
ex:  a program to count the number of upper case letters in a string
ex:  a program to search for a '5' in an array of integers (text, p. 169)