Smart electronic machines have long been firmly established in human everyday life. But despite this, their device still raises basic questions among many users. For example, not everyone knows what types of memory there are. But here everything is not so complicated, although not entirely simple. There are two main types - internal memory and external, which, in turn, have their own gradation.

Types of internal computer memory

Internal memory is so called because it is built into the main units of the computer and is an integral element of the system, ensuring its performance. It is impossible to remove or extract it without negative consequences. The following types are distinguished:

  • operational – is a set of programs and algorithms necessary for the operation of the microprocessor;
  • cache memory - this is a kind of buffer between the RAM and the processor, which ensures optimal execution speed system programs;
  • constant – laid down when the computer is manufactured at the factory, it includes tools for monitoring the state of the PC at each boot; programs responsible for starting the system and performing basic actions; system setup programs;
  • semi-permanent – contains data about the settings of a specific PC;
  • video memory – it stores video fragments that should be displayed on the screen; it is part of the video controller.

Types of computer RAM

The performance and “intellectual level” of a computer are largely determined by its RAM. It stores data used during active work electronic machine. It can also be of different types, but the most commonly used blocks are DDR, DDR2, DDR3. They differ in the number of contacts and speed characteristics.

Types of external computer memory

External computer memory is presented various types removable media information. Today, the main ones are hard drives, USB drives, or flash drives and memory cards. Laserdiscs and floppy disks are considered obsolete. But, although it is removable, it is still used as a storage unit for permanent memory and the computer will not work without it. However, it can be freely taken out and moved to another system unit, which is why it is classified as external devices memory.


Before considering the specific features of a computer device, we want to warn that basically everything said will apply to personal computers, servers, workstations - computers that are commonly called minicomputers. The design of mainframes and supercomputers is much more complex. However, many fundamental things will apply to them.

All information in a computer is represented in binary code. This is natural for numbers. For non-numeric information (for example, text), a standard technique is used: all possible elementary values ​​are numbered, and instead of the values ​​themselves, their numbers (which play the role of codes) are stored. So, when presenting text information all symbols are summarized in a table, and the text is written by symbol numbers. To present video information there are various ways encoding the color dots that make up the picture. For audio information, sound is decomposed into harmonics, which are also encoded. In any case, non-numeric data codes stored in a computer have no content outside of coding tables and encoding and decoding algorithms.

The number of binary bits required to record a symbol or point in a picture depends on the number of options for the encoding object. The largest number that can be written in binary using N numbers, consists of N units. This number is 1+2+4+…+2 N -1 = 2N-1 . For example, using eight binary digits, you can distinguish 2 8 = 256 characters of text. Eight binary digits (bits) make up one byte.

This reasoning is so important for the entire ideology of storing information in binary code that in computer science it is customary to measure volume not in the decimal number system, but in special units of measurement using powers of two. Using the fact that 2 10 = 1024 is not very different from 10 3 = 1000, it is customary to call 1024 bytes a kilobyte (1Kb). Similarly, a megabyte is 1024 kilobytes (1MB), and a gigabyte is 1024 megabytes (1GB). The amount of information in the modern world is so great that we have to introduce another unit - a terabyte, equal to 1024 gigabytes (1TB). If special precision is not needed, then we can assume that 1 TB = 10 3 GB = 10 6 MB = 10 9 kb = 10 12 bytes.

The computer device in which information is stored is called random access memory (RAM) or random access memory. From a logical point of view, RAM is a linear sequence of bytes. The length of this sequence is in modern personal computers several gigabytes (as of 2011). Even more (tens and hundreds of gigabytes) RAM supercomputers. This memory stores data as well as programs broken down into machine instructions. Specific memory allocation for numbers and commands is made operating system computer during its operation.

The serial number of a byte in RAM is called an address. Byte numbering starts from zero. The address (in manuals or error messages) is usually written in hexadecimal number system. To specify a section of RAM, the machine instruction specifies the address of its starting byte and its length.

