Description of the binary number system. What is the binary number system? History of the binary number system

Lesson Plan

Here you will learn:

♦ how to work with numbers;
♦ what is a spreadsheet;
♦ how computational problems are solved;
♦ using spreadsheets;
♦ how to use spreadsheets for information modeling.

Binary number system

Main topics of the paragraph:

♦ decimal and binary number systems;
♦ expanded form of writing a number;
♦ converting binary numbers to the decimal system;
♦ conversion of decimal numbers to the binary system;
♦ arithmetic of binary numbers.

In this chapter we will talk about organizing calculations on computer. Computing involves storing and processing numbers.

The computer works with numbers in the binary number system.

This idea belongs to John von Neumann, who formulated the principles of the design and operation of computers in 1946. Let's find out what a number system is.

Decimal and binary number systems

A number system, or in its abbreviated form SS, is a system for recording numbers that has a specific set of digits.

You learned about the history of various number systems when you studied Chapter 7 of the textbook. And today we will turn our attention to such number systems as binary and decimal SS.

As you already know from the previously studied material, one of the most commonly used number systems is decimal SS. And this system is called that because the basis of this word formation is the number 10. That is why the number system is called decimal.

You already know that this system uses ten numbers such as 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. But the number ten has an exceptional role, since there are ten fingers on our hands . That is, ten digits are the base of this number system.

But in the binary number system, only two digits are involved, such as 0 and 1, and the base of this system is the number 2.

Now let's try to figure out how to represent a value using just two numbers.

Expanded form of writing a number

Let's turn to our memory and remember what principle exists in the decimal SS for writing numbers. That is, it will no longer be a secret to you that in such an SS the recording of a number depends on the location of the digit, that is, on its position.

So, for example, the number on the far right tells us the number of units of this number, the number following this number, as a rule, indicates the number of twos, etc.

If you and I, for example, take a number like 333, we will see that the rightmost digit represents three units, then three tens, and then three hundreds.

Now let's represent this as the following equality:

Here we see an equality in which the expression located on the right side of the equal sign is provided in the expanded form of writing this multi-digit number.

Let's look at another example of a multi-digit decimal number, which is also presented in expanded form:

Converting binary numbers to decimal system

Now let's take as an example such a significant binary number as:

In this meaningful number we see a two on the lower right side, which indicates to us the base of the number system. That is, we understand that this is a binary number and we cannot confuse it with a decimal number.

And the value of each subsequent digit in a binary number increases by 2 times with each step from right to left. Now let's see what the expanded form of writing this binary number will look like:

In this example, we see how we can convert a binary number to the decimal system.

Now let's give some more examples of converting binary numbers to the decimal number system:

This example shows us that a two-digit decimal number, in this case, corresponds to a six-digit binary number. The binary system is characterized by such an increase in the number of digits as the value of the number increases.

Now let's see what the beginning of the natural series of numbers in decimal (A10) and binary (A2) SS will look like:



Converting decimal numbers to binary

Having looked at the examples above, I hope you now understand how a binary number is converted to an equal decimal number. Well, now let's try to do a reverse translation. Let's see what we need to do for this. For such a translation, we need to try to decompose the decimal number into terms that represent powers of two. Let's give an example:

As you can see, this is not so easy to do. Let's try to look at another, simpler method of converting from decimal SS to binary. This method consists in the fact that a known decimal number is, as a rule, divided by two, and its resulting remainder will act as the low-order digit of the desired number. We again divide this newly obtained number by two and get the next digit of the desired number. We will continue this process of division until the quotient becomes less than the base of the binary system, that is, less than two. This resulting quotient will be the highest digit of the number we were looking for.

Let's now look at methods for writing division by two. For example, let's take the number 37 and try to convert it to the binary system.



In these examples we see that a5, a4, a3, a2, a1, a0 are the designation of digits in the notation of a binary number, which are carried out in order from left to right. As a result, we will get:


Binary Number Arithmetic

If we proceed from the rules in arithmetic, it is easy to notice that in the binary number system they are much simpler than in the decimal number system.

Now let's remember the options for adding and multiplying single-digit binary numbers.


Because of this simplicity, which easily fits into the bit structure of computer memory, the binary number system attracted the attention of computer designers.

Pay attention to how an example of adding two multi-digit binary numbers using a column is performed:


And here is an example of multi-digit binary numbers multiplication in a column:


