A device that stores one item of information: if it has q stable states it is said to be q-ary, and if q = 2 it is said to be binary. It is usually implemented electronically, sometimes with the assistance of the magnetic, optical, or acoustic properties of a storage medium. In practice, most memory elements are binary. In fast computer circuitry, the flip-flop is the most common type of memory element.
Memory elements are employed specifically in computer memories and generally in sequential circuits. A memory element is any smallest part of such a system that possesses more than one stable state. For example, a binary shift register contains four flip-flops and has 16 states, but each of its four memory elements has only two states; a similar ternary shift register would have 81 states, but would still consist of four memory elements, each having three states.