Exam 1 Review

Here are sample questions similar to those you will see on the first exam. If you can answer these, you should be in good shape for the exam.

Programming Basics

  • Suppose you have a file containing source code for a C++ program. What are the fundamental tools you need to activate to get this code actually running on a computer? Be sure to indicate what each tool produces.

  • Make is not part of the answer to the above question. So, what does Make do that makes it so popular and important?

Number Systems

  • Explain what the base of a number system means.

  • create a table showing the first 16 numbers in Binary, Decimal, and Hexadecimal

  • Why do we add a character to the end of numbers indicating the base of the system being used?

  • Convert 242d to hexadecimal (hint, go to binary first, and make sure that “d” at the end does not confuse you!)

  • Convert 0fch to decimal (hint, go to binary first. Again, note the “h” at the end, what does that indicate?)

  • How does the computer decide if a memory container contains code or data?

  • We said that memory hold two basic kinds of things in a computer. Actually, there are three things possible. What are they? (Hint: This is not about zeros and ones, and you normally throw the third one away!)

  • If memory is organized as an array of bytes, how do we access other data types which need more space.

  • How are negative integers represented in a computer?

  • Show the binary encoding for +42 and -42 as eight bit numbers, then show what you get when you add them?

  • Extend both +42 and -42 to 16 bits.

  • Basically, how are floating point numbers encoded?

Basic Architecture

  • Draw a simple Von Neuman machine and explain basically what each part does.

  • What are the four steps a processor performs in executing a single instruction?

  • The processor uses something called a program counter (or instruction pointer) to track where the next instruction to process can be found. How is this counter updated?

  • We see the term “virtual machine” a lot in the computer industry these days. What is a virtual machine?

  • A processor is driven by a clock and performs four basic steps ias it processes each instruction. Show a fragment of C/C++ code that models this behavior.

  • What is contained in an executable file, and what tool places that file into memory?

  • What is the difference between a Von Neumann machine and a Harvard Machine?

  • Describe the signals (data and any other things) needed by the ALU to do its job.

  • Why can’t we just speed up the processor clock to make a machine run faster?

  • Explain how pipelining can speed up a system.

Challenge Questions

  • Suppose we have two simple components that store a signal in a memory cell we call a “register”. These components have a single input and a single output, and a simple boolean signal that tells the unitl to read or write when that “tick” comes along. We have a wire connecting the output of the first of these components to the input of the second one. Explain what should happen as the clock ticks so the data in the first component is transferred to the memory of the second unit. This sequence of steps will implement the assignment operation: R2 = R1.

  • Using our four step instruction processing pattern, how might we cause the processor to fetch the next instruction from some other place in memory, instead of the next instruction in memory (the instruction would look like this: JUMP address)