The number of bytes allocated to store one number varies from one to 10 bytes and depends on the type of number. There are two main formats for representing numbers in computer memory: fixed point and floating point. Fixed point numbers are written in their binary representation: 1 bit = 1 binary digit. One bit is allocated to represent the sign of the number (0 is plus, 1 is minus). A floating point number must be represented in so-called normalized (or exponential) form: X=M∙10 n, where the number M (called the mantissa) is enclosed from 1 to 10, the number n(called order) - whole. The mantissa and the order are recorded separately in memory. It should be noted that mixed formats are also supported, when the decimal digits of a number are written in binary.

Formats of the same class may differ in quantitative parameters, which determine the range of numbers that can be represented in this format. For example, if a variable is the day of the month, then one byte is enough to store it. To store integer values ​​ranging from -2 15 = –32768 to 2 15 -1 = 32767, two bytes are sufficient in fixed-point format. If an integer does not fit into this range, then four bytes are allocated to store it (range -2 31 to 2 31 -1). Floating point representation is used, as a rule, in scientific and technical problems when variables can change over a large range of values ​​or very high accuracy is needed.

To encode text information, character encoding tables are used. Currently, there is an ASCII standard (American Standard Code for Informational Interchange), containing the set and numbers of 128 basic characters (codes from 0 to 127) and the set and numbers of 128 extended characters (codes from 128 to 255). The ASCII character code occupies one byte. Since the ASCII standard does not include characters from national alphabets (of which there are many more than 128), in each country the 128 extended character codes (from 128 to 255) are replaced by characters from the national alphabet. In order to correctly encode and display characters when printing and displaying, for each language you need special program– language driver.

In the Unicode standard, each character takes up two bytes. Thanks to this, 2 16 = 65536 different characters can be encoded in the Unicode standard, which allows characters to be unified different languages, including hieroglyphs, and a large number of special symbols and signs.

A logical value is a value that can take only two values ​​– true and false (“true” and “false”). One bit is enough to store the value of a logical variable. Typically, the value “zero” of a memory bit is associated with true, and the value “one” is associated with false.

To store more than complex objects, such as video images or sounds, descriptions of these objects are converted into numerical form. There are quite a lot of ways to encode this type of information, but it should be remembered that ultimately, an image or sound is always represented in computer memory as a sequence of zeros and ones, which are located in bits of computer memory. Displaying a picture on the screen or listening to music through the speakers is the result of programs that decode and interpret information. Such programs are often also called drivers.

Do you know what RAM is? Of course you do. This is a device on which the speed of the computer depends. In general, this is true, but this definition looks a little amateurish. But what exactly is RAM? How is it structured, how does it work, and how does one type of memory differ from another?

She's the same RAM (English) is a volatile part of computer memory designed to store temporary data processed by the processor. This data is stored in the form of a binary sequence, that is, a set of zeros and ones. It is called volatile because for its operation it requires a constant connection to the source. electric current. Once you disconnect it from the power supply, all the information stored in it will be lost.

But if RAM is one part of computer memory, then what is the other part? The carrier of this part of the memory is HDD. Unlike RAM, it can store information without being connected to a power source. Hard disks, flash drives and CDs - all of these devices are called ROM, which stands for read-only memory. Like RAM, ROM stores data in the form of ones and zeroes.

What is RAM needed for?

Here the question may arise, why do we need RAM at all? Is it not possible to allocate a buffer on the hard drive to temporarily store the data being processed by the processor? In principle it is possible, but it would be a very inefficient approach.

The physical design of RAM is such that reading/writing to it is much faster. If you had ROM instead of RAM, your computer would run very slowly.

Physical RAM device

Physically, the RAM is a removable board (module) with memory chips located on it. The microcircuit is based on a capacitor - a device that has been known for more than a hundred years.

Each microcircuit contains many capacitors connected into a single cellular structure - a matrix or otherwise a memory core. The chip also contains an output buffer - a special element into which information enters before being transferred to the memory bus. From physics lessons we know that a capacitor can only assume two stable states: either it is charged or discharged. Capacitors in RAM play the same role as the magnetic surface hard drive, that is, retention in oneself electric charge, corresponding to the information bit. The presence of charge in the cell corresponds to one, and the absence - zero.

