Coding text information lesson plan. Lesson summary "coding text information"

02.04.2023 Services

Information coding is the process of converting information from a form convenient for direct use into a form convenient for transmission, storage or automatic processing.

Encoding text information

To record textual (character) information, some kind of language (natural or formal) is always used.

The entire set of symbols used in a language is called alphabet. Total number of alphabet characters N call him power. When writing text, any of the following may appear in each position: N characters of the alphabet, i.e. it can happen N events. Therefore, each character of the alphabet contains i bit of information where i is determined from the inequality (Hartley formula): 2 i N. Then the total amount of information in the text is determined by the formula:

V = k * i ,

Where V– amount of information in the text; k– the number of characters in the text (including punctuation marks and even spaces), i- the number of bits allocated for encoding one character.

Since each bit is a 0 or a 1, any text can be represented as a sequence of zeros and ones. This is how text information is stored in computer memory. Assigning a particular binary code to an alphabet character is a matter of convention, recorded in a code table. Currently, code tables are widely used ASCII And Unicode.


ASCII(American Standard Code for Informational Interchange) has been used for a long time. 8 bits are allocated to store the code of one character, therefore, the code table supports up to 28 = 256 characters. The first half of the table (128 characters) contains control characters, numbers and letters of the Latin alphabet. The second half is reserved for symbols of national alphabets. Unfortunately, currently there are as many as five variants of code tables for Russian letters (KOI-8, Windows-1251, ISO, DOS, MAC), so texts created in one encoding are displayed incorrectly in another. (You've probably come across Russian-language sites whose texts look like a meaningless set of characters?).

Unicode- has become widespread in recent years. 16 bits are allocated to store the code of one character, therefore, the code table supports up to 216 = 65536 characters. This space is enough to unite all “living” official (state) writings in one standard. By the way, the ASCII standard became part of Unicode.

If coding is the translation of information from one language to another (recording in a different symbol system, in a different alphabet), then decoding– reverse translation.

When encoding, one character of the original message can be replaced by one character of the new code or several characters, or vice versa - several characters of the original message are replaced by one character in the new code (Chinese characters denote entire words and concepts), so the encoding can be uniform And uneven. With uniform encoding, all symbols are encoded with codes of equal length; with uneven encoding, different symbols can be encoded with codes of different lengths, which makes decoding difficult.

decode from beginning, if fulfilled Fano condition: no codeword is the beginning of another codeword. The encoded message can be unambiguously decode from end, if fulfilled inverse Fano condition: no codeword is the end of another codeword. The Fano condition is a sufficient but not necessary condition for unambiguous decoding.

Solving problems on coding text information

1. The automatic device recoded an information message in Russian with a length of 20 characters, originally written in a 2-byte Unicode code, into an 8-bit KOI-8 encoding. By how many bits did the message length decrease? Write down only the number in your answer.

Solution:

1) with 16-bit encoding, the message volume is 16*20 bits

2) when it was recoded into an 8-bit code, its volume became equal to 8*20 bits

3) thus, the message was reduced by 16*20 – 8*20 = 8*20 = 160 bits

Answer: 160

2. Determine the information volume of the text in bits

Bambarbia! Kergudu!

Solution:

1) this text contains 19 characters (be sure to count spaces and punctuation marks)

2) if there is no additional information, we assume that an 8-bit encoding is used (most often it is clearly indicated that the encoding is 8- or 16-bit), so the message contains 19*8 = 152 bits of information

Answer: 152

3. The table below shows part of the ASCII code table:

Symbol

Decimal code

Hex code

What is the hexadecimal code for the character "q"?


Solution:

1) in the ASCII code table, all capital Latin letters A-Z are arranged in alphabetical order, starting with the character with code 65=4116

2) all lowercase Latin letters a-z are arranged in alphabetical order, starting with the character with code 97=6116

3) it follows that the difference in the codes of the letters “q” and “a” is equal to the difference in the codes of the letters “Q” and “A”, that is, 5116 – 4116 = 1016

4) then the hexadecimal code of the character “q” is equal to the code of the letter “a” plus 1016

5) from here we find 6116 + 1016 = 7116.

Answer: 71

4. To encode a certain sequence consisting of the letters A, B, C, D and D, a non-uniform binary code is used, which makes it possible to unambiguously decode the resulting binary sequence. Here is the code: A-00, B-010, B-011, G-101, D-111. Is it possible to shorten the length of the code word for one of the letters so that the code can still be decoded unambiguously? The codes of the remaining letters should not change. Choose the correct answer.

1) for the letter B - this is impossible

3) for the letter B – for the letter G – 01

Solution(1 way - checking Fano conditions):

3) for unambiguous decoding it is enough that one of the Fano conditions is satisfied: the direct or inverse Fano condition;

4) check options 1, 3 and 4 sequentially; if none of them are suitable, you will have to choose option 2 (“this is impossible”);

3) check option 1: A–00, B–01, C–011, G–101, D–111.

the “direct” Fano condition is not satisfied (the code of the letter B coincides with the beginning of the code of the letter B);

the “reverse” Fano condition is not satisfied (the code of the letter B coincides with the end of the code of the letter G); therefore this option is not suitable;

4) check option 3: A–00, B–010, C–01, G–101, D–111.

the “direct” Fano condition is not satisfied (the code of the letter B coincides with the beginning of the code of the letter B);

the “reverse” Fano condition is not satisfied (the code of the letter B coincides with the end of the code of the letter G); therefore this option is not suitable;

5) check option 4: A–00, B–010, C–011, G–01, D–111.

the “direct” Fano condition is not satisfied (the code of the letter G coincides with the beginning of the codes of the letters B and C); But the “inverse” Fano condition is satisfied(the code of the letter G does not coincide with the end of the codes of the remaining letters); therefore this option is suitable;

Answer: 4

Solution(2 way, wood):

1) build a binary tree in which two branches depart from each node, corresponding to the choice of the next code digit - 0 or 1; Let's place the letters A, B, C, D and D on this tree so that their code is obtained as a sequence of numbers on the edges that make up the path from the root to this letter (the code of the letter B is highlighted in red - 011):

https://pandia.ru/text/78/419/images/image003_52.gif" width="391" height="166">DIV_ADBLOCK100">

3) but we don’t need the parity bit at all not needed, something else is important: the fifth bit in each five can be discarded!

4) divide the given sequence into groups of 5 bits each:

01010, 10010, 01111, 00011.

5) discard the fifth (last) bit in each group:

0101, 1001, 0111, 0001.

These are the binary codes of the transmitted numbers:

01012 = 5, 10012 = 9, 01112 = 7, 00012 = 1.

6) thus, the numbers 5, 9, 7, 1 or the number 5971 were transmitted.

Answer: 2

Training objectives:

1) The automatic device recoded the information message in Russian, originally recorded in 16-bit code Unicode, to 8-bit encoding
KOI-8. At the same time, the information message was reduced by 800 bits. What is the length of the message in characters?

2) The table below shows part of the ASCII code table:

Symbol

Decimal code

Hex code

What is the hexadecimal code for the character "p"?

3) A text document consisting of 3072 characters was stored in 8-bit KOI-8 encoding. This document has been converted to 16-bit Unicode. Indicate how many additional KB will be required to store the document. Write down only the number in your answer.

