History of technical methods of encoding information. Encoding information in a computer




Encoding and Decoding To exchange information with other people, a person uses natural languages. Along with natural languages, formal languages ​​were developed for professional use in any field. Representing information using a language is often called encoding. Code is a set of symbols (conventions) for representing information. Code is a system of conventional signs (symbols) for transmitting, processing and storing information (messages). Coding is the process of representing information (messages) in the form of code. The entire set of symbols used for encoding is called the encoding alphabet. For example, in computer memory, any information is encoded using a binary alphabet containing only two characters: 0 and 1.


Methods of encoding information Different methods can be used to encode the same information; their choice depends on a number of circumstances: the purpose of coding, conditions, available funds. If you need to write down the text at the pace of speech, we use shorthand; if we need to send text abroad, we use the English alphabet; If you need to present the text in a form understandable to a literate Russian person, we write it according to the rules of Russian grammar. “Good afternoon, Dima!” "Dobryi den, Dima"


Methods of encoding information The choice of method for encoding information may be associated with the intended method of processing it. Let's show this using the example of representing numbers of quantitative information. Using the Russian alphabet, you can write the number “forty-seven.” Using the alphabet of the Arabic decimal number system, we write “47.” The second method is not only shorter than the first, but also more convenient for performing calculations. Which notation is more convenient for performing calculations: “forty-seven multiplied one hundred twenty-five" or "47x 125"? Obviously the second one.


Encrypting a message In some cases, there is a need to encrypt the text of a message or document so that those who are not supposed to can read it. This is called tamper protection. In this case, the secret text is encrypted. In ancient times, encryption was called secret writing. Encryption is the process of converting plaintext into ciphertext, and decryption is the process of converting plaintext into ciphertext, and decryption is the process of converting it back to the original text. Encryption is also encoding, but with a secret method known only to the source and recipient. Encryption methods are used in a science called cryptography.


Chappe's optical telegraph In 1792 in France, Claude Chappe created a system for transmitting visual information, which was called the “Optical telegraph”. In its simplest form, it was a chain of standard buildings, with poles with movable crossbars located on the roof, which was created within sight of one another. Poles with movable semaphore crossbars were controlled using cables by special operators from inside the buildings. Chappe created a special table of codes, where each letter of the alphabet corresponded to a certain figure formed by the Semaphore, depending on the positions of the transverse bars relative to the support pole. Chappe's system allowed messages to be transmitted at a speed of two words per minute and quickly spread throughout Europe. In Sweden, a chain of optical telegraph stations operated until 1880.


The first telegraph The first technical means of transmitting information over a distance was the telegraph, invented in 1837 by the American Samuel Morse. A telegraph message is a sequence of electrical signals transmitted from one telegraph apparatus through wires to another telegraph apparatus. Inventor Samuel Morse invented an amazing code (Morse code, Morse code, Morse code), which still serves humanity today. Information is encoded in three “letters”: a long signal (dash), a short signal (dot), and no signal (pause) to separate the letters. Thus, coding comes down to using a set of characters arranged in a strictly defined order. The most famous telegraph message is the SOS (Save Our Souls) distress signal. This is what it looks like: “ – – – »




Morse code Dot 4 Comma 5 / 6 ? 7!


The first wireless telegraph (radio receiver) On May 7, 1895, Russian scientist Alexander Stepanovich Popov, at a meeting of the Russian Physico-Chemical Society, demonstrated a device he called a “lightning detector,” which was intended for recording electromagnetic waves. This device is considered the world's first wireless telegraphy device, a radio receiver. In 1897, using wireless telegraphy devices, Popov received and transmitted messages between the shore and a military vessel. In 1899, Popov designed a modernized version of the electromagnetic wave receiver, where signals were received (in Morse code) by the operator's headphones. In 1900, thanks to radio stations built on the island of Gogland and at the Russian naval base in Kotka under the leadership of Popov, rescue operations were successfully carried out on board the warship Admiral General Apraksin, which ran aground on the island of Gogland. As a result of the exchange of messages transmitted by wireless telegraphy, the crew of the Russian icebreaker Ermak was promptly and accurately transmitted information about the Finnish fishermen located on the broken ice floe.


Baudot telegraph apparatus The uniform telegraph code was invented by the Frenchman Jean Maurice Baudot at the end of the 19th century. It used only two different types of signals. It doesn’t matter what you call them: dot and dash, plus and minus, zero and one. These are two different electrical signals. The code length of all symbols is the same and equals five. In this case, there is no problem of separating letters from each other: each five signals is a text sign. Therefore, a pass is not needed. A code is called uniform if the code length of all symbols is equal. The Baudot code is the first method of binary coding of information in the history of technology. Thanks to this idea, it was possible to create a direct-printing telegraph apparatus that looked like a typewriter. Pressing a key with a certain letter generates a corresponding five-pulse signal, which is transmitted over the communication line. The baud unit of transmission speed was named after Baudot. Modern computers also use uniform binary code to encode text.