How information is written and read in RAM

It will be easier to understand how data is written and read in RAM if you present it in the form of a regular table. To read data from a cell, a row address selection signal is issued to the horizontal row (RAS). After it prepares all the capacitors of the selected row for reading, a column address selection signal is sent along the vertical column (CAS), which allows you to read data from a specific matrix cell.

The characteristic that determines the amount of information that can be written or read in one read/write operation is called the microcircuit width or, in other words, the width of the data bus. As we already know, before being transferred to the chip bus, and then to CPU, the information first goes into the output buffer. It communicates with the core via an internal channel with a bandwidth equal to the width of the data bus. Another important characteristic of RAM is the memory bus frequency. What it is? This is the frequency with which information is read, and it does not necessarily have to coincide with the frequency of the signal supplied to the memory matrix, which we will see in the example DDR memory.

IN modern computers so-called synchronous dynamic random access memory is used - SDRAM. It uses a special clock signal to transmit data. When it is supplied to the microcircuit, information is synchronously read and transferred to the output buffer.

Let's imagine that we have a memory chip with a data bus width 8 bit, to which with frequency 100 MHz a sync signal is supplied. As a result, in one transaction the output buffer contains 8-bit hits the channel exactly 8 bit or 1 byte information. Exactly the same clock signal arrives at the output buffer, but this time the information goes to the memory chip bus. By multiplying the frequency of the clock signal by the width of the data bus, we get another important parameter - throughput memory .

8 bit * 100 MHz = 100 Mb/s

DDR memory

It was simplest example work SDR- memory with single data transfer rate. This type of memory is now practically not used; today its place is occupied by DDR- memory with double data transfer speed. Difference between SDR And DDR lies in the fact that data from the output buffer of such RAM is read not only when a clock signal arrives, but also when it disappears. Also, when a clock signal is supplied to the output buffer from the memory core, the information flows not through one channel, but through two, and the width of the data bus and the frequency of the clock signal itself remain the same.

For DDR memory, it is customary to distinguish between two types of frequencies. The frequency at which the clock signal is supplied to the memory module is called the base frequency, and the frequency at which information is read from the output buffer is called the effective frequency. It is calculated using the following formula:

effective frequency = 2 * base frequency

In our example with a microcircuit 8 bit and frequency 100 MHz it will look like this.

8 bits * (2 * 100 MHz) = 200 Mb/s

What is the difference between DDR and DDR2, DDR3 and DDR4

The number of channels connecting the core with the output buffer, the effective frequency, and therefore the memory bandwidth. Regarding the data bus width (bit depth), then in most modern memory modules it is 8 bytes (64 bits). Let's say we have a standard memory module DDR2-800. How to calculate its throughput? Very simple. What's happened 800 ? This is the effective memory frequency in megahertz. Multiply it by 8 bytes and we get 6400 Mb/s.

