How to set up smartphones and PCs. Informational portal

Translation of a phrase into binary code. Binary code

Everyone knows that computers can perform calculations with large groups of data at tremendous speed. But not everyone knows that these actions depend on only two conditions: whether or not there is current and what voltage.

How does a computer manage to process such a variety of information?
The secret lies in the binary system. All data goes to the computer, presented in the form of ones and zeros, each of which corresponds to one state of the electric wire: to ones - high voltage, zeros - low, or ones - the presence of voltage, zeros - its absence. Converting data to zeros and ones is called binary conversion, and the final designation is binary code.
In decimal notation, based on the decimal system used in everyday life, the numerical value is represented by ten digits from 0 to 9, and each place in the number has a value ten times higher than the place to its right. To represent a number greater than nine in the decimal system, zero is put in its place, and one is put in the next, more valuable place on the left. Likewise, in binary, where only two digits are used, 0 and 1, each space is twice as valuable as the space to the right of it. Thus, in binary code, only zero and one can be represented as single numbers, and any number greater than one requires two spaces. After zero and one, the next three binary numbers are 10 (read one-zero) and 11 (read one-one) and 100 (read one-zero-zero). Binary 100 is equivalent to 4 decimal. Other BCD equivalents are shown in the upper table on the right.
Any number can be expressed in binary code, it just takes up more space than in decimal notation. In the binary system, you can also write the alphabet, if you assign a certain binary number to each letter.

Two digits for four places
16 combinations can be made using dark and light balls, combining them in sets of four.If dark balls are taken as zeros and light balls as ones, then 16 sets will turn out to be a 16-unit binary code, the numerical value of which ranges from zero to five ( see upper table on page 27). Even with two kinds of balls in the binary system, you can build an infinite number of combinations by simply increasing the number of balls in each group - or the number of places in the numbers.

Bits and Bytes

The smallest unit in computer processing, a bit is a unit of data that can have one of two possible conditions. For example, each of ones and zeros (on the right) means 1 bit. A bit can be represented in other ways: the presence or absence of an electric current, a hole and its absence, the direction of magnetization to the right or to the left. Eight bits make up a byte. The 256 possible bytes can represent 256 characters and symbols. Many computers process a byte of data at the same time.

Binary conversion. A four-digit binary code can represent decimal numbers from 0 to 15.

Code tables

When binary code is used to denote alphabet letters or punctuation marks, code tables are required that indicate which code corresponds to which character. Several such codes have been compiled. Most PCs accommodate a seven-digit code called ASCII, or American Standard Code for Information Interchange. The table on the right shows the ASCII codes for the English alphabet. Other codes target thousands of symbols and alphabets from other languages ​​in the world.

Part of the ASCII code table

Binary code is text, computer processor instructions, or other data using any two-character system. Most often it is a system of 0 and 1. assigns a pattern of binary digits (bits) to each character and instruction. For example, an eight-bit binary string can represent any of 256 possible values ​​and therefore can generate many different elements. Reviews of the binary code of the world professional community of programmers indicate that this is the basis of the profession and the main law of the functioning of computing systems and electronic devices.

Decoding binary code

In computing and telecommunications, binary codes are used for various methods of encoding data characters into bit strings. These methods can use fixed or variable width strings. There are many character sets and encodings for translating to binary. In fixed-width code, each letter, number, or other character is represented by a bit string of the same length. This bit string, interpreted as a binary number, is usually displayed in code tables in octal, decimal, or hexadecimal notation.

Binary code decoding: A bit string interpreted as a binary number can be converted to a decimal number. For example, the lowercase letter a, if represented by the bit string 01100001 (as in the standard ASCII code), can also be represented as decimal 97. Translating a binary code into text is the same procedure, only in reverse order.

How it works

What does a binary code consist of? The code used in digital computers is based on which there are only two possible states: on. and off, usually denoted by zero and one. If in the decimal system, which uses 10 digits, each position is a multiple of 10 (100, 1000, etc.), then in the binary system, each digital position is a multiple of 2 (4, 8, 16, etc.). A binary code signal is a series of electrical impulses that represent numbers, symbols, and operations that need to be performed.

