Computer science presentations download coding. Presentation for the lesson on informatics "information coding"


Encoding information - the transfer of information from a conventional, generally accepted format into a form that is accessible to the perception of only a certain group of people or, in general, only for 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 binary, but the number two already has the number 10, the number 3 - 11, 4 -100 and so on.

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

Using the rule of the previous slide, let's see examples of writing numbers and numbers when converting from decimal to binary. It is very important to remember that the first character from the left represents a sign.

If you want to write a number in binary that will take up more than 7 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 slots, 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, an encoding that has 65535 characters is common.

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

As you can see from the example on the previous slide, 3 bytes of memory are used to write 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 means the complete absence of colors.

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

Encoding is the transfer of information from one type to a more user-friendly one at the moment.

Without encoding, it would be impossible to use any electronic computers.

slide 1

Skupova Alexandra 11 "A"

slide 2

Encoding and decoding
To exchange information with other people, a person uses natural languages. Along with natural languages, formal languages ​​have been developed for their professional application in any field. The representation of information using a language is often referred to as coding. Code - a set of symbols (symbols) for representing information. Code - a system of conventional signs (symbols) for the transmission, processing and storage of information (message). Coding - the process of presenting information (messages) in the form of a code. The entire set of characters used for encoding is called the encoding alphabet. For example, in the memory of a computer, any information is encoded using a binary alphabet containing only two characters: 0 and 1.

slide 3


Different ways 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 it is necessary to transfer the text abroad - we use the English alphabet; if it is necessary to present the text in a form understandable for a literate Russian person, we write it down according to the rules of the grammar of the Russian language. "Good afternoon, Dima!" "Dobryi den, Dima"

slide 4

Ways to encode information
The choice of how information is encoded may be related to the intended way of processing it. Let's show it on an example of representation of numbers - the 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 entry is more convenient for performing calculations: “forty-seven times one hundred twenty-five” or “47x 125”? Obviously, the second one.

slide 5

Message encryption
In some cases, there is a need to classify the text of a message or document so that it cannot be read by those who are not supposed to. This is called tamper protection. In this case, the secret text is encrypted. In ancient times, encryption was called cryptography. Encryption is the process of converting plaintext into ciphertext, and decryption is the reverse transformation process, in which the original text is restored. Encryption is also coding, but with a secret method known only to the source and addressee. Encryption is a science called cryptography.

slide 6

Morse code
A − I P − W − − − −
B − Y − − − S W − − −
B − − K − − T − b − − −
G − − L − U − L − −
D − M − − F − S − − −
E H − X E −
F − O − − − C − − Yu − −
Z − − P − − W − − − I − −

Slide 7

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 commonly called binary digits or bits. With the help of two digits 0 and 1, any message can be encoded. This was the reason that two important processes must be organized in a computer: encoding and decoding. Encoding is the transformation of input information into a form that is perceived by a computer, i.e. binary code.

Slide 8

Why Binary Encoding
From the point of view of technical implementation, the use of the binary number system for encoding information turned out to be much simpler than the use of other methods. Indeed, it is convenient to encode information as a sequence of zeros and ones, if these values ​​are represented as two possible stable states of an electronic element: 0 - no electrical signal; 1 - the presence of an electrical signal. The ways 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.

Slide 9

Notation
Numbers are used to record information about the number of objects. Numbers are written using a set of special characters. A number system is a way of writing numbers using a set of special characters called digits.

Slide 10

Types of number systems
NUMBER SYSTEMS
POSITIONAL
NON-POSITIONAL
In non-positional number systems, the value that a digit stands for does not depend on the position in the number. XXI
In positional number systems, the value denoted by a digit in a number entry depends on its position in the number (position). 2011

slide 11

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 -1000. Natural numbers are written by repeating these digits. For example, II \u003d 1 + 1 \u003d 2, here the symbol I stands for 1, regardless of its place in the number. To correctly write large numbers in Roman numerals, you must first write down the number of thousands, then hundreds, then tens, and finally units. Example: number 2988. Two thousand MM, nine hundred CM, eighty LXXX, eight VIII. Let's write them together: MCMLXXXVIII. МMCMLXXXVIII = 1000+1000+(1000-100)+(50+10+10+10)+5+1+1+1 = 2988 To display 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.

slide 12

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

slide 13

Positional number systems
In positional number systems, the value denoted by a digit in a number entry 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: 1 + 1 = 2 (compare with the Roman number system). Here the character 1 has a different meaning depending on the position in the number.

Slide 14

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

slide 15

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

slide 16

