Binary coding of information. Presentation on the topic: "binary encoding of symbolic information" Presentation to the lesson on computer science and ICT (Grade 10) on the topic Download presentation on the topic Binary coding

Slide 1.

Slide 2.

The concept of "information" and information properties Measurement of information. Alphabetical approach Measuring information. Subtative approach View and encoding information Presentation of numerical information using the numbering systems Translation of numbers in positional surprints of arithmetic operations in positional viewing systems Presentation of numbers in a computer Binary encoding information Information storage

Slide 3.

The concept of "information" and the properties of information

Concept "Information" Information in philosophy Information in physics Information in biology information properties

Slide 4.

What is information?

The word "information" comes from the Latin word information, which is translated as an explanation, the presentation. The concept of "information" is fundamental in the course of informatics, it is impossible to give it a definition through other, more "simple" concepts.

Slide 5.

In the simplest domestic understanding with the term "information", some information, data, knowledge are usually associated. Information is transmitted as messages that determine its shape and representation. Examples of messages are: a musical work, a telecast, text printed on the printer, etc. It is assumed that there is a source of information and the recipient of the information. A message from the source to the recipient is transmitted through any medium that is a communication channel. (Fig. 1.) The concept of "information" is used in various sciences.

Slide 6.

Information in philosophy

Pupil message

Slide 7.

Slide 8.

Slide 9.

Properties of information

The person is a social being, to communicate with other people, he must exchange information with them, and the exchange of information is always produced in a certain language - Russian, English, etc. Participants in the discussion should own the language on which communication is underway, then the information will be understandable to all participants in the exchange of information. The information should be useful, then the discussion acquires practical value. Useless information creates an information noise that makes it difficult to perceive useful information.

Slide 10.

The term "media", which bring information to each member of society is widely known. Such information should be reliable and relevant. Invalid information introduces members of society to delusion and may cause social shocks. Inactive information is useless and therefore no one except historians read last year's newspapers. In order for a person to correctly navigate the environment, the information must be complete and accurate. The task of obtaining full and accurate information is in front of science. Mastering scientific knowledge in the learning process allows a person to get full and accurate information about nature, society and technology.

Slide 11.

Measuring information. Alphabetical approach

The alphabetical approach is used to measure the number of information in the text represented as a sequence of symbols of some alphabet. This approach is not related to the content of text. The amount of information in this case is called the text information, which is proportional to the size of the text - the number of characters that make up the text. Sometimes this approach to the measurement of information is called a surround approach.

Slide 12.

Each text symbol carries a certain amount of information. It is called the informational weight of the symbol. Therefore, the information volume of the text is equal to the sum of the information scales of all the characters that constitute the text. It is assumed here that the text is a consistent chain of numbered characters. In formula (1), I1 denotes the informational weight of the first text symbol, I2 is the information weight of the second symbol of text, etc.; K - text size, i.e. Complete number of characters in the text

Slide 13.

All many different characters used to record texts are called alphabet. The size of the alphabet is an integer called the power of the alphabet. It should be borne in mind that the alphabet includes not only the letters of a certain alphabet, but all other characters that can be used in the text: figures, punctuation marks, various brackets. The definition of informational scales of characters may occur in two approximations: as an assumption equal to the likelihood (of the same frequency of occurrence) of any symbol in the text; Given the different probability (different frequency of occurrence) of various characters in the text.

Slide 14.

Approach equal chance of symbols in the text

If we assume that all alphabet characters in any text appear with the same frequency, the information weight of all characters will be the same. Then the proportion of any symbol in the text is 1 / N-th part of the text. By definition of the probability, this value is equal to the likelihood of the symbol in each position of the text: p \u003d 1 / n.

Slide 15.

From the position of the alphabetical approach to the measurement of information 1 bits is the information weight of the symbol from the binary alphabet. A larger unit of information measurement is byte. 1 byte is an alphabet symbol of 256. (1 byte \u003d 8 bits) to represent texts, stored and processed in the computer, the alphabet with a capacity of 256 characters is most often used. Consequently, 1 symbol of such text "weighs" 1 byte. 1 KB (kilobyte) \u003d 210 bytes \u003d 1024 byte 1 MB (megabyte) \u003d 210 kb \u003d 1024 KB 1GB (gigabyte) \u003d 210 MB \u003d 1024 MB

Slide 16.

Approaching the different probability of symbols in the text

This approximation takes into account that in the real text, different characters are found with different frequencies. It follows that the probabilities of the appearance of different characters in a certain position of the text are different and, therefore, their information weights differ. Statistical analysis of Russian texts shows that the frequency of the appearance of the letter "O" is 0.09. This means that for every 100 characters the letter "O" is on average 9 times occur. The same number indicates the likelihood of the appearance of the letter "O" in a certain position of the text: P0 \u003d 0.09. It follows that the informational weight of the letter "O" in the Russian text is 3,47393 bits.

Slide 17.

Measuring information. Subtle approach

From the position of a meaningful approach to the measurement of information, the question of the number of information in the message received by the person is resolved. The following situation is considered: a person receives a message about some event; At the same time, the uncertainty of human knowledge about the expected event is known in advance. The uncertainty of knowledge can be expressed either by the number of possible events options, or the likelihood of expected events;

Slide 18.

2) As a result of obtaining a message, the uncertainty of knowledge is removed: from some possible amount of options turned out to be selected one; 3) The formula calculates the amount of information in the received message, expressed in bits. The formula used to calculate the number of information depends on the situations that two may be: all possible options for events are equal. Their number of course is N. probability (P) possible options for events are different and they are known in advance: (pi), i \u003d 1..n. Here is still n - the number of possible options for events.

