Re: I do not understand the math notation in this chapter.

Posted by cadet1620 on
URL: http://nand2tetris-questions-and-answers-forum.52.s1.nabble.com/I-do-not-understand-the-math-notation-in-this-chapter-tp4032141p4032142.html

Chapters 1 and 2 are all combinational circuits. The circuits are dealt with like math equations—evaluate them step by step until you get the answer—and there is always the same result for a particular combination of inputs. The abstract view is that time is not involved. (The real world gets messy because it does take time for a gate to change its output after its input(s) change.)

Chapter 3 introduces the idea of time, which is represented by the variable t. In this abstract view, time is an integer that starts at 0 and increases by steps of 1.

A more mathish way to write Out(t) = In(t-1) would be
  Outt = Int-1
which makes it more evident that t is a subscript to variables Out and In.

Another way to think of it is as a program where Out and In are arrays and t is an array index.

bool In[infinity], Out[infinity]

t = In[0] = Out[0]
while (true) {
    t = t+1;
    Out[t] = In[t-1];
}
“Out is now what In was before” is a very good description, by the way.


Some students find it easier to think about "what happens next" rather than "what happened before." This changes the statement to
  Outt+1 = Int

--Mark