Base of number systems. Small Faculty of Mathematics Find the base of the number system

Notation is a method of writing a number using a specified set of special characters (numbers).

Notation:

  • gives a representation of a set of numbers (integer and/or real);
  • gives each number a unique representation (or at least a standard representation);
  • displays the algebraic and arithmetic structure of a number.

Writing a number in some number system is called number code.

A single position in the display of a number is called discharge, so the position number is rank number.

The number of digits in a number is called bit depth and matches its length.

Number systems are divided into positional and non-positional. Positional number systems are divided

on the homogeneous and mixed.

octal number system, hexadecimal number system and other number systems.

Translation of number systems. Numbers can be converted from one number system to another.

Correspondence table of numbers in various number systems.

Basic concepts of number systems

The number system is a set of rules and techniques for writing numbers using a set of digital characters. The number of digits required to write a number in the system is called the base of the number system. The base of the system is written to the right of the number in the subscript: ; ; etc.

There are two types of number systems:

positional, when the value of each digit of a number is determined by its position in the notation of the number;

non-positional, when the value of a digit in a number does not depend on its place in the notation of the number.

An example of a non-positional number system is the Roman one: the numbers IX, IV, XV, etc. An example of a positional number system is the decimal system used everyday.

Any integer in the positional system can be written as a polynomial:

where S is the base of the number system;

Digits of a number written in a given number system;

n is the number of digits of the number.

Example. Number is written in polynomial form as follows:

Types of number systems

The Roman numeral system is a non-positional system. It uses letters of the Latin alphabet to write numbers. In this case, the letter I always means one, the letter V means five, X means ten, L means fifty, C means one hundred, D means five hundred, M means a thousand, etc. For example, the number 264 is written as CCLXIV. When writing numbers in the Roman numeral system, the value of a number is the algebraic sum of the digits included in it. In this case, the digits in the number entry follow, as a rule, in descending order of their values, and it is not allowed to write more than three identical digits side by side. In the case when a digit with a larger value is followed by a digit with a smaller value, its contribution to the value of the number as a whole is negative. Typical examples illustrating the general rules for writing numbers in the Roman numeral system are shown in the table.

Table 2. Writing numbers in the Roman numeral system

III

VII

VIII

XIII

XVIII

XIX

XXII

XXXIV

XXXIX

XXIX

200

438

649

999

1207

CDXXXVIII

DCXLIX

CMXCIX

MCCVII

2045

3555

3678

3900

3999

MMXLV

MMMDLV

MMMDCLXXVIII

MMMCM

MMMCMXCIX

The disadvantage of the Roman system is the lack of formal rules for writing numbers and, accordingly, arithmetic operations with multi-digit numbers. Due to the inconvenience and great complexity, the Roman numeral system is currently used where it is really convenient: in literature (chapter numbering), in paperwork (a series of passports, securities, etc.), for decorative purposes on the watch dial and in a number of other cases.

The decimal number system is currently the most well-known and used. The invention of the decimal number system is one of the main achievements of human thought. Without it, modern technology could hardly exist, let alone arise. The reason why the decimal number system has become generally accepted is not at all mathematical. People are used to counting in decimal notation because they have 10 fingers on their hands.

The ancient image of decimal digits (Fig. 1) is not accidental: each digit denotes a number by the number of angles in it. For example, 0 - no corners, 1 - one corner, 2 - two corners, etc. The spelling of decimal digits has undergone significant changes. The form we use was established in the 16th century.

The decimal system first appeared in India around the 6th century AD. Indian numbering used nine numeric characters and a zero to indicate an empty position. In the early Indian manuscripts that have come down to us, the numbers were written in reverse order - the most significant figure was placed on the right. But it soon became the rule to place such a figure on the left side. Particular importance was attached to the null symbol, which was introduced for the positional notation. Indian numbering, including zero, has come down to our time. In Europe, Hindu methods of decimal arithmetic became widespread at the beginning of the 13th century. thanks to the work of the Italian mathematician Leonardo of Pisa (Fibonacci). The Europeans borrowed the Indian number system from the Arabs, calling it Arabic. This historically incorrect name is retained to this day.

