A mnemonic device is a memory aid. Commonly met mnemonics are often verbal, something such as a very short poem or a special word used to help a person remember something, particularly lists, but may be visual, kinesthetic or auditory. Mnemonics rely on associations between easy-to-remember constructs which can be related back to the data that is to be remembered. This is based on the principle that the human mind much more easily remembers spatial, personal, surprising, sexual or humorous or otherwise meaningful information than arbitrary sequences.
The word mnemonic is derived from the Ancient Greek word μνημονικός mnemonikos ("of memory") and is related to Mnemosyne ("remembrance"), the name of the goddess of memory in Greek mythology. Both of these words refer back to μνημα mnema ("remembrance"). Mnemonics in antiquity were most often considered in the context of what is today known as the Art of Memory.
The major assumption in antiquity was that there are two sorts of memory: the "natural" memory and the "artificial" memory. The former is inborn, and is the one that everyone uses every day. The artificial memory is one that is trained through learning and practicing a variety of mnemonic techniques. The latter can be used to perform feats of memory that are quite extraordinary, impossible to carry out using the natural memory alone.
One reason for the effectiveness of seemingly arbitrary mnemonics is the grouping of information provided by the mnemonic. Just as US phone numbers group 10 digits into three groups, the name "Roy G. Biv" groups seven colors into two short names and an initial. Various studies (most notably The Magical Number Seven, Plus or Minus Two) have shown that the human brain is capable of remembering only a limited number of arbitrary items in working memory; grouping these items into chunks permits the brain to hold more of them in memory.
Programming in machine code, by supplying the computer with the numbers of the operations it must perform, can be quite a burden, because for every operation the corresponding number must be looked up or remembered. Looking up all numbers takes a lot of time, and mis-remembering a number may introduce computer bugs.
Therefore a set of mnemonics was devised. Each number was represented by an alphabetic code. So instead of entering the number corresponding to addition to add two numbers one can enter "add".
Although mnemonics differ between different CPU designs some are common, for instance: "sub" (subtract), "div" (divide), "add" (add) and "mul" (multiply).
This type of mnemonic is different from the ones listed above in that instead of a way to make remembering numbers easier, it is a way to make remembering numbers unnecessary (e.g. by relying on the computer's assembler program to do the lookup work.)
See the Method of Loci.