Equalious events

Non-equilibrium events

Slide 19.

If you designate the letter I, the amount of information in a message that occurred is one of the N of equivalent events, the values \u200b\u200bof the I and N are related to the formula of Hartley: 2i \u003d n (1) The value of I is measured in bits. From here, the output: 1 bit is the amount of information in a message about one of two equivalent events. The formula of Hartley is an indicative equation. If i is an unknown value, then the solution of equation (1) will be:

(2) Example 1 Example 2

Slide 20.

A task. How much information contains a message about the maps of the cards got a lady peak? Solution: a deck - 32 cards. In the mixed deck, the loss of any card is an equilibious event. If i is the amount of information in the report that the specific card fell (the lady of peak), then from the Hartley equation: 2i \u003d 32 \u003d 25 from here: i \u003d 5 bits

Slide 21.

A task. How much information contains a message about the loss of a face with a number 3 on a hex playing cube? Solution: Considering the fallout of any edge by an equivalent event, we write the Hartley formula: 2i \u003d 6. Hence:

Slide 22.

If the probability of some event is equal to P, and i (bit) is the amount of information in the report that this event occurred, the data of the values \u200b\u200bare interconnected by the formula: 2i \u003d 1 / p (*) solving the indicative equation (*) relative to i , we get: Formula (**) was proposed by K. Wennon, so it is called Shannon's formula

Slide 23.

View and encoding information

1. Language as a sign system 2. Presentation of information in living organisms 3. Coding information

Slide 24.

Language as a sign system

Language is a specific symbolic information system. "Language is a lot of symbols and a set of rules that determine the ways of drawing up of these symbols of meaningful messages" (dictionary of school informatics). Because A meaningful message is information, then definitions coincide. LANGUAGE

natural formal language language language

Slide 25.

Natural languages

Historically established languages \u200b\u200bof national speech. For most modern languages, the presence of oral and written forms of speech is characteristic. Analysis of natural languages \u200b\u200bis more than the subject of philological sciences, in particular, linguistics. In computer science analysis of natural languages, specialists in the field of artificial intelligence are engaged. One of the objectives of developing a project computer of the fifth generation is to teach a computer to understand natural languages.

Slide 26.

Formal languages

Artificially created languages \u200b\u200bfor professional use. They, as a rule, are international and have a written form. Examples of such languages \u200b\u200bare mathematics, the language of the chemical formulas, a notional gram. For formal languages, it is characterized by belonging to a limited subject area. The appointment of a formal language is an adequate description of the system of concepts and relations characteristic of this subject area.

Slide 27.

With any language, the following concepts are associated: the alphabet is a set of characters used; Syntax - Rules for recording language structures; Semantics - the meaningful side of the language structures; Pragmatics - practical consequences of the application of text in this language. Natural languages \u200b\u200bare not limited in their application, in this sense they can be called universal. However, it is not always convenient to use only a natural language in narrow-professional regions. In such cases, people resort to the help of formal languages. There are examples of languages \u200b\u200bin an intermediate state between natural and formal. Esperanto language was created artificially to communicate people of different nationalities. And Latin in our time has become a formal language of medicine and pharmacology, losing the function of a spoken language.

Slide 28.

Presentation of information in living organisms

A person perceives information about the world around the world with the help of sense organs. Sensitive nervous endings of the senses perceive exposure and transmit it to neurons whose circuits make up the nervous system. Neuron can be in one of two states: an unexcited and excited. An excited neuron generates an electrical pulse that is transmitted by the nervous system. The state of the neuron (no pulse, there is a pulse) can be considered as the signs of a certain alphabet of the nervous system, with which information is transmitted.

Slide 29.

Genetic information largely determines the structure and development of living organisms and is inherited. Genetic information is stored in organisms cells in the structure of DNA molecules (deoxyribonucleic acid). The DNA molecule consists of two twisted with a spiral of chains constructed from four nucleotides: a, g, t, c, which form the genetic alphabet. The human DNA molecule includes about 3 billion nucleotide pairs and therefore all information about the human body is encoded: its appearance, health or predisposition to diseases, ability.

Slide 30.

Information coding

The presentation of the information occurs in various forms in the process of environmental perception by living organisms and man, in the process of exchanging information between man and man, man and computer, computer and computer, and so on. Transformation of information from one form of representation to another is called coding. All set characters used for coding are called coding alphabet. For example, in the computer's memory, any information is encoded using a binary alphabet containing only two characters: 0 and 1.

Slide 31.

In the process of exchanging information, it is often necessary to produce coding and decoding information. When entering the alphabet sign into the computer by pressing the corresponding key on the keyboard, the sign is encoded, that is, converting it to the computer code. When displaying a sign on the monitor screen or printer, a reverse process takes place - decoding, when a sign is converted from a computer code to its graphic image.

Slide 32.

Presentation of numerical information using surcharge systems

Number System Decimal Number System Binary System Number Positional Number Systems

Slide 33.

Notation

Numbers are used to record information about the number of objects. Numbers are recorded using special iconic systems that are called number systems. The number system is the method of image numbers and the corresponding rules of action on numbers. A variety of numbers that existed earlier and are used in our time, can be divided into non-procurement and positional. The signs used when recording numbers are called numbers.

Slide 34.

Non-sample number systems