The decimal system uses ten digits - 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9, as well as the symbols "+" and "-" to indicate the sign of the number and a comma or period to separate the integer and fractional parts numbers.

Computers use a binary number system, its base is the number 2. To write numbers in this system, only two digits are used - 0 and 1. Contrary to a common misconception, the binary number system was invented not by computer design engineers, but by mathematicians and philosophers long before the advent of computers, back in the seventeenth and nineteenth centuries. The first published discussion of the binary number system is by the Spanish priest Juan Caramuel Lobkowitz (1670). General attention to this system was attracted by the article of the German mathematician Gottfried Wilhelm Leibniz, published in 1703. It explained the binary operations of addition, subtraction, multiplication and division. Leibniz did not recommend using this system for practical calculations, but emphasized its importance for theoretical research. Over time, the binary number system becomes well known and develops.

The choice of a binary system for use in computer technology is explained by the fact that electronic elements - triggers that make up computer microcircuits, can only be in two working states.

With the help of a binary coding system, any data and knowledge can be recorded. This is easy to understand if you remember the principle of encoding and transmitting information using Morse code. A telegraph operator, using only two characters of this alphabet - dots and dashes, can transmit almost any text.

The binary system is convenient for a computer, but inconvenient for a person: the numbers are long and difficult to write down and remember. Of course, you can convert the number to the decimal system and write it in this form, and then, when you need to translate it back, but all these translations are time consuming. Therefore, number systems are used that are related to binary - octal and hexadecimal. To write numbers in these systems, 8 and 16 digits are required, respectively. In hexadecimal, the first 10 digits are common, and then capital Latin letters are used. Hexadecimal digit A corresponds to decimal 10, hexadecimal B to decimal 11, and so on. The use of these systems is explained by the fact that the transition to writing a number in any of these systems from its binary notation is very simple. Below is a table of correspondence between numbers written in different systems.

Table 3. Correspondence of numbers written in different number systems

Decimal

Binary

octal

Hexadecimal

001

010

011

100

101

110

111

1000

1001

1010

1011

1100

1101

D http://viagrasstore.net/generic-viagra-soft/

1110

1111

10000

Rules for converting numbers from one number system to another

Converting numbers from one number system to another is an important part of machine arithmetic. Consider the basic rules of translation.

1. To convert a binary number to a decimal one, it is necessary to write it as a polynomial consisting of the products of the digits of the number and the corresponding power of the number 2, and calculate according to the rules of decimal arithmetic:

When translating, it is convenient to use the table of powers of two:

Table 4. Powers of 2

n (degree)

1024

Example. Convert the number to decimal number system.

2. To translate an octal number into a decimal one, it is necessary to write it as a polynomial consisting of the products of the digits of the number and the corresponding power of the number 8, and calculate according to the rules of decimal arithmetic:

When translating, it is convenient to use the table of powers of eight:

Table 5. Powers of 8

n (degree)

Before we start solving problems, we need to understand a few simple points.

Consider the decimal number 875. The last digit of the number (5) is the remainder of the division of the number 875 by 10. The last two digits form the number 75 - this is the remainder of the division of the number 875 by 100. Similar statements are true for any number system:

The last digit of a number is the remainder of dividing that number by the base of the number system.

The last two digits of a number are the remainder of dividing the number by the base of the squared number system.

For example, . We divide 23 by the base of system 3, we get 7 and 2 in the remainder (2 is the last digit of the number in the ternary system). Divide 23 by 9 (base squared), we get 18 and 5 in the remainder (5 = ).

Let's go back to the usual decimal system. Number = 100000. 10 to the power of k is one and k zeros.

A similar statement is true for any number system:

