Contacts

Development of a lesson and a presentation on the "Coding of Text Information". Open lesson on computer science and ICT on the topic "Coding of text information" Abstract lesson Binary coding of textual information

Abstract lesson in computer science and ICT 8 class

Lesson Topic: Coding Text Information

Type of lesson : Studying new material and primary consolidation.

Objectives lesson:

Introduce students with ways to encode information in the computer;

Consider examples of solving problems;

Promote the development of educational interests of students.

Educate exposure and patience in the work, sense of partnership and mutual understanding.

Tasks lesson:

To form knowledge of students on the topic "Coding of text (symbolic) information";

Facilitate the formation of schoolchildren of figurative thinking;

Develop an analysis and self-analysis skills;

Forming the ability to plan your activities.

Equipment:

student jobs (personal computer),

teacher's workplace,

interactive board,

multimedia projector,

multimedia presentation

Structure lesson

Bibliography:

1. Informatics and ICT. Basic course. Tutorial for grade 8. / N. Ugrinovich. - M. Binin. Laboratory of Knowledge, 20010.

2. Workshop on computer science and information technology. Tutorial for general education institutions / ND. Ugrinovich, L.L. Bosova, N.I. Mikhailova. - 3rd ed. - M. Binin. Laboratory of Knowledge, 2010.

3. Dictionary of Russian proverbs and sayings. - M.: Terra, 1997

4. The simplest methods of text encryption / D.M. Zlatopolsky. - M.: Clean ponds, 2007

5. Texts of demonstration tests on computer science and according to the materials of EGE 2009-2011.

During the classes

Organizing time.

On an interactive whiteboard, the first slide of the multimedia presentation with the lesson.

Teacher: Hello guys. Sit down. On duty, report missing. (Report on duty). Thank you.

II. Work on the lesson.

1. Explanation of the new material.

The explanation of the new material is in the form of a heuristic conversation with a simultaneous display of the multimedia presentation on an interactive board (Appendix 1).

Teacher : When studying the topic "Information and Information Processes", we told that in the processes of perception, transmission and storage of information by living organisms, humans and technical devices, it is encoding using a sign system. Recall what is the result of encoding information?

Answer: The encoding result is the sequence of symbols of this character system.

Teacher: Give examples of codes.

Answer: The sequence of letters in the text, numbers among the genetic code, binary computer code, etc.

Teacher: Today, we will get to know the class with the methods of coding text information in the computer. Record the topic "Coding of Text Information" lesson (slide 1). At the lesson, consider the following questions (Slide 2):

Historical excursion;

Binary coding of textual information;

Calculation of the number of textual information.

Historical excursion

Humanity uses the encryption (encoding) of the text from the very moment when the first secret information appeared. Before you several techniques for coding text, which were invented at various stages of the development of human thought (Slide 3):

Cryptography is a gradient, a letter change system in order to make the text incomprehensible to uninitiated persons;

Morse Alphabet or an uneven telegraph code in which each letter or sign is represented by its combination of short elementary electrical parcels (points) and elementary parcels of the tripled duration (dash);

Slurgoes - gesture language used by people with hearing impairment.

Question: What examples of coding text information can be brought more?

Students lead examples.

Teacher: (Slide 4). One of the very first known methods of encryption is the name of the Roman emperor Julia Caesar (I century BC). This method is based on the replacement of each letter of the encrypted text, to another, by displacement in the alphabet from the original letter to the fixed number of characters, and the alphabet is read in a circle, that is, after the letter I am considered a. So the word byte when displaced two characters to the right is encoded by the word GVF. The reverse process of decryption of this word - it is necessary to replace each encrypted letter, to the second to the left of it.

(Slide 5) decrypt the phrase of the Persian poet by Jalaleddine Rumi "KNUSM YOGKG FESL TCFHY FVSEZHD FHGRZH YOGKSP", coded with Caesar cipher. It is known that each letter of the source text is replaced by the third after it. As a support, use the letters of the Russian alphabet located on the slide.

Question: What did you do?

Answer: Close your eyes your eyes will be the eye.

Teacher: Well done! Properly coped with the task.

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

Binary coding of text information

Teacher: In which of the listed coding techniques is used binary principle of information coding?

Answer: In the alphabet of Morse.

Teacher: The computer also use the principle of binary coding of information. Only instead of a point and dash use 0 and 1 (slide 6). Traditionally, 1 byte of information is used to encode one symbol. The user presses a keyboard with a sign on the keyboard, and a certain sequence of eight electrical pulses arrives to the computer (0-no signal, 1-signal). This is a binary sign code that is stored in the computer's RAM, where it takes one cell. During the output of the sign on the computer screen, reverse transcoding is performed.

Question: How many different characters can be encoded?

Answer: N \u003d 2 i \u003d 2 8 \u003d 256.

Teacher: Right. Is it enough for the presentation of textual information, including the uppercase and lower case letters of the Russian and Latin alphabet, numbers and other characters?

Children count the number of different characters:

33 The lower case letters of the Russian alphabet + 33 Capital letters \u003d 66;

For the English alphabet 26 + 26 \u003d 52;

Figures from 0 to 9, etc.

Teacher: Your conclusion?

In the side of students: It turns out that 127 characters need. There are still 129 values \u200b\u200bthat can be used to designate punctuation marks, arithmetic signs, service operations (translation of the string, space, etc. Consequently, one byte is enough to encode the necessary characters to encode text information.

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

An international agreement is adopted to assign each symbol of its unique code. As an international standard, the ASCII code table is adopted (American Standard Code for Information Interchange) (Slide 7).

This table presents codes from 0 to 127 (the letters of the English alphabet, signs of mathematical operations, service from the insoles, etc.), and the codes from 0 to 32 are not set as symbols, but the function keys. Record the name of this code table and the range of encoded characters.

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

For Russia, several different code table standards were introduced (codes from 128 to 255).

Here are some of them (slide 8-9). Consider and write their names:

Koi8-R, CP1251, CP866, MAS, ISO.

Open computer science workshop on page 65-66 and read about these encoding tables.

Teacher: specifies questions on the read material:

What standard was applied first to encoding Russian-speaking letters?

What kind of encoding standard is the most common now?

What does the combination of letters "Wed" mean in the encodings of CP1251, CP866?

Pupils are responsible for questions.

Teacher : In the MS WORD text editor, in order to display a symbol on its code on its screen, you must hold the "Alt" key on the keyboard to type the character code on the additional digital keyboard.

Run the MS Word text editor. Hold down the "Alt" key, type codes on an additional digital keyboard (slide 10):

What word got?

Answer: bit.

Teacher: Close the file without saving.

The concept of Enicode encoding.

(Slide 11) There are approximately 6,800 different languages \u200b\u200bin the world. If you read the text printed in Japan on a computer in Russia or the United States, it will be impossible to understand it. In order for the letters of any country to read on any computer, two bytes (16 bits) began to use them for their encoding. This is an international standard text symbol coding standard. Unicode..

Question: How many characters can be encoded with two bytes? (For weakly speaking students, you can offer them to use the engineering calculator).

Answer: N \u003d 2 i \u003d 2 16 \u003d 65536 /

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

Calculation of the number of text information

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

Check it in practice. Turn on the monitor, create a text document in the Notepad editor and type the proverb (Slide 12): "Hours - Ataman, and unacceptable - Komar." How many characters in it?

Answer: 36

Teacher : Save and close the file. Determine its volume in bytes. What is he?

Answer: 36 bytes.

Teacher : Your conclusion?

Pupils are discussing and drawing conclusions.

Fizkultminutka:Guys, now do exercises to improve cerebral circulation: 1) Sitting, hands on the belt. Once - inhabitant, put the left hand through the right shoulder, turn left to the left. Two initial position. Three, four - the same right hand. Repeat 5 times. The pace is slow.