4) To encode the letters A, B, C, D, we decided to use two-digit sequential binary numbers (from 00 to 11, respectively). If you encode the sequence of GBAV symbols in this way and write the result in the hexadecimal number system, you get:

5) For 5 letters of the Latin alphabet, their binary codes are given (for some letters - from two bits, for some - from three). These codes are presented in the table:

Determine which set of letters is encoded by a binary string

1) baade 2) badde 3) bacde 4) bacdb

6) To encode the letters A, B, C, D, three-bit sequential binary numbers starting with 1 (from 100 to 111, respectively) are used. If you encode the CDAB character sequence in this way and write the result in hexadecimal code, you get:

1) А5СD16 4) DE516

7) For 6 letters of the Latin alphabet, their binary codes are specified (for some letters, two bits, for some, three). These codes are presented in the table:

Determine which sequence of 6 letters is encoded in a binary string.

8) To encode a message consisting only of the letters A, B, C and D, a binary code of uneven length is used:

If you encode the sequence of characters GAVBVG in this way and write the result in hexadecimal code, you get:

1) 62DD2) 6213316

9) To transmit a message over a communication channel consisting only of the letters A, B, C, D, they decided to use a code of uneven length: A=1, B=01, B=001. How should the letter G be encoded so that the code length is minimal and the encoded message can be unambiguously divided into letters?

10) To transmit numbers over a noisy channel, a parity check code is used. Each of its digits is written in binary representation, with leading zeros added to a length of 4, and the sum of its elements modulo 2 is added to the resulting sequence (for example, if we transmit 23, we get a sequence). Determine what number was transmitted over the channel in the form?

11) To encode a certain sequence consisting of the letters A, B, C, D and D, a non-uniform binary code is used, which makes it possible to unambiguously decode the resulting binary sequence. Here is the code: A-10, B-11, B-000, G-001, D-011. Is it possible to shorten the length of the code word for one of the letters so that the code can still be decoded unambiguously? The codes of the remaining letters should not change. Choose the correct answer.

1) this is impossible 2) for the letter B – 1

3) for the letter G – for the letter D – 01

12) To encode a certain sequence consisting of the letters A, B, C, D and D, we decided to use a non-uniform binary code, which allows us to unambiguously decode the binary sequence appearing on the receiving side of the communication channel. Code used: A–111, B–110, C–100, D–101. Indicate what code word can be used to encode the letter D. The code must satisfy the property of unambiguous decoding. If more than one codeword can be used, enter the shortest one.

13) To transmit a message over a communication channel consisting only of the letters A, B, C, D, they decided to use a code of uneven length: A=1, B=000, B=001. How should the letter G be encoded so that the code length is minimal and the encoded message can be unambiguously divided into letters?

Encoding graphic information

Conversion of graphic information from analogue to discrete form is carried out by sampling, i.e., dividing a continuous graphic image into individual elements. The sampling process involves encoding, i.e., assigning each element a specific value in the form of a code.

Sampling it is the transformation of a continuous image into a set of discrete values ​​in the form of a code.

During the image encoding process, spatial sampling. Spatial sampling of an image can be compared to constructing an image from a mosaic. The image is divided into separate small fragments (dots), each of which is assigned a color code.

As a result of spatial discretization, graphic information is presented in the form bitmap. A raster image consists of a certain number of lines, each of which contains a certain number of dots (pixels).

Image quality depends on resolution.

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

The smaller the dot size, the greater the resolution (more raster lines and dots per line) and, accordingly, the higher the image quality.
The resolution value is expressed in (dot per inch - dots per inch), i.e., the number of dots in an image strip 1 inch long (1 inch = 2.54 cm). Digitization of graphic images from paper or film is done using a scanner. Scanning is performed by moving photosensitive elements along the image. Scanner characteristics are expressed in two numbers, for example 1200x2400 dpi. The first number determines the number of photosensitive elements per inch of the strip and is the optical resolution. The second is the hardware resolution and determines the number of microsteps when moving one inch along the image.

The sampling process can use different color palettes. Each color can be considered as a possible state of a point. The number of colors N in the palette and the amount of information for encoding the color of each point are related to each other by the well-known Hartley formula: N=2I, where I is the color depth, and N is the number of colors (palette).

The amount of information that is used to encode the color of a point in an image is called depth colors. The most common color depth values ​​are the values ​​from the table:

Table. Color depth and number of colors displayed.

Color depth (i)

Number of displayed colors (N)

The quality of the image on the monitor screen depends on the size spatial resolution and color depth. The spatial resolution of a monitor screen is defined as the product of the number of image lines and the number of pixels per line. Resolution can be: 800x600, 1024x768, 1152x864 and higher. The number of colors displayed can vary from 256 colors to more than 16 million.

Video memory

Point no.

Binary dot color code

.........................................................................................

..........................................................................................

Rice. Formation of a raster image on the screen.

Let's consider an example of generating a raster image on the monitor screen, consisting of 600 lines of 800 dots in each line (total dots) and a color depth of 8 bits. The binary color code of all points is stored in the computer's video memory, which is located on the video card.

Periodically, with a certain frequency, the color codes of the dots are read from video memory and the dots are displayed on the monitor screen. The frequency of image reading affects the stability of the image on the screen. In modern monitors, the image is updated at a frequency of 75 or more times per second, which ensures a comfortable user experience.

Information volume of required video memory can be calculated using the formula:

V =I · X · Y,

where V is the information volume of video memory in bits;
X Y - number of image pixels (screen resolution);
I - color depth in bits per dot.

For example, the required amount of video memory for graphics mode with a resolution of 800x600 pixels and 24-bit color depth is:

V =I · X · Y= 24 x 800 x 600 = bit = 1 byte.

The color image on the monitor screen is formed by mixing the basic colors: red, green and blue (RGB palette). To obtain a rich palette of colors, the base colors can be given different intensities. For example, with a color depth of 24 bits, 8 bits are allocated for each color, i.e. for each color, N=28=256 intensity levels are possible, specified in binary codes from minimum to maximum.

Table. Formation of some colors at a color depth of 24 bits.

Name

Intensity

Color is often written as - #RRGGBB, where RR is the hex code for the red color component, GG is the hex code for the green color component, BB is the hex code for the blue color component. The higher the component value, the greater the glow intensity of the corresponding base color. 00 – no glow, FF – maximum glow (FF16=25510), 8016 – average brightness value. If the component has color intensity<8016 , то это даст темный оттенок, а если >=8016, then light.

For example,

#FF0000 – red color (the red component is maximum, and the rest are zero)

#000000 – black color (no components light up)

#FFFFFF – white color (all components are maximum and identical, the brightest color)

#404040 – dark gray color (all components are the same and the values ​​are less than the average brightness value)

#8080FF – light blue (the blue component has the maximum brightness, and the brightness of the other components is the same and equal to 8016).

Solving problems on encoding graphic information

1. To store a raster image of 32x32 pixels, 512 bytes of memory were allocated. What is the maximum possible number of colors in the image palette?

Solution: When encoding with a palette, the number of bits per 1 pixel ( K) depends on the number of colors in the palette N, they are related by the formula: https://pandia.ru/text/78/419/images/image005_31.gif" width="71" height="21 src="> (2), where is the number of bits per pixel, and – total number of pixels.