A device called a clock sends out regular pulses, and components such as transistors turn on (1) or off (0) to transmit or block the pulses. In binary, each decimal number (0-9) is represented by a set of four binary digits or bits. The four basic arithmetic operations (addition, subtraction, multiplication, and division) can be reduced to combinations of fundamental Boolean algebraic operations on binary numbers.

A bit in communication and information theory is a unit of data equivalent to choosing between two possible alternatives in the binary number system commonly used in digital computers.

Binary code reviews

The nature of code and data is a fundamental part of the fundamental world of IT. This tool is used by specialists from the global IT "behind the scenes" - programmers whose specialization is hidden from the attention of an ordinary user. Feedback from developers on binary code indicates that this area requires a deep study of mathematical foundations and a lot of practice in the field of mathematical analysis and programming.

Binary code is the simplest form of computer code or programming data. It is fully represented by the binary system of numbers. According to reviews about binary code, it is often associated with machine code, as binary sets can be combined to form source code that can be interpreted by a computer or other hardware. This is partly true. uses sets of binary digits to form instructions.

Along with the most basic form of code, a binary is also the smallest amount of data that flows through all the complex complex hardware and software systems that handle today's data resources and assets. The smallest amount of data is called a bit. The current bit strings become code or data, which are interpreted by the computer.

Binary number

In mathematics and digital electronics, a binary number is a number expressed in base-2, or a binary digital system that uses only two characters: 0 (zero) and 1 (one).

The base-2 number system is a positional notation with a radius of 2. Each digit is referred to as a bit. Due to its simple implementation in digital electronic circuits using logical rules, the binary system is used by almost all modern computers and electronic devices.

Story

The modern binary system of numbers as the basis for binary code was invented by Gottfried Leibniz in 1679 and presented in his article "Explaining Binary Arithmetic". Binary numbers were central to Leibniz's theology. He believed that binary numbers symbolized the Christian idea of ​​creativity ex nihilo, or creation from nothing. Leibniz tried to find a system that converts the verbal statements of logic into purely mathematical data.

Binary systems that predate Leibniz also existed in the ancient world. An example is the Chinese binary system I Ching, where the text for prediction is based on the duality of yin and yang. In Asia and Africa, slit drums with binary tones were used to encode messages. The Indian scholar Pingala (circa 5th century BC) developed a binary system for describing prosody in his Chandashutrem.

The inhabitants of Mangareva Island in French Polynesia used a hybrid binary-decimal system until 1450. In the 11th century, the scientist and philosopher Shao Yong developed a method for organizing hexagrams that corresponds to the sequence from 0 to 63, as represented in binary format, with yin equal to 0, yang equal to 1. Order is also a lexicographic order in blocks of elements selected from a two-element set.

New time

In 1605, he discussed a system in which letters of the alphabet could be reduced to sequences of binary numbers, which could then be encoded as subtle variations of the typeface in any random text. It is important to note that it was Francis Bacon who supplemented the general theory of binary coding with the observation that this method can be used with any object.

Another mathematician and philosopher named George Boole published an article in 1847 called "The Mathematical Analysis of Logic," which describes the algebraic system of logic known today as Boolean algebra. The system was based on a binary approach, which consisted of three main operations: AND, OR, and NOT. This system was not put into operation until a graduate student at MIT named Claude Shannon noticed that the Boolean algebra he studied looked like an electrical circuit.

Shannon wrote a dissertation in 1937 that drew important conclusions. Shannon's thesis became the starting point for the use of binary code in practical applications such as computers and electrical circuits.

Other forms of binary code

A bit string is not the only type of binary code. A binary system in general is any system that allows only two options, such as a switch in an electronic system, or a simple true or false test.

Braille is a type of binary code that is widely used by blind people to read and write by touch, named for its creator Louis Braille. This system consists of grids of six points each, three per column, in which each point has two states: raised or deepened. Various combinations of dots are capable of representing all letters, numbers, and punctuation marks.