2) Sitting on the chair. Once - head to tilt to the right. Two - initial position. Three - head tilt to the left. Four - starting position Repeat 5 times. Middle themes.

And now with new forces that restrained the second part of our topic: analysis and solution of tasks.

2. RESOLUTION AND SOLUTION OF TASKS

Transition from viewing mode Presentation on an interactive board mode.

Teacher (work at the board): Consider an example of a text encoding in various encoding tables. Open page 66 computer science and information technologies. As a reference material, we will use the presented in Fig. 2.4 and 2.5 KoO8-P and CP1251 encoding tables. (On an interactive board are placed using the drawings gallery and photo of the image of the same encoding tables). We codify the word "Rome" ( Attachment 1)

CP1251: 208 232 236

Koi8-R: 242 201 205

We translate using the engineering calculator of the sequence of codes from a decimal number system to hexadecimal. We get:

CP1251: D0 E8 EC

Koi8-p: F2 C9 CD

(Go to presentation view mode).

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

Teacher: Clean the same word encoding tables proposed to you on cards.

Read carefully task on the slide (slide 13).

The task: All concepts are used in computer science or related to it. Determine these concepts and encode them using KoO8-P or CP1251 tables. Move the codes sequence from the decimal system in hexadecimal using an engineering calculator. Entee the resulting hexadecid no spaces in the appropriate input field. Press the button. Check and make sure the solution is correct. Concepts to record capital letters, except geographical names.

Card 1.. What concepts are compliant with the comments below?

1. And in the diary of the student, and in the database table.

2. And medical and computer program.

Card 2.. The listed geographical names are used in the concepts used in computer science, or associated with them.

1. The state, the capital of which Cairo

2. The city in Uzbekistan, with the title of which the concept of "algorithm" is associated.

Card 3.. Terms corresponding to definitions are also used in the context of the device and the car's operation.

1. Part of the internal combustion engine

2. Device in the car for fuel purification

Answers

2. Procedure

3. Egypt (Egyptian triangle), Khorezm (algorithm from the name of the Central Asian Mathematics al-Khorezmi)

4. Cylinder (totality tracks with the same number on magnetic disks)

filter (condition for which entries are selected in the base of bathrooms)

Codes

Record CP1251: 231 224 239 232 241 252 E7 E0 EF E8 F1 FC

Egypt CP1251: 197 227 232 239 229 242 C5 E3 E8 EF E5 F2

Cylinder CP1251: 246 232 235 232 237 228240 F 6E 8EB E 8ED E 4F 0

COOI8-R procedure: 208 210 207 195 197 196 213 210 193

D0 D2 C3 C5 C4 D5 D2 C1

Khorezm Koi8-p: 232 207 210 197 218 205 E8 CF D2 C5 DA CD

Filter Koi8-P: 198 201 204 216 212 210 C6 C9 CC D8 D4 D2

Students open cards according to the number called the teacher for each pair of students.

Teacher: Name the intended terms or concepts. Who got the right code? Who did not work? What is your mistake, what do you think?

Students respond to questions in the form of discussion.

(Switch to interactive board operation).

Teacher: Now we go to solve problems on the number of textual information and values \u200b\u200bassociated with the determination of the number of text information.

Write down the condition tasks number 1..(On an interactive whiteboard - the condition of problem number 1.) Considering that each character is encoded by one byte, appreciate the information volume of the following sentence:

"My uncle of the most honest rules, when I am not a joke, he forced himself and could not invent it better." ( Appendix 2.)

Decision: In this phrase, 108 characters, given the punctuation marks, quotes and spaces. Multiply this amount by 8 bits. We get 108 * 8 \u003d 864 bits. Are there any questions about solving?

The teacher answers questions or one student answers the question of another.

Teacher: Consider task№ 2 . (The condition is displayed on an interactive chalkboard). Record its condition: Canon LBP laser printer prints at an average of 6.3 kbps per second. How much time will you need to print 8 page document, if it is known that on one page there are an average of 45 lines, in a string 70 characters (1 symbol - 1 byte).

Decision:

1) We find the amount of information contained on 1 page:

45 * 70 * 8 bits \u003d 25200 bits

2) We find the amount of information on 8 pages:

25200 * 8 \u003d 201600 Bit

3) lead to single units of measurement. For this Mbity we translate into bits:

6.3 * 1024 \u003d 6451.2 bits / s.

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

(Appendix 3.)

Your questions.

Students ask questions if they arise.

The teacher first asks to answer the question of another student, if there is no answer, he answers himself.

Teacher: Alone solve electronic tasks. To do this, open the "Tasks 8" folder in the "Informatics" folder - "coding" computer will rate your answers and give the correct answer.

Task 1.Considering that each character is encoded by two bytes, rate the information volume of the following sentence in Unicode encoding:

One powder - about 16.4 kilograms

Enter the answer here: _________

Task 2.In 45 seconds, the text was printed. Calculate the number of pages in the text, if it is known that on average, on the page 50 page of 75 characters each, the print speed of the laser printer is 8 kbps / s., 1 symbol is 1 byte. The answer is rounded to the whole part.

Enter the answer here: __________

Transition to the presentation.

III. Generalization

Teacher Questions (Slide 14):

1. What is the principle of coding text information used in the computer?

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

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

4. In which number system are the codes in the encoding tables listed?

The guys are responsible for questions.

IV. Homework

(Slide 15) on the textbook Ugrinovich § 3.1, tasks for independent execution 3.1, 3.2. For those who want: come up with their cipher and encode any phrase. Bring to the next lesson on separate sheets.

The teacher summarizes the lesson, sets the estimates.

Goodbye, thanks for the lesson.

Attachment 1

Appendix 2.

Appendix 3.

General pedagogical analysis of educational training in physics given in grade 8

Piyaeva Olga Nikolaevna

Place of work: Municipal budgetary institution "Taraskovskaya secondary school"

Position: IT-teacher

School address: Moscow region Kashirsky district Village Taraskovo Street Komsomolskaya d.22

Class: 8.

Theme lesson:Coding text information. (First lesson on the topic "Information coding")

Type of lesson:study of new knowledge

Type of lesson:traditional using information technology

    Objectives:

Educational:

    introduce students with ways to encode information in the computer;

    consider examples of solving problems;

Developing:

    promote the development of educational interests of students.

Educational:

    educate exposure and patience in the work, sense of partnership and mutual understanding.

Tasks:

Educational:

    to form knowledge of students on the topic "Coding of Text Information";

