Review Sheet #2 - Spring 2016 Example Questions - Most begin with ex or a - Endian - big vs little - explain the difference? - why know the difference? - why choose one over the other? - Binary Multiplication Serial Multiplier (Shift Multiplier) Booth Encoding Booth Recoding (bit-pair encoding) Example Questions: -How many shifts and adds are required by ... -Show how to use each method to multiply two numbers Example Questions: Ex: Find 9 * 10 with a shift multiplier (show work) Ex: Find 9 * 10 using booth encoding Ex: Find 9 * 10 using booth encoding with recoding Ex: How many shifts and adds are required by 9 * 10 with a shift, encoded and recoded multiplication. Chapter 4 (56-57) Clock Rate Instruction Rate Fetch-Execute Cycle Example Question: Ex: What is the fetch-execute cycle? Ex: Why do we care about the fetch execute cycle? Ex: What is a clock rate? Ex: What is Hz? Ex: How do I go from Hz to number of instructions per second? Ex: How is the clock rate and instruction rate different? Chapter 5 opcodes, operands and results (p63) Ex: What's an opcode? How does it relate to assembly? variable length vs fixed length instructions (63-64) Ex: What impliciations are there for variable vs fixed length instructions? Ex: Which pipeline stage suffers from variable length instructions? Ex: Which is RISC? registers(64-66) Ex: What is it and waht is it used for? CISC vs RISC (67) Ex: Name 5 features that distinguish RISC from CISC? Fetch, decode, read, execute and store (p58) pipelines (68) Ex: What is a pipeline? Ex: What are the 5 stages and what do they do? Ex: Given the added complexity, why do we use pipelines? pipeline and stall, consequences, forwarding, no-op (68-73) Ex: What are pipeline stalls or hazards? Ex: How do pipeline stalls affect the clock rate? Ex: How do pipeline stalls affect the instruction rate? Ex: What is a no-op and why might it be used? Ex: How many clock cycles does this code take to run? What is it's instruction rate given a specific clock rate? Ex: What is forwarding? Why is it used? Ex: How long does this code take to run with forwarding? program counter, fetch-execute, branching and effects (73-74) Ex: What is the program counter and how is it used? Ex: What are the effects of branching on the fetch - execute cycle? How about the pipeline? subroutines/functions (75) Ex: Name 2 ways that arguments are passed to functions? Ex: How do nested function calls work in assembly? MIPS in brief (77) Ex: What's this assembly do? Convert it to C++. Minimalistic, orthogonality and RISC (78-79) Ex: Why are RISC so concerned with being minimal and orthogonal? Condition Codes (cc) (p80) Ex: What are condition codes? How are they used? Chapter 6 - addressing designs 0, 1, 2 or 3 addresses design -What kind of architecture is a 0 address architecture? Where might it be used? -What kind of architecture is a 1 address architecture? Where might it be used? -How do you write 'this' line of code in an x address architecture? Size of instructions -What advantage does a 2 address architecture have over a 3 address architecture? -Why is a specific address architecture chosen over another? -What is the size of an instruction in an x address architecture if opcodes are y bits and operands are z bits? Length of Programs -How long is an x address program that is a translation of this C++ code? - instruction formats and tradeoffs Ex: What features does a designer of an architecture have to consider when choosing their instruction set? programming ease ex: Does it matter how easy it is to program in assembly? # of instruction (size of instruction set) Ex: What advantage do smaller instruction sets have? size of instructions Ex: Why is the size of instructions important to consider? size of immediate values Ex: What is an immediate and why does its size matter in assembly? fetch/decode speeds ex: Why is the speed of a fetch or decode important? hardware size ex: Why does hardware size play a factor in architectural considerations? - memory addressing immediate direct register reference indirect through register direct memory indirect memory reference Exs: What are memory addressing models? Where are they used? How are they used? Why are there so many? Which ones must be available in an instruction set?