The American Standard Code for Information Interchange (ASCII) uses a 7-bit binary code to represent text and other characters in computers, communications equipment, and other devices. Each letter or symbol is assigned a number from 0 to 127.

Binary Coded Decimal Value or BCD is a binary coded representation of integer values ​​that uses a 4-bit graph to encode decimal digits. The four binary bits can encode up to 16 different values.

In BCD-encoded numbers, only the first ten values ​​in each nibble are correct and encode decimal digits with a zero through nine. The other six values ​​are invalid and can cause either a machine exception or unspecified behavior, depending on the computer's implementation of BCD arithmetic.

BCD arithmetic is sometimes preferred over floating point number formats in commercial and financial applications where complex number rounding behavior is undesirable.

Application

Most modern computers use a binary code program for instructions and data. CDs, DVDs, and Blu-ray Discs represent audio and video in binary form. Telephone calls are carried digitally in long distance and mobile telephone networks using pulse code modulation and in voice over IP networks.


Greek Georgian
Ethiopian
Jewish
Akshara-sankhya Other Babylonian
Egyptian
Etruscan
Roman
Danube Attic
Kipu
Mayan
Aegean
KPPU symbols Positional , , , , , , , , , , Nonga-positional Symmetrical Mixed systems Fibonaccieva Non-positional Single (unary)

Binary number system- positional number system with base 2. Due to its direct implementation in digital electronic circuits on logic gates, the binary system is used in almost all modern computers and other computing electronic devices.

Binary notation of numbers

In the binary system, numbers are written using two characters ( 0 and 1 ). In order not to be confused in which number system the number is written, it is supplied with an indicator at the bottom right. For example, the decimal number 5 10 , in binary 101 2 ... Sometimes a binary number is indicated by the prefix 0b or symbol & (ampersand), For example 0b101 or respectively &101 .

In the binary number system (as in other number systems other than decimal), the characters are read one at a time. For example, the number 101 2 is pronounced "one zero one".

Integers

A natural number written in binary as (a n - 1 a n - 2… a 1 a 0) 2 (\ displaystyle (a_ (n-1) a_ (n-2) \ dots a_ (1) a_ (0)) _ (2)), has the meaning:

(an - 1 an - 2… a 1 a 0) 2 = ∑ k = 0 n - 1 ak 2 k, (\ displaystyle (a_ (n-1) a_ (n-2) \ dots a_ (1) a_ ( 0)) _ (2) = \ sum _ (k = 0) ^ (n-1) a_ (k) 2 ^ (k),)

Negative numbers

Negative binary numbers are denoted in the same way as decimal numbers: a "-" sign in front of the number. Namely, a negative binary integer (- a n - 1 a n - 2… a 1 a 0) 2 (\ displaystyle (-a_ (n-1) a_ (n-2) \ dots a_ (1) a_ (0)) _ (2)), has the value:

(- a n - 1 a n - 2… a 1 a 0) 2 = - ∑ k = 0 n - 1 a k 2 k. (\ displaystyle (-a_ (n-1) a_ (n-2) \ dots a_ (1) a_ (0)) _ (2) = - \ sum _ (k = 0) ^ (n-1) a_ ( k) 2 ^ (k).)

additional code.

Fractional numbers

A fractional number written in binary as (an - 1 an - 2… a 1 a 0, a - 1 a - 2… a - (m - 1) a - m) 2 (\ displaystyle (a_ (n-1) a_ (n-2) \ dots a_ (1) a_ (0), a _ (- 1) a _ (- 2) \ dots a _ (- (m-1)) a _ (- m)) _ (2)), has the value:

(an - 1 an - 2… a 1 a 0, a - 1 a - 2… a - (m - 1) a - m) 2 = ∑ k = - mn - 1 ak 2 k, (\ displaystyle (a_ ( n-1) a_ (n-2) \ dots a_ (1) a_ (0), a _ (- 1) a _ (- 2) \ dots a _ (- (m-1)) a _ (- m)) _ ( 2) = \ sum _ (k = -m) ^ (n-1) a_ (k) 2 ^ (k),)