The base of the number system to the power of k in this number system is written as a unit and k zeros.

For example, .

1. Search for the base of the number system

Example 1

In a number system with some base, the decimal number 27 is written as 30. Specify this base.

Solution:

Denote the required base x. Then .i.e. x=9.

Example 2

In a number system with some base, the decimal number 13 is written as 111. Specify this base.

Solution:

Denote the required base x. Then

We solve the quadratic equation, we get the roots 3 and -4. Since the base of the number system cannot be negative, the answer is 3.

Answer: 3

Example 3

Indicate, separated by commas, in ascending order, all the bases of the number systems in which the entry of the number 29 ends in 5.

Solution:

If in some system the number 29 ends in 5, then the number reduced by 5 (29-5 = 24) ends in 0. We have already said that the number ends in 0 when it is divisible without remainder by the base of the system. Those. we need to find all such numbers that are divisors of the number 24. These numbers are: 2, 3, 4, 6, 8, 12, 24. Note that in the number systems with base 2, 3, 4 there is no number 5 (and in the formulation problem, the number 29 ends in 5), so there are systems with bases: 6, 8, 12,

Answer: 6, 8, 12, 24

Example 4

Indicate, separated by commas, in ascending order, all the bases of the number systems in which the entry of the number 71 ends in 13.

Solution:

If in some system the number ends in 13, then the base of this system is at least 4 (otherwise there is no number 3).

A number reduced by 3 (71-3=68) ends in 10. That is, 68 is completely divisible by the required base of the system, and the quotient of this, when divided by the base of the system, gives a remainder of 0.

Let's write out all the integer divisors of the number 68: 2, 4, 17, 34, 68.

2 is not suitable, because the base is not less than 4. Check the rest of the divisors:

68:4 = 17; 17:4 \u003d 4 (rest 1) - suitable

68:17 = 4; 4:17 = 0 (rest 4) - not suitable

68:34 = 2; 2:17 = 0 (rest 2) - not suitable

68:68 = 1; 1:68 = 0 (rest 1) - suitable

Answer: 4, 68

2. Search for numbers by conditions

Example 5

Indicate, separated by a comma, in ascending order, all decimal numbers not exceeding 25, the notation of which in the base four number system ends in 11?

Solution:

First, let's find out what the number 25 looks like in a number system with base 4.

Those. we need to find all numbers, not greater than , whose notation ends with 11. By the rule of sequential counting in a system with base 4,
we get numbers and . We translate them into the decimal number system:

Answer: 5, 21

3. Solution of equations

Example 6

Solve the equation:

Write down the answer in ternary system (the base of the number system in the answer is not necessary to write).

Solution:

Let's convert all the numbers to the decimal number system:

The quadratic equation has roots -8 and 6. (because the base of the system cannot be negative). .

Answer: 20

4. Counting the number of ones (zeros) in the binary notation of the value of the expression

To solve this type of problem, we need to remember how addition and subtraction "in a column" works:

When adding, the bitwise summation of the digits written one under the other occurs, starting from the least significant digits. If the resulting sum of two digits is greater than or equal to the base of the number system, the remainder of dividing this amount by the base of the system is written under the summed figures, and the integer part of dividing this amount by the base of the system is added to the sum of the following digits.

When subtracting, a bit-by-bit subtraction of the digits written one under the other occurs, starting from the least significant digits. If the first digit is less than the second, we “borrow” one from the adjacent (larger) digit. The unit occupied in the current digit is equal to the base of the number system. In decimal it's 10, in binary it's 2, in ternary it's 3, and so on.

Example 7

How many units are contained in the binary notation of the value of the expression: ?

Solution:

Let's represent all the numbers of the expression as powers of two:

In binary notation, two to the power of n looks like 1 followed by n zeros. Then summing and , we get a number containing 2 units:

Now subtract 10000 from the resulting number. According to the rules of subtraction, we borrow from the next digit.