To represent information in computer memory
(both numeric and non-numeric)
Binary encoding is used.
The elementary memory cell of a computer has a length
8 bits (bytes). Each byte has its own number
(it's called an address).
The largest sequence of bits that
The computer can process as a single unit,
called a machine word.

Numbering of bits in a two-byte machine word

Bit No. 15 is considered the most significant,
bit No. 0 is the least significant.
The length of a machine word depends on the bit depth
processor and can be equal to 16, 32 bits and
etc.

Text characters (letters, numbers, signs) are encoded in combinations
of zeros and ones. Every character that can be
used in the text, the binary code is assigned.
Using a 1-bit code, you can encode only 2 different
symbol.
There can be 4 two-bit combinations (00; 01, 10, 11) i.e. 22.
Three-bit combinations – 8 (23).
To encode 32 (25) different characters, 5 bits are enough.
This code was used in telegraph work in the 20s of the twentieth century,
TCHK and ZPT were used instead of punctuation marks.
Using 7 bits, 128 characters can be encoded (binary
seven-bit information exchange code KOI-7).

Representation of text information in computer memory

The optimal number of characters that
used when typing various texts,
approximately 200 (Latin and Russian letters,
capital and lowercase, punctuation marks,
numbers, mathematical signs, elements
pseudographics).
There can be so many characters in the 2nd s.s.
encoded as a sequence of 8 bits
(28=256), i.e. 1 byte.

Representation of text information in computer memory

The most famous 8-bit encoding is the table
ASCII (American Standard Coding for Information
Interchange is the standard American code for
exchange of information).
It consists of 2 parts: the main one, identical throughout
world (decimal codes 0-127 are control
codes, Latin letters, punctuation marks, numbers) and
extended (codes 128-255 are letters
national alphabet, pseudographic symbols).
The first 32 codes are control characters: return
carriages, tabs, undo operations, etc.

Representation of text information in computer memory

In addition to the eight-bit character encoding system
(text) information system developed
sixteen-bit character encoding, which
called universal, UNICODE.
Such a system allows you to encode 216 = 65,536 different
characters, including almost all alphabets of our languages
planets.
Calculating the volume of text information comes down to calculating
product of the number of characters in the text by the number of digits
binary code required to encode one character.

Representation of numbers in computer memory

Mixed binary decimal system
dead reckoning"
Each decimal place is stored in a nibble (4 bits).
Decimal digits from 0 to 9 are represented
binary numbers from 0000 to 1001.
For example, packed decimal format for
storing integers with 18 significant digits
occupies 10 bytes in memory (the most significant of which
signed), uses binary decimal system
coding.

Representation of numbers in computer memory

Fixed point format
Used to store integers
15
14 ……………………………….0
Sign
Digital digits of a number
1 bit
15 bit
The most significant bit (No. 15) can be considered a sign bit. At
In this case, if it stores 0, then it is +,
if 1, then this is .
The digital digits of a number are stored in the additional
code (DK).

Representation of numbers in computer memory

Additional code (DC)
Used to store negative integers and
allows you to perform subtraction through addition.
The concept of additional code exists in any system
Reckoning.
DC is obtained by subtracting this negative
numbers from minimum number, in which the digits are on
one more.
Let's consider the principle of using additional code
using the example of decimal s.s.

The principle of operation of the additional code using the example of 10 s.s.

Let it be necessary to calculate: 8810 – 6410
Such a familiar recording of numbers to us is a direct code (PC) of numbers.
Let's perform subtraction through addition of numbers in the DC.
1) Let's convert the numbers to DC. For the number 88, DK coincides with PC.
So for all numbers that are greater than 0.
For the number -64 (it is less than 0) subtract 64 from the minimum
three-digit number (since the number 64 has two digits, then this is 100):
100 – 64 = 36 is the DC of the number 64.
2) Now let’s add the DC numbers: 88+36 = 124.
If we discard the most significant digit, we get 24, which
corresponds to the result of the subtraction.

DK for negative binary numbers
it turns out easier. Need to view
writing binary code from right to left and to
the first available unit, inclusive
leave the digits unchanged. After this
All 0 units are replaced by 1, and 1 by 0.

Representation of numbers in computer memory
(fixed point format)
Example 1. Write the number -40(10) in computer format as a signed integer.
The format size is 16 bits.
Solution.

40(10) = 101000(2)


0000 0000 0010 1000
3) We get the DC by looking through the PC from right to left
PC: 0000 0000 0010 1000
DC: 1111 1111 1101 1000
This is the binary representation of the computer representation of -4010 in the format
16-bit fixed-point computer.
For a more compact recording, use hexadecimal code: FFD8(16)

Representation of numbers in computer memory (fixed point format)

Example 2. Write the number 40(10) in computer format as an integer with
familiar. The format size is 16 bits.
Solution.
1) Convert 40(10) to the binary number system:
40(10) = 101000(2)
2) We get PC numbers in computer format. To do this, we add
binary representation of the number on the left with zeros so that it becomes 16 bits:
0000 0000 0010 1000
The resulting PC coincides with the DC, since the number is positive.
Therefore, this binary notation is the computer representation
numbers 4010 in computer fixed point format
16 bits.
For a more compact notation, use hexadecimal code:
0028(16)
Here, non-significant zeros cannot be omitted, since they are stored in
computer memory.

