2 find the binary number system with examples. Number systems. The positional number system is binary. Converting numbers from binary to decimal

Binary system

Binary number system is a positional number system with base 2. In this number system, natural numbers are written using just two symbols (usually the numbers 0 and 1).

The binary system is used in digital devices because it is the simplest and meets the requirements:

  • The fewer values ​​there are in the system, the easier it is to manufacture individual elements that operate on 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 a threshold value or not, etc.
  • The fewer states an element has, the higher the noise immunity and the faster it can operate. 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 quite simple. Simple are the tables of addition and multiplication - the basic operations with numbers.
  • It is possible to use the apparatus of logical 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 system” is in other dictionaries:

    BINARY SYSTEM, in mathematics, a number system having base 2 (the decimal system has base 10). It is most suitable for working with computers because it is simple and corresponds to two positions (open 0 and closed... ... Scientific and technical encyclopedic dictionary

    binary system- - Telecommunications topics, basic concepts EN binary system... Technical Translator's Guide

    binary system- dvejetainė sistema statusas T sritis automatika atitikmenys: engl. binary system vok. Binärsystem, n rus. binary system, f pranc. système binaire, m … Automatikos terminų žodynas

    binary system- dvejetainė sistema statusas T sritis fizika atitikmenys: engl. binary system; dyadic system vok. Binärsystem, n; Dualsystem, n rus. binary system, f pranc. système binaire, m … Fizikos terminų žodynas

    Jarg. stud. Joking. Severe intoxication. PBS, 2002 ... Large dictionary of Russian sayings

    Positional number system with base 2, in which the digits 0 and 1 are used to write numbers. See also: Positional number systems Financial Dictionary Finam ... Financial Dictionary

    BINARY NUMERAL system, a method of writing numbers in which two digits 0 and 1 are used. Two units of the 1st digit (i.e., the space occupied in a number) form a unit of the 2nd digit, two units of the 2nd digit form a unit of the 3rd digit, and etc... ... Modern encyclopedia

    Binary number system- BINARY NUMERAL SYSTEM, a method of writing numbers in which two digits 0 and 1 are used. Two units of the 1st digit (i.e., the space occupied in a number) form a unit of the 2nd digit, two units of the 2nd digit form a unit of the 3rd digit etc.… … Illustrated Encyclopedic Dictionary

    Binary number system- a system that uses sets of combinations of numbers 1 and 0 to represent alphanumeric and other symbols, the basis of codes used in digital computers... Publishing dictionary-reference book

    BINARY NUMERAL SYSTEM- a positional number system with base 2, in which there are two digits 0 and 1, and all natural numbers are written in their sequences. Eg. the number 2 is written as 10, the number 4 = 22 as 100, the number 900 as an 11-digit number: 11 110 101 000 ... Big Polytechnic Encyclopedia

Let's recall the material on number systems. It stated that the most convenient number system for computer systems is the binary system. Let's define this system:


The binary number system is a positional number system in which the base is the number 2.

To write any number in the binary number system, only 2 digits are used: 0 and 1.

General form of writing binary numbers

For binary integers we can write:


a n−1 a n−2 ...a 1 a 0 =a n−1 ⋅2 n−1 +a n−2 ⋅2 n−2 +...+a 0 ⋅2 0

This form of writing a number “suggests” the rule for converting natural binary numbers into the decimal number system: you need to calculate the sum of the powers of two corresponding to the units in the collapsed form of writing a binary number.

Rules for adding binary numbers

Basic rules for adding single-bit numbers


0+0=0
0+1=1
1+0=1
1+1=10

From this it is clear that and, as in the decimal number system, numbers represented in the binary number system are added bitwise. If a digit overflows, the 1 is carried to the next digit.

Example of adding binary numbers

Rules for subtracting binary numbers


0-0=0
1-0=0
10-1=1

But what about 0-1=? Subtracting binary numbers is slightly different from subtracting decimal numbers. Several methods are used for this.

Subtraction by borrowing

Write the binary numbers one below the other - the smaller number under the larger one. If the smaller number has fewer digits, align it to the right (the same way you write decimals when subtracting them).
Some problems involving subtracting binary numbers are no different from subtracting decimal numbers. Write the numbers below each other and, starting from the right, find the result of subtracting each pair of numbers.


Here are some simple examples:



1 - 0 = 1
11 - 10 = 1
1011 - 10 = 1001

Let's consider a more complex problem. You only have to remember one rule to solve binary subtraction problems. This rule describes borrowing the digit from the left so you can subtract 1 from 0 (0 - 1).


110 - 101 = ?

In the first column on the right you get the difference 0 - 1 . To calculate it, you need to borrow the number on the left (from the tens place).


First, cross out the 1 and replace it with a 0 to get a problem like this: 1010 - 101 = ?
You subtracted (“borrowed”) 10 from the first number, so you can write that number in place of the number to the right (in the ones place). 101100 - 101 = ?
Subtract the numbers in the right column. In our example:
101100 - 101 = ?
Right column: 10 - 1 = 1 .
102 = (1 x 2) + (0 x 1) = 210(lower case digits indicate the number system in which the numbers are written).
12 = (1x1) = 110.

Thus, in the decimal system this difference is written as: 2 - 1 = 1.


Subtract the numbers in the remaining columns. Now it's easy to do (work with the columns, moving from right to left):


101100 - 101 = __1 = _01 = 001 = 1.

Subtraction by addition

Write the binary numbers below each other the same way you write decimal numbers when subtracting them. This method is used by computers to subtract binary numbers because it is based on a more efficient algorithm.




Let's look at an example: 101100 2 - 11101 2 = ?

If the values ​​of the numbers are different, add the corresponding number of 0 to the number with the lower value on the left.




101100 2 - 011101 2 = ?

In the number you are subtracting, change the digits: change each 1 to 0, and each 0 to 1.




011101 2 → 100010 2 .

What we're really doing is "taking one's complement," that is, subtracting each digit from 1. This works in the binary system because this "substitution" can only have two possible results: 1 - 0 = 1 and 1 - 1 = 0.


Add one to the resulting subtrahend.


100010 2 + 1 2 = 100011 2


Now, instead of subtracting, add two binary numbers.


101100 2 +100011 2 = ?


Check the answer. A quick way is to open an online binary calculator and enter your problem into it. The other two methods involve checking the response manually.


1) Let's convert the numbers to the binary number system:
Let's say that from the number 101101 2 needs to be subtracted 11011 2


