Objectives

Students will be able to:

  • Review fundamentals of one-dimensional and two-dimensional arrays.

Fetch Decode Execute Simulation

Let's simulate the Fetch-Decode-Execute cycle, sometimes called the Machine Instruction Cycle.

This will help us review concepts related to:

  • looping
  • searching
  • 1-dimensional arrays
  • 2-dimensional arrays
  • designing functions (with/without parameters)
  • designing functions with/without return statements
  • calling functions appropriately
  • the Fetch-Decode-Instruction cycle

Let's slow things down! Include this line of code at the end of the for loop:

TimeUnit.SECONDS.sleep(1);

Replace some of the rows in the RAM array with null.

Does your program still work? What error do you get?

If there is an error, can you fix it?

Tags

linear searchALU voidCU return MDR fetch MAR decodeexecute