Decimal number system
The decimal number system is a positional number system based on base 10. It is assumed that base 10 is associated with the number of fingers a person has. The most common number system in the world. To write numbers, the characters 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, called Arabic numerals, are used.

Slide 17

Binary number system
The 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 ​​\u200b\u200bthere are in the system, the easier it is to manufacture individual elements. The lower the number of states for an element, the higher the noise immunity and the faster it can work. Ease of creating addition and multiplication tables - basic operations on numbers

Slide 18

Alphabet decimal, binary, octal and hexadecimal number systems
Number system Base Alphabet of digits
Decimal 10 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
Binary 2 0, 1
Octal 8 0, 1, 2, 3, 4, 5, 6, 7
Hexadecimal 16 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F

Slide 19

Converting numbers from one number system to another
The conversion from the decimal number system to the base p number system is carried out by successively dividing the decimal number and its decimal quotients by p, and then writing out the last quotient and the remainders in reverse order. Let's translate the decimal number 9910 into binary number systems (base p=2). As a result, we got 10000112=9910

Slide 20

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

slide 21

Encoding of text information
Assigning a specific numeric code to a symbol is a matter of convention. The ASCII (American Standard Code for Information Interchange) code table is 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). National standards of coding tables 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 signs. 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 EC series of computers, and from the mid-80s it began to be used in the first Russified versions of the UNIX operating system. The most common encoding currently used is Microsoft Windows, abbreviated as CP1251 ("CP" stands for "Code Page", "code page").

slide 22

International ASCII encoding

slide 23


A person is able to perceive and store information in the form of images (visual, sound, tactile, gustatory and olfactory). Visual images can be stored in the form of images (drawings, photographs, and so on), and sound images can be recorded on records, magnetic tapes, laser discs, and so on. Information, including graphics and sound, can be presented in analog or discrete form. With an 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.

slide 24

Analog and discrete form of information representation
Let us give an example of analog and discrete representation of information. The position of the body on the inclined plane and on the stairs is specified by the values ​​of the X and Y coordinates. When the body moves along the inclined plane, its coordinates can take on an infinite number of continuously changing values ​​from a certain range, and when moving up the stairs - only a certain set of values, and changing abruptly.

Slide 25

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

slide 26

Types of computer images
There are two ways to create and store graphic objects in a computer - as a bitmap or as a vector image. Each image type has its own encoding method.

Slide 27

Bitmap encoding
A raster image is a collection of dots (pixels) of different colors. Pixel - the minimum area of ​​the image, the color of which can be set independently. In the process of encoding an image, its spatial sampling is performed. Spatial discretization of an image can be compared to the construction of 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 the value of its color, that is, a color code (red, green, blue, and so on). Image quality 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 image is encoded).

Slide 28

Color models
To represent a color in the form of a numeric code, two color models are used that are inverse to each other: 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 forming images intended for printing on paper.

Slide 29

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

slide 30

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 (28 = 256 values ​​in total), and each image point, with such a coding system, can be painted in one of 16,777,216 colors. Such a set of colors is usually called True Color (true colors), because the human eye is still not able to distinguish a greater variety.

Slide 31

Vector Image Encoding
A vector image is a collection of graphic primitives (point, segment, ellipse...). Each primitive is described by mathematical formulas. Envy coding from the application environment. The advantage of vector graphics is that the files that store vector graphics are relatively small. It is also important that vector graphics can be enlarged or reduced without loss of quality.

slide 32

Graphic file formats
Graphic file formats determine how information is stored in a file (raster or vector), as well as the form of information storage (compression algorithm used). Most popular bitmap formats: BMP GIF JPEG TIFF PNG

Slide 33

Audio encoding
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 extremely 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.

slide 34

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 loudness levels.

Slide 35

The quality of binary audio encoding is determined by the encoding depth and sampling rate. Sampling frequency - the number of measurements of the signal level per unit of 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 = 2I = 216 = 65536.

slide 36

Presentation of video information
Recently, the computer is increasingly used to work with video information. The simplest such work is watching movies and video clips. It should be clearly understood that the processing of video information requires a very high speed of the computer system. What is a film in terms of computer science? First of all, it is a combination of sound and graphic information. In addition, to create the effect of movement on the screen, a discrete technology for quickly changing static pictures is used. Studies have shown that if more than 10-12 frames are replaced in one second, then the human eye perceives changes in them as continuous.

Slide 37

Presentation of video information
It would seem that if the problems of coding static graphics and sound are solved, then it will not be difficult to save the video image. But this is only at first glance, because 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 customary to call it a key frame), and in the following ones to save only differences from the initial frame (difference frames).

