Analog computers tend to be used for special purpose applications which involve controlling manufacturing or similar "real-time" processes. They measure values using a continuous range (typically, a continuous range of electrical voltages) to manipulate environmental characteristics such as temperature and gas pressure. There has been a tendency over the past 10 or 20 years to replace this type of computer with digital computers which are connected to the "real-world" with "analog-to-digital" interface devices.
Digital computers are, by far, the more common type. They are the only type which we will consider in this course.
The main idea behind a digital computer is that, at least at a low level, values are represented using "descrete", rather than "continuous" units. Instead of a value being represented by any possible voltage between 0 volts and 5 volts (for example), a digital computer might require that the value be represented by one of the voltages: 0 volts, 1.5 volts, 3.0 volts, or 4.5 volts.
Some early digital computer systems used a 10-level representation scheme (which made working with our "normal" base 10 number system easy). Various other numbers of levels have been attempted with varying degrees of success. Modern digital computers, however, are restricted to a simple 2-level, or "binary" system.
As currently implemented, a "digital computer" is synonymous with a "computer which uses a binary system for value representation".
There are 3 main reasons for using codes:
Codes are used to identify a particular entity (or value) from within a larger collection of possible values. This "collection of possible values" is called the domain. The Morse code, for example, provides a collection of "code values" for letters and other character symbols. The domain of the Morse code is the collection of "character symbols". Any code system has a limited domain of things it can represent. When information is to be represented using a code, it is important to classify the information in terms of an appropriate domain, in order to select an appropriate code system.
A code system which assigned the collection of symbols:
@ # $ %
to the entities:
spring summer fall winter
respectively, has a domain which would be appropriate if the
information to be encoded were "my favourite season"; its domain
would not be appropriate if the information were "my age".
Within any particular domain, we usually think of the relationship between codes and represented entities as being one-to-one; that is, each code stands for only one entity and each entity is only represented by a unique code. Note, however, that in certain situations, one-to-many or many-to-one relationships between codes and entities may be appropriate.
A decoding scheme is a method for determing the entity being represented by a particular code. With a "proper" decoding scheme, a single code can represent only one, unique entity.
A coding system is a combination of encoding and decoding schemes.
Entities may belong to many "proper" coding systems (same entity, different codes) provided that there is a unique relationship between the entity and its code in each system.
Similarly, codes may belong to many ("proper") coding systems (same code representing a different entity in a different system).
Coding systems are often defined using a tabular representation. For
example, the Morse code could be defined by the table:
|
|
|
|
Although it might, at first, seem useless, it is possible to have an encoding system with no corresponding decoding system, a system whereby entities can be transformed into codes, with no ability to perform the reverse transformation. A simple example of where this is often used is in "password systems"; the original password is encoded and stored in its encoded form; when someone wants to use the "passworded" system, he/she enters the password which is encoded and compared to the encoded original password; in this way the real password is never stored in a form which could be accessed by an illegal "hacker".
Almost all computer systems employ only code systems in which the codes are composed of multiple binary values.