In non-phase surgery systems, the value of the number does not depend on the position among the number. An example of a non-transposition number system is the Roman system (Roman numbers). In the Roman system, Latin letters are used as numbers: I V x L C d M 1 5 10 50 100 500 1000 Example 1 Example 2 Example 3 In Roman numbers, the numbers are recorded from left to right in descending order. In this case, their values \u200b\u200bare added. If a smaller digit is recorded, and the right is large, their values \u200b\u200bare deducted.

Slide 35.

Slide 36.

Slide 37.

Mcmxcviii \u003d 1000 + (- 100 + 1000) + + (- 10 + 100) + 5 + 1 + 1 + 1 \u003d 1998

Slide 38.

Positional Number Systems

The first positioning system of the number was invented in ancient Babylon, and the Babylonian numbering was sixty-meter, that is, sixty digits were used in it! Interestingly, so far, when measuring time, we use the base equal to 60. In the XIX century, a twelve number of the number is quite widespread. Until now, we often use a dozen: in days two dozen hours, the circle contains thirteen degrees and so on in the positional viewing systems, the value indicated by the number in the number of numbers depends on its position. The number of numbers used is called the base of the positioning system.

Slide 39.

The most common current positioning systems are decimal, binary, octal, hexadecimal. In the positioning systems of the number, the base of the system is equal to the number of numbers (characters in its alphabet) and determines how many times the values \u200b\u200bof the same numbers standing in the adjacent positions of the number differ.

Slide 40.

Decimal number system

Consider as an example a decimal number 555. The figure 5 is found three times, and the most right figure 5 denotes 5 units, the second right is five dozen and, finally, the third right is five hundred. The position of the numbers is among the number .... The discharge of the number increases to the right left, from the younger discharges to the elders. The number 555 is the rolled form of the number of numbers. In the detailed form of the number of numbers, the multiplication of the number of numbers to different degrees of the number 10 is written explicitly. So

discharge

Slide 41.

In the general case, in the decimal number system, the recording of the number A10, which contains n wide discharges of the number and M fractional digits of the number, looks like this: The AI \u200b\u200bcoefficients in this record are numbers of a decimal number, which is written in the folded form: from the above formulas it is clear that multiplication Or the division of the decimal number 10 (the value of the base) leads to the movement of the comma separating the whole part of the fractional, one-time, respectively or left.

Slide 42.

Binary number system

In a binary number system, the base is 2, and the alphabet consists of two digits (0 and 1). Consequently, the numbers in the binary system in the unfolded form are recorded as the amount of the degrees of the base 2 with the coefficients, which protrudes 0 or 1. For example, the detailed recording of a binary number may look like that

Slide 43.

In the general case, in the binary system, the recording of the number A2, which contains n wide discharges of the number and M fractional discharges of the number, looks like this: rolled record of a binary number: from the above formulas it can be seen that multiplication or division of a binary number by 2 (base value) leads to a move The comma separating the whole part of the fractional one digit is right or left.

Slide 44.

Positional Normal Research Systems

It is possible to use a plurality of positional numbering systems, the base of which is equal to either greater than 2. In the counting systems with the base Q (Q-Ichnaya number system) of the number in the detailed form recorded as the amount of the degrees of the base Q with coefficients, which protrudes the numbers 0, 1, Q-1: AI coefficients in this entry are numbers recorded in a Q-Single Number System.

Slide 45.

So, in the octal system, the base is eight (Q \u003d 8). Then recorded in the rolled-shaped octal number A8 \u003d 673.28 in the detailed form will be viewed: in the hexadecimal system, the base is sixteen (Q \u003d 16), then the hexadecimal number A16 \u003d 8a, F16 will be recorded in the folded shape in the detailed form: If you express hexadecimal numbers through their decimal values, the record of the number will take the form:

Slide 46.

Translation of numbers in positional viewing systems

Translation of numbers in a decimal number system Translation of numbers from a decimal system into a binary, octal and hexadecimal transition of numbers from a binary number system to octal and hexadecimal and back

Slide 47.

Translation of numbers in a decimal number system

The transformation of the numbers presented in binary, octal and hexadecimal surgery systems, to decimal to perform quite easily. To do this, you need to record a number in the detailed form and calculate its value of the translation of the number from the binary system in a decimal translation of the numbers from the octal system into a decimal translation of numbers from a hexadecimal system in decimal

Slide 48.

Translation of a number of binary system in decimal

10,112 Translate into the decimal system the following numbers: 1012, 1102, 101,012

Slide 49.

Translation of numbers from the octal system in decimal

67.58 Translate into the decimal system the following numbers: 78,118, 228, 34,128

Slide 50.

Translation of numbers from a hexadecimal system in decimal

19F16 (F \u003d 15) Translate into a decimal number of number the following numbers: 1A16, BF16, 9C, 1516

Slide 51.

Translation of numbers from a decimal system to binary, octal and hexadecimal

The translation of numbers from a decimal system to binary, octal and hexadecimal is more complex and can be carried out in various ways. Consider one of the translation algorithms on the example of the transfer of numbers from the decimal system to binary. It must be borne in mind that algorithms for the translation of integers and the correct fractions will vary. Algorithm for the transfer of integer decimal numbers into a binary system for the number of translation algorithm for the correct decimal fractions into a binary number system. Translation of numbers from the system with the base P into the system with the base Q

Slide 52.

Algorithm for the transfer of whole decimal numbers in a binary number system