Addition, subtraction and multiplication of binary numbers

Addition table

An example of addition "column" (decimal expression 14 10 + 5 10 = 19 10 in binary looks like 1110 2 + 101 2 = 10011 2):

An example of multiplication "column" (decimal expression 14 10 * 5 10 = 70 10 in binary looks like 1110 2 * 101 2 = 1000 110 2):

Starting with the number 1, all numbers are multiplied by two. The point after 1 is called a binary point.

Converting binary numbers to decimal

Let's say a binary number is given 110001 2 ... To convert to decimal, write it down as a digit sum as follows:

1 * 2 5 + 1 * 2 4 + 0 * 2 3 + 0 * 2 2 + 0 * 2 1 + 1 * 2 0 = 49

The same thing is slightly different:

1 * 32 + 1 * 16 + 0 * 8 + 0 * 4 + 0 * 2 + 1 * 1 = 49

You can write it down in the form of a table as follows:

512 256 128 64 32 16 8 4 2 1
1 1 0 0 0 1
+32 +16 +0 +0 +0 +1

Move from right to left. Under each binary unit, write its equivalent on the line below. Add the resulting decimal numbers. Thus, the binary number 110001 2 is equivalent to decimal 49 10.

Converting fractional binary numbers to decimal

Need to translate the number 1011010,101 2 to the decimal system. Let's write this number as follows:

1 * 2 6 + 0 * 2 5 + 1 * 2 4 + 1 * 2 3 + 0 * 2 2 + 1 * 2 1 + 0 * 2 0 + 1 * 2 -1 + 0 * 2 -2 + 1 * 2 -3 = 90,625

The same thing is slightly different:

1 * 64 + 0 * 32 + 1 * 16 + 1 * 8 + 0 * 4 + 1 * 2 + 0 * 1 + 1 * 0,5 + 0 * 0,25 + 1 * 0,125 = 90,625

Or according to the table:

64 32 16 8 4 2 1 0.5 0.25 0.125
1 0 1 1 0 1 0 , 1 0 1
+64 +0 +16 +8 +0 +2 +0 +0.5 +0 +0.125

Horner transformation

In order to convert numbers from binary to decimal system using this method, it is necessary to sum the digits from left to right, multiplying the previously obtained result by the base of the system (in this case 2). Horner's method is usually used to convert from binary to decimal. The reverse operation is difficult, since it requires skills in addition and multiplication in the binary number system.

For example, the binary number 1011011 2 translated into decimal system like this:

0*2 + 1 = 1
1*2 + 0 = 2
2*2 + 1 = 5
5*2 + 1 = 11
11*2 + 0 = 22
22*2 + 1 = 45
45*2 + 1 = 91

That is, in the decimal system, this number will be written as 91.

Translation of the fractional part of numbers by Horner's method

The numbers are taken from the number from right to left and divided by the base of the number system (2).

for instance 0,1101 2

(0 + 1 )/2 = 0,5
(0,5 + 0 )/2 = 0,25
(0,25 + 1 )/2 = 0,625
(0,625 + 1 )/2 = 0,8125

Answer: 0.1101 2 = 0.8125 10

Converting decimal numbers to binary

Let's say we need to convert the number 19 to binary. You can use the following procedure:

19/2 = 9 with remainder 1
9/2 = 4 with remainder 1
4/2 = 2 without remainder 0
2/2 = 1 without remainder 0
1/2 = 0 with remainder 1

So, we divide each quotient by 2 and write the remainder to the end of the binary notation. We continue dividing until the quotient is 0. Write the result from right to left. That is, the bottom digit (1) will be the leftmost, and so on. As a result, we get the number 19 in binary notation: 10011 .

Convert fractional decimal numbers to binary