1) find the total number of pixels https://pandia.ru/text/78/419/images/image009_17.gif" width="61" height="19">bytebytebitbit

3) determine the number of bits per pixel: #ХХХХХХ", where hexadecimal values ​​of the intensity of color components in the 24-bit RGB model are specified in quotes.

What color will the page color specified by the tag be close to? ?

1) white 2) gray 3) yellow 4) purple

Solution: The highest color intensity (99) is found in the red and blue components. This produces a purple color.

Answer: 4

3. What is the width (in pixels) of a rectangular 64-color unpacked bitmap that occupies 1.5 MB of disk space if its height is half the width?

Solution: Since the amount of memory for the entire image is calculated using formula (1), where is the number of bits per pixel, and https://pandia.ru/text/78/419/images/image014_12.gif" width="36" height=" 41 src=">.

64=26. From here K= 6.

Substitute these values ​​into formula (1), we get:

*6=1.5*220*23. After reduction: x2 = 222. From here: x= 211=2048.

ABOUTanswer: 4

Training objectives:

1. To store a raster image measuring 128 x 128 pixels, 4 kilobytes of memory were allocated. What is the maximum possible number of colors in the image palette?

2. To encode the background color of an Internet page, use the bgcolor="#ХХХХХХ" attribute, where hexadecimal values ​​of the intensity of color components in the 24-bit RGB model are specified in quotes. What color will the color of the page specified by the tag be close to? ?

1) yellow 2) pink 3) light green 4) light blue

3. What is the width (in pixels) of a rectangular 16-color unpacked bitmap that occupies 1 MB of disk space if its height is twice its width?

Encoding of audio information

Sound is a sound wave with continuously varying amplitude and frequency. The greater the amplitude of the signal, the louder it is; the higher the frequency, the higher the tone. In order for a computer to process sound, a continuous audio signal must be converted into a sequence of electrical pulses (binary ones and zeros).

In the process of encoding a continuous audio signal, its time sampling is performed. In this case, the sound wave is divided into small temporary sections, for each of which the amplitude value is set.

Time sampling – a process in which, during encoding of a continuous audio signal, the sound wave is divided into separate small time sections, and for each such section a certain amplitude value is set. The greater the amplitude of the signal, the louder the sound.

On the graph (see figure) this looks like replacing a smooth curve with a sequence of “steps”, each of which is assigned a volume level value. The more volume levels allocated during the encoding process, the better the sound will be.

Rice. Time sampling of audio

Audio depth (encoding depth) -number of bits per audio encoding.

Volume levels (signal levels)- sound can have different volume levels. The number of different volume levels is calculated using Hartley's formula: N= 2 I WhereI– sound depth, and N – volume levels.

Modern sound cards provide 16-bit audio encoding depth. The number of different signal levels can be calculated using the formula: N=216=65536. Thus, modern sound cards provide encoding of 65536 signal levels. Each amplitude value is assigned a 16-bit code.

When binary coding a continuous audio signal, it is replaced by a sequence of discrete signal levels. The quality of encoding depends on the number of measurements of the signal level per unit time, i.e., the sampling frequency. The greater the number of measurements taken in 1 second (the higher the sampling frequency), the more accurate the binary coding procedure.

Sampling frequency number of measurements of the input signal level per unit of time (per 1 second). The higher the sampling rate, the more accurate the binary encoding procedure. Frequency is measured in Hertz (Hz).

1 measurement per 1 second -1 Hz, 1000 measurements per 1 second 1 kHz.

Let's denote the sampling rate by the letterF. For encoding, choose one of three frequencies:44.1 KHz, 22.05 KHz, 11.025 KHz.

It is believed that the range of frequencies that a person hears is from 20 Hz to 20 kHz.

The quality of binary audio encoding is determined by the encoding depth and sampling rate.

The sampling frequency of an analog audio signal can range from 8 kHz to 48 kHz. At a frequency of 8 kHz, the quality of the sampled audio signal corresponds to the quality of a radio broadcast, and at a frequency of 48 kHz, the quality of the sound of an audio CD. It should also be taken into account that both mono and stereo modes are possible.

Audio adapter (sound card) – a device that converts electrical vibrations of sound frequency into a numerical binary code when inputting sound and vice versa (from a numerical code into electrical vibrations) when playing sound.

Audio adapter specifications:sampling frequency and register bit depth.

Register size - number of bits in the audio adapter register. The larger the digit capacity, the smaller the error of each individual conversion of the magnitude of the electric current into a number and vice versa. If the bit depth is I, then when measuring the input signal 2 can be obtainedI = Ndifferent meanings.

Digital mono audio file size (A) is measured by the formula:

A=F*T* I/8 ,

WhereF –sampling frequency (Hz),T– time of sound playing or recording,I register width (resolution). According to this formula, the size is measured in bytes.

Digital stereo audio file size (A) is measured by the formula:

A=2* F* T* I/8 ,

the signal is recorded for two speakers, since the left and right sound channels are encoded separately.

Example. Let's try to estimate the information volume of a stereo audio file with a sound duration of 1 second at high sound quality (16 bits, 48 ​​kHz). To do this, the number of bits must be multiplied by the number of samples per second and multiplied by 2 (stereo):

16 bits*48,000 *2 = 1,536,000 bits = 192,000 bytes = 187.5 KB

Table 1 shows how many MB an encoded one minute of audio information will occupy at different sampling rates:

Signal type

Sampling frequency, kHz

16 bit, stereo

16 bit, mono

8 bit, mono

Examples of tasks:

1. Determine the size (in bytes) of a digital audio file whose playing time is 10 seconds at a sampling rate of 22.05 kHz and a resolution of 8 bits. The file is not compressed.

Solution:

Formula for calculating size (in bytes) digital audio file: A= F* T* I/8.

To convert to bytes, the resulting value must be divided by 8 bits.

22.05 kHz =22.05 * 1000 Hz =22050 Hz

A= F* T* I/8 = 22050 x 10 x 8 / 8 = 220500 bytes.

Answer: 220500

2. The user has a memory capacity of 2.6 MB at his disposal. It is necessary to record a digital audio file with a sound duration of 1 minute. What should the sampling frequency and bit depth be?

Solution:

Formula for calculating the sampling frequency and bit depth: F* I = A/T

(memory capacity in bytes) : (sounding time in seconds):

2.6 MB = 26 bytes

F* I =A/T= 26 bytes: 60 = 45438.3 bytes

F=45438.3 bytes: I

The adapter width can be 8 or 16 bits. (1 byte or 2 bytes). Therefore the sampling frequency can be either 45438.3 Hz = 45.4 kHz ≈ 44.1 kHz–standard characteristic sampling frequency, or 22719.15 Hz = 22.7 kHz ≈ 22.05 kHz- standard characteristic sampling rate

Answer:

Sampling frequency

Audio adapter capacity

1 option

Option 2

3. The amount of free memory on the disk is 5.25 MB, the bit depth of the sound card is 16. What is the duration of the sound of a digital audio file recorded with a sampling frequency of 22.05 kHz?

Solution:

Formula for calculating sound duration: T=A/F/I

(memory capacity in bytes) : (sampling frequency in Hz) : (sound card capacity in bytes):

5.25 MB = 5505024 bytes

5505024 bytes: 22050 Hz: 2 bytes = 124.8 sec
Answer: 124,8