Consistently perform the division of the original whole decimal number and obtained by the entire private on the base system until a private, less divider is obtained, that is, smalight 2. Record the resulting residues in the reverse sequence. EXAMPLE

Slide 53.

19 2 9 18 1 4 8 0 1910=100112

Translate a decimal number 19 to a binary number system

Another way to write

Slide 54.

Algorithm for the transfer of the right decimal fractions into a binary number system.

Consistently perform multiplication of the original decimal fraction and the resulting fractional parts of the works on the base of the system (by 2) until the zero fractional part is obtained or the required accuracy of the calculations will be achieved. Record the resulting parts of the work in direct sequence. EXAMPLE

Slide 55.

Translate 0.7510 to binary number system

A2 \u003d 0, a-1a-2 \u003d 0,112

Slide 56.

Translation of numbers from the system with the base P into the system with the base Q

The translation of the numbers from a positional system with an arbitrary base P into the system with a base Q is made according to algorithms similar to those discussed above. Consider the algorithm for the translation of integers on the example of the translating of a whole decimal number 42410 in a hexadecimal system, that is, from the number system with the base p \u003d 10 to the number system with the base Q \u003d 16. In the process of executing the algorithm, it is necessary to note that all actions must be carried out in the original number system (in this case in decimal), and the remnants received to record the numbers of the new number system (in this case hexadecimal).

Slide 57.

Consider the algorithm for the translation of fractional numbers on the example of the translation of the decimal fraction A10 \u003d 0.625 in the octal system, that is, from the number system with the base P \u003d 10 to the number system with the base Q \u003d 8. The translation of numbers containing both the whole and fractional part is made in two stages. Separately translated on the appropriate algorithm the whole part and separately - fractional. In the final record of the resulting number, the whole part of the fractional is separated by the comma.

Slide 58.

Translation of numbers from a binary number system to octal and hexadecimal and back

The translation of the numbers between the number systems, the bases of which are degrees of the number 2 (Q \u003d 2N), can be carried out on simple algorithms. Such algorithms can be used to transfer numbers between binary (Q \u003d 21), octal (q \u003d 23) and hexadecimal (q \u003d 24) with surge systems. Translation of numbers from a binary number system to octal. Translation of numbers from a binary number system to hexadecimal. Translation of numbers from octal and hexadecimal surfaces in binary.

Slide 59.

Translation of numbers from a binary number system to octal.

Two digits are used to record binary numbers, that is, each discharge of the number 2 options are possible. We solve the indicative equation: 2 \u003d 2i. Since 2 \u003d 21, then i \u003d 1 bits. Each discharge of the binary number contains 1 bit of information. Eight digits are used to record octal numbers, that is, in each discharge, there are 8 recording options. We solve the indicative equation: 8 \u003d 2i. Since 8 \u003d 23, then i \u003d 3 bits. Each discharge of the octal number contains 3 bits of information.

Slide 60.

Thus, to translate a whole binary number to the octal one, it needs to be divided into groups of three digits, to the right left, and then convert each group into an octal figure. If in the last, left, group will be less than three digits, then it is necessary to supplement it on the left with zeros. We translate in this way the binary number 1010012 in the octal: 101 0012 To simplify the translation, you can use the table of transforming binary triad (groups of 3 digits) in octal numbers.

Slide 61.

To transfer a fractional binary number (correct fraction) in the octal, it is necessary to split it into the triads from left to right (without taking into account the zero to the comma) and, if in the last, right, the group will be less than three digits, supplement it to right with zeros. Next, the triads are necessary to replace on octal numbers. For example, we transform a fractional binary number A2 \u003d 0.1101012 in an octaous number system: 110 101 0,658

Slide 62.

Translation of numbers from a binary number system to hexadecimal

Sixteen digits are used to write hexadecimal numbers, that is, in each discharge, 16 recording options are possible. We solve the indicative equation: 16 \u003d 2i. Since 16 \u003d 24, then i \u003d 4 bits. Each category of the octal number contains 4 bits of information.

Slide 63.

Thus, to translate a whole binary number to hexadecimal, it needs to be divided into groups of four digits (notebooks), right to left, and if in the last, left, group will be less than four digits, then it must be supplemented on the left with zeros. To transfer a fractional binary number (correct fraction) to hexadecimal, it is necessary to split it on the tetrads from left to right (without taking into account the zero to the comma) and, if in the last, right, group will be less than four digits, add it to the right to zero. Next, the notebooks must be replaced by hexadecimal numbers. Tetrad conversion table in hexadecimal numbers

Slide 64.

Translation of numbers from octal and hexadecimal surcharge systems to binary

To transfer numbers from octal and hexadecimal numbering systems to binary, the numbers are needed to convert to the group of binary digits. To translate from the octal system to a binary number, each number should be converted to a group of three binary digits (triad), and when transforming a hexadecimal number - to a group of four digits (tetrad).

Slide 71.

Presentation of numbers in a fixed-comma format

The integers on the computer are stored in memory in a fixed-comma format. In this case, each discharge of the memory cell is always the same one of the same number, and the "comma" "is" on the right after the youngest discharge, that is, outside the discharge mesh. For the storage of whole non-negative numbers, one memory cell is assigned (8 bits). For example, the number A2 \u003d 111100002 will be stored in the memory cell as follows:

Slide 72.

The maximum value of a whole nonnegative number is achieved in the case when units are stored in all cells. For n-discharge presentation, it will be 2n - 1. Determine the range of numbers that can be stored in RAM in the format of integer non-negative numbers. The minimum number corresponds to eight zeros stored in eight bits of the memory cell, and is zero. The maximum number corresponds to eight units and equals the range of changes in integer non-negative numbers: from 0 to 255