Developing:

    develop an analysis and self-analysis skills;

    facilitate the formation of schoolchildren of figurative thinking;

Educational:

    forming the ability to plan your activities.

Equipment:

    student jobs (personal computer),

    teacher's workplace,

    multimedia projector,

Software:PC, PowerPoint program, Tables, Schemes.

Information card lesson:

p / P.

Stage lesson

Pri-

measures

time

Didactic

kaya goal

Forms and methods of work

Types of activity of students

Organizational

at birth

2 minutes

Include students in business rhythm, prepare a class to work

Oral message teacher

Mood on productive

work

nosta

Study

new

material

18 min

To form cognitive motifs. Ensure the adoption of the lesson goals. To form specific ideas about the coding of textual information.

Explanation of the new material using

presentation

Listening and memorization, answers to teacher's questions, fulfilling the task for decoding

information

Fizkultminutka

2 minutes.

Prevent the fatigue of children

Exercise exercise

Exercise exercise

Fastening the acquired knowledge

10 min.

Organize activities to apply new knowledge

Practical work

Implementation of practical

work

Primary testing of understanding

8 min

Reveal the level of primary learning new material

Frontal survey

Differentiated independent work

Answer the questions of the teacher

Perform an independent job

Homework

2 minutes.

Give information on homework and instructions for its implementation

Tailor to perform homework

Recording homework in diaries

Summing up the lesson (reflection)

3 min.

Self-analysis of students understanding the topic

Reception of an unfinished sentence

Discussion of what you learned and how worked

During the classes.

Organizing time.

Guys, I am glad to see you fully, in a good mood and hope for a fruitful lesson.

Sit down.

Now we will spend a raid readiness for the lesson:

    show diaries

    show the handles

    show textbooks

    show notebooks

Everything is ready for the lesson, we can start.

Studying a new material

Today we are proceeding with the study of the big theme "Coding and processing of textual information", and our first lesson is called "coding of textual information"
On the screen the first slide of the multimedia presentation with the lesson.

In today's lesson, we will get acquainted with the methods of text coding, which were invented by people at various stages of the development of human thought, with binary encoding of information in the computer, learn how to identify numeric characters codes, enter characters using numeric codes and transcoding the Russian-speaking text in a text editor.

The problem of information protection is worried about people a few centuries.

Codes appeared in ancient times in the form of cryptograms (which translated from Greek means "TinesOin"). Sometimes sacred Jewish texts were encrypted by replacement. Instead of the first letter of the alphabet, the last letter was written, instead of the second - the penultimate, etc. This ancient cipher was called Atbash.

Showing Slide number 2.

Before you several techniques for coding text, which were invented at various stages of the development of human thought.

- cryptography - this is a secretion, a letter change system in order to make the text incomprehensible for uninitiated persons;

- aBC Morse or an uneven telegraph code in which each letter or sign is represented by its combination of short elementary parcels of electrical current (points) and elementary parcels of the tripled duration (dash);

- sudesawned - The language of gestures used by people with hearing impairment.

Question: What examples of text information coding can be brought more?

Students lead examples . ( cipher Vizizer, replacement cipher)

Showing Slide number 3.

One of the very first known methods of encryption is the name of the Roman emperor Julia Caesar (I century BC). This method is based on the replacement of each letter of the cipher text, to another, by offset in the alphabet from the source letter to the fixed number of characters. So word byte When shifting three characters to the right is encoded by a word dGMH . The reverse process of decrypting this word - it is necessary to replace each encrypted letter, on the third to the left of it.

Slide Show No. 4

In ancient Greece (II century BC), a cipher was known, which was created using a polybia square. For encryption, a table was used, which is a square with six columns and six rows, which are numbered from 1 to 6. In each cell, such a table was recorded one letter. As a result, a couple of numbers corresponded to each letter, and encryption was reduced to replacing the letter with a pair of numbers. The first digit indicates the line number, the second is the column number. The word byte is encoded in this case: 12 11 25 42

Showing Slide number 5.

Decipher with a square of polybia the following phrase

"33 11 35 36 24 32 16 36 11 45 43 51 24 32 41 63"

Question: What did you do?

Answer students: In the examples are learning

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

Binary coding of text information in the computer

Teacher: Information expressed by natural and formal languages \u200b\u200bin writing is usually called text information.

Display Slide number 6.

For the presentation of textual information (uppercase, lowercase letters of the Russian and Latin alphabets, numbers, signs and mathematical symbols) are enough 256 different characters.

If you fold all the signs:

33 The lower case letters of the Russian alphabet + 33 Capital letters \u003d 66;

For the Latin alphabet 26 + 26 \u003d 52;

Figures from 0 to 9

it turns out that 127 characters need. There are also 129 values \u200b\u200bthat can be used to designate punctuation marks, arithmetic signs, service operations (row translating, space, etc.)

Showing Slide number 7

According to the formula N \u003d 2 i can calculate how much information is necessary to encode each sign:

N. = 2 I.  256 = 2 I.  2 8 = 2 I.I. \u003d 8 bits

To handle text information on the computer, it is necessary to present it in a binary iconic system. We have been calculated that 8 bits of information are required to encode each sign, i.e. the length of the binary sign code is eight binary signs. Each sign must be put into line with a unique binary code from the interval from 00000000 to 11111111 (in decimal code from 0 to 255).

When entering the text of the text information, its binary coding occurs. The user presses a key on the keyboard, and a specific sequence of eight electrical pulses arrives to the computer (binary sign code). During the output to the computer screen, reverse recoding is made, i.e. Transformation of binary code into its image.

Slide Show No. 8

Assigning a specific binary code sign is a question of an agreement that is fixed in the code table. An international agreement is adopted to assign each symbol of its unique code. As a International Standard adopted the ASCII code table (American Standard Code for Information Interchange - American Standard Code for Information Exchange)

This table presents codes from 0 to 127 (the letters of the English alphabet, signs of mathematical operations, service characters, etc.), and the codes from 0 to 32 are allocated not to symbols, but the function keys.

Record the name of this code table and the range of encoded characters.

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

For Russia, several different code table standards were introduced (codes from 128 to 255).

Display Slides number 9.

Here is some of them. Consider and write their names:

Koi. - 8 , Windows MS-DOS. , MAS, ISO.

There are approximately 6,800 different languages \u200b\u200bin the world. If you read the text printed in Japan on a computer in Russia or the United States, it will be impossible to understand it. In order for the letters of any country to read on any computer, two bytes (16 bits) began to use them for their encoding.

Let's, we also define the number of characters that can be encoded according to this standard:

N \u003d 2 i \u003d 2 16 \u003d 65536

this number of characters is enough to encode not only Russian and Latin alphabets, but also Greek, Arabic, Hebrew and other alphabets.

Fizkultminutka

And now I will spend a physical attachment: first I write the tip of the nose shaped on the ceiling "I like the computer science."

