Binary system: arithmetic operations and scope

From childhood, we have been accustomed to things that can not be done in adulthood: to perform any simple actions, politely talk, read, count. Probably, everyone remembers how hard he was given an account in kindergarten or in primary school, how hard it was to get used to spelling numbers correctly. After some time, we get so used to the fact that everything is based on the decimal number system (account, money, time), that we do not even suspect the existence of other systems (also widely used in various fields of activity, for example, in manufacturing or in the field of IT )

binary system

One of such "non-standard" numbering options is the binary system. As the name implies, the entire set of characters in it consists of 0 and 1. Although it seems simple, the binary system is used in the most complex technical devices today - computers and other automated complexes.

The question arises: why did you decide to use it, because it is much more convenient for a person to focus on the usual 10 digits? The fact is that a computer is a machine that works using electricity, and its software filling consists, in fact, of the simplest action algorithms. Compared to others, the binary system has several advantages over other systems:

binary notation

1. There are 2 states for a machine: working or not, there is current or not current. Each of these states characterizes one of the symbols: 0 - "no", 1 - "yes".

2. The binary (binary) system allows to simplify the device of microcircuits as much as possible (that is, it is enough to have two channels for different types of signals).

3. This system is more noise-resistant and faster. It is interfering because it is simple and the risk of software failure is minimized, and it is fast because binary algebra is much easier to implement than decimal.

4. Boolean operations with binary numbers are much easier to do. In general, the algebra of logic (Boolean) is intended to understand the complex processes of signal conversion in the technical systems of a computer.

If you study in a technical specialty, then you are probably familiar with the basics of representing numbers in binary form. The ordinary person, inexperienced in such matters, arithmetic operations with 0 and 1 are necessary for a more complete understanding of the computer, which, of course, everyone has.

subtraction in binary notation

So, with zero and one you can perform the same arithmetic operations as with ordinary digits. In this article, we will not consider operations such as inversion, addition modulo 2, and others (purely specific).

Let's consider how addition occurs in a binary number system. For example, add two numbers: 1001 and 1110. Starting from the last digit, add: 1 + 0 = 1, then 0 + 1 = 1, the next action: 0 + 1 = 1, and finally 1 + 1 = 10. Total we got the number 10111.

Subtraction in binary notation occurs according to the same principles. Take the same numbers as an example, only now we subtract 1001 from 1110. We also start from the last digit: 0-1 = 1 (minus 1 from the next digit), then also according to the sample. Total 101.

Division and multiplication also have no fundamental differences in comparison with the principles of the decimal form customary to us.

In addition to binary, the computer uses ternary, octal and hexadecimal number systems.

Source: https://habr.com/ru/post/C3774/


All Articles