Slide 73.

For the storage of integers, two memory cells (16 bits) are allocated to the sign (16 bits), and the senior (left) discharge is discharged under the number of numbers (if the number is positive, then 0, if the number is negative - 1). The presentation in the computer of positive numbers using the "sign - value" format is called the direct code of the number. For example, the number 200210 \u003d 111110100102 will be represented in a 16-bit view as follows: the maximum positive number (taking into account the allocation of one discharge on the sign) for integers with the sign in the n-discharge representation is: A \u003d 2N-1 - 1

Slide 74.

Additional code is used to represent negative numbers. Additional code allows you to replace the arithmetic operation of subtraction by the addition by the operation, which significantly simplifies the operation of the processor and increases its speed. An additional negative code A stored in n cells is 2N - | A |. To obtain an additional negative code, you can use a fairly simple algorithm: 1. The number module is recorded in direct code in n binary discharges. 2. Get the reverse code number, for this value of all bits to invert (all units are replaced to zeros and all zeros are replaced by units). 3. To the resulting reverse code to add a unit. EXAMPLE

Slide 75.

The advantages of the presentation of numbers in a fixed-semicolon format are simplicity and clarity of the presentation of numbers, as well as the simplicity of algorithms for the implementation of arithmetic operations. The disadvantage of the presentation of numbers in a fixed-comma format is a small range of representation of values, insufficient to solve mathematical, physical, economic and other tasks, in which both very small and very large numbers are used.

Slide 76.

Slide 77.

Presentation of floating-comma numbers

The real numbers are stored and processed in a floating point compute. In this case, the position of the comma in the recording of the number may vary. The format of a floating point is based on the exponential form of a record, in which any number can be represented. So the number A can be represented as: where M is the Mantissa number; Q is the basis of the number system; n - order of number.

Slide 78.

This means that Mantissa must be the right shot and have a digit after a semicolon, different from zero. We transform a decimal number 555.55, recorded in natural form, in an exponential form with a normalized mantissa:

Slide 83.

Data storage

Information encoded with the help of natural and formal languages, as well as information in the form of visual and sound images is stored in the person's memory. However, for long-term storage of information, its accumulation and transmission from generation to generation are used media. (student message)

To enjoy previewing presentations, create yourself an account (account) Google and log in to it: https://accounts.google.com


Signatures for slides:

Binary coding

Discretization Discretization of information is the process of converting information from the continuous form of the presentation to the discrete.

Discretization process No. coordinate points 1 (2,1) 2 (5.4) 3 (0.7) ...

Binary encoding Alphabet - a finite set of characters other than each other (characters) used to submit information. The power of the alphabet is the number of characters included in it (characters).

Binary coding alphabet containing two characters is called binary alphabet.

Binary coding 0 1 0 1 0 1 0 1 0 1 0 1 0 1 Singing number 1 2 3 4 Two-digit binary code 00 01 10 11 Sequence number of symbol 1 2 3 4 5 6 7 8 Three-digit binary code 000 001 010 011 100 101 110 111.

The length of the binary chain is the number of characters in binary code - refer to the discharge of a binary code. Binary coding Binary code bit 1 2 3 4 5 6 7 8 9 10 Number of code combinations 2 4 8 16 32 64 128 256 512 1024 If the number of code combinations should be denoted by the letter n, and the bit rate of the binary code - the letter I, then the identified pattern will be represented by the formula : N \u003d 2 i

The task of the Multi tribe leader instructed its minister to develop binary code and translate all important information to it. Binary code of which bit will be required if the alphabet used by the multi tribe contains 16 characters? Write all the code combinations. N \u003d 16 i \u003d? N \u003d 2 i 16 \u003d 2 i 2 * 2 * 2 * 2 \u003d 2 i 2 4 \u003d 2 i i \u003d 4 0000 0001 0010 0111 1000 1001 1010 1011 1100 1101 1110 1111

Uniform and uneven codes Uniform codes in code combinations contain the same number of symbols, uneven - Miscellaneous! Morse code Code Table ASCII

The most important discretion of information is the process of converting information from the continuous form of the presentation to the discrete. Language Alphabet is a finite set of different characters used to present information. Alphabet containing two characters is called binary alphabet.


2 Table of Contents Binary Coding In Computer Analog and Discrete Form of Information View Analog and Discrete Shape Presentation of Information Binary Coding Graphic Images Binary Coding Graphic Images Binary Sound Encoding Binary Coding Video Information Binary Coding Text Information


3 Binary coding in the computer All the information that the computer processes must be represented by binary code using two digits: 0 and 1. These two characters are called binary numbers or bits in the computer must be organized: encoding and decoding coding - converting input information in A shape perceived by the computer, i.e. Binary Code Decoding - Transformation of Data from Binary Code into the shape, who understands a person Hi!


4 Why binary encoding is convenient to encode information in the form of a sequence of zeros and units, if you present these values \u200b\u200bas two possible stable states of the electronic element: 0 - no electrical signal; 1 - the presence of an electrical signal. Lack of binary coding - long codes. But the technique is easier to deal with a large number of simple elements than with a small number of complex. Methods for encoding and decoding information in the computer, first of all depends on the type of information, namely, what should be encoded: numbers, text, graphic images or sound.