If there is an integer part in the original number, then it is converted separately from the fractional part. The conversion of a fractional number from the decimal number system to binary is carried out according to the following algorithm:

  • The fraction is multiplied by the base of the binary number system (2);
  • In the resulting product, the integer part is highlighted, which is taken as the most significant bit of the number in the binary number system;
  • The algorithm ends if the fractional part of the resulting product is equal to zero or if the required computational accuracy is achieved. Otherwise, calculations continue over the fractional part of the product.

Example: You want to translate a fractional decimal number 206,116 to a binary fraction.

Translation of the whole part gives 206 10 = 11001110 2 according to the previously described algorithms. The fractional part of 0.116 is multiplied by the base 2, putting the whole parts of the product in the digits after the decimal point of the desired binary fractional number:

0,116 2 = 0 ,232
0,232 2 = 0 ,464
0,464 2 = 0 ,928
0,928 2 = 1 ,856
0,856 2 = 1 ,712
0,712 2 = 1 ,424
0,424 2 = 0 ,848
0,848 2 = 1 ,696
0,696 2 = 1 ,392
0,392 2 = 0 ,784
etc.

Thus, 0.116 10 ≈ 0, 0001110110 2

We get: 206.116 10 ≈ 11001110.0001110110 2

Applications

In digital devices

The binary system is used in digital devices, since it is the most simple and meets the requirements:

  • The fewer values ​​exist in the system, the easier it is to manufacture individual elements operating with these values. In particular, two digits of the binary number system can be easily represented by many physical phenomena: there is a current (current is greater than a threshold value) - there is no current (current is less than a threshold value), magnetic field induction is greater than a threshold value or not (magnetic field induction is less than a threshold value) etc.
  • The fewer the number of states an element has, the higher the noise immunity and the faster it can work. For example, to encode three states in terms of voltage, current, or magnetic field induction, two threshold values ​​and two comparators would need to be entered,

In computing, it is widely used to write negative binary numbers in two's complement code. For example, the number −5 10 can be written as −101 2 but will be stored as 2 in a 32-bit computer.

In the English system of measures

When specifying linear dimensions in inches, traditionally, binary fractions are used, not decimal, for example: 5¾ ″, 7 15/16 ″, 3 11/32 ″, etc.

Generalizations

The binary number system is a combination of a binary coding system and an exponential weighting function with a base equal to 2. It should be noted that a number can be written in binary code, and the number system in this case may not be binary, but with a different base. Example: BCD encoding, in which decimal digits are written in binary and the number system is decimal.