Representation of numbers in computer memory (fixed point format)

Another way to get a DC is to get a reverse
(inverse) code (OK), and then add 1 to it.
Example 3. Let's write down the DC of the number (–38), interpreting it
as a fixed-point value
32 bits:
1) PC number 38:
0000 0000 0000 0000 0000 0000 0010 0110;
2) OK number -38 (here 0 is replaced by 1, and 1 by 0):
1111 1111 1111 1111 1111 1111 1101 1001;
3) DC is obtained by adding one to OK:
1111 1111 1111 1111 1111 1111 1101 1010
or FFFFFFDB(16).

Representation of numbers in computer memory (fixed point format)

Example 4. Given a number in computer format (16 bits): FFD4(16). Define
decimal value of the number.
Solution.
1) Write down the binary code of the number:
FFD4(16) = 1111 1111 1101 0100(2)
2) Select the format elements:
1 111 1111 1101 0100
sign Digital digits
3) Since the sign bit is 1 (this is –), the digital bits are written in
DK. Let's get a PC using the same rule that we used to get a DC:
DC: 1111 1111 1101 0100
PC: 0000 0000 0010 1100
4) Convert PC to 10 s.s.: 32+8+4 = 44(10)
5) We remember that the sign is -. Therefore the answer is: -44(10)

Any real number can be written in standard form
(sometimes called scientific notation):
M 10p, where 1 M< 10, p - целое.
For example, 120100000 = 1.201108.
Since each decimal position is different from
neighboring power of 10, multiplying by 10 is equivalent
shift the decimal point one position to the right.
Similarly, dividing by 10 moves the decimal point by
position to the left.
Therefore, the example can be continued:
120100000 = 1,201 108 = 0,1201 109 = 12,01 107 .
It turns out that the decimal point “floats” in numbers and more
does not mark the absolute space between an integer and a fraction
in parts.

Representation of numbers in computer memory (floating point format)

Consider the entry M 10 p.
Here: M is the mantissa of the number, p is the order of the number.
To maintain maximum accuracy, in memory
The computer mantissa is stored in a normalized form.
It means that:
1 M< 2.
This way of storing a floating point mantissa
implies that the binary comma is at
fixed place: binary comma follows
first significant binary digit. This means that in
normalized mantissa whole part always equal to 1.
Then its value lies between one and two.

Representation of numbers in computer memory (floating point format)

Let's look at the real number format. For him maybe
allocate 4, 6, 8, 10 and other bytes. DC is not used.
The space allocated for a floating point number is divided by
three fields: sign (most significant bit), place to store order
and a place to store the mantissa. For 4 byte format:
31 30 … … … 23 22…………………….0
Sign Displaced
order
1 bit
8 bit
Mantissa
23 bits

Representation of numbers in computer memory (floating point format)

The shifted order is the order to which
a constant has been added (it's called offset
order), corresponding to the bit depth of the format.
This allows you to avoid using DC.
The offset is selected so that the minimum value
order corresponded to zero. For example, for the 8 byte format
order takes 11 bits and has a range from 2–1023 to 21023,
so the offset is 1023(10) = 11 1111 1111(2) = 3FF(16).

Representation of numbers in computer memory
(floating point format)
Table of order offsets for formats with
floating point
Bit depth
format, bit
Bit depth
order, bit
Order offset
10 s.s.
16 s.s.
32
8
127
7F
64
11
1023
3FF
80
15
16383
3FFF

Representation of numbers in computer memory
(floating point format)
Algorithm for obtaining a representation of a real number in
computer memory:
1) translate module given number to binary system
calculus;
2) normalize the binary number, i.e. write in the form M 2p,
where M is the mantissa (its integer part is equal to 1) and p is the order,
written in decimal notation;
3) add the offset to the order and translate the offset
order in binary number system;
4) taking into account the sign of the given number (0 - positive; 1 -
negative), write down its representation in memory
computer. At the same time, discard the whole mantissa
part, because it is always equal to 1.