5 Analog and discrete form of information presentation The person is able to perceive and store information in the form of images (visual, sound, tactile, taste and olfactory). Summary images can be saved as images (drawings, photos and so on), and sounds are fixed on plates, magnetic tapes, laser disks and so on information, including graphical and sound, can be represented in analog or discrete form with analog The presentation of the physical value takes an infinite set of values, and its values \u200b\u200bare changed continuously at a discrete representation, the physical value takes a finite set of values, and its value changes hoppy


6 analog and discrete form of information presentation An example of analog and discrete report presentation: the position of the body on the inclined plane and on the stairs is given by the values \u200b\u200bof the coordinates x and y when the body moves along the inclined plane, its coordinate can take an infinite set of continuously changing values \u200b\u200bfrom a certain range, and when driving On the stairs only a certain set of values, and changing jumps like


7 Discretization Example of analog view of graphical information Picturesque web, the color of which changes continuously, and the discrete image printed using an inkjet printer and consisting of separate points of different color an example of analog storage of sound information is a vinyl record (the sound track changes its form continuously), and discrete The audio CD (which contains areas with different reflectivity) transformation of graphic and sound information from an analog form to a discrete is made by sampling, that is, partitioning a continuous graphic image and continuous (analog) sound signal into separate elements. In the sampling process, coding is made, that is, the assignment to each element of a specific value in the form of sampling code is the conversion of continuous images and sound in a set of discrete values \u200b\u200bin the form of codes






10 Step 1. Discretization: breakdown on pixels. Raster coding Step 2. For each pixel, a single color is determined. The pixel is the smallest pattern of the pattern, for which you can independently set the color. Resolution: Number of pixels per inch, Dots Per inch (DPI) Screen 96 DPI, DPI printing, 1200 dpi printing house


11 Raster coding (True Color) Step 3. From Color - To Numbers: Model RGB Color \u003d R + G + B Red Red Blue Blue Green Green R \u003d 218 G \u003d 164 B \u003d 32 R \u003d 135 G \u003d 206 B \u003d 250 STEP 4. Numbers - in the binary system. How much memory needs to store color 1 pixel? ? How many different colors can be encoded? ? 256 · 256 · 256 \u003d (True Color) R: 256 \u003d 2 8 options, you need 8 bits \u003d 1 byte R g B: Total 3 byte Color depth


12 Color Model RGB Color Images can have a different color depth, which is set by the number of bits used to encode the color color when encoding the color of one image point in three bits (one bit on each color RGB), then we will get all eight different colors


13 True Color In practice, to save information about the color of each color image point in the RGB model, 3 bytes are usually given (i.e. 24 bits) - 1 byte (i.e., 8 bits) for the value of the color of each component The way each RGB component can take a value in the range from 0 to 255 (only 2 8 \u003d 256 values), and each point of the image, with such a coding system can be painted in one of the colors such a set of colors is called True Color (truthful colors ) because the human eye is still unable to distinguish more diversity


14 Calculate the volume of video memory In order to form an image on the monitor screen, each point information (point color code) should be stored in a computer video memory. Calculate the required volume of video memory for one of the graphics modes in modern computers, the screen resolution is usually 1280 x 1024 points. Those. A total of 1280 * 1024 \u003d points. With a color depth 32 bits per point, the required volume of video memory: 32 * \u003d bit \u003d byte \u003d 5120 kb \u003d 5 MB


15 Raster coding (True Color) CMYK model Spending (subtractable), used when preparing images for printing on a professional printer and serves as the basis for four-color printing technology. The color components of this model are the colors obtained by subtraction of primary white: blue (sun) \u003d white - red \u003d green - blue; magenta (magenta) \u003d white - green \u003d red + blue; Yellow (Yellow) \u003d White - blue \u003d red + green. The problem of the SMU color model: In practice, no paint is absolutely clean and necessarily contains impurities, overlapping additional colors in practice does not give clean black. Therefore, in this color model and the component of pure black color was turned on.




17 Coding of vector images The vector image is a combination of graphic primitives (point, cut, ellipse ...). Each primitive is described by mathematical formulas. Coding envy from applied virtue of vector graphics is that files that store vector graphic images have a relatively small volume is also important that vector graphic images can be increased or reduced without loss of quality


18 Vector drawings are built of geometric shapes: cuts, broken, rectangles of circle, ellipses, arcs smoothed lines (Bezier curves) for each figure in memory stored: dimensions and coordinates in the picture color and style border color and fill style (for closed figures) formats Files: WMF (Windows MetaFile) CDR (CorelDRAW) AI (Adobe Illustrator) FH (Freehand)


19 vector drawings are the best way to store drawings, schemes, cards; When encoding there is no loss of information; When resizing there are no distortion; less file size depends on the complexity of the pattern; Ineffectively use for photos and blurry images


20 File graphic formats Formats Graphic files define the storage method in the file (raster or vector), as well as the storage form (used by the compression algorithm) The most popular raster formats: BMP GIF JPEG TIFF PNG


21 Graphic File Formats Bit Map Image (BMP) Universal format of raster graphic files are used in the Windows operating system. Supported by many graphic editors, including the Paint editor. It is recommended for storing and exchanging data with other Tagged Image File File Format (TIFF) format of raster graphic files, supported by all major graphic editors and computer platforms. Includes a compression algorithm without information loss. Used to exchange documents between different programs. Recommended for use when working with publishing systems


