Why is binary coding universal? Programming Methods
The computer processes a large number ofinformation. Audio files, pictures, texts - all this must be reproduced or displayed. Why is binary coding a universal method of programming the information of any technical equipment?
What is the difference between encryption and encryption?
Often people identify the concepts of "coding"and "encryption", when in fact they have different meanings. So, encryption is the process of transforming information in order to conceal it. It can often be deciphered by the person who has changed the text, or specially trained people. Coding is used to process information and to simplify the work with it. Usually a common encoding table is used, familiar to everyone. It is also built into the computer.
Binary coding principle
Binary coding is based onUse only two characters - 0 and 1 - to process information used by different devices. These signs were called binary digits, in English - binary digit, or bit. Each of the binary code symbols occupies the computer's memory in 1 bit. Why is binary coding a universal method of information processing? The fact is that it is easier for a computer to process fewer characters. This directly affects the productivity of the PC: the fewer functional tasks to perform the device, the higher the speed and quality of work.
The principle of binary coding does not occuronly in programming. By alternating the deaf and sonorous drum beats, the inhabitants of Polynesia transmitted information to each other. A similar principle is also used in Morse code, where long and short sounds are used to transmit a message. The Telegraph ABC is still used today.
Where is binary coding used?
Binary encoding of information in the computeris used universally. Each file, be it music or text, must be programmed so that in the future it can be easily processed and read. The binary coding system is useful for working with symbols and numbers, audio files, graphics.
Binary coding of numbers
Now in computers numbers are presented incoded form, incomprehensible to an ordinary person. The use of Arabic numerals, as we imagine, is irrational for technology. The reason for this is the need to assign to each number its own unique symbol, which is sometimes impossible to do.
There are two numeral systems: positional and non-positional. The non-position system is based on the use of Latin letters and is familiar to us in the form of Greek numerals. This way of recording is difficult enough to understand, so it was abandoned.
The position number system is used today. This includes binary, decimal, octal, and even hexadecimal encoding of information.
Decimal system of coding we use inlife. These are the familiar Arabic numerals, which are clear to every person. Binary coding of numbers differs using only zero and one.
Integer numbers are converted to a binary coding system by dividing them by 2. The resulting private ones are also divided in stages into 2, until the result is 0 or 1. For example, the number 12310 in the binary system can be represented as 11110112. And the number 2010 will look like 101002.
Indices 10 and 2 are denoted, respectively,decimal and binary system for coding numbers. The binary coding symbol is used to simplify the work with the values represented in different number systems.
The methods of programming decimal numbers are basedon the "floating point". In order to correctly translate the value from decimal to binary coding system, use the formula N = M x qp. M is a mantissa (the expression of a number without any order), p is the order of the value of N, and q is the base of the system coding (in our case 2).
Not all numbers are positive. In order to distinguish between positive and negative numbers, the computer leaves a space of 1 bit to encode the character. Here zero represents a plus sign and a one represents a minus sign.
Using such a number system makes it easy for a computer to work with numbers. That's why binary coding is universal in computing processes.
Binary coding of textual information
Each alphabet character is encoded by its own setzeros and ones. The text consists of different symbols: letters (uppercase and lowercase), arithmetic signs and other different values. Coding text information requires the use of 8 consecutive binary values from 00000000 to 11111111. In this way, 256 different characters can be converted.
To avoid confusion in the coding of the text,Use special tables of values for each character. They contain the Latin alphabet, arithmetic signs and special signs (for example, €, ¥, © and others). Spacing symbols 128-255 encode the national alphabet of the country.
To encode 1 character, 8 bits of memory are required. To simplify the scores, 8 bits are equated to 1 byte, so the total disk space for the text information is measured in bytes.
Most personal computers are equipped withthe standard table of ASCII (American Standard Code for Information Interchange). Other tables are also used in which the text information coding system is different. For example, the first known character encoding is called KOI-8 (the information exchange code is 8-bit), and it works on computers with UNIX OS. Also widely found is the table of codes CP1251, which was created for the Windows operating system.
Binary coding of sounds
Another reason why binary codingis a universal method of programming information - it's its simplicity when working with audio files. Any music is a sound wave of different amplitude and frequency of oscillation. From these parameters depends the volume of the sound and its pitch.
To program a sound wave, the computerdivides it conditionally into several parts, or "selections." The number of such samples can be large, so there are 65536 different combinations of zeros and ones. Accordingly, modern computers are equipped with 16-bit sound cards, which means using 16 binary digits to encode one sample of the sound wave.
To play the audio file, the computer processes the programmed binary code sequences and connects them to one continuous wave.
Graphical information can be presented inthe form of drawings, diagrams, pictures or slides in PowerPoint. Any picture consists of small dots - pixels, which can be painted in different colors. The color of each pixel is coded and saved, and in the end we get a full-fledged image.
If the picture is black and white, the code for each pixelcan be either one or zero. If you use 4 colors, then the code for each of them consists of two digits: 00, 01, 10 or 11. This principle distinguishes the quality of any image processing. Increasing or decreasing the brightness also affects the number of colors used. At best, the computer distinguishes about 16 777 216 shades.
There are different methods of programminginformation, among which binary coding is the most effective. Just using two characters - 1 and 0 - the computer easily reads most of the files. At the same time, the processing speed is much higher than, for example, the decimal programming system. The simplicity of this method makes it irreplaceable for any technique. That's why binary coding is universal among its counterparts.</ p>>