Binary coding in a computer All information that a computer processes must be represented in binary code using two digits: 0 and 1. These two characters are usually called binary digits or bits. Using two numbers 0 and 1 you can encode any message. This was the reason that two important processes must be organized in a computer: encoding and decoding. Coding is the transformation of input information into a form that can be perceived by a computer, i.e. binary code.


Why binary coding From a technical implementation point of view, using the binary number system to encode information turned out to be much simpler than using other methods. Indeed, it is convenient to encode information as a sequence of zeros and ones if we imagine these values ​​as two possible stable states of an electronic element: 0 – absence of an electrical signal; 1 – presence of an electrical signal. The methods of encoding and decoding information in a computer, first of all, depend on the type of information, namely, what should be encoded: numbers, text, graphics or sound.




Types of number systems NUMBER SYSTEMS POSITIONALNONPOSITIONAL In non-positional number systems, the value denoted by a digit does not depend on its position in the number. XXI In positional number systems, the value denoted by a digit in the notation of a number depends on its position in the number (position). 2011


Non-positional number systems The canonical example of an actually non-positional number system is the Roman one, in which Latin letters are used as numbers: I stands for 1, V - 5, X - 10, L - 50, C - 100, D - 500, M Natural numbers are written with by repeating these numbers. For example, II = = 2, here the symbol I denotes 1 regardless of its place in the number. To correctly write large numbers in Roman numerals, you must first write the number of thousands, then hundreds, then tens, and finally units. Example: number Two thousand MM, nine hundred CM, eighty LXXX, eight VIII. Let's write them down together: MCMLXXXVIII. МMCMLXXXVIII = ()+() = 2988 To represent numbers in a non-positional number system, you cannot limit yourself to a finite set of digits. In addition, performing arithmetic operations in them is extremely inconvenient.


Ancient Egyptian decimal non-positional number system. Around the third millennium BC, the ancient Egyptians came up with their own numerical system, in which the key numbers were 1, 10, 100, etc. special hieroglyphs were used. All other numbers were composed from these key numbers using the operation of addition. The number system of Ancient Egypt is decimal, but non-positional.


Alphabetic number systems. Alphabetic systems were more advanced non-positional number systems. Such number systems included Greek, Slavic, Phoenician and others. In them, numbers from 1 to 9, whole numbers of tens (from 10 to 90) and whole numbers of hundreds (from 100 to 900) were designated by letters of the alphabet. In the alphabetic number system of Ancient Greece, the numbers 1, 2,..., 9 were designated by the first nine letters of the Greek alphabet, for example a = 1, b = 2, g = 3, etc. The following 9 letters were used to denote the numbers 10, 20,..., 90 (i = 10, k = 20, l = 30, m = 40, etc.), and to denote the numbers 100, 200,... , 900 last 9 letters (r = 100, s = 200, t = 300, etc.). For example, the number 141 was represented by rma. Among the Slavic peoples, the numerical values ​​of the letters were established in the order of the Slavic alphabet, which used first the Glagolitic alphabet and then the Cyrillic alphabet. More information about the origin and development of Russian writing can be found on the website




Positional number systems In positional number systems, the value denoted by a digit in the notation of a number depends on its position in the number (position). The number of digits used is called the base of the number system. For example, 11 is eleven, not two: = 2 (compare with the Roman number system). Here the symbol 1 has a different meaning depending on its position in the number.


The first positional number systems The very first such system, when the fingers served as a counting “device,” was fivefold. Some tribes on the Philippine islands still use it today, and in civilized countries its relic, according to experts, has been preserved only in the form of a school five-point rating scale.


The duodecimal number system The duodecimal number system came next after the pentadecimal number system. It originated in ancient Sumer. Some scientists believe that such a system arose from counting the phalanges on the hand with the thumb. The duodecimal number system became widespread in the 19th century. Its widespread use in the past is clearly indicated by the names of numerals in many languages, as well as the methods of counting time, money, and the relationship between certain units of measurement that have been preserved in a number of countries. A year consists of 12 months, and half a day consists of 12 hours. Counting by dozens can serve as an element of the duodecimal system in modern times. The first three powers of the number 12 have their own names: 1 dozen = 12 pieces; 1 gross = 12 dozen = 144 pieces; 1 mass = 12 gross = 144 dozen = 1728 pieces. The English pound is divided into 12 shillings.


Sexagesimal number system The next positional number system was invented in Ancient Babylon, and the Babylonian numbering was sexagesimal, i.e. it used sixty digits! In later times it was used by the Arabs, as well as by ancient and medieval astronomers. The sexagesimal number system, according to researchers, is a synthesis of the above-mentioned pentadecimal and duodecimal systems.