4. Calculate how many bytes of information one second of stereo recording occupies on a CD (frequency 44032 Hz, 16 bits per value). How long does one minute take? What is the maximum disk capacity (assuming a maximum duration of 80 minutes)?

Solution:

Formula for calculating memory size A= F* T* I:
(recording time in seconds) * (sound card capacity in bytes) * (sampling frequency). 16 bits -2 bytes.
1) 1s x 2 x 44032 Hz = 88064 bytes (1 second stereo CD recording)
2) 60s x 2 x 44032 Hz = 5283840 bytes (1 minute of stereo CD recording)
3) 4800s x 2 x 44032 Hz = byte = 412800 KB = 403.125 MB (80 minutes)

Answer: 88064 bytes (1 second), 5283840 bytes (1 minute), 403.125 MB (80 minutes)

Training objectives:

1) Single-channel (mono) sound recording is performed with a sampling frequency of 22 kHz and a coding depth of 16 bits. The recording lasts 2 minutes, its results are written to a file, data compression is not performed. Which of the following numbers is closest to the size of the resulting file, expressed in megabytes?

2) Two-channel (stereo) sound recording is performed with a sampling frequency of 48 kHz and a coding depth of 24 bits. The recording lasts 1 minute, its results are written to a file, data compression is not performed. Which of the following numbers is closest to the size of the resulting file, expressed in megabytes?

3) Single-channel (mono) sound recording was carried out with a sampling frequency of 16 kHz and 24-bit resolution. The result was a 3 MB file; no data compression was performed. Which of the following values ​​is closest to the time during which the recording was made?

1) 30 sexsecsec

4) Single-channel (mono) sound recording is performed with a sampling frequency of 128 Hz. 64 sampling levels were used during recording. The recording lasts 6 minutes 24 seconds, its results are written to a file, and each signal is encoded with the minimum possible and the same number of bits. Which of the numbers below is closest to the size of the resulting file, expressed in kilobytes?

5) Two-channel (stereo) sound recording is performed with a sampling frequency of 16 kHz and a coding depth of 32 bits. The recording lasts 12 minutes, its results are written to a file, and no data compression is performed. Which of the following numbers is closest to the size of the resulting file, expressed in megabytes?

Sections: Computer science

Target:. introduce students to the method of encoding text information in a computer.

Equipment:

  1. Students' workstation PC and theoretical table.
  2. Teacher's workplace
  3. Multimedia equipment
  4. Presentation (Appendix 1)
  5. Electronic cards
  6. Worksheets

During the classes

It is suggested that you start greeting the class by using the example of “brick language” from children’s games “ Hello guys, SIRESIBYASITA" (hello guys).

What do you think I said?

As a child, we really loved to play this game, so that we would not be understood, we inserted the preposition si before the syllable.

So what did I tell you? Sizdravsistvuysite siresibyasita.

Well done.

Let's watch a cartoon (fragment from the cartoon Moomintrol).

Do you think anyone understood what Tosla and Wisla were talking about?

And why we didn’t understand them is because we don’t know what language they speak or how they classified their information.

In fact, if we listen carefully, we will understand that Tosla and Wisla speak our language, they only add slur to each word in order to classify their conversation.

Just with the advent of the first secret information, people began to encrypt text. One of the first such secret information was the correspondence of Julius Caesar with his senators.

Therefore, today in class we will get acquainted with the topic “Coding text information”, write down the topic in the worksheets (Appendix 2).

Here are several text encoding techniques that were invented at various stages of the development of human thought.

Cryptography- this is secret writing, a system of changing writing in order to make the text incomprehensible to unenlightened people.

Morse code or an uneven telegraph code in which each letter or symbol is represented by its own combination of dots and dashes.

Signature gestures– sign language used by people with hearing impairments.

What examples of encoding text information can you give?

One of the earliest known coding methods is named after the Roman emperor Julius Caesar (1st century BC). This method is based on replacing each letter of the encoded text with another, by shifting the alphabet from the original letter by a fixed number of characters, and the alphabet is read in a circle, that is, after the letter I is being considered A.

So the word BYTE when shifted two characters to the right, a word is encoded GVLF. Let's try to decode a phrase if we know that it was encoded when moving 1 letter to the right.

Decipher the phrase " Lpnreyaus epmzyo sbvpubue, fshyooily epmzyo efnbue» Use the letters of the Russian alphabet located on the slide and on your worksheets as support.

What did you get? ( The computer must work, students must think)

Well done.

Guys, does anyone know how text is encoded on our computer?

That's right, the computer uses binary coding of text information (write it down in your worksheet).

Traditionally, 1 byte of information is used to encode one character in a computer. (write it down on the sheets).

How many different characters can be encoded?

Is this enough to represent text information, including uppercase and lowercase letters of the Russian and Latin alphabet, numbers and other symbols?

To accurately answer this question, we need to count the lowercase and uppercase letters of the Russian alphabet, as well as numbers for the English alphabet.

Record the results on your worksheet.

  1. How many characters did we get?
  2. What conclusion can be drawn?

The remaining values ​​are used to indicate punctuation marks, arithmetic marks, and service operations (line feed, space, etc.). Therefore, 1 byte is enough for us to encode text information.

In a computer, each character is encoded with a unique code. An international agreement has been adopted to assign each character its own unique code. The ASCII (American Standard Code for Information Interchange) code table has been adopted as an international standard. Write down the name of the code table on your sheets. This table presents codes from 0 to 127, which includes from 0 to 32 function keys, from 33 to 127 - the English alphabet, symbols of mathematical operations, and service symbols. Mark it on your sheets

Codes 128 to 255 are allocated to the national standards of each country. This is sufficient for most developed countries. In our encodings, what will be encoded using codes 128 to 255

Several different code table standards have been introduced for Russia (codes 128 to 255).

Here are some of them. Let's look at them and write down their names: KOI8-P, SR1251, SR866, Mas, ISO.

Chronologically, one of the first standards for encoding Russian letters on a computer was KOI8 (“8-bit information exchange code”), this encoding was used in the 70s of the last century on computers of the EC series of computers.

The most common encoding currently used is Microsoft Windows, abbreviated CP1251 (Code page).

From the beginning of the 90s, during the dominance of the MS DOS operating system, the CP886 encoding remains.

Also, Apple computers running their Mac OS operating system use their own Mac encoding.

In addition, the International Standards Organization (ISO) approved another encoding called ISO 8859 as a standard for the Russian language.

Let's look at an example of encoding text in various encoding tables, using the worksheets as reference

Let's encode the word “Bit” using two code tables

Well done, now we immediately see that if the text is written in one encoding, then it is not possible to read it in another encoding.

Now we will do eye exercises before we begin practical work on the topic of “coding text information.”

You will need to complete 3 tasks:

  1. In the first task, we will decode a word using a word processor.
  2. In the second task, you will do it in pairs, but everyone works at their own computer. You will encode the concept that is given to you, and as a result we should get a phrase.
  3. In the third task, you need to count the number of characters and use the Notepad text editor to find out how much a given phrase weighs.

If you have questions about practical work?

Sit down at the computers according to the numbers of your sheets and read the task carefully.

Open the word processor MS Word.

In the first task, you need to hold down ALT and dial numbers on the additional keyboard to decode the word that is on your pieces of paper.

146 165 138 145 146