Representation of numbers in computer memory
(floating point format)
Example 1. Write the number –312.3125(10) in the format
computer floating point 4 bytes (32
bit).
Solution.
1) Binary notation of the modulus of this number: 100111000.0101.
2) We normalize the number, i.e. move the comma so that
in the whole part there was one 1. We have:
100111000,0101 = 1,001110000101 28.
3) We get the shifted order by adding to the order
offset for 32-bit format (12710 or 7F16).
It is more convenient to perform actions in the 16th s.s.:
810 = 10002 = 816
816 + 7F16 = 8716 = 1000 01112 .

Representation of numbers in computer memory (floating point format)

4) Let's write down the format elements:
Sign:
Characteristic:
Mantissa:
1 (because the number is less than 0)
1000 01112
0011100001012 (we don’t take the whole part)
5) “Collecting” format elements:
1 10000111 001110000101 - only 21 digits, but 32 are needed.
6) Add 11 more zero digits to the right, because it will be
leading zeros:
1100 0011 1001 1100 0010 1000 0000 00002
This is a record of the answer in the 2nd s.s. For a more compact recording
we use the 16th s.s.:
C39C2800

Representation of numbers in computer memory (floating point format)

Example 2: The real number C1040000 is specified in
computer floating point size 4 format
bytes (32 bits). Determine the decimal value of a given
numbers.
Solution.
1) Binary notation of this number:
1100 0001 0000 0100 0000 0000 0000 0000
2) Select the format elements:
Sign:
1 (i.e. the number is negative)
Shifted order: 1000 0010 or 8216
Mantissa: 000 0100 0000 0000 0000 0000

Representation of numbers in computer memory (floating point format)

3) We get the order by subtracting the offset from 8216 for
32 bit format:
8216 – 7F16 = 316
4) We get the mantissa - the integer part is equal to 1, and the fractional part
take from the format, discarding insignificant zeros:
1, 00001
5) Write the binary number in normal form:
-1,000012∙23
6) The order says that the comma should be moved by 3
digit to the right:
-1000,012 = - (8+1/4) = -8,2510

Representation of numbers in computer memory (floating point format)

Features of the floating point format
If, when calculating with real numbers, the result comes out
outside the permissible range, then program execution
is interrupted. This happens, for example, when dividing by zero, or
by a very small number close to zero.
Real numbers whose mantissa has a bit depth greater than
the number of bits allocated for the mantissa in memory is represented by
in the computer approximately (with a “truncated” mantissa). For example,
the rational decimal number 0.1 will be represented in the computer
approximately (rounded), since in the binary number system
its mantissa has an infinite number of digits. The consequence of this
approximation is the error of machine calculations with
real numbers.
The computer performs calculations with real numbers
approximately. The error of such calculations is called
error of machine calculations.
A bunch of real numbers, exactly representable in memory
computer in floating point form, is limited and
discrete. Their number can be calculated.

Let's look at raster graphics.
To encode any image, it is divided into
code the dots and the color of each dot.
For example, a black and white picture can be encoded
using two bits: 11 is white, 10 is light gray, 01 is dark gray and 00 is black.
Encoding 256 different colors requires 8 bits.
To encode full color images into
modern computers for storing colors of one
dots 3 bytes are used.

Presentation of graphic information

Color coding system graphic information
RGB
(Red, Green, Blue)
Each color is a combination of three colors
components: red, green and blue. First byte
determines the intensity of the red component, the second
- green, the third - blue.
White color is encoded by the maximum intensity of all
three components (255, 255, 255 or in the 2nd s.s. 111111111,
11111111, 11111111). Black color - the absence of everyone
color components - (0,0,0). Red color can
be dark - (120,0,0) or bright red (255,0,0).
The RGB system provides an unambiguous definition of 16.5
million different colors and shades (224).

Presentation of graphic information