Have you noticed how easy and simple it is to perform such examples.

Briefly about the main thing

A number system is certain rules for writing numbers and methods for performing calculations associated with these rules.

The base of a number system is equal to the number of digits used in it.

Binary numbers are numbers in the binary number system. They are written using two numbers: 0 and 1.

The expanded form of writing a binary number is its representation as a sum of powers of two multiplied by 0 or 1.

The use of binary numbers in a computer is due to the bit structure of computer memory and the simplicity of binary arithmetic.

Advantages of the binary number system

Now let's look at the advantages of the binary number system:

Firstly, the advantage of the binary number system is that with its help it is quite easy to carry out the processes of storing, transmitting and processing information on a computer.
Secondly, to complete it, not ten elements are enough, but only two;
Thirdly, displaying information using only two states is more reliable and more resistant to various interferences;
Fourthly, it is possible to use logical algebra to implement logical transformations;
Fifthly, binary arithmetic is still simpler than decimal arithmetic, and therefore is more convenient.

Disadvantages of the binary number system

The binary number system is less convenient, since people are more accustomed to using the decimal system, which is much shorter. But in the binary system, large numbers have a fairly large number of digits, which is its significant drawback.

Why is the binary number system so common?

The binary number system is popular because it is the language of computing, where each digit must be represented in some way on a physical medium.

After all, it is easier to have two states when making a physical element than to come up with a device that must have ten different states. Agree that it would be much more difficult.

In fact, this is one of the main reasons for the popularity of the binary number system.

The history of the binary number system

The history of the creation of the binary number system in arithmetic is quite bright and fast-paced. The founder of this system is considered to be the famous German scientist and mathematician G. W. Leibniz. He published an article in which he described the rules by which it was possible to perform all kinds of arithmetic operations on binary numbers.

Unfortunately, until the beginning of the twentieth century, the binary number system was hardly noticeable in applied mathematics. And after simple mechanical calculating devices began to appear, scientists began to pay more active attention to the binary number system and began to actively study it, since it was convenient and indispensable for computing devices. It is the minimal system with which you can fully implement the principle of positionality in the digital form of recording numbers.

Questions and tasks

1. Name the advantages and disadvantages of the binary number system compared to the decimal number system.
2. What binary numbers correspond to the following decimal numbers:
128; 256; 512; 1024?
3. What are the following binary numbers equal to in the decimal system:
1000001; 10000001; 100000001; 1000000001?
4. Convert the following binary numbers to decimal:
101; 11101; 101010; 100011; 10110111011.
5. Convert the following decimal numbers to the binary number system:
2; 7; 17; 68; 315; 765; 2047.
6. Perform addition in binary number system:
11 + 1; 111 + 1; 1111 + 1; 11111 + 1.
7. Perform multiplication in binary number system:
111 10; 111 11; 1101 101; 1101 · 1000.

I. Semakin, L. Zalogova, S. Rusakov, L. Shestakova, Computer Science, 9th grade
Submitted by readers from Internet sites

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 entirely. 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.

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.


The positional number system first appeared in ancient Babylon. In India the system works as

positional decimal numbering using zero, the Indians have this number system

the Arab nation borrowed, and the Europeans, in turn, took from them. In Europe this system became

call it Arabic.

Positional system - the meaning of all digits depends on the position (digit) of a given digit in a number.

Examples, the standard 10th number system is a positional system. Let's say the number 453 is given.

The number 4 denotes hundreds and corresponds to the number 400, 5 - the number of tens and corresponds to the value 50,

and 3 - units and the value 3. It is easy to notice that as the digit increases, the value increases.

Thus, we write the given number as the sum 400+50+3=453.

Binary number system.

There are only 2 digits here - 0 and 1. Base of the binary system- number 2.

The number located at the very edge to the right indicates the number of units, the second number indicates

In all digits, only one digit is possible - either zero or one.

Using the binary number system, it is possible to encode any natural number by representing

This number is a sequence of zeros and ones.

Example: 10112 = 1*2 3 + 0*2*2+1*2 1 +1*2 0 =1*8 + 1*2+1=1110

The binary number system, like the decimal number system, is often used in computing

technology. The computer stores text and numbers in its memory in binary code and converts it programmatically

into the image on the screen.

Adding, subtracting and multiplying binary numbers.