Fizkultminutka for eyes:

    Quickly peel, close your eyes and sit calmly, slowly counting to 5. Repeat 4-5 times.

    Pull the right hand forward. Follow the eyes without turning the heads, behind the slow movements of the index finger of the elongated hand left and right, up and down. Repeat 4-5 times.

    Look at an index finger of an elongated hand to account 1-4, then transfer the gaze into account 1-6. Repeat 4-5 times.

    At an average pace, to do 3-4 circular movements through the eyes on the right side, as much on the left side. Relaxing the eye muscles, to look into the distance to the account 1-6. Repeat 1-2 times.

Fastening the knowledge gained.

Not in vain, the Roman Basinople Fedr said: "Science - Captain, and practice - soldiers." Therefore, we now move on from theory to practice.

Open the tutorial on page 152, find a practical work number 8, read it.

Write down in the notebook the topic of practical work "Coding text information", goal: learn how to identify numeric characters codes, enter characters using numeric codes and transcoding the Russian-speaking text in a text editor.

Enable computers, and we will perform this work together.

Task number 1. In the Word text editor, identify numeric codes of several characters:

    in Windows encoding;

    in the Enicode encoding (Unicode)

    Run Word Text Editor

    enter the command (insert - symbol ...). A dialog panel appears on the screen. The central part of the dialog panel takes the table of characters.

    To determine the decimal numeric symbol code in the Windows encoding using the drop-down list from: Select the type of encoding Cyrillic (DES.).

    In the character table, select a symbol. In the text box, the sign code: a decimal symbol code will appear.

    To determine the hexadecimal numeric code in Unicode encoding using the drop-down list from: Select the Unicode encoding type (Six.).

    In the character table, select a symbol. In the text box, the sign code: a sixteen numeric symbol code will appear.

    Using an electronic calculator to translate hexadecimal numeric code into a decimal number system:

0586 16 \u003d x 10; 1254 16 \u003d x 10; 8569 16 \u003d x 10;

Task number 2. In the text editor, enter the sequence of characters in the Windows and MS - DOS encodings using numeric codes.

    1. Start the standard Notepad application command (program - standard - notepad).

      Using an optional numeric keypad while pressing the  ALT key, enter the number 0224, release the  alt  key, the "A" symbol appears in the document. Repeat the procedure for numerical codes from 0225 to 0233, a sequence of 10 characters "ABSGDJUSES" appears in the document in Windows encoding.

      Using an optional numeric keypad while pressing the  ALT key, enter the number 224, release the  ALT  key, the "P" symbol will appear in the document. Repeat the procedure for numeric codes from 225 to 233, a sequence of 10 characters "FUFFHSCHCH" appears in the MS - DOS encoding.

Primary testing of understanding

Teacher's questions

1. What is the principle of coding text information used in the computer? (When you enter the text information, it takes its binary encoding to the computer. The user presses a key on the keyboard with a sign, and a certain sequence of eight electrical pulses (binary sign code) arrives in the computer. During the output of the computer, reverse transcoding is made, i.e. Transformation of binary code into its image.)

2. What is the name of the international symbol encoding table?( ASCII.AMERICAN STANDARD CODE FOR INFORMATION INTERCHANGE - american standard the code for exchange information )

3. List the names of the encoding tables for Russian-speaking characters. (Koi - 8., MS. - DOS. , MAS, ISO. , Windows )

