# Question about Figure 3.2, Page 48, Second Edition of the book

12 messages
Open this post in threaded view
|

## Question about Figure 3.2, Page 48, Second Edition of the book

 When studying Figure 3.2, Page 48, Second Edition of the book, I can't understand one particular part of the diagram circled red. If we probe at the transition between Cycle 3 and 4, input and output signals are both 1. However, since the picture shows a NOT gate, shouldn't the input and output signal have opposite values? Thanks for the help!
Open this post in threaded view
|

## Re: Question about Figure 3.2, Page 48, Second Edition of the book

 To me, the response of the Not gate presented in Figure 3.2 seems inconsistent.  I would think the transition to logic 1 that occurs during cycle 3 should produce the same response that is shown in cycle 1.  The change would produce a diagram such as shown below.  But I may be missing something.
Open this post in threaded view
|

## Re: Question about Figure 3.2, Page 48, Second Edition of the book

 I agree. This is more likely an error in the new edition of the book.
Open this post in threaded view
|

## Re: Question about Figure 3.2, Page 48, Second Edition of the book

 Administrator I think the point of the figure is to show the effect of the propagation delay through the gate. Say the gate has a propagation delay of 10 ns (just making up a number). When the input to the gate changes, the output won't start changing until about 10 ns after the input changes. So during that time both the input and the output will appear to be the same value.
Open this post in threaded view
|

## Re: Question about Figure 3.2, Page 48, Second Edition of the book

 If that is the case, does it imply that this particular NOT gate will output the wrong values sometimes?
Open this post in threaded view
|

## Re: Question about Figure 3.2, Page 48, Second Edition of the book

 Administrator If will if you don't give it time to process its inputs. Things in the real world do not happen instantly. They take time. Your design has to take this into account by ensuring that there is enough time for all signals to propagate from input to output along all paths (the slowest path is known as the critical path and it drives the design). The critical path sets that maximum clock speed in your system. If you run you system faster than that, you risk capturing values that have not settled to their correct states.
Open this post in threaded view
|

## Re: Question about Figure 3.2, Page 48, Second Edition of the book

 So can we conclude that the clock speed is not properly designed since we have input=output=1 when we probe the transition between Cycle 3 and 4?
Open this post in threaded view
|

## Re: Question about Figure 3.2, Page 48, Second Edition of the book

 Administrator No. You can't conclude that. ANY time the input to a logic gate changes, it WILL take a finite amount of time before that change is reflected in the inputs. A basic logic gate doesn't know anything about clock cycles. Changes in the input are reflected at the output once they have propagated through the circuitry in the gate. That takes a certain amount of time. What is troubling about that diagram isn't that there is a delay, but why/how the input is changing BEFORE the clock edge. The better representation would be to show the input changing at (or shortly after) a clock edge to reflect the fact that the cause for it to start changing is a change in the output of some register, which happens in conjunction with a clock edge. Then show the output changing slightly later, but being finished and stable before the next clock edge.
Open this post in threaded view
|

## Re: Question about Figure 3.2, Page 48, Second Edition of the book

 In reply to this post by charleszzx I have now given this question a bit more thought in the clear light of morning.  I agree with WBahn about the purpose of the diagram: to illustrate the need to read the output of combinational gates only after time is allowed for a change in input signal to propagate through the gate to the output.  The outputs of combinational gates are considered valid and to be used only at a specific, regular point in each clock cycle.  Therefore, although combinational circuits do not depend on the clock for their operation, they certainly depend on the clock for their use.  This is made much more clear in several slides provided for Project 3 on the From Nand to Tetris web site which I reproduce below (the slides are snipped from the version revised for the 2nd Ed of the book): My original complaint was that the Not gate in the diagram shows inconsistent response behavior.  Only in the questioned section does the output response lag behind the input.  In every other case, the input and response occur together.  Such unpredictable behavior would seem to me to be undesirable.
Open this post in threaded view
|

## Re: Question about Figure 3.2, Page 48, Second Edition of the book

 In reply to this post by WBahn Thank you so much for the explanation. I did find that part of the diagram a bit confusing. Now I understand it a lot better!