22 Graphics File Formats Graphics Interchange Format (GIF) Format of raster graphic files, supported by applications for various operating systems. Includes compression algorithm without information loss, allowing you to reduce the file size several times. It is recommended for storing images created by programmatically (charts, graphs, and so on) and drawings (type of application) with a limited amount of colors (up to 256). Used to accommodate graphic images on web pages on the Internet portable Network Graphic (PNG) format of raster graphic files, similar to the GIF format. It is recommended to place graphic images on web pages on the Internet Joint Photographic Expert Group (JPEG) format of raster graphic files, which implements an effective compression algorithm (JPEG method) for scanned photos and illustrations. The compression algorithm allows you to reduce the file volume in tens of times, however, leads to an irreversible loss of part of the information. Supported by applications for various operating systems. Used to accommodate graphic images on web pages on the Internet


23 Questions and Quests: What types of computer images do you know? What is the maximum number of colors can be used in the image, if 3 bits are given to each point? What do you know about the color model RGB? Calculate the required volume of video memory for graphic mode: screen resolution is 800 x 600, the quality of color reproduction is 16 bits.




25 Sound coding Sound is a wave with a continuously changing amplitude and frequency: the greater the amplitude, the more louder for a person, the greater the frequency, the higher the tone of complex continuous sound signals can with sufficient accuracy to represent in the form of a sum of the simplest sinusoidal oscillations each sinusoid, It can be accurately set by some set of numerical parameters - amplitudes, phases and frequencies that can be viewed as a sound code at some point in time.


26 Sound sampling The sound signal encoding its temporal discretization is carried out - the continuous wave is divided into separate small temporary sections and for each such site there is a certain amount of amplitude thus the continuous dependence of the amplitude of the signal from time is replaced by a discrete volume of volume levels.


27 The quality of binary sound encoding is determined by the depth of coding and the sampling frequency. Sampling frequency - the number of measurements of the signal level per unit of time The number of volume levels determines the coding depth. Modern audio cards provide a 16-bit sound coding depth. In this case, the number of volume levels is N \u003d 2 i \u003d 2 16 \u003d 65536




29 Presentation of video information Processing video information requires a very high performance of the computer system What is a film from the point of view of computer science? First of all, this is a combination of sound and graphic information. In addition, to create on the screen of the effect of the movement, a discrete technology of rapid change of static pictures is used in essence. Studies have shown that if one second is replaced by more frames, the human eye perceives changes to them as continuous


30 Presentation of video information When using traditional information preservation methods The electronic version of the film will be too big enough. A fairly obvious improvement is that the first frame is to remember the whole (in the literature it is called key), and in the following to maintain only differences from the initial frame (difference frames)


31 Some video file formats There are many different video data presentation formats. Video for Windows based on universal files with AVI extension (Audio Video Interleave - alternation of audio and video) is becoming increasingly distributed. Recently, video compression systems are obtained, allowing some imperceptible image distortions in order to increase the degree of compression. Motion Picture Expert Group serves the most famous standard. Methods used in MPEG are not easy for understanding and rely on a rather complicated mathematics larger distribution received technology called DivX (Digital Video Express). Thanks to DivX, it was possible to achieve the degree of compression, which allowed to squeeze a high-quality record of a full-length film for one CD - compress 4.7 GB of a DVD film to 650 MB


32 MIDI sound file formats - recording of musical works in the form of a synthesizer commands, compact, a person's voice is not played, (correspond to the vector view in the graph) WAV is a universal sound format, it stores full information about digitized sound (corresponds to the BMP format in the chart). It takes a very large amount of memory (15 MB to 1 minute) MP3 - the compression format of audio information with adjustable information loss, allows you to compress files several times depending on the specified bitrate (on average 11 times). Even with the highest bitrate - 320 kbit / s - provides 4-fold compression compared to APE CDs - the compression format of audio information without loss of information (and therefore - quality), the compression ratio of about 2


33 Multimedia Multimedia (Multimedia, from English. Multi - Many and Media - Media, Wednesday) - A set of computer technologies that simultaneously use several information environments: text, graphics, video, photo, animation, sound effects, high-quality soundtracks under the word "Multimedia »Understand the impact on the user on several information channels at the same time. Multimedia is a combination of the image on the computer screen (including graphic animation and video frames) with text and sound accompaniment The largest spread of the multimedia system was obtained in the field of training, advertising, entertainment




35 Binary coding of text information Starting from the 60s, computers have increasingly used to handle text information and at present most of the PC in the world are occupied by the processing of text information. Traditionally, for encoding one character, the amount of information is used \u003d 1 byte (1 byte \u003d 8 bits).




37 Binary Coding Text Information Coding lies in the fact that each symbol is put in accordance with the unique binary code from to (or decimal code from 0 to 255) It is important that the assignment of a specific code is a question of agreement that is fixed by the code table


38 Table encoding Table in which all symbols of the computer alphabet are made in accordance with the sequence numbers (codes), is called the encoding table for different types of computers, various encodings are used. With the distribution of IBM PC, the International Standard has become the ASCII encoding table (American Standart Code for Information Interchange) - American Standard Information Exchange Code


39 ASCII Standard Encoding Table in this table is only the first half, i.e. Symbols with numbers from 0 () to 127 (). 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, the new international standard Unicode has been widespread, which takes two bytes to each symbol. With it, you can encode (2 16 \u003d) different characters.


42 The most common currently is the Microsoft Windows encoding, denoted by the reduction of CP1251 ("CP" means "Code Page", "Code Page"). CP1251


The International Standardization Organization (International Standards Organization, ISO) approved another encoding as a standard for Russian language called ISO ISO