Close the file without saving.

You continue further work in pairs, but each at his own computer.

You open cards with numbers ( Appendix 3, Appendix 4, Appendix 5), which are indicated on your sheets and one of the pair encodes information according to the table koi8, and the second according to cp1251 and after that write the result in the sheet.

Code numbers are written without spaces.

Pay attention to lowercase and uppercase letters.

In the following task we perform it in notepad:

Since each character is encoded by 1 byte, the information volume of the text can be found by multiplying the number of characters in the text by 1 byte.

Now you retype the expression that was given to you on the sheets, count the number of characters, taking into account all the punctuation marks and the space.

Let's check this in practice. Create a text document in Notepad and type the phrase “A computer program does what you tell it to do, not what you want it to do.”

How many characters does it have?

Answer: 105

Save and close the file. Determine its size in bytes. What is he like?

Answer: 105 bytes.

They move to the tables and begin to check what you got.

What word did you get right in the first task?

Well done.

Name the phrases you have in mind.

What were the difficulties in completing this task?

What were the main mistakes you made?

In the last task, you counted the number of characters in the statement “A computer program does what you told it to do, not what you wanted it to do.”

How much did you get?

After that, we checked what information volume the file with this statement contains, what is the volume?

And, I would like to sum up the practical work by saying that the computer program does what you ordered, and not what you wanted it to do.

There are approximately 6,800 different languages ​​in the world. If you read text printed in Japan on a computer in Russia or the USA, you will not be able to understand it. So that the letters of any country could be read on any computer, two bytes (16 bits) => 65536 were used to encode them.

This encoding is called Unicode and is designated UCS-2. This code includes all the existing alphabets of the world, as well as many mathematical, musical, chemical symbols and much more. There is also a UCS-4 encoding, where 4 bytes are used for encoding, that is, more than 4 billion characters can be encoded.

At the end of our lesson, let's answer the questions and decode the last phrase ourselves:

  1. What principle of encoding text information is used in a computer?
  2. What is the name of the international character encoding table?
  3. List the names of encoding tables for Russian characters.
  4. In what number system are the codes in the encoding tables you listed?
  5. Decipher the phrase yourself using the Unicode table.

193 235 224 227 238 228 224 240 254 194 209 197 213 231 224 226 237 232 236 224.

Lesson topic: "Coding of text information".

Item: Computer Science and ICT.

Class: 8

Teacher: Strokach Natalya Petrovna

Lesson outline

Equipment : computer, multimedia projector, blackboard, student workstations (personal computers), textbook “Informatics and ICT. 9th grade" N.D. Ugrinovich.

Lesson type : combined.

Forms of work : frontal, collective, individual.

Material for the lesson: presentation, code tables (ASCII, 5 code tables of the Russian language:Windows, ISO, Mac, MS- DOS, KOI-8), sheets with practical work assignments.

Lesson objectives:

Educational:

    Introduce the concepts of textual information;

    to form in students an idea of ​​how text information is encoded in computer memory;

    Learn to determine a character code and a character by code using code tables and a text editor. Learn to encode and recode text information.

Educational:

    Development of logical thinking, attention, memory;

    Development of sustainable cognitive interest among students;

Educational:

    Formation of interest in the subject, formation of a worldview;

    Fostering a culture of behavior in the classroom and listening skills.

Requirements for knowledge and skills:

Students should know:

    The principle of encoding text information;

    ASCII encoding table structure.

Students should be able to:

    Encode and decode characters using a code table;

Lesson plan:

    Organizing time (3 min)

    Updating knowledge

    Learning new material - read the presentation (15 min)

    Fixing the material. Completing tasks (17 min)

    Testing, grading, homework (5 min)

During the classes:

    Organizing time.

    Statement of a cognitive task

Question:

    What types of information can a computer process? (numeric, graphic, text, audio, video)

Question:

    In what form is information presented in computer memory? (in binary)

Question:

    How is graphic information converted from analog to discrete? (by spatial sampling, the image is divided into pixels)

Question:

    How is sound converted to digital form? (using time sampling)

Question:

    What information do you think a person most often processes using a computer?

Currently, most of the personal computers in the world (both in number and in time) are busy processing text information.(slide 1,2)

3. Message of the topic, conveying the objectives of the lesson

Today the topic of our lesson is: “Coding text information”(slide 3,4).

Purpose of the lesson (slide 5)

    Get acquainted with the concepts of coding text information, code table.

    Learn to determine a character code and a character by code using text editors.

4.Introduction of new knowledge.

Question:

    How many characters are needed to encode text information?

Let's use the "estimation" method. To do this, we need to remember what symbols we use in writing.

33*2(uppercase and lowercase) + 10(numbers) + 10(punctuation) = 86 characters.

    Question:

Are all texts in Russian? What characters should I add to my keyboard?

For the English alphabet 26 + 26 = 52;

It turns out that 127 characters are needed. There are still 129 values ​​left that can be used to indicate punctuation marks, arithmetic marks, service operations (line feed, space, etc.).

The set of all symbols with which text is written is called the alphabet. (Slide 6)

The number of characters in an alphabet is called its cardinality. (slide7)

So, there are 256 characters on the keyboard. The computer must be able to recognize all of these characters and convert them into binary code.(slide 8)

    Question:

How does a computer differentiate between characters?

The computer distinguishes symbols by a combination of electrical impulses - the binary code of the symbol

How many bits of information can be encoded for 1 character if there are 256 such characters?

Let's remember the formulaN=2 i . (slide 9)

256=2 8 Therefore, 1 character is encoded in 8 bits or 1 byte.(slides 10,11,12).

The binary code of each character can be written as a decimal number.

    )Question:

Can you tell which words are coded by the numbers on the board?(slide 13)

65; 112; 112; 108; 101

200; 216; 228; 224

Question: What is needed to be able to decode these words? (Tables for translation)

Take the table from the edge of the table and tell me what the first word you came up with (Apple)

What's the second word? A problematic situation has arisen - tables with codes greater than 127, five. And according to different code tables, different words are obtained. (Code – according to ISO table)

Code table – a table in which the correspondence between numeric codes and symbols is established. (Slide No. 14)

There is an internationally accepted code table called ASCII (American Standard Code for Information Interchange). (Slide No. 15)

Parts of the ASCII code table:

0-32 are commands and function keys;

33-127 – international part (Latin);

128-255 – national part.

Historically, the national part of the code tables appeared inconsistently in different countries and in different operating systems. ISO and KOI-8 code tables appeared in the USSR. The MS-DOS code table was developed for the Microsoft DOS operating system, the Windows code table was developed for the Microsoft Windows operating system. The Mac codebook is used in Mac OS operating systems.

Currently there are 5 encoding tables for Russian letters (Windows, MS-DOS, KOI-8, Mac, ISO), so texts created in one encoding will not display correctly in another.

Russian encodings (Cyrillic): (Slide No. 16)

Windows

MS- DOS,

KOI-8,

Mac,

ISO.

Question: Why do you think the last character in the code table is numbered 255, and earlier it was said that there are 256 codes. (Because the numbering starts from 0.)

Sometimes it becomes necessary to use more than two languages ​​in one text document. For example, when printing text on geometry, you may need Russian symbols, Latin letters, and Greek letters. What to do in such a situation?