What positional number systems are currently used? Currently, the most common number systems are decimal, binary, octal and hexadecimal. Binary, octal (now being replaced by hexadecimal), and hexadecimal are often used in areas related to digital devices, programming, and computer documentation in general. Modern computer systems operate with information presented in digital form.


Decimal number system The decimal number system is a positional number system based on base 10. Base 10 is supposed to be related to the number of fingers a person has. The most common number system in the world. To write numbers, the symbols 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, called Arabic numerals, are used.


Binary number system Binary number system is a positional number system with base 2. The numbers 0 and 1 are used. The binary system is used in digital devices because it is the simplest and satisfies the requirements: The fewer values ​​there are in the system, the easier it is to manufacture individual elements. The fewer states an element has, the higher the noise immunity and the faster it can operate. Easy to create addition and multiplication tables with basic number operations


Alphabet of decimal, binary, octal and hexadecimal number systems Numeral system BaseAlphabet of numbers Decimal100, 1, 2, 3, 4, 5, 6, 7, 8, 9 Binary20, 1 Octal80, 1, 2, 3, 4, 5, 6, 7 Hex160, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F


Correspondence between decimal, binary, octal and hexadecimal number systems p= p= p= p= ABCDEF10 The number of digits used is called the base of the number system. When working with several number systems simultaneously, to distinguish them, the base of the system is usually indicated as a subscript, which is written in the decimal system: this is the number 123 in the decimal system; the same number, but in binary system. A binary number can be written as: = 1* * * * *2 0.


Converting numbers from one number system to another Transfer from a decimal number system to a number system with base p is carried out by sequentially dividing the decimal number and its decimal quotients by p, and then writing out the last quotient and remainders in reverse order. Let's convert the decimal number to the binary number system (the base of the number system is p=2). As a result we got =99 10


Numbers in a computer Numbers in a computer are stored and processed in the binary number system. The sequence of zeros and ones is called binary code. We will look at the specific features of representing numbers in computer memory in other lessons on the topic “number systems”.


Encoding text information Traditional encodings use 8 bits to encode one character. It is easy to calculate using formula 2.3 that such an 8-bit code allows you to encode 256 different characters. Assigning a specific numeric code to a symbol is a matter of convention. The ASCII (American Standard Code for Information Interchange) code table has been adopted as an international standard, encoding the first half of characters with numeric codes from 0 to 127 (codes from 0 to 32 are assigned not to characters, but to function keys). ASCII code table National standards for character codes include the international part of the code table without changes, and in the second half they contain codes of national alphabets, pseudographic symbols and some mathematical symbols. Unfortunately, there are currently five different Cyrillic encodings (KOI8-R, Windows.MS-DOS, Macintosh and ISO), which causes additional difficulties when working with Russian-language documents. Chronologically, one of the first standards for encoding Russian letters on computers was KOI8 ("Information Exchange Code, 8-bit"). This encoding was used back in the 70s on computers of the ES computer series, and from the mid-80s it began to be used in the first Russified versions of the UNIX operating system. KOI8 The most common currently is the Microsoft Windows encoding, denoted by the abbreviation CP1251 (“CP” means "Code Page", "code page").CP1251


Encoding of text information From the beginning of the 90s, the time of dominance of the MS DOS operating system, the CP866 encoding remains. Apple computers running the Mac OS operating system use their own Mac encoding. In addition, the International Standards Organization (ISO) approved another encoding called ISO CP866MacISO as a standard for the Russian language. At the end of the 90s, a new international standard Unicode appeared, which allocates not one byte for one character, but two, and therefore with its help you can encode not 256, but different characters. The complete specification of the Unicode standard includes all the existing, extinct and artificially created alphabets of the world, as well as many mathematical, musical, chemical and other symbols. Example Present the word “computer” in hexadecimal code form in all five encodings. Use the CD-ROM to obtain the CP866, Mac and ISO encoding tables and a computer calculator to convert numbers from decimal to hexadecimal. Sequences of decimal codes of the word “computer” in various encodings are compiled on the basis of encoding tables: KOI8-R: CP1251: CP866: Mac: ISO: Using a calculator, we convert the sequence of codes from the decimal system to hexadecimal: KOI8-R: FC F7 ED CP1251: DD C2 CC CP866: 9D 82 8C Mac: 9D 82 8C ISO: CD B2 BC Special converter programs are used to convert Russian-language text documents from one encoding to another. One such program is the Hieroglyph text editor, which allows you to translate typed text from one encoding to another and even use different encodings in the same text.









Analogue and discrete form of information representation A person is able to perceive and store information in the form of images (visual, sound, tactile, gustatory and olfactory). Visual images can be saved in the form of images (drawings, photographs, etc.), and sound images can be recorded on records, magnetic tapes, laser discs, and so on. Information, including graphic and audio, can be presented in analog or discrete form. With analog representation, a physical quantity takes on an infinite number of values, and its values ​​change continuously. With a discrete representation, a physical quantity takes on a finite set of values, and its value changes abruptly.


