ComputersProgramming

Why is binary coding universal? Programming Methods

The computer processes a large amount of information. 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 hide it. It can often be deciphered by the person who 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 on using only two characters - 0 and 1 - to process information used by various 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 you need to perform the device, the higher the speed and quality of work.

The principle of binary encoding is found not only 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. "Telegraphic alphabet" is used today.

Where is binary coding used?

Binary coding of information in the computer is used everywhere. 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 in an encoded 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 can sometimes be impossible.

There are two numeral systems: positional and non-positional. The non-positioning 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 they refused it.

The positional number system is used today. This includes binary, decimal, octal and even hexadecimal encoding of information.

We use the decimal system of coding in everyday life. These are familiar to us 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 partials are also divided into two stages in stages, until the result is 0 or 1. For example, the number 123 10 in the binary system can be represented as 1111011 2 . And the number 20 10 will look like 10100 2 .

The subscripts 10 and 2 are denoted, respectively, by a decimal and binary number coding system. The binary coding symbol is used to simplify the work with the values represented in different number systems.

The methods for programming decimal numbers are based on a "floating comma". In order to correctly translate the value from decimal to binary coding system, use the formula N = M x qp. M is the 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 one represents a minus sign.

Using such a number system makes it easier 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 set of zeros 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.

In order to avoid confusion in the coding of text, special tables of values for each character are used. They contain the Latin alphabet, arithmetic signs and special signs (for example, €, ¥, © and others). The symbols of the interval 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 with a 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 coding is a universal method of information programming is 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 computer divides it conditionally into several parts, or "samples." 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.

Encoding graphics

Graphical information can be presented in the 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 encoded and saved, and in the end we get a full-fledged image.

If the picture is black and white, the code for each pixel can be either one or zero. If 4 colors are used, then the code of each of them consists of two digits: 00, 01, 10 or 11. This principle distinguishes the quality of processing of any image. Increasing or decreasing the brightness also affects the number of colors used. At best, the computer distinguishes about 16 777 216 shades.

Conclusion

There are various methods of programming information, 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, a decimal programming system. The simplicity of this method makes it irreplaceable for any technique. That's why binary coding is universal among its counterparts.

Similar articles

 

 

 

 

Trending Now

 

 

 

 

Newest

Copyright © 2018 en.birmiss.com. Theme powered by WordPress.