# I do not understand the math notation in this chapter.

7 messages
Open this post in threaded view
|

## I do not understand the math notation in this chapter.

 Out(t) = In(t-1) These makes no sense to me. So t fluctuates between 0 and 1 according to the clock, or does the whole bracketed statement do that? Can t be 500? Is Out being multiplied by t or is it operating on t? The way I understand this is “Out is now what In was before” but this leaves me asking 10 billion other questions. I have built the first chip (the Bit) using the software, but I did that by constantly trying different things rather than reaching an understanding, so I’m not continuing until I have some clarity as this isn’t a recipe for understanding anything. I have tried YouTube vids explaining memory circuits but haven’t found anything good.
Open this post in threaded view
|

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

 Administrator 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
Open this post in threaded view
|

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

 If we were dealing with billiard balls, then what would the mechanism be doing? Would it be holding one billiard ball and pushing the one previously held out? This kind of analogy would help me a lot. I am also going to try to make an animation of a flip flop from animated Nands so that I can confirm to myself that I fully understand it. This book is great and I appreciate the authors of it and online help.
Open this post in threaded view
|

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

 Administrator Yes, your machine that holds a billiard ball for one clock period would be a good analogy for the DFF. You mention animating Nands. If you are trying to understand what is going on inside the DFF, check out this site.     http://www.play-hookey.com/digital/sequential/It has live circuits that you can poke at and watch how they work. I suggest starting at the top with Nand Latch so that you will see how the parts go together to make the DFF. --Mark
Open this post in threaded view
|

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

 Mark, I was playing around with the D flip-flop simulation on that website you posted and saw something which confused me. The D flip-flop on the website seems to behave differently from the DFF built-in chip included with the Nand2Tetris software package. The DFF on the website appears to output whatever value is seen at D during the falling clock edge, whereas the DFF built-in chip appears to "take in" whatever input value is seen at the rising clock edge and then output that "taken in" value at the falling clock edge regardless of the value of the input at the falling clock edge. From what I've read in a digital logic textbook I have, it seems like the DFF on the website more accurately reflects the true behavior of real DFFs. Are you able to comment on this discrepancy at all? Why doesn't the odd behavior of the built-in DFF cause problems later on? If the way I described the discrepancy doesn't make sense then I can provide a concrete example of what I'm talking about.