46


48 Text Information Today is very many people to prepare letters, documents, articles, books, etc. Use computer text editors. Computer editors, mainly work with an alphabetic size of 256 characters in this case it is easy to calculate the amount of information in the text. If 1 alphabet symbol carries 1 byte of information, then you just need to count the number of characters; The resulting number will give information the text in the bytes. Let a small book made using a computer contains 150 pages; On each page of 40 lines, in each line 60 characters. So the page contains 40x60 \u003d 2400 bytes of information. Volume of all information in the book: 2400 x 150 \u003d byte


49 Pay attention! 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, then their conversion is carried out in another binary code (see the number "Presentation of numbers in the computer"). Take the number 57. 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 when used in calculations, the code of this number will be obtained by the rules of translation into the binary system and get -


50 Questions and tasks: What is the encoding of text information in the computer? Clear your surname, name, class number with the ASCII code. What message is encoded in the Windows-1251 encoding: counting that each character is encoded by one byte, appreciate the information volume of the following sentence from Pushkin Quatrain: Singer-David was slightly small, but Holiafaged!


51 Questions and tasks: Calculate the required volume of video memory for graphic mode: screen resolution of 800 x 600, color reproduction of 16 bits. To store a raster image, the size of 64 * 64 pixels took 1,5 kb of memory. What is the maximum possible number of colors in the image palette? Specify the minimum amount of memory (in KB), sufficient to store any raster image size 64 * 64 pixels, if it is known that the image is used in the palette of 256 colors. Do not store the palette itself. How many seconds will be required to a modem transmitting messages with a bit / s speed to transmit a color raster image of 800 * 600 pixels in size, provided that in the palette of 16 million colors? A color image is scanned with a size of 10 * 10 cm. The resolution of the scanner is 1200 * 1200 dpi, the color depth is 24 bits. What information volume will have the received graphic file?

To enjoy previewing presentations, create yourself an account (account) Google and log in to it: https://accounts.google.com


Signatures for slides:

Binary symbolic information coding 12/17/2015 1 Prepared: Teacher of Informatics MBOU SOSH No. 2 Lipetsk Kukina Ekaterina Sergeevna

2 With binary coding of text information, each symbol is put in line with a unique decimal code from 0 to 255 or the corresponding binary code from 00000000 to 11111111. So a person distinguishes characters by drawing them, and the computer - according to their code.

According to the formula that connects the number of messages N and the amount of information i, you can calculate how much information is necessary to encode each sign 3

4 Assigning a specific binary code symbol is a question of agreement that is fixed in the code table. The first 33 code (from 0 to 32) does not correspond to the symbols, but operations (translation of the string, input of the space, etc.). Codes from 33 to 127 are international and correspond to the symbols of the Latin alphabet, numbers, the signs of arithmetic operations and punctuation signs.

5 codes from 128 to 255 are national, i.e., various symbols correspond to the same code in national encodings. There are 5 single-byte code tables for Russian letters, so the texts created in one encoding will not be properly displayed in another.

6 chronologically one of the first standards of coding of Russian letters on computers was koi code - 8 ("Information exchange code - 8 bit"). This encoding is used in computers with the UNIX operating system.

7 The most common encoding is the standard Cyrillistic Microsoft Windows encoding, denoted by the abbreviation CP1251 ("CP" means "Code Page"). All Windows are applications that work with the Russian language support this encoding.

8 To work in the MS-DOS operating system, an "alternative" encoding is used, in Microsoft Terminology - CP 866 encoding.

9 Apple developed for Macintosh computers their own coding of Russian letters (Mac)

The International Standardization Organization (International Standards Organization, ISO) approved another encoding as a standard for Russian language called ISO 8859 - 5.

Koi - 8 - UNIX CP1251 ("CP" means "Code Page") - Microsoft Windows CP 866 - MS-DOS MAC - Macintosh ISO 8859 - 5 Encoding Standards 11

Symbol Coding Table Binary Code Decimal Code COI8 CP1251 CP866 MAC ISO 0000 0000 0 ......... 0000 1000 8 Removing the Last Symbol (Backspace Key) ......... 0000 1101 13 Translation Row (Enter key) ......... 0001 0000 32 SPACE 0010 0001 33 ! ......... 0101 1010 Z ......... 0111 1111 127 ......... 128 - Kommersant ......... 1100 0010 194 B - - - T ......... 1100 1100 204 L M :: b ......... 1101 1101 221 ... ......... 1111 1111 225 b. The gap is indisputable. Gap 12.

13 Recently, a new international standard Unicode has appeared, which takes no one byte to each symbol, and two, and therefore it can be encoded with 256 characters, 2 16 \u003d 65 536 different characters. This encoding is supported by editors starting with MS Office 97.

Task 1: Determine the symbol on the numerical code. Run the Notepad program Press Alt and 0224 (on an additional digital keyboard). A symbol a. Repeat this operation for numeric codes from 0225 to 0233. The symbols in the encoding (Windows CP 1251). Write them down in a notebook. Press Alt and 161 (on an additional digital keyboard). A symbol b will appear. Repeat this operation for numeric codes 160, 169, 226. The encoding symbols will appear (CP 866 MS-DOS). Write them down in a notebook. fourteen

Task 2: Determine the numeric code for characters Determine the numeric code to be entered by holding the ALT key to obtain the characters: ☼, §, $, ♀ Explanation: This code is contained in the range from 0 to 50. 15

16 Thank you for your attention!