Computer science lesson “Measuring information. Alphabetical approach." 8th grade.


Lesson summary “Measuring information”

Do you think there is some kind of pattern here?

Right! Note that 2=21, 4=22, 8=23, 16=24

In general, this is written as follows: N=2b

The width of the binary code is the information weight of the symbol.

But what about numbers that are not equal to a whole power of two?

If the number N is not equal to an integer power of two, then to determine the information weight of a symbol proceed as follows: take the value M closest to N, greater than N, equal to an integer power of two: N

The information weight of each symbol, expressed in bits (i), and the power of the alphabet (N) are related by the formula: N=2i

Let's look at examples:

Example 1

The alphabet consists of 16 characters. Find information weight of characters

Example 2

The information weight of the symbol is 5 bits. Find the cardinality of this alphabet

The information volume of a text consists of the information weights of its constituent characters.

Example 3

The following text, written in binary alphabet: 1101001011000101110010101101000111010010

contains 40 characters, therefore, its information volume is 40 bits.

Example 4

The message contains 15 characters. Power of the alphabet in which the text is written 16. Find the information volume of this text

Today, computers are most often used to prepare text documents. The alphabet from which such “computer text” is composed contains 256 characters.

An alphabet of this size can accommodate all practically necessary symbols: lowercase and uppercase Latin and Russian letters, numbers, punctuation marks, arithmetic operations signs, all kinds of brackets, etc.

Since 256=28, one character of the computer alphabet “weighs” 8 bits. A value equal to eight bits is called a byte.

It is easy to calculate the information weight of one character is 1 byte. You just need to count the number of characters in the text. The resulting value will be the information volume of the text, expressed in bytes.

Example 5

A small book prepared using a computer contains 150 pages. Each page has 40 lines, each line has 60 characters (including spaces between words).

Solution:

This means that the page contains 40*60=2400 bytes of information. To calculate the information volume of the entire book, you need to multiply the resulting value by the number of pages:

2400 bytes*150=360000 bytes.

This example already shows that a byte is a “small” unit. Imagine that you need, for example, to measure the information volume of an entire library. In bytes this will be a huge number! Larger units are used to measure larger volumes.

Therefore, the information volume of the above-mentioned book is approximately 360 KB. And if you calculate more precisely, you get:

360000:1024=351.5625 KB

351.5625:1024=0.34332275 MB

Example 6

The message is written using an alphabet containing 8 characters. How much information does one letter of this alphabet carry?

Problem solving:

Problem 1

The tribal alphabet consists of 32 characters. Tribe members use only words of 8 characters in their speech and writing. How much information does this tribe's 20-word message convey?

Problem 2

How much information in bits is contained on an SD disk with a capacity of 650 MB?

Problem 3

Measure the information volume of a message recorded on a computer:

Hooray! Holidays!!!

Express this volume in bits, bytes, kilobytes.

In conclusion, let us once again draw attention to an important property of the considered alphabetic approach. When using it, the content of the text is not taken into account. Text consisting of a meaningless combination of characters will have a non-zero information volume.

3. Expected result:

Determine the information volume of the text

Convert the amount of information from one unit to another.

4. Lesson summary

  1. Summarize the lesson: analyze the work of the whole class and individual students, evaluate the class’s work and assign grades.
  2. Reflection. Answers to questions are recorded by each student on the back of the self-assessment card. After which the completed cards are handed over to the teacher.
  • What new did you learn in the lesson?
  • Was it interesting to work in the lesson?
  • What did you learn in the lesson?
  • Do you think you met the goal set at the beginning of the lesson?

5.Homework

Do it in writing.

Translate:

A) 5 KB = __ byte = __ bit B) __ KB = ___ byte = 12288 bits C) __ KB = ___ byte = 213 bits D) __ GB = 1536 MB = ____ KB E) 512 KB = ____ byte = ____ bits

Units of information

§ 2. Approaches to measuring information

So, in a binary code, one binary digit carries 1 bit of information. 8 bits form one byte. In addition to the bit and byte, larger units are used to measure information:

    1 KB (kilobyte) = 210 bytes;

    1 MB (megabyte) = 210 KB = 220 bytes;

    1 GB (gigabyte) = 210 MB = 220 KB = 230 bytes;

    1 TB (terabyte) = 210 GB = 220 MB = 230 KB = 240 bytes;

    1 PB (petabyte) = 210 TB = 220 GB = 230 MB = 240 KB = 250 bytes.

Historically, the prefixes “kilo”, “mega”, “giga”, “tera”, etc. in computer science are interpreted differently than in mathematics, where “kilo” corresponds to 103, “mega” - 106, “giga” - 109, "tera" - 1012, etc.

This happened because 210 = 1024 ≈ 1000 = 103. Therefore, 1024 bytes began to be called a kilobyte, 210 kilobytes began to be called a megabyte, etc.

To avoid confusion with different uses of the same prefixes, in 1999 the International Electrotechnical Commission introduced a new standard for naming binary prefixes. According to this standard, 1 kilobyte is equal to 1000 bytes, and the value of 1024 bytes received a new name - 1 kibibyte (Kibyte).

In our country, in 2009, the “Regulation on units of quantities allowed for use in the Russian Federation” was adopted. It says that the name and designation of the unit of information “byte” (1 byte = 8 bits) is used with the binary prefixes “kilo”, “mega”, “giga”, which correspond to the multipliers “210”, “220” and “230” "(1 KB = 1024 bytes, 1 MB = 1024 KB, 1 GB = 1024 MB). These prefixes are written with a capital letter.

Let's look at a few more examples of solving problems related to determining the information volume of messages.

Example 8.

When registering in a computer system, each user is given a password of 12 characters, formed from decimal digits and the first six letters of the English alphabet, and the letters can be used in both lowercase and uppercase - the corresponding characters are considered different. Passwords are encoded character by character. All characters are encoded with the same and minimum possible number of bits. To store information about each user in the system, the same and minimum possible integer number of bytes are allocated. In addition to the password itself, the system stores additional information for each user, for which 12 bytes are allocated. What is the maximum number of users the system is designed for if it has 200 KB allocated for storing user information?

First of all, let's find out the power of the alphabet used to write passwords: N = 6 (uppercase letters) + b (lowercase letters) +10 (decimal digits) = 22 characters.

To encode one of 22 characters, 5 bits of memory are required (4 bits will allow you to encode a total of 24 = 16 characters, 5 bits will allow you to encode 25 = 32 characters); 5 is the minimum possible number of bits to encode 22 different characters of the alphabet used to write passwords.

To store all 12 characters of a password, 12 • 5 = 60 bits are required. It follows from the condition that the password must occupy an integer number of bytes; since 60 is not a multiple of eight, we take the nearest larger value that is a multiple of eight: 64 = 8 • 8. Thus, one password takes 8 bytes.

User information takes 20 bytes, since it contains not only the password (8 bytes), but also additional information (12 bytes). The maximum number of users (“users”) whose information can be stored in the system is 10,240:

Example 9.

The size of a message consisting of 8192 characters is 16 KB. What is the maximum power of the alphabet used to transmit the message?

Answer: The maximum capacity of the alphabet is 65,536 characters.

Rating
( 2 ratings, average 4.5 out of 5 )
Did you like the article? Share with friends:
Для любых предложений по сайту: [email protected]