The teacher distributes cards with individual tasks. (Petya and Kolya write each other emails in Koi encoding - 8. Once Petya was mistaken and sent a letter to the Windows encoding. Kolya received a letter and as always read it in Koi - 8. It turned out a meaningless text, which often repeated the word *** ***. What word was in the source text of the letter?

1 option - robber (scanner)

2 Option - RBNSFSFS (memory)

3 Option - RTiofet (Printer)

4 Option - Dyulefb (diskette)

5 Option - FTELVPM (Trackball)

6 Option - NPOOFPT (Monitor)

7 Option - RTPGEUPT (processor)

8 Option - Lambchjbfkhtb (keyboard)

9 Option - NBFETYOULBS RMCFB (motherboard)

10 Option - FBLFFCHBS SUBUFFBB RTPGUUUPTB (processor clock frequency)

Homework

According to the textbook N. Ugrinovich p.3.1. p. 74 - 77

Code in Koi code - 8 your name and surname. Write down the result in the form:

    binary code

    decimal code

Additional task (on the card): Decry text using koi -8 encoding:

254 212 207 194 205 213 196 210 207 214 201 218 206 216 208 210 207 214 201 212 216, 218 206 193 212 216 206 193 196 207 194 206 207 206 197 205 193 204 207,

228 215 193 215 193 214 206 217 200 208 215 193 215 201 204 193 218 193 208 207 205 206 201 196 204 209 206 193 222 193 204 193:

244 217 204 213 222 219 197 199 207 204 207 196 193 202, 222 197 205 222 212 207 208 207 208 193 204 207 197 211 212 216,

233 204 213 222 219 197 194 213 196 216 207 196 201 206, 222 197 205 215 205 197 211 212 197 21 203 197 205 208 207 208 193 204 207.

(So \u200b\u200bthat wise life live, you needed to know quite a few,

Two important regulations of remember for starters:

You're better than hunger than that it fell

    Informatics and information technology. Tutorial for grade 8 / nd. Ugrinovich. - M. Binin. Laboratory of Knowledge, 2011. - 205 p.: Il.

    Magazine "Informatics and Education", № 4,2003, №6,2006

    Informatics 7 - 9 CL. / A.G. Kushnirenko, G.V. Lebedev, Ya.N. Zapaderman, M.: Drop, 2001. - 336 p.: Il.

Theme lesson: « Coding text information. "

Thing: Informatics and ICT.

Class: 9-10.

Keywords : informatics, text coding, information encoding.

Literature, Eor.

1. Textbook Ugrinovich N.D. Informatics and ICT Basic Course Grade 9;

Equipment : computer class, programsMicrosoft.Office.PowerPoint., Tasks to the lesson in electronic form (see Appendix).

Type of lesson : Study of a new topic.

Work forms : frontal, collective, individual.

Annotation: number of students class, subgroup.

The purpose of the lesson: Give an idea of \u200b\u200bcoding text information.

Tasks:

    Formation of the presentation of the coding of text information;

    Contribute to educationfeelingsbut Collectivism, Cleveri Listen to comrades answers;

    Development of attention and logical thinking;

    Development of interest in learning computer programs.

During the classes:

Introductory teacher's story With the help of the presentation (on ECthe wound is presented a presentation on the topic).

Since the 60s, computers have increasingly become used to handle text information and at present most of the PCs in the world are occupied by the processing of text information.

For the presentation of text information, 256 characters are enough.
According to the formulaN \u003d 2. I. , 256= 2 8 Therefore, for encoding one character, the amount of information is equal to 1 byte. (Special attention should be paid to the formula).

Coding is that each symbol is put into line with a unique binary code from 00000000 to 11111111 (or decimal code from 0 to 255).

It is important that the assignment of a specific code is a question of the agreement that is fixed by the code table.

For different types of computers, various encodings are used.

With distributionIBM.PC. International standard has become a coding tableASCII. ( American. Standart. Code. for Information Interchange. ) - American standard code for informational exchange.

The standard in this table is only the first half, i.e. Symbols with numbers from 0 (00000000) to 127 (0111111). Here includes the letter of the Latin alphabet, numbers, punctuation marks, brackets and some other characters.

The remaining 128 codes are used in different versions. In Russian encodings, the symbols of the Russian alphabet are placed.

Currently, there are 5 different code tables for Russian letters (koi8,CP1251 , CP866,MAC, ISO.).

Currently received widespread new international standardUnicode. which dismides on each symbol of two bytes. With it, you can encode 65536 (2 16 \u003d 65536) different characters.

The numbers are encoded according to the ASCII standard in two cases - when entering-output and when they are found in the text. If the numbers are involved in the calculations, they are transformed into another binary code.

Take the number57 .

When used in the text, each digit will be represented by its code in accordance with the ASCII table. In the binary system it is 0011010100110111.

When used in calculations, the code of this number will be obtained by the transfer rules in the binary system and get - 00111001.

Today, there are many people to prepare letters, documents, articles, books, etc. Usingcomputer text editors . Computer editors, mostly workwith alphabet size 256 characters .

In this case, it is easy to calculate the amount of information in the text. If a1 Alphabet Symbol Carries 1 byte Information , then you just need to count the number of characters; The resulting number will give information the text in bytes.

I.= K.× i.where

I.-Information volume of the message

K.- Number of characters in the text

i.- information weight of one symbol

2 i. \u003d N.

N.- Power of alphabet

Solving tasks. The presentation was built according to the principle "decided with the teacher - decided for themselves."

Summarizing. Setting marks. Homework.

Lesson number 13.

Theme lesson: "Coding text information."

Type of lesson: Training.

Objectives lesson:

Introduce students with ways to encode information in the computer;

Consider examples of solving problems;

Promote the development of educational interests of students.

Educate exposure and patience in the work, sense of partnership and mutual understanding.

Tasks lesson:

To form knowledge of students on the topic "Coding of text (symbolic) information";

Facilitate the formation of schoolchildren of figurative thinking;

Develop an analysis and self-analysis skills;

Forming the ability to plan your activities.

Equipment:

student jobs (personal computer),

teacher's workplace,

interactive board,

multimedia projector,

multimedia presentation

During the classes

I. Organizational moment.

On an interactive whiteboard, the first slide of the multimedia presentation with the lesson.

Teacher: Hello guys. Sit down. On duty, report missing. (Report on duty). Thank you.

II. Work on the lesson.

1. Explanation of the new material.

The explanation of the new material is in the form of a heuristic conversation with a simultaneous display of a multimedia presentation on an interactive blackboard.(Attachment 1).

Teacher: What information coding we studied in previous activities?

Answer : Encoding graphic and multimedia information.

Teacher : Let us turn to the study of a new material. Record the topic "Coding Text Information" lesson (slide one). Considered questions (slide 2):

Historical excursion;

Binary coding of textual information;

Calculation of the number of textual information.

Historical excursion

Humanity uses the encryption (encoding) of the text from the very moment when the first secret information appeared. Before you are several techniques for coding text, which were invented at various stages of the development of human thought (slide 3) :

Cryptography - this is a secretion, a letter change system in order to make the text incomprehensible for uninitiated persons;

ABC Morse or an uneven telegraph code in which each letter or sign is represented by its combination of short elementary parcels of electrical current (points) and elementary parcels of the tripled duration (dash);

Sudesawned - The language of gestures used by people with hearing impairment.

Question : What examples of text information coding can be brought more?

Students lead examples (road signs, electrical circuits, product barcode).

Teacher: (show slide four). One of the very first known methods of encryption is the name of the Roman emperor Julia Caesar (I century BC). This method is based on the replacement of each letter of the encrypted text, to another, by displacement in the alphabet from the original letter to the fixed number of characters, and the alphabet is read in a circle, that is, after the letteri Consideringbut . So the word byte When you displaced two characters to the right is encoded by the wordgVLF . The reverse process of decryption of this word - it is necessary to replace each encrypted letter, to the second to the left of it.

(Slide 5) decrypt the phrase of the Persian poet Jalaleddine Rumi "kGNUSM YOGKG FESL TCFHY FSSEZHZ FHGRZH YOGKSP", Encoded with Caesar cipher. It is known that each letter of the source text is replaced by the third after it. As a support, use the letters of the Russian alphabet located on the slide.

Question : What did you do?

Student response:

Close your eyes his eyes let the heart become an eye

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

Binary coding of text information

Information expressed with the help of natural and formal languages \u200b\u200bin writing is calledtext information (slide 6).

What amount of information is necessary to encode each sign, can be calculated by the formula: n \u003d 2I.

Question : Which of the listed encoding techniques is used binary principle of information coding?

The answer of students: in the Alphabet of Morse.

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

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

Question : How many different characters can be encoded? (Remind that 1 byte \u003d 8 bits)

Student response: n \u003d 2 i \u003d 2 8 \u003d 256.

Teacher : Right. Is it enough for the presentation of textual information, including the uppercase and lower case letters of the Russian and Latin alphabet, numbers and other characters?

Children count the number of different characters:

33 The lower case letters of the Russian alphabet + 33 Capital letters \u003d 66;

For the English alphabet 26 + 26 \u003d 52;

Figures from 0 to 9, etc.

Teacher: Your conclusion?

Conclusion of students : It turns out that 127 characters need. There are still 129 values \u200b\u200bthat can be used to designate punctuation marks, arithmetic signs, service operations (translation of the string, space, etc. Consequently, one byte is enough to encode the necessary characters to encode text information.

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

An international agreement is adopted to assign each symbol of its unique code. As an international standard, the ASCII code table is adopted (American Standard Code for Information Interchange) (slide 8).

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

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

For Russia, several different code table standards were introduced (codes from 128 to 255).

Here is some of them (slide 9-10). Consider and write their names:

Koi8-R, CP1251, CP866, MAS, ISO.

Open computer science workshop on page 65-66 and read about these encoding tables.

Teacher : In the MS WORD text editor, in order to display the symbol on its code on the screen, you must hold the "ALT" key to type the character code on the additional digital keyboard (slide 11):

Concept of Enicode encoding

Decision : In this phrase, 108 characters, given the signs of punctuation, quotes and spaces. Multiply this amount by 8 bits. We get 108 * 8 \u003d 864 bits.

Teacher : Consider Task No. 2. (The condition is displayed on an interactive blackboard).<Рисунок 3> Record its condition: Canon LBP laser printer prints at an average of 6.3 kbps per second. How much time will you need to print 8 page documents if it is known that on one page on average 45 lines, in the string 70 characters (1 symbol - 1 byte) (see Fig. 2).

Decision:

1) We find the amount of information contained on 1 page:

45 * 70 * 8 bits \u003d 25200 bits

2) We find the amount of information on 8 pages:

25200 * 8 \u003d 201600 Bit

3) lead to single units of measurement. For this, kbit translate into bits:

6.3 * 1024 \u003d 6451.2 bits / s.

4) We find the time of printing: 201600: 6451.2 \u003d 31.25 seconds.

III. Generalization

Teacher's questions (slide 14):

1. What is the principle of coding text information used in the computer?

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

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

4. In which number system are the codes in the encoding tables listed?