2) Let us denote the number 101101 2 as A and the number 11011 2 as B.


3) Write the numbers A and B in a column, one below the other, starting from the least significant digits (the numbering of digits starts from zero).


4) Subtract digit by digit from number A and number B, writing the result in C starting from the least significant digits. The rules for bitwise subtraction for the binary number system are presented in the table below.

Loan
from the current category
Oi-1

Loan
from the next category
O i+1

The whole process of adding our numbers looks like this:


(loans from the corresponding category are shown in red)


Happened 101101 2 - 11011 2 = 10010 2
or in decimal number system: 45 10 - 27 10 = 18 10

Rules for multiplying binary numbers.

In general, these rules are very simple and clear.



0*0=0
0*1=0
1*0=0
1*1=1

Multiplication of multi-bit binary numbers occurs in the same way as ordinary ones. We multiply each significant digit by the upper number according to the given rules, observing the positions. Multiplying is simple - since multiplying by one gives the same number.


We encounter the binary number system when studying computer disciplines. After all, it is on the basis of this system that the processor and some types of encryption are built. There are special algorithms for writing a decimal number in the binary system and vice versa. If you know the principle of building a system, it will not be difficult to operate in it.

The principle of constructing a system of zeros and ones

The binary number system is built using two digits: zero and one. Why these particular numbers? This is due to the principle of constructing the signals that are used in the processor. At its lowest level, the signal takes only two values: false and true. Therefore, it was customary to denote the absence of a signal, “false,” by zero, and its presence, “true,” by one. This combination is easy to implement technically. Numbers in the binary system are formed in the same way as in the decimal system. When a digit reaches its upper limit, it is reset to zero and a new digit is added. This principle is used to move through a ten in the decimal system. Thus, numbers are made up of combinations of zeros and ones, and this combination is called the “binary number system”.