Slide 38

Some video file formats
There are many different formats for presenting 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 - interleaving audio and video). More versatile is the Quick Time multimedia format, which originally originated on Apple computers. Recently, video image compression systems have become more widespread, allowing some distortions of the image that are invisible to the eye in order to increase the compression ratio. The most famous standard of this class is MPEG (Motion Picture Expert Group). The methods used in MPEG are not easy to understand and rely on fairly complex mathematics. A technology called DivX (Digital Video Express) has become more widespread. Thanks to DivX, it was possible to achieve a compression ratio that made it possible to fit a high-quality recording of a full-length film onto one CD - to compress a 4.7 GB DVD movie to 650 MB.


  • Encoding - information processing
  • Three ways to encode text
  • Encoding of character information in a computer
  • Encoding of numerical information in a computer
  • Representation of graphic information in a computer
  • Representation of sound in a computer

Information encoding

Information encoding - this is the transformation of information into a symbolic form, convenient for storage, transmission and processing. The reverse transformation is called Decoding.


  • abbreviation of the record;
  • 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 alphabet

BUT -

L -

B -

C - -

AT - -

H - - -

G - -

H -

W - - - -

O - - -

D -

SCH - - -

P - -

E

AND -

R -

Kommersant - - -

Y - - -

FROM

Z - -

b - -

And

E -

At -

Y - - -

YU - -

F -

TO - -

I - -

X


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

Numeric encoding method

Example 2. An encrypted proverb.

To chop wood you need

and to water the garden -

Fishermen made in 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


A PENNY RUBLE SAVE


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


33211463212165101816312030

1015221618141241032


Example 4. An encoding table is given (the first digit of the code is the line number, the second is the column number): Using this encoding table: a) encrypt the phrase: I_I CAN_WORK_ WITH_INFORMATION!_A_YOU? b) decode the text:


a) 34352113053335

1700011520002031351835

10142215171300241005454335


b) WHAT?_WHERE?_WHEN?


Symbolic way of coding A B C D E F G H I J K L M N O P R S T U V W X Y Y Z Example 5. The Caesar cipher This cipher implements the following text transformation: 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 words: INFORMATION, COMPUTER, MAN. - unscramble the word NULTHSEOUGCHLV.


Code "Permutations".

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

Restore the words and define the permutation rule:


INFORMATION - LRCHSUPGSHLV

COMPUTER - NSPTYABKHZU

MAN - ЪZOSEZN


NULTHSEOUGCHLV - CRYPTOGRAPHY


REPRESENTATION OF SYMBOL INFORMATION IN A COMPUTER

"Text Information"="Character Information"

Text is any sequence of characters.

Symbolic computer alphabet - a set of symbols used on a computer for external representation of texts

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


Character information inside a computer is encoded in 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 - B

11 - G


A three-character sequence can already encode eight letters:

000 - A

001 - B

010 - B

011 - G

100 - D

101-E

110 - F

111 - Z

DEDVEZHEZHA – 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 the domestic code KOI-7

(Information Exchange Code)

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


Using an eight-bit code, 2 8 = 256 characters can be encoded. The character alphabet of a computer consists of exactly 256 characters.

The eight-bit code is called ASCII

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.


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

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

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

Those. encoding table establishes a link between

computer's external character 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 00101011 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 120 w 01001101 79 N c 01110111 100 x 121 01100010 O 01111000 01100011 101 01001110 y 122 d z 01001111 102 01111001 123 e 01100100 ( 01111010 103 01100101 f 124 01111011 01100110 g 01111111" width="640"

ASCII code part table


Alternate ASCII Code Part Table


UNICODE is a new international character encoding standard.

This is a 16-bit encoding, i.e. Each character has 16 bits (2 bytes) of memory.

How many characters can be encoded using UNICODE ?


REPRESENTATION OF NUMERICAL 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 to:

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

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


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

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

Example 8. Let's determine the internal representation of the number -1607 according to these rules.


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 like this: 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 an overall picture.
  • VECTOR The approach divides any image into geometric elements: straight line segments, elliptical arcs, fragments of rectangles, circles, etc. With this approach, video information is a mathematical description of the listed elements in the 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. On modern PCs, only raster displays are used, which work on the principle of progressive scanning of an image.

All the variety of colors that we see on a computer screen is achieved by mixing only 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 mix to make pink? Example 10 It is known that brown is obtained by mixing red and green. What is the code for brown?

Color

Brown


A 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 the color.

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

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

0100 - red, 1100 - bright red color;