Analogue and discrete form of information presentation Let's give an example of analog and discrete information presentation. The position of a body on an inclined plane and on a staircase is specified by the values ​​of the X and Y coordinates. When a body moves along an inclined plane, its coordinates can take on an infinite number of continuously changing values ​​from a certain range, and when moving along a staircase, only a certain set of values, which change abruptly.


Discretization An example of an analog representation of graphic information is, for example, a painting whose color changes continuously, and a discrete image printed using an inkjet printer and consisting of individual dots of different colors. An example of analog storage of audio information is a vinyl record (the sound track changes its shape continuously), and a discrete audio CD (the sound track of which contains areas with different reflectivity). The conversion of graphic and sound information from analogue to discrete form is carried out by sampling, that is, splitting a continuous graphic image and a continuous (analog) sound signal into separate elements. The sampling process involves encoding, that is, assigning each element a specific value in the form of a code. Sampling is the conversion of continuous images and sound into a set of discrete values ​​in the form of codes.




Coding of raster images A raster image is a collection of dots (pixels) of different colors. A pixel is the smallest area of ​​an image whose color can be set independently. During the encoding process, an image is spatially discretized. Spatial sampling of an image can be compared to constructing an image from a mosaic (a large number of small multi-colored glasses). The image is divided into separate small fragments (dots), and each fragment is assigned a color value, that is, a color code (red, green, blue, and so on). The quality of the image depends on the number of dots (the smaller the dot size and, accordingly, the greater their number, the better the quality) and the number of colors used (the more colors, the better the quality of the image encoded).


Color models To represent color as a numeric code, two inverse color models are used: RGB or CMYK. The RGB model is used in TVs, monitors, projectors, scanners, digital cameras... The main colors in this model are: red (Red), green (Green), blue (Blue). The CMYK color model is used in printing when creating images intended for printing on paper.


RGB color model Color images can have different color depths, which are determined by the number of bits used to encode the color of a dot. If we encode the color of one pixel in an image with three bits (one bit for each RGB color), we get all eight different colors.


True Color In practice, to store information about the color of each point of a color image in the RGB model, 3 bytes (i.e. 24 bits) are usually allocated - 1 byte (i.e. 8 bits) for the color value of each component. Thus, each RGB component can take a value in the range from 0 to 255 (total 2 8 = 256 values), and each point of the image, with such a coding system, can be colored in one of the colors. This set of colors is usually called True Color, because the human eye is still unable to distinguish a greater variety.


Coding of vector images A vector image is a collection of graphic primitives (point, line, ellipse...). Each primitive is described by mathematical formulas. Coding depends on the application environment. The advantage of vector graphics is that files storing vector graphic images are relatively small in size. It is also important that vector graphics can be enlarged or reduced without loss of quality.




Graphic file formats Bit MaP image (BMP) is a universal raster graphics file format used in the Windows operating system. This format is supported by many graphic editors, including the Paint editor. Recommended for storing and exchanging data with other applications. Tagged Image File Format (TIFF) is a raster graphics file format supported by all major graphics editors and computer platforms. Includes a lossless compression algorithm. Used to exchange documents between different programs. Recommended for use when working with publishing systems. Graphics Interchange Format (GIF) is a raster graphics file format supported by applications for various operating systems. Includes a lossless compression algorithm that allows you to reduce the file size by several times. Recommended for storing images created programmatically (diagrams, graphs, etc.) and drawings (such as appliqué) with a limited number of colors (up to 256). Used to place graphic images on Web pages on the Internet. Portable Network Graphic (PNG) is a raster graphics file format similar to GIF. Recommended for placing graphic images on Web pages on the Internet. Joint Photographic Expert Group (JPEG) is a raster graphics file format that implements an efficient compression algorithm (JPEG method) for scanned photographs and illustrations. The compression algorithm allows you to reduce the file size by tens of times, but leads to irreversible loss of some information. Supported by applications for various operating systems. Used to place graphic images on Web pages on the Internet.



Sound coding The use of a computer for sound processing began later than numbers, texts and graphics. Sound is a wave with continuously changing amplitude and frequency. The greater the amplitude, the louder it is for a person; the greater the frequency, the higher the tone. Sound signals in the world around us are incredibly diverse. Complex continuous signals can be represented with sufficient accuracy as the sum of a certain number of simple sinusoidal oscillations. Moreover, each term, that is, each sinusoid, can be precisely specified by a certain set of numerical parameters - amplitude, phase and frequency, which can be considered as a sound code at some point in time.


Temporal audio sampling In the process of encoding an audio signal, its temporal sampling is performed - a continuous wave is divided into separate small time sections and a certain amplitude value is set for each such section. Thus, the continuous dependence of the signal amplitude on time is replaced by a discrete sequence of volume levels.