Recording a number in the system

In decimal

In binary

In decimal

In binary

How to write a binary number as a decimal number?

There are online services that convert numbers into binary and vice versa, but it’s better to be able to do it yourself. When translated, the binary system is denoted by the subscript 2, for example, 101 2. Each number in any system can be represented as a sum of numbers, for example: 1428 = 1000 + 400 + 20 + 8 - in the decimal system. The number is also represented in binary. Let's take an arbitrary number 101 and consider it. It has 3 digits, so we arrange the number in order in this way: 101 2 =1×2 2 +0×2 1 +1×2 0 =4+1=5 10, where the index 10 denotes the decimal system.

How to write a prime number in binary?

It is very easy to convert to the binary number system by dividing the number by two. It is necessary to divide until it is possible to complete it completely. For example, take the number 871. We begin to divide, making sure to write down the remainder:

871:2=435 (remainder 1)

435:2=217 (remainder 1)

217:2=108 (remainder 1)

The answer is written according to the resulting remainders in the direction from end to beginning: 871 10 =101100111 2. You can check the correctness of the calculations using the reverse translation described earlier.

Why do you need to know translation rules?

The binary number system is used in most disciplines related to microprocessor electronics, coding, data transmission and encryption, and in various areas of programming. Knowledge of the basics of translation from any system to binary will help the programmer develop various microcircuits and control the operation of the processor and other similar systems programmatically. The binary number system is also necessary for implementing methods for transmitting data packets over encrypted channels and creating client-server software projects based on them. In a school computer science course, the basics of converting to the binary system and vice versa are the basic material for studying programming in the future and creating simple programs.

Numbers are the second most common after the familiar decimal, although few people think about it. The reason for this demand is that it is the one that is used in We’ll talk about this later, but first, a few words about the number system in general.

This phrase denotes a system of recording or other visual representation of numbers. This is a dry definition. Unfortunately, not everyone understands what is hidden behind these words. However, everything is quite simple, and the first number system appeared at the same time when people learned to count. The simplest way to represent numbers is to identify some objects with others, well, for example, fingers on the hands and the number of fruits collected in a certain time. However, there are significantly fewer fingers on the hands than there can be countable objects. They began to be replaced with sticks or lines on sand or stone. This was the very first number system, although the concept itself appeared much later. It is called non-positional because each digit in it has a strictly defined meaning, regardless of what position in the record it occupies.

But such recording is extremely inconvenient, and later the idea came to group objects and designate each group with a stone, and not with a stick, or with a drawing of another shape when recording. This was the first step towards the creation of positional systems, which included the binary number system. However, they were finally formed only after the invention of numbers. Due to the fact that initially it was more convenient for people to count on their fingers, of which a normal person has 10, it was the decimal system that became the most common. A person using this system has numbers from 0 to 9 at his disposal. Accordingly, when a person reaches 9 while counting, that is, he exhausts the supply of numbers, he writes one to the next digit and resets the ones to zero. And this is the essence of positional number systems: the meaning of digits in a number directly depends on what position it occupies.

The binary number system provides only two digits for calculations, it is easy to guess that these are 0 and 1. Accordingly, new digits when writing appear in this case much more often: the first register transition occurs already at the number 2, which is designated in the binary system as 10.