Addition table in binary number system:

10 (transfer to

senior rank)

Subtraction table in binary number system:

(loan from senior

category) 1

Example of column addition (14 10 + 5 10 = 19 10 or 1110 2 + 101 2 = 10011 2):

+ 1 1 1 0
1 0 1
1 0 0 1 1

Multiplication table in binary number system:

Example of column multiplication (14 10 * 5 10 = 70 10 or 1110 2 * 101 2 = 1000110 2):

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

Number conversion in the binary number system.

To convert from binary to decimal use the following table of exponents

bases 2:

Starting with the digit one, each digit is multiplied by 2. The dot after 1 is called binary point.

Convert binary numbers to decimal.

Let there be a binary number 110001 2. To convert to decimal we write it as a sum by

ranks as follows:

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

A little different:

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

It's also good to write the calculation as a table:

We move from right to left. Under all binary units we write its equivalent in the line below.

Convert fractional binary numbers to decimal numbers.

Exercise: convert the number 1011010, 101 2 to the decimal system.

We write the given number in this form:

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

Another recording option:

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 in table form:

0.25

0.125

0.125

Convert decimal numbers to binary.

Suppose you need to convert the number 19 to binary. We can do it this way:

19 /2 = 9 with the remainder 1

9 /2 = 4 with remainder 1

4 /2 = 2 without a trace 0

2 /2 = 1 without a trace 0

1 /2 = 0 with the remainder 1

That is, each quotient is divided by 2 and the remainder is written to the end of the binary notation. Division

continues until there is no zero in the quotient. We write the result from right to left. Those. lower

number (1) will be the leftmost one and so on. So, we have the number 19 in binary notation: 10011.

Convert fractional decimal numbers to binary.

When a given number contains an integer part, it is converted separately from the fractional part. Translation

converting a fractional number from the decimal number system to the binary system occurs as follows:

  • The fraction is multiplied by the base of the binary number system (2);
  • In the resulting product, an entire part is isolated, which is taken as the leading part.

digit of a number in the binary number system;

  • The algorithm terminates if the fractional part of the resulting product is zero or if

the required calculation accuracy has been achieved. Otherwise, calculations continue over

fractional part of the product.

Example: You need to convert the fractional decimal number 206.116 into a fractional binary number.

Translating the whole part, we get 206 10 =11001110 2. The fractional part of 0.116 is multiplied by base 2,

We put the whole parts of the product in the decimal places:

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

Result: 206,116 10 ≈ 11001110,0001110110 2

An algorithm for converting numbers from one number system to another.

1. From the decimal number system:

  • divide the number by the base of the translated number system;
  • find the remainder when dividing the integer part of a number;
  • write down all remainders from division in reverse order;

2. From the binary number system:

  • to convert to the decimal number system, we find the sum of the products of base 2 by

appropriate degree of discharge;


Aryabhata
Cyrillic
Greek Georgian
Ethiopian
Jewish
Akshara-sankhya Other Babylonian
Egyptian
Etruscan
Roman
Danube Attic
Kipu
Mayan
Aegean
KPPU symbols , , 4, 5, 6, , , , , , Nega-positional Symmetrical Fibonacci Unit (unary)

Binary notation of numbers

In the binary number system, numbers are written using two symbols ( 0 And 1 ). To avoid confusion as to which number system the number is written in, it is provided with an indicator at the bottom right. For example, a number in the decimal system 5 10 , in binary 101 2 . Sometimes a binary number is denoted by a prefix 0b or symbol & (ampersand), For example 0b101 or accordingly &101 .

In the binary number system (as in other number systems except decimal), the digits are read one at a time. For example, the number 101 2 is pronounced “one zero one.”

Integers

A natural number written in binary number system 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:

(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),)

Negative numbers

Negative binary numbers are denoted in the same way as decimal numbers: by a “−” sign in front of the number. Namely, a negative integer written in binary number system (− 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 number system as, has the value:

(a n − 1 a n − 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))

(a n − 1 a n − 2 … a 1 a 0 , a − 1 a − 2 … a − (m − 1) a − m) 2 = ∑ k = − m n − 1 a k 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),)

Adding, subtracting and multiplying binary numbers

Addition table

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

Starting with the number 1, all numbers are multiplied by two. The dot that comes after the 1 is called the binary dot.

Converting binary numbers to decimal