There are approximately 6,800 different languages ​​in the world. If you read text printed in Japan on a computer in Russia or the USA, you will not be able to understand it. So that the letters of any country can be read on any computer, inIn 1991, a new code standard was proposed, where 2 bytes of memory were allocated for each character.

The code table was called Unicode (Slide No. 17)

There are 65536 characters in the Unicode code table (Slide No. 18)

Unicode includes almost all modern scripts, including: Arabic, Armenian, Bengali, Burmese, Greek, Georgian, Devanagari, Hebrew, Cyrillic, Coptic, Khmer, Latin, Tamil, Hangul, Han (China, Japan, Korea), Cherokee, Ethiopian, Japanese (katakana, hiragana, kanji) and others.

For academic purposes, many historical scripts have been added, including: ancient Greek, Egyptian hieroglyphs, cuneiform, Mayan writing, and the Etruscan alphabet.

Unicode provides a wide range of mathematical and musical symbols and pictograms.

Notebook entry: (Slide No. 19)

Code tables:

ASCII

Unicode

Number of bytes per character

1 byte

2 bytes

Characters

256

65536

So, let's conclude: the same code in different code tables gives different characters.

5. Practical work

Remember the objectives of the lesson.

The first goal is to get acquainted with the concept of coding text information, a code table. Tell me, have we achieved this goal? (Yes )

We also set goals for ourselves, which the practical work “Coding Text Information” will help us achieve. (Slide No. 21)

What goals will we set for ourselves in practical work? (Learn to encode text information, learn to determine a character code and a character by code, using code tables and a text editor )

Practical work consists of two parts:

The first part consists of three tasks and is performed on a computer:

Read the tasks that need to be completed on the computer. What program will we use to complete these tasks? (Text editors MS Word and Notepad).

Now in front of you on the screen is a text editor window. (Slide No. 22)

We will determine the symbol code and find the symbol by code by inserting special characters (Insert → Symbols).

When selecting the required symbol, we see its numeric code in the lower right corner of the window. All symbols in the table are ordered by ascending numeric codes, so you can find a symbol with a given numeric code.

You need to write down all the results in a notebook.

Do you have questions about completing practical work? (No).

You can start completing tasks on your computers. Take notebooks and pens. Do not forget about safety rules and maintaining health when working at the computer.

Students do work on computers, the teacher observes, helps, corrects the work, and ensures correct seating at the computer.

Students who have completed the first part turn off their computers, return to their desks and complete the second part of the practical work.

The teacher monitors the work and helps if difficulties arise.

Result:

« WORD»

200 205 212 206 208 204 192 210 200 202 192- “INFORMATICS” in “Windows»

STUDENT

“Notepad”: abvgdezhiy rstufhtchshshch I want to study

The second part consists of two tasks and is completed in notebooks using code tables: (slide 23)

204 224 242 229 236 224 242 232 247 229 241 234 232 233 32 235 232 246 229 233

    Masha sent her friend Olya a letter written in Windows encoding, and Olya read it in ISO encoding. The result was a meaningless phrase: “Yayuchf№rtyўў!” Help Olya read the letter.

For those who can complete the tasks faster, the work offers an additional task: Encode the phrase “I came, I saw, I conquered” in ISO encoding.

3. Additional task

Using the Windows code table, decode the phrase:

205 229 32 246 226 229 242 251 130 224 32 226 255 237 243 242

205 229 32 235 224 228 238 248 232 130 32 224 32 232 236 232 245 235 238 239 224 254 242

205 229 32 225 229 235 252 184 130 32 224 32 232 245 32 240 224 231 226 229 248 232 226 224 254 242

205 224 32 237 232 245 32 236 238 230 237 238 32 226 229 248 224 242 252 32 235 224 239 248 243

Divide the children into 4 groups of 3 people. Give each group 1 line. When all students complete the task, their completion is checked. Each of the four options has encoded lines from the riddle.

Not flowers, but withering
Not clapping hands, but clapping them,
Not laundry, but they are hung out
You can hang noodles on them.

Students take turns reading their versions of the text. Let's guess together!

6. Lesson summary

Let's summarize the lesson.

Answer the following questions about the lesson material: (Slide No. 25)

    What is needed to encode text information on a computer? (Code table)

    What is the name of the international code table? (ASCII)

    How many Russian language encodings are there? (Five)

    For what purpose was Unicode introduced, which allows you to encode 65,536 different characters?(to encode not only Russian and Latin alphabets, numbers, signs and mathematical symbols, but also Greek, Arabic, Hebrew and other alphabets).

Let's remember the objectives of the lesson: (Slide No. 26)

    Get acquainted with the concept of coding text information, code table.

    Learn to encode and recode text information using code tables.

    Learn to determine a character code and a character by code using a text editor.

Question: Have we achieved these goals? (Yes, we reached it)

Grading for the lesson.

7. Homework

Recording homework in diaries or notebooks: (Slide No. 27)

    Textbook, pp. 49 – 52, paragraph 2.1.

    Test questions on page 52

    Tasks for independent completion No. 2.1., 2.2.

8.Reflection

Students are given an individual card in which they need to highlight phrases that characterize the student’s work in the lesson in three areas.

Lesson

I'm in class

Bottom line

1. interesting

1. worked

1. understood the material

2. boring

2. rested

2. learned more than I knew

3.don't care

3.helped others

3. didn’t understand

Encoding text information

Goal of the work: learn to identify numeric character codes, enter characters using numeric codes using encodingWindows, Unicode(Unicode).

Work order:

Exercise 1.

Determining the numeric code of a character using a text editor Word .

    Launch a text editorWordcommand [Programs/MicrosoftWord]

    Enter the command [insert/symbol]. A dialog box will appear on the screenSymbol . To determine the numeric code of a character in the encodingWindows from: select encoding typeCyrillic (dec.).

    Sign code: The decimal numeric code of the character will appear (in this case 192).

    To determine the hexadecimal numeric code of a character in the encodingUnicodeusing dropdown listfrom: select encoding type Unicode (hex)

    In the symbol table, select a symbol (for example, the capital letter “A”). In a text fieldSign code: The hexadecimal numeric code of the character will appear (in this case 0410).

Task2.

Entering a character using numeric codes in the Notepad text editor

    Launch the standard Notepad application with the command [Programs/Accessories/Notepad]

    Alt) enter the number 0224, release the key (Alt), the symbol “a” will appear in the document. Repeat the procedure for numeric codes from 0225 to 0233, a sequence of 12 characters “abvgdezhy” will appear in the documentin encoding Windows .

    Using the optional numeric keypad while pressing (Alt) enter the number 224, the symbol “p” will appear in the document. Repeat the procedure for numeric codes from 225 to 233, a sequence of 12 characters “rstufhtchshshch” will appear in the documentin encoding MS - DOS

Task 3:

    Using encodingWindowsMicrosoftWordencode the wordCOMPUTER SCIENCE

    Using encodingUnicodelocated in a text editorMicrosoftWorddecode the word0423 0427 0415 041 D 0418 041A

    Using encodingWindows, located in the Notepad application, decode the sentence:

0255 0032 0245 0238 0247 0243 0032 0243 0247 0232 0242 0252 0241 0255

Lesson #13

Lesson topic: “Coding of text information.”

Lesson type: Educational.

Lesson objectives:

Introduce students to ways of encoding information in a computer;

