Chapter 3 Terminology

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Chapter 3 Terminology

ismithers
Hi, I'm working my way through chapter 3 and I wanted to ask about the terminology of bit and Bit which appear to be used to reference different things. A bit with a lowercase 'b' refers to the definition I'm accustomed to, which is an atomic value of information in computing. But then later there are figures in the book, such as 3.1 and 3.2 that have items labelled as Bit with an uppercase 'B'. These seem to refer to a part of a chip - is this just a lexical form in the book, or are there bits and Bits and they are different?

Also I'm confused about figure 3.1 and the text in the paragraph below that references it. It says that the right-most image is the correct implementation as it uses a Mux chip. However it says that if we wish to start storing a new value, we can put the value into the in pin, and feed the selector pin with a value of 1. On page 21 the Mux diagram (and in fact my implementation) says that the the selector pin with a value of 1, will feed the input from pin b through to the out pin. Why in 3.1 does it feed what looks like pin a through to the out pin?

The only thing I can think of is that 3.1 has a Mux chip but show from a different perspective - ie the underside. I don't really think that is the answer, but it's all I can think of because on page 21 the selector pin is shown on the bottom of the diagram, but in 3.1 its on the top. That would effectively reverse the a and b pin positions. Small thing, but I was just trying to be thorough and make sure I'm following what I've learned in the prior chapters.

Thanks!
Reply | Threaded
Open this post in threaded view
|

Re: Chapter 3 Terminology

cadet1620
Administrator
Lowercase 'bit' is the generic bit you know. Uppercase 'Bit' refers to a chip that you will build, Bit.hdl. Think of Bit as a 1-bit memory cell; you'll use 16 of them to make Register.hdl.

Figure 3.1 is confusing, as you point out. And you have solved the conundrum correctly; the mux is flipped from how it's been drawn earlier.

Schematics usually label at least one of the mux inputs (or demux outputs) so that there is no ambiguity. The select input can be top or bottom, whichever is more convenient for a particular schematic. You will also see muxes and demuxes drawn as trapezoids instead of triangles.

--Mark
Reply | Threaded
Open this post in threaded view
|

Re: Chapter 3 Terminology

Slight_Of_Nand
This post was updated on .
I was also confused by the reversing of the A and B pins on the Mux!

Could someone also clarify in a different way why out(t-1) is different to out = in(t-1)?

I think I understand it, but I feel another perspective might help me fully grasp it.

Finally I assume you NEED the DFF in diagram 3.1; that is to say you could not get away with simply routing the output of the mux to one of it's own inputs?  The DFF acts as a sort of delay?

Thank you,

:)
Reply | Threaded
Open this post in threaded view
|

Re: Chapter 3 Terminology

WBahn
Administrator
Slight_Of_Nand wrote
I was also confused by the reversing of the A and B pins on the Mux!
I'm not sure exactly what you are referring to, but I can guess.

In some diagrams, such as Fig 3.1, the idea being conveyed is pretty abstract and all that is needed to know is that you can use a Mux to select between the input signal and the current output of the DFF and that you use a 'load' signal to do so. The details of whether you use load=1 or load=0 to choose the input signal are irrelevant at this level, but those details are presented in the programmatic description below the diagram, which gives you sufficient information to determine whether the 'in' signal goes to the A or the B input of the Mux. As to whether the A or the B is drawn on the top or the bottom, that is up to the person drawing the figure and one choice usually results in a cleaner diagram than the other.

Personally, I always prefer put an indicator on the symbol showing which input is which. A common convention is to put a 0 or a dot next to the input that is active with the select signal(s) is(are) all zero and then have the inputs ordered in increasing binary order of the select signal(s) from there.

Could someone also clarify in a different way why out(t-1) is different to out = in(t-1)?
out(t-1) is the value of the output signal at time t-1 (or the time increment before the current one).

out = in(t-1) says that the output at the current time increment, or out(t), is equal to the value of the 'in' signal at the prior time increment.

I think I understand it, but I feel another perspective might help me fully grasp it.

Finally I assume you NEED the DFF in diagram 3.1; that is to say you could not get away with simply routing the output of the mux to one of it's own inputs?  The DFF acts as a sort of delay?
Not only does it act as a delay, but it stores the value that was written into it for however long it is needed. The value on the 'in' signal is going to change on almost every clock cycle.
Reply | Threaded
Open this post in threaded view
|

Re: Chapter 3 Terminology

Slight_Of_Nand
Thank you for your reply, can I just see if I have this right?

The DFF does it hold a charge and therefore a data bit or is is simply the feedback loop that works continuosly that allows data to be stored?

Also does the term out(t-1) always mean the clock cycle -1 to the current cycle or is it just a short way of saying any time period before the current one?
Reply | Threaded
Open this post in threaded view
|

Re: Chapter 3 Terminology

WBahn
Administrator
<quote author="Slight_Of_Nand">
Thank you for your reply, can I just see if I have this right?

The DFF does it hold a charge and therefore a data bit or is is simply the feedback loop that works continuosly that allows data to be stored?
<quote>

That depends on the technology being used. Most flip-flops are active feedback circuits but some rely on charge (or some other form of) storage. Computer RAM is generally dynamic relying on charge storage and so it must be refreshed periodically in order to avoid being lost. The time between refreshes is usually a handful of milliseconds but some types are in the microseconds.

Also does the term out(t-1) always mean the clock cycle -1 to the current cycle or is it just a short way of saying any time period before the current one?
If the current time is t=147, then out(t-1) is the the output at time t=146.

If you think about this, it makes sense. A DFF can't store the value that was at its input at ANY time in the past. First off, that value has been changing over time. Second, how could it do it? How could the DFF store what was on it's input 18465 clock cycles ago?

It can store what was on it's input in the most recent clock cycle because that is what is still on its input at the very beginning of the current clock cycle, which is the moment that it samples and captures that value.

Reply | Threaded
Open this post in threaded view
|

Re: Chapter 3 Terminology

Slight_Of_Nand
So it is simply the 'loop' of the output returning to the input that "remembers" the valueand as long and the load favours that loop the value is stored, when it favours the new input the output and the stored value get refreshed?

This is also why memory clears once power is cut?

Thank you again; I am much obliged.
Reply | Threaded
Open this post in threaded view
|

Re: Chapter 3 Terminology

WBahn
Administrator
Slight_Of_Nand wrote
So it is simply the 'loop' of the output returning to the input that "remembers" the valueand as long and the load favours that loop the value is stored, when it favours the new input the output and the stored value get refreshed?

This is also why memory clears once power is cut?

Thank you again; I am much obliged.
Again, it really depends on the memory technology that is used. Some memories are nonvolatile and store the data even after the power is removed. Hard drives, flash drives, magnetic tape, core memory. Other technologies will lose the memory when power is removed but otherwise will retain it as long as power is applied without doing anything else. Other technologies will not only lose it if power is removed, but will lose it after a very short period of time even with power applied and it must be read and rewritten before that can happen.

We have no idea what technology the DFF in the Hack ostensibly uses -- for our purposes it doesn't matter and any necessary details are taken care of internally. But what we do know is that each DFF in the system ALWAYS, on EVERY clock cycle, writes what is CURRENTLY on its input (at the beginning of the clock cycle, which is the value produced on that signal line by the end of the previous clock cycle) into the register.

If you want to get a feel for how DFFs work internally, the Wikipedia article on Flip Flops is pretty good. What the Hack is using is a positive-edge triggered D-type flip flop.
Reply | Threaded
Open this post in threaded view
|

Re: Chapter 3 Terminology

Slight_Of_Nand
Okay, cheers buddy.  I do appreciate it! :)