The quality of binary audio encoding is determined by the encoding depth and sampling rate. Sampling frequency – the number of signal level measurements per unit time. The number of volume levels determines the encoding depth. Modern sound cards provide 16-bit audio encoding depth. In this case, the number of volume levels is N = 2 I = 2 16 =


Presentation of video information Recently, the computer is increasingly used to work with video information. The simplest way to do this is to watch movies and video clips. It should be clearly understood that processing video information requires a very high speed of the computer system. What is the film from a computer science point of view? First of all, it is a combination of sound and graphic information. In addition, to create the effect of movement on the screen, an inherently discrete technology for quickly changing static images is used. Studies have shown that if more frames change in one second, then the human eye perceives the changes in them as continuous.


Presentation of video information It would seem that if the problems of encoding static graphics and sound are solved, then saving a video image will not be difficult. But this is only at first glance, since using traditional methods of storing information, the electronic version of the film will turn out to be too large. A fairly obvious improvement is to remember the first frame in its entirety (in the literature it is usually called the key frame), and in the following ones to save only the differences from the initial frame (difference frames).


Some Video File Formats There are many different formats for representing video data. In the Windows environment, for example, the Video for Windows format has been used for more than 10 years, based on universal files with the AVI extension (Audio Video Interleave - alternating audio and video). More universal is the Quick Time multimedia format, which originally appeared on Apple computers. Recently, video compression systems have become increasingly widespread, allowing for some image distortions invisible to the eye in order to increase the degree of compression. The most well-known standard of this class is MPEG (Motion Picture Expert Group). The methods used in MPEG are not easy to understand and rely on quite complex mathematics. A technology called DivX (Digital Video Express) has become more widespread. Thanks to DivX, it was possible to achieve a compression level that made it possible to fit a high-quality recording of a full-length film onto one CD - compressing a 4.7 GB DVD film to 650 MB.


Multimedia Multimedia (multimedia, from the English multi - many and media - carrier, environment) is a set of computer technologies that simultaneously use several information media: text, graphics, video, photography, animation, sound effects, high-quality sound. The word “multimedia” refers to the impact on the user through several information channels simultaneously. You can also say this: multimedia is the combination of an image on a computer screen (including graphic animation and video frames) with text and sound. Multimedia systems are most widespread in the fields of education, advertising, and entertainment.


Questions: What is a code? Give examples of information coding used in school subjects? Come up with your own ways to encode Russian letters. Encode the message "computer science" using Morse code. What is a number system? What two types of number systems do you know? What is the base of a number system? What is the number system alphabet? Examples. What number system is used to store and process numbers in computer memory? What types of computer images do you know? What is the maximum number of colors that can be used in an image if 3 bits are allocated for each pixel? What do you know about the RGB color model?


Tasks: Write the number 1945 in the Roman numeral system. Write down the numbers in expanded form: , 957 8, What will the numbers 74 8, 3E 16, 1010 be equal to in the decimal number system? How will a number be written in the binary number system? in octal? Calculate the required amount of video memory for graphics mode: screen resolution 800x600, color quality 16 bits.

Listen and remember!

Why and how is information encoded?


CODING ORIGINED IN AN LONG TIME AND WAS USED BOTH TO REPRESENT INFORMATION IN SYMBOLIC FORM AND FOR ENCRYPTION OF MESSAGES AND SECRET WRITING.


Traffic lights and road signs– this is also encoded information.

We process it, and then make a decision - to cross the street or wait for the green traffic light.


Coding- the process of representing information in the form of code.

Code- a set of symbols for presenting information.

To present information, different codes can be used and, accordingly, you need to know certain rules - the laws of recording these codes, i.e. be able to code.

When coding, we must agree on how to understand certain designations. That is, agree on the type of presentation of information.


People have developed many

forms of information presentation.

These include: spoken languages, the language of facial expressions and gestures, the language of drawings and drawings, scientific languages, languages ​​of art, special languages.


Why do people encode information?

The way information is encoded depends on the purpose, for the sake of which coding is carried out.

For example:

  • Record abbreviation.

SOSH – secondary school;

Life Safety - Basics of Safety

life activity;

MHC is a world art culture.


  • Classification (encryption)

information. To hide it from others (all cases of ciphers and secret writing)


For example, how to transmit information by telegraph? There is no way to push a letter into an electric wire, which means you need to imagine this letter in such a way that it can be conveniently transmitted using electric current.


Methods of encoding information

Information can be encoded in various ways: orally, in writing, with gestures or signals of any other nature.

graphicusing pictures and icons;

numericalusing numbers;

symbolicusing characters of the same alphabet as the source text.


The complete set of characters (characters) used to encode text is called alphabet or ABC .