Obviously, this system is also not very convenient in writing, so why is it so in demand? The thing is that when building computers, the decimal system turned out to be extremely inconvenient and unprofitable, since the production of a device with ten different states is quite expensive, and they take up a lot of space. So they adopted the binary system invented by the Incas.

Converting to the binary number system is unlikely to cause any difficulties for anyone. The simplest and most straightforward way to do this is to divide the number by two until the answer is zero. In this case, the remainders are written separately from right to left sequentially. Let's look at an example, take the number 73: 73\2 = 36 and 1 in the remainder, we write the units in the extreme right position, we write all further remainders to the left of this unit. If you did everything correctly, then you should have the following number: 1001001.

How does a computer convert a number to the binary number system, since we enter decimal numbers from the keyboard? Is it really also divisible by 2? Naturally not. Each key on the keyboard corresponds to a specific line in the encoding table. We press a button, a program called a driver transmits a certain sequence of signals to the processor. That, in turn, sends a request to the table, which character corresponds to this sequence, and displays this character on the screen, or performs an action, if necessary.

Now you know what importance the binary number system has in our lives. After all, a lot in our world is now done with the help of electronic computing systems, which, in turn, would be completely different if it were not for this system.

A number system is a set of techniques and rules for naming and designating numbers. Conventional signs used to denote numbers are called numbers.

Typically, all number systems are divided into two classes: non-positional and positional.

In positional number systems, the weight of each digit varies depending on its position (position) in the sequence of digits representing the number. For example, in the number 757.7, the first seven means 7 hundreds, the second means 7 units, and the third means 7 tenths of a unit.

The very notation of the number 757.7 means an abbreviated notation of the expression:

In non-positional number systems, the weight of a digit (that is, the contribution it makes to the value of the number) does not depend on its position in the number record. Thus, in the Roman number system in the number XXXII (thirty-two), the weight of the number X in any position is simply ten.

Historically, the first number systems were non-positional systems. One of the main disadvantages is the difficulty of writing large numbers. Writing large numbers in such systems is either very cumbersome, or the alphabet of the system is extremely large. An example of a non-positional number system, which is quite widely used at present, is the so-called Roman numeration.

Binary number system, i.e. a system with a base is a “minimal” system in which the principle of positionality in the digital form of recording numbers is fully realized. In the binary number system, the value of each digit “in place” when moving from the least significant to the most significant digit doubles.

The history of the development of the binary number system is one of the brightest pages in the history of arithmetic. The official “birth” of binary arithmetic is associated with the name of G.V. Leibniz, who published an article in which the rules for performing all arithmetic operations on binary numbers were considered.

Leibniz, however, did not recommend binary arithmetic for practical calculations instead of the decimal system, but emphasized that “calculation with the help of twos, that is, 0 and 1, in return for its lengths, is fundamental for science and gives rise to new discoveries that turn out to be useful later, even in the practice of numbers, and especially in geometry: the reason for which is the fact that when numbers are reduced to the simplest principles, such as 0 and 1, a wonderful order is revealed everywhere.”

Leibniz considered the binary system simple, convenient and beautiful. He said that “calculation with the help of twos... is fundamental for science and gives rise to new discoveries... When numbers are reduced to the simplest principles, which are 0 and 1, a wonderful order appears everywhere.”

At the request of the scientist, a medal was knocked out in honor of the “dyadic system” - as the binary system was then called. It depicted a table with numbers and simple operations with them. Along the edge of the medal was a ribbon with the inscription: “To bring everything out of insignificance, one is enough.”

Then they forgot about the binary system. For almost 200 years, not a single work was published on this topic. They returned to it only in 1931, when some possibilities for the practical use of binary numbering were demonstrated.

Leibniz’s brilliant predictions came true only two and a half centuries later, when the outstanding American scientist, physicist and mathematician John von Neumann proposed using the binary number system as a universal way of encoding information in electronic computers (“John von Neumann’s Principles”).

Share with friends or save for yourself:

Loading...