We coded symbols, sound and graphics. Can I encode emotions?

Slide is demonstrated14.

IV. The outcome of the lesson. Homework

§ 2.1, Task 2.1, recordings in notebooks.


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

Coding text information

To write text (iconic) information, there is always a language (natural or formal).

All the sets used in the language symbols is called Alphabet. Complete number of alphabet characters N. called it Power. When writing text, any of the next position may appear N. alphabet characters, i.e. can occur N. events. Consequently, each alphabet symbol contains i.bit information where i. Determined from inequality (Formula Hartley): 2 i. N.. Then the total amount of information in the text is determined by the formula:

V. = k. * i. ,

where V. - the amount of information in the text; k. - the number of signs in the text (including punctuation marks and even spaces), i.- The number of bits allocated to the encoding of one sign.

Since each bit is 0 or 1, then any text can be represented by a sequence of zeros and units. This is how the text information is stored in the memory of the computer. Assigning a specific binary code alphabet symbol is a question of agreement fixed in the code table. Current tables received wide distribution ASCII. and Unicode..


ASCII.(American Standart Code for Informational Interchange - American Standard Information Exchange Code) is used for a long time. To storing a single symbol code, 8 bits are highlighted, therefore, the code table supports to 28 = 256 symbols. The first half of the table (128 characters) - control characters, numbers and letters of the Latin alphabet. The second half is discharged under the symbols of national alphabets. Unfortunately, there are currently five options for code tables for Russian letters (koi-8, Windows-1251, ISO, DOS, MAC), so the texts created in one encoding are incorrectly displayed in another. (Probably, did you meet Russian-speaking sites whose texts look like a meaningless set of signs?).

Unicode. - received distribution in recent years. To store a single symbol code, 16 bits are allocated, therefore, the code table supports to 216 = 65536 Symbols. This space is enough to combine all the "live" official (state-owned) writing in one standard. By the way, the ASCII standard entered Unicode.

If a coding - this is the transfer of information from one language to another (recording in another symbol system, in another alphabet), then decoding - Replacement.

When encoding one source message symbol can be replaced with one symbol of a new code or several characters, and maybe vice versa - several source symbols are replaced with one character in a new code (Chinese characters indicate whole words and concepts), so coding can be uniform and uneven.With uniform coding, all characters are encoded by codes of equal length, with uneven coding, different characters can be encoded by codes of different lengths, which makes it difficult to decoding.

decoded from the beginningif executed fano condition: no code word is the beginning of another code word. The encoded message can be unambiguous. decoded from the endif executed reverse condition Fano: no code word is the end of another code word. Fano's condition is a sufficient, but not necessary condition for unambiguous decoding.

Solving tasks for coding text information

1. Automatic device was transcoding the information message in Russian in length in 20 characters, originally recorded in the 2-byte Unicode code, in the 8-bit koi-8 encoding. How many bits decreased the length of the message? In response, write down only the number.

Decision:

1) with 16-bit encoding the volume of the message - 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 decreased by 16 * 20 - 8 * 20 \u003d 8 * 20 \u003d 160 bits

Answer: 160

2. Determine the information of the text in the bits

Bambarbia! Kerguda!

Decision:

1) In this text, 19 characters (be sure to consider spaces and punctuation marks)

2) if there is no additional information, we believe that 8-bit encoding is used (most often it is clearly indicated that the encoding is 8- or 16-bit), therefore in the message 19 * 8 \u003d 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 of the symbol "Q"?


Decision:

1) In the ASCII code table, all the title Latin letters A-Z are placed alphabetically, starting with a symbol with code 65 \u003d 4116

2) All lowercase Latin letters A-Z are placed alphabetically, starting with a symbol with code 97 \u003d 6116

3) From here it follows that the difference between the codes of the letters "Q" and "A" is equal to the difference of codes of the letters "Q" and "A", that is, 5116 - 4116 \u003d 1016

4) Then the hexadecimal code "Q" is equal to the letter "A" code plus 1016

5) From here we find 6116 + 1016 \u003d 7116.

Answer: 71

4. For encoding some sequence consisting of letters A, B, B, G, and D, an uneven binary code is used, which allows you to unambiguously decode the resulting binary sequence. This code: A-00, B-010, B-011, G-101, D-111. Is it possible to reduce for one of the letters of the length of the code word so that the code can still be decoded unambiguous? The codes of the remaining letters should not change. Select the correct answer option.

1) for the letter B is impossible

3) for the letter in -for the letters r - 01

Decision (1 Method - Check Fano Conditions):

3) For unambiguous decoding, it is sufficient to be carried out one of the Fano conditions: direct or reverse condition of Fano;

4) check the options 1, 3 and 4 successively; If none of them are suitable, you will have to choose the option 2 ("it is impossible");

3) Checking Option 1: A-00, B-01, B-011, M-101, D-111.

The "Direct" condition of the Fano is not satisfied (the code of the letter B coincides with the beginning of the code of the letter B);

The "reverse" condition of the Fano is not satisfied (the code of the letter B coincides with the end of the code of the letter d); Therefore, this option is not suitable;

4) Checking option 3: A-00, B-010, B-01, G-101, D-111.

"Direct" condition Fano is not satisfied (the code of the letter in coincides with the start of the letter B);

"Reverse" Fano condition is not satisfied (the code of the letter in coincides with the end of the code of the letter D); Therefore, this option is not suitable;

5) Check the option 4: A-00, B-010, B-011, Mr., D-111.

The "direct" condition of the Fano is not satisfied (the code of the letter G coincides with the start of the codes of letters B and B); but "Reverse" Fano Conditions (The code of the letter G does not coincide with the end of the code of the remaining letters); Therefore, this option is suitable;

Answer: 4

Decision (2 way, tree):

1) we will construct a binary tree in which two branches are departed from each node, corresponding to the choice of the next digit code - 0 or 1; Let's place on this tree the letters A, B, B, G, and D so that their code gets like a sequence of numbers on the roams that make up the path from the root to this letter (red it is highlighted in - 011 code):

https://pandia.ru/text/78/419/images/image003_52.gif "width \u003d" 391 "height \u003d" 166 "\u003e div_adblock100"\u003e

3) But the bit of parity to us quite not neededOther important: Fifth bit in each five you can drop!

4) Differences The specified sequence in groups of 5 bits each:

01010, 10010, 01111, 00011.

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

0101, 1001, 0111, 0001.

these are binary codes of 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

Tasks for training:

1) The automatic device has been transcoding the information message in Russian, originally recorded in 16-bit code Unicode.in 8-bit encoding
Koi-8.. At the same time, the informational message decreased by 800 bits. What is the length of the message in the characters?

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

Symbol

Decimal code

Hex code

What is the hexadecimal code of the symbol "P"?

3) A text document consisting of 3072 characters was stored in the 8-bit koi-8 encoding. This document was transformed into a 16-bit Unicode encoding. Specify which additional amount of KB will need to store the document. In response, write down only the number.

4) for encoding letters A, B, B, G decided to use two-digit sequential binary numbers (from 00 to 11, respectively). If in this way to encode the sequence of symbols of the GBAV and record the result in a hexadecimal number system, it will turn out:

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