Now add 1 to the resulting number:

We see that the result has 2013+1+1=2015 units.

Convert to decimal number system

Exercise 1. What number in the decimal number system corresponds to the number 24 16?

Solution.

24 16 = 2 * 16 1 + 4 * 16 0 = 32 + 4 = 36

Answer. 24 16 = 36 10

Task 2. It is known that X = 12 4 + 4 5 + 101 2 . What is the number X in decimal notation?

Solution.


12 4 = 1 * 41 + 2 * 40 = 4 + 2 = 6
4 5 = 4 * 5 0 = 4
101 2 = 1 * 2 2 + 0 * 2 1 + 1 * 2 0 = 4 + 0 + 1 = 5
Find the number: X = 6 + 4 + 5 = 15

Answer. X = 15 10

Task 3. Calculate the value of the sum 10 2 + 45 8 + 10 16 in decimal notation.

Solution.

Let's translate each term into the decimal number system:
10 2 = 1 * 2 1 + 0 * 2 0 = 2
45 8 = 4 * 8 1 + 5 * 8 0 = 37
10 16 = 1 * 16 1 + 0 * 16 0 = 16
The sum is: 2 + 37 + 16 = 55

Convert to binary number system

Exercise 1. What is the number 37 in binary number system?

Solution.

You can convert by dividing by 2 and combining the remainders in reverse order.

Another way is to expand the number into the sum of powers of two, starting with the highest, the calculated result of which is less than the given number. When converting, the missing powers of a number should be replaced with zeros:

37 10 = 32 + 4 + 1 = 2 5 + 2 2 + 2 0 = 1 * 2 5 + 0 * 2 4 + 0 * 2 3 + 1 * 2 2 + 0 * 2 1 + 1 * 2 0 = 100101

Answer. 37 10 = 100101 2 .

Task 2. How many significant zeros are in the binary representation of the decimal number 73?

Solution.

We decompose the number 73 into the sum of powers of two, starting with the highest and multiplying the missing powers by zeros, and the existing ones by one:

73 10 = 64 + 8 + 1 = 2 6 + 2 3 + 2 0 = 1 * 2 6 + 0 * 2 5 + 0 * 2 4 + 1 * 2 3 + 0 * 2 2 + 0 * 2 1 + 1 * 2 0 = 1001001

Answer. There are four significant zeros in the binary notation for the decimal number 73.

Task 3. Calculate the sum of x and y for x = D2 16 , y = 37 8 . Present the result in binary number system.

Solution.

Recall that each digit of a hexadecimal number is formed by four binary digits, each digit of an octal number by three:

D2 16 = 1101 0010
37 8 = 011 111

Let's add the numbers:

11010010 11111 -------- 11110001

Answer. The sum of the numbers D2 16 and y = 37 8 , represented in the binary system, is 11110001.

Task 4. Given: a= D7 16 , b= 331 8 . Which of the numbers c, written in binary notation, meets the condition a< c < b ?

  1. 11011001
  2. 11011100
  3. 11010111
  4. 11011000

Solution.

Let's translate the numbers into the binary number system:

D7 16 = 11010111
331 8 = 11011001

The first four digits for all numbers are the same (1101). Therefore, the comparison is simplified to a comparison of the least significant four digits.

The first number in the list is the number b, therefore, does not fit.

The second number is greater than b. The third number is a.

Only the fourth number fits: 0111< 1000 < 1001.

Answer. The fourth option (11011000) meets the condition a< c < b .

Tasks for determining values ​​in various number systems and their bases

Exercise 1. The characters @, $, &, % are encoded in two-digit consecutive binary numbers. The first character corresponds to the number 00. Using these characters, the following sequence was encoded: $% [email protected]$. Decode this sequence and convert the result to hexadecimal.

Solution.

1. Let's compare the binary numbers to the characters they encode:
00 - @, 01 - $, 10 - &, 11 - %