Consider examples of problem solving;

To promote the development of students' cognitive interests.

Cultivate endurance and patience in work, feelings of camaraderie and mutual understanding.

Lesson objectives:

To form students’ knowledge on the topic “Coding text (symbolic) information”;

To promote the formation of imaginative thinking in schoolchildren;

Develop skills of analysis and self-analysis;

Develop the ability to plan your activities.

Equipment:

student workplaces (personal computer),

teacher's workplace,

interactive board,

multimedia projector,

multimedia presentation,

During the classes

I. Organizational moment.

On the interactive whiteboard is the first slide of a multimedia presentation with the topic of the lesson.

Teacher: Hello guys. Sit down. Duty officer, report those absent. (Report of the duty officer). Thank you.

II. Working on the topic of the lesson.

1. Explanation of new material.

The explanation of new material takes place in the form of a heuristic conversation with the simultaneous display of a multimedia presentation on the interactive board(Annex 1).

Teacher: What information coding did we study in previous lessons?

Answer : Coding of graphic and multimedia information.

Teacher : Let's move on to studying new material. Write down the topic of the lesson “Coding text information” (slide1). Issues under consideration (slide 2):

Historical excursion;

Binary coding of text information;

Calculation of the amount of text information.

Historical excursion

Humanity has been using text encryption (encoding) since the very moment when the first secret information appeared. Here are several text encoding techniques that were invented at various stages of the development of human thought (slide 3) :

Cryptography - this is secret writing, a system of changing writing in order to make the text incomprehensible to the uninitiated;

Morse code or an uneven telegraph code, in which each letter or sign is represented by its own combination of short elementary bursts of electric current (dots) and elementary bursts of triple duration (dash);

Signature gestures - sign language used by people with hearing impairments.

Question : What other examples of encoding text information can be given?

Students give examples (road signs, electrical diagrams, product barcode).

Teacher: (Show slide4). One of the earliest known encryption methods is named after the Roman emperor Julius Caesar (1st century BC). This method is based on replacing each letter of the encrypted text with another, by shifting the alphabet from the original letter by a fixed number of characters, and the alphabet is read in a circle, that is, after the letter I is being considered A . So the word is byte when shifted two characters to the right, it is encoded as a word gwlf . The reverse process of deciphering a given word - it is necessary to replace each encrypted letter with the second one to the left of it.

(Show slide 5) Decipher the phrase of the Persian poet Jalaluddin Rumi “kgnusm yoogkg fesl ttsfhya fzuzhschz fhgrzkh yoogksp”, encoded using the Caesar cipher. It is known that each letter of the source text is replaced by the third letter after it. Use the letters of the Russian alphabet located on the slide as support.

Question : What did you get?

Student response:

Close your eyes and let your heart become your eye

The answer is compared with the correct answer that appears on slide 5.

Binary coding of text information

Information expressed using natural and formal languages ​​in written form is calledtext information (slide 6).

How much information is needed to encode each character can be calculated using the formula: N = 2 I.

Question : Which of the following coding techniques uses the binary principle of encoding information?

Student answer: In Morse code.

Teacher : The computer also uses the principle of binary coding of information. Only instead of a dot and a dash they use 0 and 1 (slide 7) .

Traditionally, 1 byte of information is used to encode one character.

Question : How many different characters can be encoded? (remember that 1 byte=8 bits)

Student answer: N = 2 I = 2 8 = 256.

Teacher : Right. Is this enough to represent text information, including uppercase and lowercase letters of the Russian and Latin alphabet, numbers and other symbols?

Children count the number of different symbols:

33 lowercase letters of the Russian alphabet + 33 uppercase letters = 66;

For the English alphabet 26 + 26 = 52;

Numbers from 0 to 9, etc.

Teacher: What is your conclusion?

Student output : It turns out that 127 characters are needed. There are still 129 values ​​left that can be used to indicate punctuation marks, arithmetic signs, service operations (line feed, space, etc.). Therefore, one byte is enough to encode the necessary characters for encoding text information.

Teacher : In a computer, each character is encoded with a unique code.

An international agreement has been adopted to assign each character its own unique code. The ASCII (American Standard Code for Information Interchange) code table has been adopted as an international standard (slide 8).

This table presents codes from 0 to 127 (letters of the English alphabet, symbols of mathematical operations, service symbols, etc.), and codes from 0 to 32 are assigned not to symbols, but to function keys. Write down the name of this code table and the range of characters to be encoded.

Codes 128 to 255 are allocated to the national standards of each country. This is sufficient for most developed countries.

Several different code table standards have been introduced for Russia (codes 128 to 255).

Here are some of them (slide9-10). Let's look at and write down their names:

KOI8-R, SR1251, SR866, Mas, ISO.

Open the computer science workshop on pages 65-66 and read about these coding tables.

Teacher : In the text editor MS Word, in order to display a character on the screen by its code number, you must hold down the “ALT” key on the keyboard and type the character code on the additional numeric keypad (slide 11):

Unicode concept

Solution : This phrase has 108 characters, including punctuation, quotation marks and spaces. We multiply this number by 8 bits. We get 108*8=864 bits.

Teacher : Consider task No. 2. (The condition is displayed on the interactive board).<Рисунок 3> Write down her condition: The Canon LBP laser printer prints at an average speed of 6.3 Kbps. How long will it take to print an 8-page document, if you know that on average there are 45 lines on one page, 70 characters per line (1 character - 1 byte) (see Fig. 2).

Solution:

1) Find the amount of information contained on 1 page:

45 * 70 * 8 bits = 25200 bits

2) Find the amount of information on 8 pages:

25200 * 8 = 201600 bits

3) We reduce to common units of measurement. To do this, convert Kbits into bits:

6.3*1024=6451.2 bits/sec.

4) Find the printing time: 201600: 6451.2 = 31.25 seconds.

III. Generalization

Teacher Questions (slide 14):

1. What principle of encoding text information is used in a computer?

2. What is the name of the international character encoding table?

3. List the names of encoding tables for Russian characters.

4. In what number system are the codes presented in the encoding tables you listed?

We coded characters, sound and graphics. Is it possible to encode emotions?

Slide shown 14.

IV. Lesson summary. Homework

§ 2.1, task 2.1, notes in notebooks.


Lesson outline

Item: Computer science.

Class: 10

Lesson topic:“Coding of text (character) information.”

Lesson type: Educational.

Lesson objectives:


  • Introduce students to ways of encoding information in a computer;

  • Consider examples of problem solving;

  • To promote the development of students' cognitive interests.

  • Cultivate endurance and patience in work, feelings of camaraderie and mutual understanding.
Lesson objectives:

  • To form students’ knowledge on the topic “Coding text (symbolic) information”;

  • To promote the formation of imaginative thinking in schoolchildren;

  • Develop skills of analysis and self-analysis;

  • Develop the ability to plan your activities.
Equipment:

  • student workplaces (personal computer),

  • teacher's workplace,

  • interactive board,

  • workshop on computer science and information technology (authors: N. Ugrinovich, L. Bosova, I. Mikhailova),

  • multimedia projector,

  • multimedia presentation,

  • electronic cards zadachi.htm, kart_1(2,3).exe.
During the classes

I. Organizational moment.

On the interactive whiteboard is the first slide of a multimedia presentation with the topic of the lesson.

