Presentation on computer science information coding. Presentation - coding of information. A penny saves the ruble

Slide 1

Skupova Alexandra 11 "A"

Slide 2

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

Slide 3


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

Slide 4

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

Slide 5

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

Slide 6

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

Slide 7

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

Slide 8

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

Slide 9

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

Slide 10

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

Slide 11

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

Slide 12

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

Slide 13

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

Slide 14

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

Slide 15

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

Slide 16

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

Slide 17

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

Slide 18

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

Slide 19

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

Slide 20

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

Slide 21

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

Slide 22

International ASCII encoding

Slide 23


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

Slide 24

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

Slide 25

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

Slide 26

Types of Computer Images
There are two ways to create and store graphic objects on your computer - as a raster image or as a vector image. Each type of image uses its own encoding method.

Slide 27

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

Slide 28

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

Slide 29

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

Slide 30

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

Slide 31

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

Slide 32

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

Slide 33

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

Slide 34

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

Slide 35

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

Slide 36

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

Slide 37

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

Slide 38

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

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

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

Graphic files

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

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

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

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

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

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

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

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

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

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

Encoding and Decoding

To exchange information with other people, a person uses natural languages. Along with natural languages, formal languages ​​were developed for professional use in any field. Representing information using a language is often called encoding.

Code is a set of symbols (conventions) to represent information.

Code is a system of conventional signs (symbols) for transmitting, processing and storing information (messages).

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

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

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

In a broader sense, decoding is the process of reconstructing the content of an encoded message. With this approach, the process of writing text using the Russian alphabet can be considered as encoding, and reading it is decoding.

Encoding methods

information

Different methods can be used to encode the same information; their choice depends on a number of circumstances: the purpose of coding, conditions, available funds.

If you need to write down the text at the pace of speech, we use shorthand; if you need to send text abroad, we use the English alphabet; If you need to present the text in a form understandable to a literate Russian person, we write it according to the rules of Russian grammar.

"Hello, Sasha!" "Zdravstvuy, Sasha!"

Encoding methods

information

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

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

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

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

Message encryption

In some cases there is a need for secrecy

text of a message or document, so that those who are not supposed to read it cannot read it. It's called

protection against unauthorized access.

IN in this case the secret text encrypted

IN in ancient times encryption was called secret writing.

Encryption is the process of converting plaintext into ciphertext, and decryption is the process of converting it back into ciphertext, which restores the original text.

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

Encryption methods are the subject of a science called

cryptography.

First telegraph

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

telegraph apparatus through wires to another telegraph apparatus.

Inventor Samuel Morse invented an amazing code (Morse code, Morse code, Morse code), which still serves humanity today. Information

encoded with three “letters”: long signal (dash), short signal (dot) and no signal (pause) to separate letters. Thus, coding comes down to using a set of characters arranged in a strictly defined order.

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

Morse code

− − −

Morse code

− − − −

− − − −

− − − − −

− − −

− − − −

− − −

Code unevenness

− − − − − −

A characteristic feature of Morse code is

variable code length of different letters , that's why Morse code is called uneven code.

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

First wireless telegraph (radio receiver)

On May 7, 1895, Russian scientist Alexander Stepanovich Popov, at a meeting of the Russian Physico-Chemical Society, demonstrated a device he called a “lightning detector,” which was intended for recording electromagnetic waves.

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

radio receiver. In 1897, using wireless telegraphy devices, Popov received and transmitted messages between the shore and a military vessel.

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

In 1900, thanks to radio stations built on the island of Gogland and at the Russian naval base in Kotka under the leadership of Popov, rescue operations were successfully carried out on board the warship Admiral General Apraksin, which ran aground on the island of Gogland. As a result of the exchange of messages transmitted by wireless telegraphy, the crew of the Russian icebreaker Ermak was promptly and accurately transmitted information about the Finnish fishermen located on the broken ice floe.


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

Encoding information

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


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

MORSE code

A -

L -

B -

C - -

IN - -

H - - -

G - -

N -

W - - - -

ABOUT - - -

D -

SCH - - -

P - -

E

AND -

R -

Kommersant - - -

Y - - -

WITH

Z - -

b - -

AND

E -

U -

Y - - -

Yu - -

F -

TO - -

I - -

X


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

Numerical coding method

Example 2. Encrypted proverb.

To chop wood you need

and to water the garden -

The fishermen made it in the ice

and began to fish.

The most prickly animal in the forest is

Now read the proverb:

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

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

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


KOPEYKA SAVES THE RUBLE


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


33211463212165101816312030

1015221618141241032


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


a) 34352113053335

1700011520002031351835

10142215171300241005454335


b) WHAT?_WHERE?_WHEN?


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


"Permutation" code.

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

Restore the words and determine the permutation rule:


INFORMATION – LRCHSUPGSHLV

COMPUTER – NSPTYABHZU

MAN - SEASON


NULTHSYOUGCHLV - CRYPTOGRAPHY


REPRESENTATION OF SYMBOLIC INFORMATION IN A COMPUTER

"Text information" = "Character information"

Text is any sequence of characters.

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

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


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

A sequence of one character can encode only two letters:

0 – A


A sequence of two characters can encode four letters:

00 – A

01 – B

10 – V

11 – G


A three-character sequence can already encode eight letters:

000 – A

001 – B

010 – B

011 – G

100 – D

101 – E

110 – F

111 – W

DEDVEZEZHA – 100 101 100 010 101 111 101 110 000

GDEVAZA


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

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

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

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

This is enough to encode a message in good Russian.

This is exactly the domestic code KOI-7

(Information Exchange Code)

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


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

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

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


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

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

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

Those. the encoding table establishes the connection between

computer's external symbol alphabet

And internal binary representation .


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

Standard ASCII code table


Alternate ASCII code table


UNICODE is a new international character encoding standard.

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

How many characters can be encoded using UNICODE?


REPRESENTATION OF NUMERIC INFORMATION

Numbers in computer memory are stored in two formats:

  • fixed point format (integers);
  • floating point format (decimal fractions).

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


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

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

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


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

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

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


1607 10 = 11001000111 2

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

0000 0110 0100 0111

in compressed hexadecimal form this code will be written like this: 0647


1607 10 = 11001000111 2

0000 0110 0100 0111

1111 1001 1011 1000

____________________________________________________

1111 1001 1011 1001


PRESENTATION OF GRAPHIC INFORMATION

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

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

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

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


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

Color

Brown


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

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

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

0100 - red, 1100 – bright red color;

0110 - brown, 1110 – bright brown


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

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

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

and the number of flowers - TO (palette size)

expressed by the formula K=2 b .

Color code depth – b usually called

bit depth colors.

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


SOUND REPRESENTATION

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

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


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

sound wave

MICROPHONE

Alternating electric current

AUDIO ADAPTER

COMPUTER MEMORY

Binary code


The process of reproducing audio information stored in computer memory

COMPUTER MEMORY

Binary code

AUDIO ADAPTER

Electrical signal

ACOUSTIC

SYSTEM

sound wave


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


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

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

sampling frequency and bit depth.


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

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

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