# Why we need the DFF to build the Register

4 messages
Open this post in threaded view
|

## Why we need the DFF to build the Register

 In this chapter. It says we can use DFF to construct a 1-bit register. The final circuit has input(in, load) and output(out).  It’s easy to be implemented My question is, why do we need DFF to construct the 1-bit register? As far As I know, the dff works depending on clock pulse. However, it’s possible to construct a 1-bit register without the clock input(I actually simulate this and it works. But I don’t know how to upload an screenshot here). It works under the same rules: if load==1 then out=in if load==0 then out is unchanged It seems the clock pulse is unnecessary if all we want is a simple register.  The DFF with clock is much more complex. Can any one help to explain the reason of using clock-based circuit  here?
Open this post in threaded view
|

## Re: Why we need the DFF to build the Register

 This is true in general, but not for the hardware simulator developed for the N2T course. It is simplified and cannot handle cycles (unless they are "broken" by the provided DFF). You can create a flip-flop without clock. But what would it mean to create a  register without a clock? It is supposed to emit the value from the previous input, that is out[t] = in[t - 1]. How would you know when to get these values without a clock? It is in the specification in the form of t. In the real world (not simulators) it takes time for something to happen. Changing the signal from 0 to 1 for example isn't instantaneous. It will move through values, which are digitally not valid, it may fluctuate several times before it stabilizes to a value, which we interpret as a digital 1. Each gate needs some time for its inputs to stay stable before it can produce a correct and stable output. This output is often an input to another gate, which also needs its inputs stable, and so on. You can calculate these times for circuits as well, by finding the slowest path for the signals to propagate from the inputs to the outputs. In a purely combinational circuit you can just wait for the outputs to stabilize and call it a day. But once you introduce state things become harder. Suppose one of these circuits is a 1-bit memory of some sort. You want it to remember the value in its input when it's the correct one. Too early or too late and it might not even be a valid value. The clock is used to synchronize these and to "instruct" the register to remember the value when it's valid. The propagation times of the circuits dictate the minimum and maximum allowed clock speeds. P.S. I'm a software guy and my knowledge about electronics is very rudimentary. I'm sure there are much more considerations when you develop real hardware. P.P.S. To include an image, just click on "Insert Image" button in the edit form.