in digital computers, a preset system of symbols representing the information in the computer. Each code uses the characters of its own alphabet. For most codes the alphabet has two symbols or consists of letters from a two-symbol alphabet. The physical form of a code depends on the nature of the data carrier used, and there may be several versions for the same computer. For example, in written documents the code is in the form of numerals and (or) letters of the Russian or Latin alphabet; on punched cards it is a combination of perforated and unperforated areas; on magnetic drums and disks it is in the form of configurations of magnetized sections; in the cells of an internal memory it is in the form of groups of magnetic cores, each of which is in one of two possible states. The main symbols used in a digital computer are 0 and 1.
The codes used in a computer usually include a symbolic (alpha-numeric) code to represent textual information and programs written in algorithmic languages, an instruction code to represent programs in machine language, and a number code to represent the numerical data. The plan of the code, in which all its principal parts and the number of binary symbols in each of its parts are indicated, is called the code format.
A symbolic code is a series of groups composed of identical numbers of binary symbols (eight in most modern digital computers). Each group designates one symbol (a letter, arbitrary sign, or number). The number of groups in a code depends on the length of the coded text. The instruction code includes as a principal part an “operation code,” which determines the computer’s response to a certain instruction, and the structure of the remainder of the code, which may contain the address (operand) codes, the desired results, and also sometimes the codes of the operands themselves and the codes for other parts of the instruction. A number code depends on the type of numerical representation in the computer. A number with a fixed point is represented by one of three codes (the true representation, the one’s complement, and the complement). A number code that is represented by a form with a floating point is written as an ordered pair consisting of the mantissa and order codes; both the mantissa and the order can be represented by one of the three codes indicated above.
A true representation is usually used to store numbers in a memory unit; the one’s complement and complement are used to execute arithmetic and certain other operations. When sending numbers from the memory unit to the arithmetic unit and vice versa, they are recoded. All three codes are made up of a sign code (the number of digits assigned is /), an integer code (m), and a fraction code (n). The sum d = l + m + n is called the code length. In a digital computer or its hardware, l,m, and n are usually fixed. For integers n = 0, for proper fractions usually m = 0, and when all the numbers have the same sign, l = 0.
For positive numbers the digit code is denoted by a series of zeros; for negative numbers, by a series of ones. For positive numbers the true representation, one’s complement, and complement coincide. In the true representation, the representation of negative numbers differs from that of positive numbers only in the sign code; in the one’s complement the digits of the number are replaced by their complements with respect to 1 (that is, 0 is replaced by 1, and vice versa). The complement of a negative number differs from the one’s complement in that after the inversion of the digits the result is added to a d-digit number having zeros in all places except the lowest, without a carryover operation. For example, a binary-system number is equal to + 11.01. Let l = 2, m = 3, and n = 4; by adding zeros to the integral and fractional parts we will write the number in the form +011.0100. The true representation, one’s complement, and complement of the given number are identical—that is, 00 011 0100. For the negative number — 11.01 the true representation has the form 11 011 0100, and the one’s complement has the form 11 100 1011, and the complement code is 11 100 1100. The choice between the one’s complement and the complement depends on the design and logic of the computer.
N. A. KRINITSKII
a system of preset characters for transmitting, processing, and storing (retrieving) a variety of information. A finite sequence of coded characters is called a word. The number of different characters used in the words of a given code is known as its base; for example a code with base 2 is called a binary code. If all the words have the same length or number of elements n, it is a uniform n-unit code. If the words are of variable length, the code is called nonuniform—for example, Morse code. A code is considered to be complete when it is impossible to add another new code combination without impairing its intelligibility. A complete, uniform n-unit code contains mn words, where m is the base of the code. A code containing code combinations that are used to isolate one message from another is called a code with delimiters; one in which all code combination are used only to designate message elements is called a code without delimiters. The code combinations that form delimiters can be made up either of special code characters or of the same code characters that form the code combinations corresponding to definite elements of a message. Sometimes it is convenient to divide the message elements into several groups and to construct a code for each group; the signal for shifting from one code to another is supplied by special code combinations (addresses). A set of codes for each of the group of elements together with the address code combinations is known as a multiple-address or multiple-program code.
Codes are usually transcribed by digits and numbers (0, 1, 2, . . . , 57, 9276, and so on) or signs, such as + (plus), — (minus), · (dot), or — (dash). In engineering each code character is a predetermined designation for some elementary signal having certain physical parameters (signal characteristics) that can take on different values. For electrical signals these characteristics may be the amplitude of the current or voltage, the polarity or duration of electric pulses (or pulse trains), or their repetition rate.
The codes used in remote control, in communications and automatic control systems, and in computer technology are a set of combinations made up of electric pulses and the spaces between them, which is equivalent to a representation of the coded values in the form of binary numbers—that is, sets composed of 0’s and 1’s. The number of pulses in the combinations or bits in the equivalent binary number determines the number of units in the code.
The selection of a code depends on the conditions of transmission, processing, or storage of the information and is associated mainly with the most efficient use of communications channels and the provision of the required noise immunity during transmission. Codes are made more complicated in order to improve their noise immunity: extra checking digits are added to the information characters. Codes that detect and correct errors are constructed using this principle.
in remote control, a system of electric or pneumatic signals used for transmitting binary or binary-coded decimal messages over a communications channel. Signals that differ in such characteristics as amplitude, frequency, polarity, phase, and duration are used to represent and transmit single elements of a code. Thus, in a binary code using polarity indicators, the element “0” is coded by a pulse of negative polarity and the element “1” is coded by a pulse of positive polarity. Width indicators may mean a difference in the duration of a pulse or in the duration of the interval between pulses. If not all possible combinations of elements are used for message transmissions, the use of special methods becomes feasible, making possible during reception the detection and correction of distortions (errors) in the transmitted elements of a code. Such methods improve the reliability of data transmission.
The choice of a coding system, the means of transmission, and the methods for improving the reliability of transmitted information depend on the actual operating conditions of the remote-control system, the importance of objectives to be achieved, the properties of communications channels, and the apparatus being used.
M. M. GEL’MAN
a set of arbitrary symbols used by members of the diplomatic service for secret correspondence with their government and by the armed forces for transmission of orders, directives, and messages. Encipherment is achieved by substituting in varying combinations numerals or letters of the alphabet for entire phrases or for words, syllables, or letters in accordance with a predetermined system, which, consequently, is the key for deciphering the text. Texts written in double codes must be deciphered twice and require two keys. Codes do not always guarantee secrecy of correspondence, since the key to even a very complex code can be derived from calculations, from computations involving the recurrence of individual symbols, and by other means.