0110 - brown, 1110 – bright brown


Larger palettes are obtained 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 the 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)

is expressed by the formula K=2 b .

Bit depth of the color code - b called

bit depth colors.

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


SOUND REPRESENTATION

The basic principle of audio coding, like image coding, 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 playing sound information stored in the computer's 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 sound frequency into a numerical binary code when outputting sound and for reverse conversion (from a numerical code to electrical vibrations) when playing sound.


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

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

sampling rate 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 1 second corresponds to a frequency of 1 Hz. 1000 measurements in 1 second - 1 kilohertz (1kHz). Typical sampling rates of audio adapters: 11kHz, 22kHz, 44.1kHz, etc.

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

Encoding and decoding

To exchange information with other people, a person uses natural languages. Along with natural languages, formal languages ​​have been developed for their professional application in any field. The representation of information using a language is often referred to as coding.

Code - a set of symbols (symbols) for representing information.

Code - a system of conventional signs (symbols) for the transmission, processing and storage of information (message).

Coding - the process of presenting information (messages) in the form of a code.

The whole set of characters used for encoding is called coding alphabet. For example, in the memory of a computer, any information is encoded using a binary alphabet containing only two characters: 0 and 1.

Decoding is the process of converting the code back to the form of the original character system, i.e. get the original message. For example: translation from Morse code into a written text in Russian.

More broadly, decoding is the process of recovering the content of an encoded message. With this approach, the process of writing text using the Russian alphabet can be considered as encoding, and reading it is decoding.

Encoding methods

information

Different ways 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 it is necessary to transfer the text abroad - we use the English alphabet; if it is necessary to present the text in a form understandable for a literate Russian person, we write it down according to the rules of the grammar of the Russian language.

"Hello, Sasha!" Hello, Sasha!

Encoding methods

information

The choice of how information is encoded may be related to the intended way of processing it.

Let's show this on the example of representing numbers - quantitative

information. Using the Russian alphabet, you can write the number "thirty five". Using the same Arabic decimal alphabet

reckoning, we write "35". The second method is not only shorter than the first, but also more convenient for performing calculations. Which record is more convenient for performing calculations: " thirty five times one hundred twenty seven"or" 35 x 127 "? Obviously - the second.

Message encryption

In some cases, there is a need for secrecy

the text of a message or document so that it cannot be read by those who are not supposed to. It is called

protection against unauthorized access.

AT in this case, the secret text is encrypted.

AT ancient times encryption was called cryptography.

Encryption is the process of converting plaintext into ciphertext, and decryption is the reverse transformation process, in which the original text is restored.

Encryption is also coding, but with a secret method known only to the source and addressee.

Encryption methods are dealt with by a science called

cryptography.

First telegraph

The first technical means of transmitting information over a distance was the telegraph, invented in 1837 by the American Samuel Morse.

telegraph apparatus by wire to another telegraph apparatus.

Inventor Samuel Morse invented an amazing code (Morse code, Morse code, "Morse code"), which has served mankind ever since. Information

encoded by three "letters": long signal (dash), short signal (dot) and no signal (pause) to separate letters. Thus, encoding is reduced to using a set of characters arranged in a strictly defined order.

The most famous telegraph message is the SOS distress signal (Save Our Souls - save our souls). Here's what it looks like: "---

Morse code

− − −

Morse code

− − − −

− − − −

− − − − −

− − −

− − − −

− − −

Code unevenness

− − − − − −

A characteristic feature of Morse code is

variable length code of different letters , so Morse code is called uneven code.

Letters that occur more often in the text have a shorter code than rare letters. This is done in order to shorten the length of the entire message. But because of the variable length of the code of letters, there is a problem of separating letters from each other in the text. Therefore, for separation, you have to use a pause (skip). Therefore, the Morse telegraph alphabet is ternary, since it uses three characters: dot, dash, space.

First wireless telegraph (radio receiver)

On May 7, 1895, the Russian scientist Alexander Stepanovich Popov, at a meeting of the Russian Physical and Chemical Society, demonstrated a device that he called a "lightning detector", which was designed to record electromagnetic waves.

This device is considered the world's first wireless telegraphy machine,

radio receiver. In 1897, with the help of wireless telegraphy devices, Popov carried out the reception and transmission of messages between the coast and a military vessel.

In 1899, Popov designed a modernized version of an electromagnetic wave receiver, where signals were received (in Morse code) on the operator's head phones.