Story

  • A complete set of 8 trigrams and 64 hexagrams, an analogue of 3-bit and 6-bit numbers, was known in ancient China in the classical texts of the Book of Changes. Order of hexagrams in Book of Changes, arranged in accordance with the values ​​of the corresponding binary digits (from 0 to 63), and the method of obtaining them was developed by the Chinese scientist and philosopher Shao Yun in the 11th century. However, there is no evidence that Shao Yong understood the rules of binary arithmetic by arranging two-character tuples in lexicographic order.
  • Sets, which are combinations of binary numbers, were used by Africans in traditional divination (such as Ifa) along with medieval geomancy.
  • In 1854, the English mathematician George Boole published a landmark work describing algebraic systems as applied to logic, which is now known as Boolean algebra or algebra of logic. His calculus was destined to play an important role in the development of modern digital electronic circuits.
  • In 1937, Claude Shannon presented his Ph.D. thesis for defense Symbolic analysis of relay and switching circuits in which Boolean algebra and binary arithmetic were used in relation to electronic relays and switches. All modern digital technology is essentially based on Shannon's dissertation.
  • In November 1937, George Stiebitz, who later worked at Bell Labs, created a Model K computer on the basis of the relay. K itchen ”, the kitchen where the assembly was done), which performed binary addition. In late 1938, Bell Labs launched a research program led by Stibitz. The computer created under his leadership, completed on January 8, 1940, was able to perform operations with complex numbers. During a demonstration at the American Mathematical Society conference at Dartmouth College on September 11, 1940, Stiebitz demonstrated the ability to send commands to a remote complex number calculator over a telephone line using a teletypewriter. This was the first attempt at using a remote computer via a telephone line. Among the conference participants who witnessed the demonstration were John von Neumann, John Mauchly and Norbert Wiener, who later wrote about it in their memoirs.
  • On the pediment of the building (the former Computing Center of the Siberian Branch of the USSR Academy of Sciences) in the Novosibirsk Academgorodok, there is a binary number 1000110, equal to 70 10, which symbolizes the date of construction of the building (

Since it is the most simple and meets the requirements:

  • The fewer values ​​exist in the system, the easier it is to manufacture individual elements operating with these values. In particular, two digits of the binary number system can be easily represented by many physical phenomena: there is a current - there is no current, the magnetic field induction is greater than the threshold value or not, etc.
  • The fewer the number of states an element has, the higher the noise immunity and the faster it can work. For example, to encode three states through the magnitude of the magnetic field induction, you will need to enter two threshold values, which will not contribute to noise immunity and reliability of information storage.
  • Binary arithmetic is pretty straightforward. The tables of addition and multiplication, the basic operations on numbers, are simple.
  • It is possible to use the apparatus of logic algebra to perform bitwise operations on numbers.

Links

  • Online calculator for converting numbers from one number system to another

Wikimedia Foundation. 2010.

See what "Binary Code" is in other dictionaries:

    2 bit Gray code 00 01 11 10 3 bit Gray code 000 001 011 010 110 111 101 100 4 bit Gray code 0000 0001 0011 0010 0110 0111 0101 0100 1100 1101 1111 1110 1010 1011 1001 1000 Gray code is a number system in which two adjacent values ... ... Wikipedia

    Signal Point Code (SPC) of the signaling system 7 (SS7, SS7) is a unique (in the home network) node address used at the third level of MTP (routing) in telecommunication SS7 networks for identification ... Wikipedia

    In mathematics, a number that is not divisible by any square except for 1. For example, 10 is squareless, but 18 is not, since 18 is divisible by 9 = 32. The beginning of a sequence of squareless numbers is: 1, 2, 3, 5, 6, 7, ... ... Wikipedia

    To improve this article, is it desirable ?: Wikify the article. Redesign the design in accordance with the rules for writing articles. Correct the article according to the stylistic rules of Wikipedia ... Wikipedia

    This term has other meanings, see Python (disambiguation). Python Language class: mu… Wikipedia

    In the narrow sense of the word, at present, the phrase is understood as "Attempt on the security system", and tends more towards the meaning of the next term Cracker attack. This happened due to the distortion of the meaning of the word "hacker". Hacker ... ... Wikipedia

08. 06.2018

Dmitry Vassiyarov's blog.

Binary code - where and how is it used?

Today I am especially glad to meet you, my dear readers, because I feel like a teacher who, at the very first lesson, begins to acquaint the class with letters and numbers. And since we live in the world of digital technologies, I will tell you what binary code is, which is their basis.

Let's start with the terminology and find out what binary means. For clarification, let's return to our usual calculus, which is called "decimal". That is, we use 10 digits, which make it possible to conveniently operate with various numbers and keep a corresponding record. Following this logic, the binary system uses only two characters. In our case, it is just "0" (zero) and "1" one. And here I want to warn you that, hypothetically, in their place there could be other conventions, but just such values, denoting the absence (0, empty) and the presence of a signal (1 or "stick"), will help us further understand the structure of the binary code.

Why do I need binary?

Before the advent of computers, various automatic systems were used, the principle of operation of which is based on receiving a signal. The sensor is triggered, the circuit is closed and a specific device is turned on. No current in the signal circuit - no actuation. It was electronic devices that made progress in processing information represented by the presence or absence of voltage in a circuit.

Their further complication led to the appearance of the first processors, which also did their job, processing already a signal consisting of pulses alternating in a certain way. We will not delve into the program details now, but the following is important for us: electronic devices turned out to be able to distinguish a given sequence of incoming signals. Of course, it is possible to describe the conditional combination like this: “there is a signal”; "no signal"; “There is a signal”; "There is a signal." You can even simplify the notation: "is"; "No"; "there is"; "there is".

But it is much easier to designate the presence of a signal by one "1", and its absence - by zero "0". Then, instead of all this, we can use a simple and concise binary: 1011.

Undoubtedly, the processor technology has made great strides forward and now chips are able to perceive not just a sequence of signals, but entire programs written in specific commands consisting of individual characters. But for their recording, the same binary code is used, consisting of zeros and ones, corresponding to the presence or absence of a signal. Whether he is, or not, it makes no difference. For a chip, any of these options is a single piece of information called a "bit" (bit is the official unit of measurement).

Conventionally, a character can be encoded as a sequence of several characters. Only four variants can be described with two signals (or their absence): 00; 01; 10; 11. This encoding method is called two-bit. But it can be:

  • four-bit (as in the example for the paragraph above 1011) allows you to write 2 ^ 4 = 16 character combinations;
  • eight-bit (for example: 0101 0011; 0111 0001). At one time it was of most interest for programming, since it covered 2 ^ 8 = 256 values. This made it possible to describe all decimal digits, the Latin alphabet and special characters;
  • sixteen-bit (1100 1001 0110 1010) and above. But records with such a length are already for modern more complex tasks. Modern processors use 32- and 64-bit architecture;

Frankly, there is no single official version, it so happened that the combination of eight characters has become the standard measure of stored information, called "byte". This could even be applied to one letter written in 8-bit binary code. So, my dear friends, please remember (if anyone did not know):

8 bits = 1 byte.

So it is accepted. Although a character written as a 2-bit or 32-bit value can also nominally be called a byte. By the way, thanks to the binary code, we can estimate the volume of files measured in bytes and the speed of information and Internet transfer (bits per second).

Binary encoding in action

To standardize the recording of information for computers, several coding systems have been developed, one of which ASCII, based on 8-bit recording, has become widespread. The values ​​in it are distributed in a special way:

  • the first 31 characters are control characters (from 00000000 to 00011111). Serve for service commands, output to a printer or screen, sound signals, text formatting;
  • the next from 32 to 127 (00100000 - 01111111) Latin alphabet and auxiliary symbols and punctuation marks;
  • the rest, up to 255th (10000000 - 11111111) - an alternative part of the table for special tasks and displaying national alphabets;

The decoding of the values ​​in it is shown in the table.

If you think that "0" and "1" are located in a chaotic order, then you are deeply mistaken. Using any number as an example, I will show you a pattern and teach you how to read numbers written in binary code. But for this we will accept some conventions:

  • a byte of 8 characters will be read from right to left;
  • if in ordinary numbers we use the digits of ones, tens, hundreds, then here (reading in reverse order) for each bit different powers of "two" are presented: 256-124-64-32-16-8-4-2-1;
  • now we look at the binary code of a number, for example 00011011. Where there is a signal "1" in the corresponding position, we take the values ​​of this bit and sum them up in the usual way. Accordingly: 0 + 0 + 0 + 32 + 16 + 0 + 2 + 1 = 51. You can verify the correctness of this method by looking at the code table.

Now, my inquisitive friends, you not only know what a binary code is, but also know how to transform the information encrypted by it.

Language understandable to modern technology

Of course, the algorithm for reading binary code by processor devices is much more complicated. But on the other hand, you can use it to write anything you like:

  • text information with formatting options;
  • numbers and any operations with them;
  • graphic and video images;
  • sounds, including those that go beyond the limits of our audibility;

In addition, due to the simplicity of "presentation", various ways of recording binary information are possible: HDD disks;

The advantages of binary coding are supplemented by almost unlimited possibilities for transmitting information over any distance. It is this method of communication that is used with spaceships and artificial satellites.

So, today the binary number system is a language that is understood by most of the electronic devices we use. And what is most interesting, no other alternative for it is foreseen yet.

I think that the information I have outlined for a start will be quite enough for you. And then, if such a need arises, everyone can delve into an independent study of this topic. I will say goodbye and after a short break I will prepare for you a new article on my blog on some interesting topic.

It's better if you tell me it yourself;)

See you soon.

Top related articles