Quality graphic image also depends on
number of points (pixels) per unit area. This
the parameter is called resolution and is measured in points
per inch - dpi.
Calculation of the volume of graphic information comes down to
calculating the product of the number of points in
image on the number of digits required for
coding the color of one point.
For example, for a color image of 640 × 480 size,
composed of 256 colors, requires:
8 640 480 = 23 64 10 6 8 10 = 23 26 2 5 2 3 23
2 5 = 210 5 25 3 5 = 22 75 23 210 bits = 4 75 KB
= 300 KB.

Presentation of graphic information

Number of colors displayed on screen (K) and
number of bits allocated for each pixel (N),
related by the formula:
K=2N
Number of bits N allocated for each pixel
called bit depth.

The sound wave is converted into binary code with
using a sound card (audio adapter).
During audio recording, the audio adapter with
measures amplitude over a certain period
electric current and enters into the register
binary code of the resulting value.
Then the resulting code from the register is rewritten
into the computer's RAM. Quality
computer sound determined
characteristics of the audio adapter: frequency
sampling and bit depth.

Presentation of audio information

Sampling frequency is the number
measurements of the input signal in 1 second.
Measured in Hertz (Hz).
One measurement per second corresponds to frequency
1 Hz.
1000 measurements per second corresponds to frequency
1 kHz (kilohertz).

Presentation of audio information

The register width is the number of bits in
audio adapter register. She defines
accuracy of input signal measurements. How
The larger the bit depth, the smaller the error
each individual value conversion
electrical signal to a number and back.
If the bit depth is 8, then when measuring the input
signal can be received 256 different
values. Obviously, the higher the bit depth
audio adapter, the more accurately it is reproduced
sound.

Presentation of audio information

Example. Determine the size of V in digital bytes
audio file, the playing time of which is t=10 seconds at
sampling frequency ν=22.05 kHz and resolution i=8
bit. The file is not compressed.
Solution.
Formula: V = ν ∙ i ∙ t bits
22050∙10∙8 / 8 bytes = 220500 bytes

All information on a computer is presented in digital form. For numbers this representation is natural. For non-numeric information (for example, text), a standard technique is used: all possible values ​​are numbered and instead of the values ​​themselves, their numbers (which play the role of codes) are stored. Thus, to represent text information, a symbol table is used, containing all the characters of the alphabet that may appear in the text, and the text stored in the computer memory is replaced by a list of symbol numbers in this table. Information of other types is encoded similarly. In any case, the content of the represented non-numeric data stored in the computer depends on numbering tables (called encoding tables).

The number of binary digits required to record one code using this recording method depends on the total size of the table. The largest number that can be written in binary using N digits consists of N ones. This number is 1 + 2 + 4 + ... + 2 N -1 = 2 N- 1. For example, using 8 binary digits you can distinguish 2 8 = 256 characters of text. Consequently, approximately log 2 M binary digits are required to store value codes whose total size is equal to the number M.

This reasoning is so important for the entire ideology of storing information in binary code that in computer science it is customary to measure the volume of data and computer memory not in the decimal number system, but in special units of measurement based on powers of two. Using the fact that 2 10 = 1024 is not very different from 10 3 = 1000, it is customary to call 1024 bytes a kilobyte (1Kb). Similarly, a megabyte (1MB) is 024 kilobytes, and a gigabyte (1GB) is 1024 megabytes. The amount of information in the modern world is so great that it is necessary to introduce an additional unit - a terabyte (1T6), equal to 1024 gigabytes. If special precision is not needed, then we can assume that approximately 1 terabyte = 1 thousand gigabytes = 1 million megabytes = 1 billion kilobytes = 1 trillion bytes.

Dimension of information Behind piece of information take the amount of information contained in the choice of one of two equally probable events. This unit is called a binary digit, or bit.

In computer science and computer technology, a system for representing data in binary code has been adopted. The smallest unit of this representation is the bit.

Byte  It is a group of interconnected bits. 1 byte = 8 bits. One byte encodes one character of text information.

1 Kilobyte (KB) = 1024 bytes.

However, everywhere where this is not important, they consider that 1 KB is equal to 1000 bytes. Conventionally, we can assume that one page of unformatted typewritten text is equal to 2 KB.