Determine which set of letters is encoded binary string

1) BAADE 2) Badde 3) BACDE 4) BACDB

6) For encoding the letters A, B, C, D, three-digit sequential binary numbers, starting with 1 (from 100 to 111, respectively) are used. If in this way to encode the CDAB symbol sequence and write the result in hexadecimal code, it will turn out:

1) A5SD16 4) DE516

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

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

8) To coding a message consisting of only letters A, B, B and G, is used unevenly by length Binary code:

If in this way to encode the sequence of GAVBVG characters and record the result in hexadecimal code, it will turn out:

1) 62dd2) 6213316

9) For transmission over the communication channel, the message consisting only of the letters A, B, B, G, was decided to use the uneven code code: a \u003d 1, b \u003d 01, B \u003d 001. How to encode the letter r so that the length of the code is minimal and was allowed to unambiguously split the encoded message into the letters?

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

11) To encode some sequence consisting of letters A, B, B, G, and D, an uneven binary code is used, which allows you to unambiguously decode the resulting binary sequence. This code: A-10, B-11, B-000, M-001, D-011. Is it possible to reduce for one of the letters of the length of the code word so that the code can still be decoded unambiguous? The codes of the remaining letters should not change. Select the correct answer option.

1) It is impossible 2) for the letter B - 1

3) for the letter G-for the letters d - 01

12) To encode some sequence consisting of letters A, B, B, G, and D, decided to use an uneven binary code, which allows you to unambiguously decode the binary sequence appearing on the reception side of the communication channel. Used code: A-111, B-110, B-100, M-101. Specify what kind of code word can be encoded by the letter D. The code must satisfy the property of the unambiguous decoding. If you can use more than one code word, specify the shortest of them.

13) For transmission over the communication channel, the message consisting only of the letters A, B, B, G, decided to use the uneven length code: a \u003d 1, b \u003d 000, B \u003d 001. How to encode the letter r so that the length of the code is minimal and was allowed to unambiguously split the encoded message into the letters?

Coding graphic information

Transformation of graphic information from analog form to discrete is made by discretization, i.e., partitioning a continuous graphic image to individual elements. During the sampling process, coding is made, i.e. assignment to each element of a specific value in the form of code.

Sampling this is a conversion of a continuous image into a set of discrete values \u200b\u200bin the form of code.

In the process of encoding the image is made spatial discretization. Spatial image sampling can be compared with building an image from a mosaic. The image is divided into separate small fragments (points), each of which is assigned the color code.

As a result of spatial sampling, graphic information is represented as raster image. The raster image consists of a certain number of rows, each of which contains a certain number of points (pixel).

Image quality depends on resolution.

The resolution of the bitmap image is determined by the number of horizontal points (x) and the number of vertical points ( Y.) per unit image length.

The smaller the size of the point, the greater the resolution (larger rows of the raster and points in the string) and, accordingly, above the image quality.
The value of the resolution is expressed in (dot per inch - dots per inch), i.e. in the number of points in the strip of an image in a length of 1 inch (1 dyum \u003d 2.54 cm). Digitization of graphic images from paper or films is performed using a scanner. Scanning is done by moving the photosensitive elements along the image. Scanner characteristics are expressed by two numbers, such as 1200x2400 DPI. The first number determines the number of photosensitive elements on one inches of the strip and is optical resolution. The second is a hardware resolution and determines the number of microsses when moving one inch along the image.

During the sampling process, various colors palettes can be used. Each color can be viewed as a possible point point. The number of n in the palette and the amount of information for coding the color of each point are related to the well-known Hartley formula: N \u003d 2i,where I is the depth of color, and n is the number of colors (palette).

The amount of information that is used to coding the color color image is called depth colors. The most common values \u200b\u200bof the color depth are values \u200b\u200bfrom the table:

Table. Color depth and number of displayed colors.

Color depth (I)

The number of colors depicted (N)

Image quality on the monitor screen depends on the size spatial permission and color depths. The spatial resolution of the monitor screen is defined as a product of the number of strings of the image on the number of points in the row. Permission can be: 800x600, 1024x768, 1152x864 and above. The number of colors displayed may vary from 256 colors to more than 16 million.

Video memory

Point number

Binary color color code

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

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

Fig. Forming a bitmap on the screen.

Consider an example of forming a raster image on the monitor screen consisting of 600 rows of 800 points in each row (all points) and color depth of 8 bits. The binary color code of all points is stored in the computer video memory, which is on the video card.

Periodically, with a certain frequency, the color codes of the points are read from the video memory and the points are displayed on the monitor screen. The image read frequency affects the image stability on the screen. In modern monitors, the image update occurs with a frequency of 75 or more times per second, which ensures the comfort of perception by the user.

Information required video memory can be calculated by the formula:

V. \u003d I · x · y,

where V is the information volume of video memory in bits;
X · y - the number of image points (screen resolution);
I - color depth in bits per point.

For example, the required volume of video memory for graphic mode with a resolution of 800x600 points and a color depth of 24 bits is:

V \u003d i · x · y \u003d 24 x 800 x 600 \u003d bit \u003d 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 color palette with basic colors, various intensities can be specified. For example, with a color depth of 24 bits per each of the colors, 8 bits are released, that is, for each of the colors, n \u003d 28 \u003d 256 intensity levels specified by binary codes from the minimum to maximum are possible.

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

Name

Intensity

Often, the color is written in the form of - #rrggbb, where RR is hexadecimal code of red color components, GG is hexadecimal code for green color components, BB is hexadecimal code of blue color components. The greater the value of the component, the greater the intensity of the glow of the corresponding base color. 00 - no luminescence, FF - maximum glow (FF16 \u003d 25510), 8016 - the average brightness value. If the component has color intensity<8016 , то это даст темный оттенок, а если >\u003d 8016, then light.

For example,

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

# 000000 - black color (no component glows)

#FFFFFF - white color (all components are maximum and the same, the most bright color)

# 404040 - Dark gray (all components are the same and values \u200b\u200bless than the average brightness value)

# 8080FF - light blue (maximum brightness in the blue component, and the brightness of other components are the same and equal to 8016).

Solving tasks for encoding graphic information

1. To store a raster image with a size of 32 × 32 pixels, 512 memory bytes took. What is the maximum possible number of colors in the image palette?

Decision: When encoding with a palette, the number of bits per pixel ( K.) depends on the number of colors in the palette N.They are associated with the formula: https://pandia.ru/text/78/419/images/image005_31.gif "width \u003d" 71 "height \u003d" 21 src \u003d "\u003e (2), where - the number of bits on the pixel, and - Total number of pixels.

1) Find a total number of pixels https://pandia.ru/text/78/419/images/image009_17.gif "width \u003d" 61 "height \u003d" 19 "\u003e bytebitbitbit

3) Determine the number of bits on pixel: # xxxxxx, "where hexadecimal intensity values \u200b\u200bof the color component in the 24-bit RGB model are set in quotes.

What color will be close to the color of the page set by tag ?

1) White 2) Gray 3) Yellow 4) Purple

Decision: The highest color intensity (99) in the components of red and blue colors. It gives purple color.

Answer: 4