The signs included in the alphabet can be letters, numbers, symbols (for example, notes) that are familiar to us, more complex images (road signs), etc.


To correctly encode information, it is necessary to create a correspondence table.

In it, each sign of one sign system (for example, the Russian alphabet) is associated with a sign of some other system (for example, the alphabet of men).


As technology developed, different ways of encoding information appeared. In the second half XIX century American inventor Samuel Morse invented an amazing code that still serves humanity today.

Morse code is a variable length code. To encode one character, from 1 to 6 characters are used.

The alphabet consists total of 3 characters :

  • Dot - short signal (pulse),
  • Dash - long signal (pulse),
  • Pause - absence of a signal (impulse). It is placed between letters and words.

Consider the operation of the telegraph using Morse code .


This is what a Morse machine looks like.

Behind it is a dial showing the pulse length.

On the right is the key that closes the electrical circuit.

On the left is an electromagnet and a recording device. A tape comes out of it, on which dots and dashes are imprinted.


Computer technology also has its own system - it is called binary coding and is based on representing data as a sequence of just two characters: 0 and 1. These characters are called binary digits.

You will learn more about binary coding in high school.


In everyday life, we are faced with deciphering various information disguised in the form of tasks, riddles, puzzles, etc.

Decoding – process is the reverse of coding.

Decoding information – This is the transformation of information encoded in the form of symbols (or signals) into a form of information representation that is familiar to us.

The oldest inscription


Birch bark legends

Novgorod rarities prove that our ancestors knew how to write and read perfectly

Ludota Koval oldest And

so far the only one surviving

Russians inscriptions made on weapons and metal in general

The oldest Egyptian inscription


Various methods of decoding information allow intelligence officers to decipher secret messages. Many books have been written about this and many films have been made.

In one of his books, the great detective solves the mystery of funny drawings


Information encoding is the transfer of information from a conventional, generally accepted format into a form that is perceptible only to a certain group of people or, in general, only to electronic computers.

There are several types of information encoding, depending on what is being encoded:

Graphic files

Numbers are encoded in a two-digit system, that is, in this system there are only two digits 1 and 0. Thus, the number 1 in the decimal system corresponds to the same number in the binary system, but the number two is already the number 10, the number 3 is 11, 4 is 100 and so on.

Since a byte contains only eight bits, which can be written into one character at a time, empty cells, except for the first one on the left (it indicates the sign of the number: “1” means “-”, and “0”, respectively, “+”) are always padded with zeros .

Using the rule from the previous slide, let's look at examples of writing digits and numbers when converting from the decimal number system to the binary system. It is very important not to forget that the first symbol on the left represents the sign.

If you want to write a number in binary that will take up more than six characters, then you need to use two bytes. So, the number “1”, when using two bytes, will be represented as “0000000000000001”. It is also possible to use three or more bytes.

When encoding text, the generally accepted American system ASCII (American Standard Code for Information Interchange) is used. It is a table of two columns, the first of which is represented by codes from 0 to 127, and is also completely identical for all computer models, and the second column is almost always different. At the moment, the most common encoding has 65535 characters.

The essence of encoding graphic information is to assign any color or shade its own unique, non-repeating code, which, when mentioned, will display this color. For example, the color white is represented by the code 255 255 255.

As you can understand from the example given on the previous slide, 3 bytes of memory are used to record the color code. As you know, all shades are formed using three colors: red, blue and green. So the first byte indicates the intensity of red, the second - green, and the third - blue. Therefore, black has the code 0 0 0, since it denotes the complete absence of colors.

Early examples of information encoding are Morse code and ancient Egyptian hieroglyphs.

Encoding is the translation of information from one type into a more convenient one for the user at the moment.

Without coding it would be impossible to use any electronic computers.


  • Coding – information processing
  • Three ways to encode text
  • Coding of symbolic information in a computer
  • Coding of numerical information in a computer
  • Presentation of graphic information in a computer
  • Representation of sound in a computer

Encoding information

Encoding information – is the transformation of information into symbolic form, convenient for storage, transmission and processing. The inverse transformation is called Decoding.


  • recording abbreviation;
  • classification (encryption) of information;
  • ease of processing (for example, in a computer, all information is encoded in binary codes);
  • ease of information transfer (for example, Morse code)

MORSE code

A -

L -

B -

C - -

IN - -

H - - -

G - -

N -

W - - - -

ABOUT - - -

D -

SCH - - -

P - -

E

AND -

R -

Kommersant - - -

Y - - -

WITH

Z - -

b - -

AND

E -

U -

Y - - -

YU - -

F -

TO - -

I - -

X


  • Graphic – using special drawings and symbols;
  • Numerical – using numbers;
  • Symbolic – using characters of the same alphabet as the source text.

Numerical coding method

Example 2. Encrypted proverb.

To chop wood you need

and to water the garden -

The fishermen made it in the ice