3. Let's translate the binary number into the hexadecimal number system:
0111 1010 0001 = 7A1

Answer. 7A1 16 .

Task 2. There are 100 x fruit trees in the garden, of which 33 x are apple trees, 22 x are pears, 16 x are plums, 17 x are cherries. What is the base of the number system (x).

Solution.

1. Note that all terms are two-digit numbers. In any number system, they can be represented as follows:
a * x 1 + b * x 0 = ax + b, where a and b are the digits of the corresponding digits of the number.
For a three digit number it would be like this:
a * x 2 + b * x 1 + c * x 0 = ax 2 + bx + c

2. The condition of the problem is as follows:
33x + 22x + 16x + 17x = 100x
Substitute the numbers in the formulas:
3x + 3 + 2x +2 + 1x + 6 + 1x + 7 = 1x 2 + 0x + 0
7x + 18 = x2

3. Solve the quadratic equation:
-x2 + 7x + 18 = 0
D = 7 2 - 4 * (-1) * 18 = 49 + 72 = 121. The square root of D is 11.
The roots of the quadratic equation:
x = (-7 + 11) / (2 * (-1)) = -2 or x = (-7 - 11) / (2 * (-1)) = 9

4. A negative number cannot be the base of the number system. So x can only be equal to 9.

Answer. The desired base of the number system is 9.

Task 3. In a number system with some base, the decimal number 12 is written as 110. Find this base.

Solution.

First, let's write the number 110 through the formula for writing numbers in positional number systems to find the value in the decimal number system, and then find the base by brute force.

110 = 1 * x 2 + 1 * x 1 + 0 * x 0 = x 2 + x

We need to get 12. We try 2: 2 2 + 2 = 6. We try 3: 3 2 + 3 = 12.

So the base of the number system is 3.

Answer. The desired base of the number system is 3.

Task 4. In what number system would the decimal number 173 be represented as 445?

Solution.
We denote the unknown base by X. We write the following equation:
173 10 \u003d 4 * X 2 + 4 * X 1 + 5 * X 0
Given that any positive number to the zero power is equal to 1, we rewrite the equation (base 10 will not be indicated).
173 = 4*X 2 + 4*X + 5
Of course, such a quadratic equation can be solved using the discriminant, but there is a simpler solution. Subtract from the right and left parts by 4. We get
169 \u003d 4 * X 2 + 4 * X + 1 or 13 2 \u003d (2 * X + 1) 2
From here we get 2 * X + 1 \u003d 13 (we discard the negative root). Or X = 6.
Answer: 173 10 = 445 6

Tasks for finding several bases of number systems

There is a group of tasks in which it is required to list (in ascending or descending order) all bases of number systems in which the representation of a given number ends with a given digit. This task is solved quite simply. First you need to subtract the given digit from the original number. The resulting number will be the first base of the number system. And all other bases can only be divisors of this number. (This statement is proved on the basis of the rule for transferring numbers from one number system to another - see item 4). Just remember that the base of the number system cannot be less than the given digit!

Example
Indicate, separated by commas, in ascending order, all the bases of the number systems in which the entry of the number 24 ends in 3.

Solution
24 - 3 \u003d 21 is the first base (13 21 \u003d 13 * 21 1 + 3 * 21 0 \u003d 24).
21 is divisible by 3 and 7. The number 3 is not suitable, because There is no 3 in the base 3 number system.
Answer: 7, 21

The calculator allows you to convert whole and fractional numbers from one number system to another. The base of the number system cannot be less than 2 and more than 36 (10 digits and 26 Latin letters, after all). Numbers must not exceed 30 characters. To enter fractional numbers, use the symbol. or, . To convert a number from one system to another, enter the original number in the first field, the base of the original number system in the second, and the base of the number system to which you want to convert the number in the third field, then click the "Get Entry" button.

original number recorded in 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 -th number system.

I want to get a record of a number in 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 -th number system.

