Bits of RAM

A bit is a physical component (thus has a size and location) in a computer, that is always (at least when it has power) in one of two states: on or off. It also has the ability to change its state and maintain its state.

Bits can be constructed using 4 NAND gates as shown below.

D-Type Transparent Latch

Here D is the input, E is the setter, and Q is the output value (the value of the bit).

When the setter in is turned on, Q = D.  That is, the output value (the value of the bit) is set equal to the input value.

If the setter is turned off, the value of Q is the value of D at the moment when the setter was last toggled from on to off, regardless of the value of the input.  That is, the value of the bit remains unchanged from when it was last set.

To summarize, the setter (when on) allows the computer to change the value of the bit by changing the value of the input.  The setter (when off) also prevents the value of the bit from changing regardless of the value of the input.

The truth table for this bit circuit is as follows:

E/C D Q Q Comment
0 X Qprev Qprev No change
1 0 0 1 Reset
1 1 1 0 Set

The bit circuit also has its own symbol as shown below.

Transparent Latch Symbol