and began to fish.

The most prickly animal in the forest is

Now read the proverb:

3, 7, 2, 7, 8, 9, 11

1, 2, 3, 4, 5, 1, 6

9, 4, 7, 4, 13, 12, 14


KOPEYKA SAVES THE RUBLE


Example 3. You can replace each letter with its serial number in the alphabet: Encrypt the phrase: I CAN CODEL INFORMATION.


33211463212165101816312030

1015221618141241032


Example 4. Given a coding table (the first digit of the code is the line number, the second is the column number): Using this coding table: a) encrypt the phrase: I_KNOW WORK_ WITH_INFORMATION!_AND YOU? b) decipher the text:


a) 34352113053335

1700011520002031351835

10142215171300241005454335


b) WHAT?_WHERE?_WHEN?


Symbolic encoding method A B C D E E F G H I J K L M N O P R S T U V H C CH W Q Y Y Y Z Example 5. “Caesar” cipher This cipher implements the following text transformations: Each letter of the original text is replaced by the third letter after it in the alphabet, which is considered to be written in a circle. Using this cipher:- encrypt the words: INFORMATION, COMPUTER, PERSON. - decipher the word NULTHSEUGCHLV.


"Permutation" code.

Coding is carried out by rearranging letters in a word according to the same general rule.

Restore the words and determine the permutation rule:


INFORMATION – LRCHSUPGSHLV

COMPUTER – NSPTYABHZU

MAN - SEASON


NULTHSYOUGCHLV - CRYPTOGRAPHY


REPRESENTATION OF SYMBOLIC INFORMATION IN A COMPUTER

"Text information" = "Character information"

Text is any sequence of characters.

Computer symbol alphabet – a set of symbols used on a computer for external representation of texts