3. What is the width (in pixels) of a rectangular 64-color unpacked raster image that occupies 1.5 MB on the disk, if its height is twice as much as the width?

Decision: Since the amount of memory to the entire image is calculated by the formula (1), where - the number of bits per pixel, and https://pandia.ru/text/78/419/images/image014_12.gif "width \u003d" 36 "height \u003d" 41 src \u003d "\u003e.

64 \u003d 26. From here K.= 6.

We will substitute these values \u200b\u200bin formula (1), we get:

* 6 \u003d 1.5 * 220 * 23. After cuts: x.2 = 222. From here: x.= 211=2048.

ABOUTtvety: 4

Tasks for training:

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

2. To encode the color page, the Internet page is used attribute BGColor \u003d "# xxxxxx", where hexadecimal intensity values \u200b\u200bof the color component in the 24-bit RGB model are set in quotes. What color will be close to the color of the page given by tag ?

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

3. What is the width (in pixels) of a rectangular 16-color unpacked raster image that occupits 1 MB on a disk, if its height is twice as much width?

Encoding audio information

The sound is a sound wave with a continuously changing amplitude and frequency. The greater the amplitude of the signal, the more louder than the more frequency, the higher the tone. In order for the computer to process the sound, a continuous beep should be turned into a sequence of electrical pulses (binary zeros and units).

In the process of encoding a continuous audio signal, its temporary discretion is made. In this case, the sound wave is divided into small temporary areas, for each of which the amplitude value is set.

Temporary discretization -the process at which, during the coding of a continuous sound signal, the sound wave is divided into separate small temporary sections, and a certain amount of amplitude is established for each such site. The more the amplitude of the signal, the louder the sound.

On the graph (see Fig.) It looks like replacing a smooth curve to the sequence of "steps", each of which is assigned the volume level value. The larger the amount of volume levels will be highlighted during the coding process, the more qualitative will be the sound.

Fig. Temporary sound sampling

Sound Depth (coding depth) - The number of bit on sound encoding.

Volume levels (signal levels) - The sound may have different volume levels. The number of different volume levels are calculated by the Hartley formula: N.= 2 I. WhereI. - the depth of sound, and n - volume levels.

Modern audio cards provide a 16-bit sound encoding depth. The number of different signal levels can be calculated by the formula: n \u003d 216 \u003d 65536. T. about., Modern sound cards provide encoding 65536 signal levels. Each amplitude value is assigned a 16-bit code.

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

Sampling frequencythe number of measurements of the input signal level per unit time (for 1 s). The greater the discretization frequency, the more accurate the binary coding procedure. Frequency is measured in Hertz (Hz).

1 Measurement for 1 second -1 Hz, 1000 measurements for 1 second 1 kHz.

Denote the frequency of sampling letterF.. For encoding, choose one of three frequencies:44.1 kHz, 22.05 kHz, 11.025 kHz.

It is believed that the frequency range that the person hears is from 20 Hz to 20 kHz.

The quality of the binary sound encoding is determined by the coding depth and the sampling frequency.

The sampling frequency of an analog sound signal can take values \u200b\u200bfrom 8 kHz to 48 kHz. At a frequency of 8 kHz, the quality of the discrete-free sound signal corresponds to the quality of radio broadcasts, and with a frequency of 48 kHz - the quality of audio-CD sound. It should also be borne in mind that both mono- and stereoisms are possible.

Audio adapter (sound fee) -a device that converts electrical oscillations of sound frequency in a numeric binary code when entering sound and back (from numerical code into electrical oscillations) when playing sound.

Audio adapter characteristics: Frequency of sampling and the discharge of the register.

The discharge of the register -the number of bits in the audio adapter register. The greater the discharge, the smaller the error of each individual transformation of the electrical current value and back. If the discharge is equal I., when measuring the input signal can be obtained 2I. = N. Different values.

Digital monoadylfile size (A.) It is measured by the formula:

A.\u003d F *T.* I./8 ,

whereF -discretization frequency (Hz),T. - sound time or sound recording,I. the discharge of the register (permission). According to this formula, the size is measured in bytes.

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

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

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

Example. Let's try to evaluate the information volume of the stereo audio file with the duration of the sound of 1 second with high quality sound (16 bits, 48 \u200b\u200bkHz). For this, the number of bits must be multiplied by the number of samples in 1 second and multiply by 2 (stereo):

16 bits * 48 000 * 2 \u003d 1 536,000 bits \u003d 192,000 byte \u003d 187.5 KB

Table 1 shows how many MB will occupy a coded one minute of sound information with different sampling frequency:

Type of signal

Frequency Discretization, kHz

16 bits, stereo

16 bits, mono

8 bits, mono

Examples of tasks:

1. Determine the size (in bytes) of the digital audio file, the sound time of which is 10 seconds at a discretization frequency of 22.05 kHz and a resolution of 8 bits. The file compression is not subject.

Decision:

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

To transfer to bytes, the value obtained must be divided into 8 bits.

22.05 kHz \u003d 22.05 * 1000 Hz \u003d 22050 Hz

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

Answer: 220500

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

Decision:

Formula for calculating the frequency of sampling and bit: f * i \u003d a / t

(Memory capacity in bytes): (Sound time in seconds):

2, 6 MB \u003d 26 bytes

F * i \u003d a / t \u003d 26 bytes: 60 \u003d 45438.3 byte

F \u003d 45438.3 byte: I

The discharge of the adapter can be 8 or 16 bits. (1 byte or 2 bytes). Therefore, the discretization frequency may be either 45438.3 Hz \u003d 45.4 kHz ≈ 44.1 kHz. - Standard characteristic frequency of discretization, or 22719.15 Hz \u003d 22.7 kHz ≈ 22.05 kHz - Standard characteristic sampling rate

Answer:

Sampling frequency

The discharge of audio adapter

1 option

Option 2

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

Decision:

Formula for calculating the duration of sound: T \u003d A / F / I

(Memory capacity in bytes): (sampling frequency in Hz): (Sound board bit in bytes):

5.25 MB \u003d 5505024 byte

5505024 byte: 22050 Hz: 2 bytes \u003d 124.8 sec
Answer: 124,8

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

Decision:

Formula for calculating memory A.= F.* T.* I.:
(Recording time in seconds) * (Sound Circuit Blossomy) * (sampling frequency). 16 BIT -2 byte.
1) 1C x 2 x 44032 Hz \u003d 88064 bytes (1 second stereo recording on a CD)
2) 60c x 2 x 44032 Hz \u003d 5283840 byte (1 minute stereo maps on a CD)
3) 4800c x 2 x 44032 Hz \u003d byte \u003d 412800 kb \u003d 403,125 MB (80 minutes)

Answer: 88064 bytes (1 second), 5283840 byte (1 minute), 403,125 MB (80 minutes)

Tasks for training:

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

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

3) Single-channel (mono) was conducted sound recording with a 16 kHz discretization frequency and a 24-bit resolution. As a result, a file was obtained with a size of 3 MB, the data compression was not performed. Which of the following values \u200b\u200bis closest to the time during which record was recorded?

1) 30 Sexexexek

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

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



Did you like the article? Share it