Teacher: Hello guys. Sit down. Duty officer, report those absent. (Report of the duty officer). Thank you.

II. Working on the topic of the lesson.

1. Explanation of new material.

The explanation of new material takes place in the form of a heuristic conversation with the simultaneous display of a multimedia presentation on the interactive board (Annex 1).

Teacher: What information coding did we study in previous lessons?

Answer: Encoding numerical information and representing numbers in a computer.

Teacher: Let's move on to studying new material. Write down the topic of the lesson “Coding text information” ( slide 1). Issues under consideration ( slide 2):

Historical excursion;

Binary coding of text information;

Calculation of the amount of text information.

Historical excursion

Humanity has been using text encryption (encoding) since the very moment when the first secret information appeared. Here are several text encoding techniques that were invented at various stages of the development of human thought ( slide 3) :

- cryptography- this is secret writing, a system of changing writing in order to make the text incomprehensible to the uninitiated;

- Morse code or an uneven telegraph code, in which each letter or sign is represented by its own combination of short elementary bursts of electric current (dots) and elementary bursts of triple duration (dash);

- sign gestures– sign language used by people with hearing impairments.

Question: What other examples of encoding text information can be given?

Students give examples.

Traditionally, 1 byte of information is used to encode one character.

Question: How many different characters can be encoded?

Student response: N = 2 I = 2 8 = 256.

Teacher: Right. Is this enough to represent text information, including uppercase and lowercase letters of the Russian and Latin alphabet, numbers and other symbols?

Children count the number of different symbols:

33 lowercase letters of the Russian alphabet + 33 uppercase letters = 66;

For the English alphabet 26 + 26 = 52;

Numbers from 0 to 9, etc.

Teacher: What is your conclusion?

Student output: It turns out that 127 characters are needed. There are still 129 values ​​left that can be used to indicate punctuation marks, arithmetic signs, service operations (line feed, space, etc.). Therefore, one byte is enough to encode the necessary characters for encoding text information.

Teacher: In a computer, each character is encoded with a unique code.

An international agreement has been adopted to assign each character its own unique code. The ASCII (American Standard Code for Information Interchange) code table has been adopted as an international standard ( slide 7).

This table presents codes from 0 to 127 (letters of the English alphabet, symbols of mathematical operations, service symbols, etc.), and codes from 0 to 32 are assigned not to symbols, but to function keys. Write down the name of this code table and the range of characters to be encoded.

Codes 128 to 255 are allocated to the national standards of each country. This is sufficient for most developed countries.

Several different code table standards have been introduced for Russia (codes 128 to 255).

What word did you receive?

Answer: bit.

Teacher: Close the file without saving.

Unicode concept

SR1251: 208 232 236

KOI8-R:242 201 205

Using an engineering calculator, let's convert sequences of codes from the decimal number system to hexadecimal. We get:

CP1251: D0 E8 EC

KOI8-R: F2 C9 CD

(Switch to presentation viewing mode).

Work in pairs. (The class is divided into pairs).

Teacher: Let's encode the words offered to you on the cards using the same encoding tables.

Read the task on the slide carefully ( slide 13).

Exercise: All concepts are used in computer science or related to it. Define these concepts and code them using tables KOI8-R or CP1251. Using an engineering calculator, convert sequences of codes from the decimal number system to hexadecimal. Enter the resulting hexadecimal code without spaces in the appropriate input field. Click the Check button and make sure your solution is correct. Write concepts in capital letters, except for geographical names.


Card 1

Card 2

Card 3

What concepts do the comments below correspond to?

1. Both in the student’s diary and in the bath database table.

2. Both medical and in a computer program.


The listed geographical names are used in concepts used in computer science or are associated with them.

1. State whose capital is Cairo

2. A city in Uzbekistan, the name of which is associated with the concept of “algorithm”


Terms corresponding to the definitions are also used in the context of the design and operation of a car.

1. Part of internal combustion engine

2. Device in a car for purifying fuel


Answers

record

procedure


Egypt (Egyptian triangle)

Khorezm (algorithm from the name of the Central Asian mathematician al-Khorezmi)


cylinder (a set of tracks with the same number on magnetic disks)

filter (condition by which records are selected in the database)


Codes

record

SR1251: 231 224 239 232 241 252

E7 E0 EF E8 F1 FC


Egypt

197 227 232 239 229 242

C5 E3 E8 EF E5 F2


cylinder

246 232 235 232 237 228 240

F6 E8 EB E8 ED E4 F0


procedure

208 210 207 195 197 196 213 210 193

D0 D2 СF C3 C5 C4 D5 D2 C1


Khorezm

232 207 210 197 218 205

E8 CF D2 C5 DA CD


filter

198 201 204 216 212 210

C6 C9 CC D8 D4 D2


Students open cards according to the number given by the teacher for each pair of students. ( Appendix 2 , Appendix 3 , Appendix 4)

(When preparing electronic cards, you should take into account the level of difficulty for different groups of students.)

Teacher: Name the intended terms or concepts. Who got the correct code? Who didn't succeed? What is your mistake, do you think?

Students answer questions in the form of a discussion.

(Transition to the interactive mode of the board).

Teacher: Now we move on to solving problems on the amount of text information and quantities associated with determining the amount of text information.

Write down the condition of task No. 1. (On the interactive whiteboard - the condition of task No. 1.) Assuming that each character is encoded in one byte, estimate the information volume of the following sentence:

My uncle had the most honest rules, When he was seriously ill, He forced him to respect himself And couldn’t think of anything better.”

Solution: This phrase has 108 characters, including punctuation, quotation marks and spaces. We multiply this number by 8 bits. We get 108*8=864 bits. Are there any questions about the solution?

Students ask questions if they arise.

The teacher answers questions or one student answers another’s question.

Teacher: Consider task No. 2. (The condition is displayed on the interactive board). Write down her condition: The Canon LBP laser printer prints at an average speed of 6.3 Kbps. How long will it take to print an 8-page document, if you know that on average there are 45 lines on one page and 70 characters per line (1 character - 1 byte) (see Fig. 2).

Solution:

1) Find the amount of information contained on 1 page:

45 * 70 * 8 bits = 25200 bits

2) Find the amount of information on 8 pages:

25200 * 8 = 201600 bits

3) We reduce to common units of measurement. To do this, we convert Mbits into bits:

6.3*1024=6451.2 bits/sec.

4) Find the printing time: 201600: 6451.2? 31 seconds.

Your questions.

Students ask questions if they arise.

The teacher answers questions or one student answers another's question.

Teacher: Now let’s solve problems on electronic cards. Open the file zadachi.htm. (Appendix 5)(The teacher calls the card number for each student. One student solves problems at the board). Solve the problems and write the answer in the appropriate input field.

During the task, the teacher checks the students' answers.

III. Generalization

1. What principle of encoding text information is used in a computer?

2. What is the name of the international character encoding table?

3. List the names of encoding tables for Russian characters.

4. In what number system are the codes presented in the encoding tables you listed?

IV. Homework

(Slide 15) According to Ugrinovich’s textbook § 2.10, workshop on computer science and information technology § 2.7, tasks for independent completion 2.58-2.63 (for students with weak motivation to learn) (2.58-2.66 for other students).

The teacher sums up the lesson and gives grades.

Goodbye, thanks for the lesson.