Let's say we're given a binary number 110001 2 . To convert to decimal, write it as a sum by digits as follows:

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

Same thing a little differently:

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

You can write this in table form like this:

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 the decimal number 49 10.

Converting Fractional Binary Numbers to Decimal Numbers

Need to convert 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

Same thing a little differently:

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

Transformation by Horner's method

In order to convert numbers from binary to decimal using this method, you need to sum the numbers 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 system. The reverse operation is difficult, as it requires skills in addition and multiplication in the binary number system.

For example, binary number 1011011 2 converted to decimal system as follows:

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.

Converting the fractional part of numbers using Horner's method

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

For example 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 at the end of the binary notation. We continue dividing until the quotient is 0. We write the result from right to left. That is, the bottom number (1) will be the leftmost, etc. As a result, we get the number 19 in binary notation: 10011 .

Converting fractional decimal numbers to binary

If the original number has an integer part, then it is converted separately from the fractional part. Converting a fractional number from the decimal number system to the binary system is carried out using the following algorithm:

  • The fraction is multiplied by the base of the binary number system (2);
  • In the resulting product, the integer part is isolated, which is taken as the most significant digit 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 calculation accuracy is achieved. Otherwise, calculations continue on the fractional part of the product.

Example: You need to convert a fractional decimal number 206,116 to a fractional binary number.

Translation of the whole part gives 206 10 =11001110 2 according to the previously described algorithms. We multiply the fractional part of 0.116 by base 2, entering the integer parts of the product into the decimal places of the desired fractional binary 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 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 (the current is greater than the threshold value) - there is no current (the current is less than the threshold value), the magnetic field induction is greater than the threshold value or not (the magnetic field induction is less than the threshold value) 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 voltage, current or magnetic field induction, you will need to introduce two threshold values ​​and two comparators.

In computing, writing negative binary numbers in two's complement is widely used. For example, the number −5 10 could be written as −101 2 but would be stored as 2 on a 32-bit computer.

In the English system of measures

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

Generalizations

The binary number system is a combination of the 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 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, analogous to 3-bit and 6-bit numerals, was known in ancient China in the classical texts of the Book of Changes. The 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 for obtaining them was developed by the Chinese scientist and philosopher Shao Yong in the 11th century. However, there is no evidence to suggest that Shao Yun understood the rules of binary arithmetic, arranging two-character tuples in lexicographical order.
  • Sets, which are combinations of binary digits, were used by Africans in traditional divination (such as Ifa) along with medieval geomancy.
  • In 1854, English mathematician George Boole published a landmark paper describing algebraic systems as applied to logic, which is now known as Boolean algebra or algebra of logic. His logical calculus was destined to play an important role in the development of modern digital electronic circuits.
  • In 1937, Claude Shannon submitted his Ph.D. thesis for defense. Symbolic analysis of relay and switching circuits in , 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 Stibitz, who later worked at Bell Labs, created the “Model K” computer based on relays. K itchen", the kitchen where the assembly was carried out), which performed binary addition. In late 1938, Bell Labs launched a research program led by Stiebitz. 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, Stibitz demonstrated the ability to send commands to a remote complex number calculator over a telephone line using a teletype machine. This was the first attempt to use a remote computer via a telephone line. Conference participants who witnessed the demonstration included John von Neumann, John Mauchly and Norbert Wiener, who later wrote about it in their memoirs.

see also

Notes

  1. Popova Olga Vladimirovna. Computer Science Textbook (undefined) .
  2. Sanchez, Julio & Canton, Maria P. (2007), Microcontroller programming: the microchip PIC, Boca Raton, Florida: CRC Press, p. 37, ISBN 0-8493-7189-9


 
Articles By topic:
Nobody's thing.  Sean Tan.  Nobody's Thing Books by Sean Tan, translated into Russian
“I guess you want to know what this book is about just by reading the cover? I get it—everyone is short on time, there’s a lot to do, and most of us probably have more important things to do than look at a picture book about a giant red thing, lost.
Artificial intelligence (AI)
The Turing Test, proposed by Alan Turing, was developed as a satisfactory functional definition of intelligence. Turing decided that there was no point in developing an extensive list of requirements needed to create artificial intelligence.
By the nature of the information stored
Database For example: Factual documents presented in a strictly defined format.
Documentary ) Information storage input procedure search - the process of processing a request;
processing information output