1 Megabyte (MB) = 1024 KB.

1 Gigabyte (GB) = 1024 MB.

1 Terabyte (TB) = 1024 GB.

It has already been said that logically the computer's RAM is a linear sequence of bytes. The length of this sequence in modern personal computers reaches tens and hundreds of megabytes. Supercomputers have even more memory.

To store numbers, depending on their size and accuracy, several bytes of memory are allocated (from 1 to 10). There are two main forms of representing a number in computer memory. In the first method, all bits of the memory bytes allocated for storing a number are numbered sequentially and the binary digits of the number are directly written to the corresponding memory bits. One bit is allocated to represent the sign of the number (0 is plus, 1 is minus). In the second method, the number is represented in the so-called normalized (or exponential) form: X= M 10 n , where the number M(called the mantissa) enclosed from 1 to 10, the number P(called order) - whole.

Several formats are used to represent integers and normalized numbers, which differ in size and the presence or absence of a sign bit. This determines the range of numbers that can be represented in a given format. For example, if it is known in advance that some integer value is positive and cannot be greater than 255, then 1 byte is enough to store it. To store values ​​that vary in the range from -2 15 = -32,768 to 2 15 - 1 = 32,767, 2 bytes are allocated. If an integer does not fit into this range, then 4 bytes are allocated to store it (range -2 31 to 2 31 - 1).

In principle, a similar approach is also suitable for fractional numbers. The digits of a number are entered into the computer memory, but it is assumed that there is a decimal point at a certain place in this entry. This form of recording is called representation of a number with fixed point. The maximum number of digits in a number and the specific position of the decimal point are determined by the format of the number. There are several options for the format for representing fixed-point numbers in computer memory.

The representation of normalized numbers is called introducing converting a floating point number . It is used to store quantities that can have values ​​over a very large range. In computer memory, the exponent and mantissa are stored separately in the form of signed binary integers. Modern computers use several formats for representing floating-point numbers, which differ in the total size of the number representation (6, 8 or 10 bytes), as well as the size of the memory allocated separately for the mantissa and the order. This determines the overall range of possible values ​​of a numerical value in a computer and the minimum error in calculations resulting from the inability of the computer to store more digits after the decimal point.

In reality, the information is heterogeneous. Data is usually divided into numeric, textual and logical information. Text information is understood as a linear sequence of characters. To represent a character in computer memory, the following scheme is used: a set of valid text characters is recorded (usually 2 8 = 256 characters), and each character is assigned a number (from 0 to 255), which serves as the character code. After this, the sequence of characters is replaced by a sequence of codes, which are written in the computer memory as binary integers (unsigned). The code of one character fits in 1 byte of memory (this is why historically the memory was divided into groups of 8 bits, since it turned out that the optimal number of characters is 2 8, and not, for example, 2 9).

The set of valid characters and their codes make up the character encoding table. Naturally, this table should not depend on the arbitrariness of the programmer or computer manufacturer, since the exchange of information in this case will be very difficult. Currently there is a standard A.S.C./ f (American Standard Code for Informational Interchange), containing 128 basic characters (codes 0 to 127) and 128 extended characters (codes 128 to 255). Since this standard does not include characters from national alphabets, in each country the 128 extended character codes (from 128 to 255) are replaced by characters from the national alphabet. In other words, every language with an alphabet different from English sets its own standard. Meaningful text in one language will be meaningless in another. Thus, for proper operation With text, not only the information itself is important, but also its interpretation. A program that correctly interprets character codes according to the encoding table in a particular alphabet is called text driver

A logical value is a value that can take only two values: true Andfalse (“true” and “false”). To store the value of a logical variable, 1 bit is enough. Typically, the value “one” of a memory bit is associated with true, the value “zero” with false.

To store more complex objects in computer memory, such as video images or sounds, descriptions of these objects are converted into numerical form. There are quite a few ways to encode this type of information, but in the end, an image or sound is represented as a sequence of zeros and ones, which are placed in bits of computer memory and, if necessary, retrieved from there and interpreted in a certain way.