Get an entry

Translations completed: 3722471

It may also be of interest:

  • Truth table calculator. SDNF. SKNF. Zhegalkin polynomial

Number systems

Number systems are divided into two types: positional and not positional. We use the Arabic system, it is positional, and there is also the Roman one - it is just not positional. In positional systems, the position of a digit in a number uniquely determines the value of that number. This is easy to understand by looking at the example of some number.

Example 1. Let's take the number 5921 in the decimal number system. We number the number from right to left starting from zero:

The number 5921 can be written in the following form: 5921 = 5000+900+20+1 = 5 10 3 +9 10 2 +2 10 1 +1 10 0 . The number 10 is a characteristic that defines the number system. The values ​​of the position of the given number are taken as degrees.

Example 2. Consider the real decimal number 1234.567. We number it starting from the zero position of the number from the decimal point to the left and to the right:

The number 1234.567 can be written as follows: 1234.567 = 1000+200+30+4+0.5+0.06+0.007 = 1 10 3 +2 10 2 +3 10 1 +4 10 0 +5 10 -1 + 6 10 -2 +7 10 -3 .

Converting numbers from one number system to another

The easiest way to transfer a number from one number system to another is to convert the number first to the decimal number system, and then, the result obtained to the required number system.

Converting numbers from any number system to decimal number system

To convert a number from any number system to decimal, it is enough to number its digits, starting from zero (the digit to the left of the decimal point) similarly to examples 1 or 2. Let's find the sum of the products of the digits of the number by the base of the number system to the power of the position of this digit:

1. Convert number 1001101.1101 2 to decimal number system.
Solution: 10011.1101 2 = 1 2 4 +0 2 3 +0 2 2 +1 2 1 +1 2 0 +1 2 -1 +1 2 -2 +0 2 -3 +1 2 - 4 = 16+2+1+0.5+0.25+0.0625 = 19.8125 10
Answer: 10011.1101 2 = 19.8125 10

2. Convert number E8F.2D 16 to decimal number system.
Solution: E8F.2D 16 = 14 16 2 +8 16 1 +15 16 0 +2 16 -1 +13 16 -2 = 3584+128+15+0.125+0.05078125 = 3727.17578125 10
Answer: E8F.2D 16 = 3727.17578125 10

Converting numbers from a decimal number system to another number system

To convert numbers from a decimal number system to another number system, the integer and fractional parts of the number must be translated separately.

Converting the integer part of a number from a decimal number system to another number system

The integer part is converted from the decimal number system to another number system by successively dividing the integer part of the number by the base of the number system until an integer remainder is obtained, which is less than the base of the number system. The result of the transfer will be a record from the remains, starting with the last one.

3. Convert number 273 10 to octal number system.
Solution: 273 / 8 = 34 and remainder 1, 34 / 8 = 4 and remainder 2, 4 is less than 8, so the calculation is complete. The record from the remnants will look like this: 421
Examination: 4 8 2 +2 8 1 +1 8 0 = 256+16+1 = 273 = 273 , the result is the same. So the translation is correct.
Answer: 273 10 = 421 8

Let's consider the translation of correct decimal fractions into various number systems.

Converting the fractional part of a number from a decimal number system to another number system

Recall that a proper decimal fraction is real number with zero integer part. To translate such a number into a number system with base N, you need to consistently multiply the number by N until the fractional part is zeroed or the required number of digits is obtained. If during multiplication a number with an integer part other than zero is obtained, then the integer part is not taken into account further, since it is sequentially entered into the result.

4. Convert number 0.125 10 to binary number system.
Solution: 0.125 2 = 0.25 (0 is the integer part, which will be the first digit of the result), 0.25 2 = 0.5 (0 is the second digit of the result), 0.5 2 = 1.0 (1 is the third digit of the result, and since the fractional part is zero , the translation is complete).
Answer: 0.125 10 = 0.001 2