(letters of the Latin and Russian alphabets, decimal numbers, punctuation marks, special characters %, &, $, #, @, etc.)


Character information inside a computer is encoded using binary numbers (binary alphabet - 0 and 1)

A sequence of one character can encode only two letters:

0 – A


A sequence of two characters can encode four letters:

00 – A

01 – B

10 – V

11 – G


Eight letters can be encoded with a three-character sequence:

000 – A

001 – B

010 – B

011 – G

100 – D

101 – E

110 – F

111 – W

DEDVEZEZHA – 100 101 100 010 101 111 101 110 000

GDEVAZA


………………………… ..

………………………… ..

………………………… ..

A seven-digit sequence can encode 2 7 = 128 characters.

This is enough to encode a message in good Russian.

This is exactly the domestic code KOI-7

(Information Exchange Code)

The appearance of one sign 0 or 1 in a sequence will be called a word BIT (from English BI nary digi T - binary digit)


Using an eight-bit code, you can encode 2 8 = 256 characters. The symbolic alphabet of a computer consists of exactly 256 characters.

The eight-bit code is called ASCII (A merican S tandard C ode for Information Interchange - American Standard Code for Information Interchange)

Thanks to eight-bit encoding, you can use both uppercase and lowercase letters of both the Russian and Latin alphabets, punctuation marks, numbers and special characters &, $, #, @, %, etc. in the text.


There are 256 possible 8-bit combinations made up of 0 and 1:

from 00000000 to 11111111, which are presented in the encoding table.

Encoding table is a standard that assigns each character of the alphabet its own serial number from 0 to 255; the binary code of a symbol is its serial number in the binary number system.

Those. the encoding table establishes the connection between

computer's external symbol alphabet

And internal binary representation .


S 42 h 00111101 00101000 105 01010010 01101000 106 00101001 ? 00111110 01010011 * i T 64 85 43 + 00111111 @ 65 44 j 86 01010100 01101001 107 U 00101010 01101010 A 108 , 01000000 k 45 87 0010101 1 01010101 66 V 88 01000001 01101011 46 l - 67 109 W 01010110 B 00101100 01101100 89 . C 00101101 01000010 68 47 X 01010111 m 110 01000011 00101110 69 111 D 01011000 48 n 01101101 90 Y / 01101110 E o 01000100 01011001 112 49 70 91 0 00101111 Z 1 113 01000101 p F 92 01101111 50 01011010 71 [ 00110000 01000110 q 93 2 51 01110000 G \ 72 00110001 01011011 114 94 3 01110001 H 73 00110010 52 01000111 115 01011100 r ] I 01011101 00110011 01110010 74 s 53 4 01001000 116 ^ 95 J 01001001 t 54 5 117 01011110 75 96 01110011 00110100 _ 118 6 01001010 K u 97 01110100 55` 00110101 76 01011111 v 98 01001011 7 01110101 a 00110110 77 01100000 119 L 01110110 99 01001100 M b 78 01100001 00110111 1 ( 01111010 103 01100101 f 124 01111011 01100110 g 125 | 01100111 ) 01111100 126 127 01111101 ~ 01111110 . 01111111" width="640"

Standard ASCII code table


Alternate ASCII code table


UNICODE is a new international character encoding standard.

This is 16-bit encoding, i.e. 16 bits (2 bytes) of memory are allocated for each character.

How many characters can be encoded using UNICODE?


REPRESENTATION OF NUMERIC INFORMATION

Numbers in computer memory are stored in two formats:

  • fixed point format (whole numbers);
  • floating point format (decimal fractions).

A dot is a sign that separates the integer and fractional parts of a number.


To get the internal representation of a positive integer N in fixed-point format you need:

  • Convert the number N to the binary number system;
  • The result obtained is supplemented on the left with insignificant zeros up to 16 digits.

Example 7. Get an internal representation of the number N =1607


To write the internal representation of a negative integer (- N) you need:

  • Get an internal representation of a positive number N;
  • Get the reverse code of this number by replacing 0 with 1 and 1 with 0;
  • Add 1 to the resulting number.

Example 8. Using these rules, we define the internal representation of the number –1607.


1607 10 = 11001000111 2

The internal representation of this number in a machine word will be as follows:

0000 0110 0100 0111

in compressed hexadecimal form this code will be written as follows: 0647


1607 10 = 11001000111 2

0000 0110 0100 0111

1111 1001 1011 1000

____________________________________________________

1111 1001 1011 1001


PRESENTATION OF GRAPHIC INFORMATION

There are two approaches to solving the problem of representing an image on a computer:

  • RASTER The approach involves dividing the image into small single-color elements - video pixels, which, merging, give the overall picture.
  • VECTOR the approach breaks down any image into geometric elements: line segments, elliptical arcs, fragments of rectangles, circles, etc. With this approach, video information is a mathematical description of the listed elements in a coordinate system associated with the monitor screen.

The raster approach is universal, i.e. it is always applicable, regardless of the nature of the image. Modern PCs use only raster displays that operate on the principle of progressive scanning of images.

All the variety of colors that we see on a computer screen is achieved by mixing just three primary colors: red, green and blue, the so-called RGB color model (Red, Green, Blue). Any other color is characterized by the proportion of red, green and blue in it


Eight-color palette Example 9. What colors are mixed to create pink? Example 10. It is known that brown color is obtained by mixing red and green colors. What is the color code for brown?

Color

Brown


The sixteen-color palette is encoded with 4 bits according to the principle "IKZS" , Where AND– intensity bit, an additional bit that controls the brightness of a color.

These are the same 8 colors, but with two brightness levels.

For example, if in an 8-color palette the code 100 means red, then in a 16-color palette:

0100 - red, 1100 – bright red color;

0110 - brown, 1110 – bright brown


Larger palettes are created by separately controlling the intensity of each of the three base colors. To do this, more than one bit is allocated in the color code for each base color.

For example, the structure of an eight-byte code for a palette of 256 colors is as follows: "KKKZZZSS"

The relationship between the bit depth of the color code - b

and the number of flowers - TO (palette size)

expressed by the formula K=2 b .

Color code depth – b usually called

bit depth colors.

So-called natural palette colors are obtained when b =24 , for this bit depth the palette includes over 16 million colors (2 24 = 16 777 216)


SOUND REPRESENTATION

The basic principle of audio encoding, like image encoding, is expressed by the word “sampling”

The physical nature of sound is vibrations in a certain frequency range transmitted by a sound wave through air (or other elastic medium)


The process of converting sound waves into binary code in computer memory

Sound wave

MICROPHONE

Alternating electric current

AUDIO ADAPTER

COMPUTER MEMORY

Binary code


The process of reproducing audio information stored in computer memory

COMPUTER MEMORY

Binary code

AUDIO ADAPTER

Electrical signal

ACOUSTIC

SYSTEM

Sound wave


AUDIO ADAPTER (Sound card)– a special device connected to a computer, designed to convert electrical vibrations of audio frequency into a numerical binary code when outputting sound and for the reverse conversion (from a numerical code to electrical vibrations) when playing sound.


In the process of recording sound, the audio adapter measures the amplitude of the electric current with a certain period and enters the binary code of the resulting value into the register. The binary code from the register is then copied into the computer's RAM.

The quality of computer sound is determined by the characteristics of the audio adapter:

sampling frequency and bit depth.


Sampling frequency – is the number of measurements of the input signal in 1 second. Frequency is measured in Hertz (Hz).

One measurement per second corresponds to a frequency of 1Hz. 1000 measurements in 1 second – 1 kilohertz (1 kHz). Typical sampling rates of audio adapters: 11 kHz, 22 kHz, 44.1 kHz, etc.

Register width is the number of bits in the audio adapter register. The bit depth determines the accuracy of the input signal measurement. The larger the bit depth, the smaller the error of each individual conversion of the electrical signal value into a binary number and vice versa.