In 1900, thanks to the 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 General-Admiral Apraksin, which ran aground off the island of Gogland. As a result of the exchange of messages transmitted by wireless telegraphy, the crew of the Russian icebreaker Ermak received information about the Finnish fishermen on the torn off ice floe in a timely and accurate manner.

slide 2

Encoding and decoding information

  • Encoding is the transformation of input information into a form that is perceived by a computer, i.e., a binary code.
  • Decoding is the transformation of data from a binary code into a human-readable form.
  • slide 3

    Encoding of text information

    Textual information is information expressed in writing.

    With 1 byte, you can get 256 different binary code combinations and use them to display 256 different characters. Encoding is that each character is assigned a unique decimal code from 0 to 255 or its corresponding binary code from 00000000 to 11111111.

    slide 4

    Assigning a specific code to a character is a matter of agreement, which is fixed in the code table.

    The code table is a table in which serial numbers (codes) are assigned to all characters of the computer alphabet.

    ASCII table (American Standard Code for Information Interchange - American Standard Code for Information Interchange) has been adopted as a worldwide standard.

    slide 5

    Currently, there are five different code tables for Russian letters: Windows, MS-DOS, COI-8; Mas; ISO, so text created in one encoding will not display correctly in another.

    slide 6

    Unicode encoding table

    The new international Unicode standard, which assigns not one byte, but two, to each character, and therefore it can be used to encode not 256, but 65536 different characters. This encoding is supported by the latest versions of the Microsoft Windows & Office platform (since 1997).

    Slide 7

    • In 1838 Samuel Morse, professor of painting at New York University in the USA, while simultaneously dealing with the issues of information transmission, proposed a system for encoding letters and numbers for transmitting them over wired communication channels, later named after him. All letters, numbers, and punctuation in Morse code were encoded as sequences of dots and dashes.
  • Slide 8

    Morse code

  • Slide 9

    Graphic information encoding

    Slide 10

    slide 11

    Bitmap when enlarged

  • slide 12

    Converting an image from analog (continuous) to digital (discrete) form is called spatial sampling.

    • analog form
    • discrete form
  • slide 13

    In the process of spatial sampling, the image is divided into separate small fragments, points - pixels.

    Pixel (eng. pixel = picture element, picture element) - the smallest picture element for which you can set your own color.

    Slide 14

    The resolution of a raster image is determined by the number of horizontal and vertical dots per unit length of the image.

    slide 15

    The smaller the dot size, the greater the resolution, and hence the higher the image quality.

    slide 16

    Slide 17

    Slide 18

    Vector graphics can be enlarged or reduced without loss of quality.

    A vector drawing is a drawing that is encoded as a set of simple geometric shapes, the parameters of which (sizes, vertex coordinates, inclination angles, outline and fill colors) are stored as numbers.

    Slide 19

    Audio encoding

  • Slide 20

    The dependence of loudness, as well as the pitch of the sound, on the intensity and frequency of the sound wave.

    slide 21

    SOUND REPRESENTATION METHODS

    1. analog
    2. Discrete
    1. a physical quantity takes on an infinite number of values, and they change continuously.
    2. a physical quantity takes on a finite set of values, and they change stepwise.

    Vinyl record (the sound track changes its shape continuously).

    Audio CD (audio track contains areas with different reflectivity).

    slide 22

    The quality of audio coding also depends on the sampling frequency - the number of measurements of the signal level per unit of time. This value can take values ​​from 8 to 48 kHz.

    slide 23

  • Editor's Choice
    Remember the joke about how the fight between the physical education teacher and the Trudovik ended? Trudovik won, because karate is karate, and...

    AEO "Nazarbayev Intellectual Schools" Sample Dictation for the final certification of graduates of the basic school Russian language (native) 1....

    WE HAVE A REAL PROFESSIONAL DEVELOPMENT! Choose a course for yourself! WE HAVE A REAL PROFESSIONAL DEVELOPMENT! Upgrade courses...

    The head of the GMO of geography teachers is Drozdova Olesya Nikolaevna Documents of the GMO of geography teachers News of the MO of geography teachers ...
    September 2017 Mon Tue Wed Thu Fri Sat Sun 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19...
    Robert Anson Heinlein is an American writer. Together with Arthur C. Clarke and Isaac Asimov, he is one of the "Big Three" of the founders of...
    Air travel: hours of boredom punctuated by moments of panic. El Boliska 208 Link to quote 3 minutes to reflect...
    Ivan Alekseevich Bunin - the greatest writer of the turn of the XIX-XX centuries. He entered literature as a poet, created wonderful poetic...
    Tony Blair, who took office on May 2, 1997, became the youngest head of the British government ...