10 number system. Translation of numbers into binary, hexadecimal, decimal, octal number systems. Tasks for determining values ​​in various number systems and their bases

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

In the course of computer science, regardless of school or university, a special place is given to such a concept as number systems. As a rule, several lessons or practical exercises are allocated for it. The main goal is not only to learn the basic concepts of the topic, to study the types of number systems, but also to get acquainted with binary, octal and hexadecimal arithmetic.

What does it mean?

Let's start with the definition of the main concept. As the textbook "Computer Science" notes, the number system is a record of numbers that uses a special alphabet or a specific set of numbers.

Depending on whether the value of a digit changes from its position in the number, two are distinguished: positional and non-positional number systems.

In positional systems, the value of a digit changes with its position in the number. So, if we take the number 234, then the number 4 in it means units, but if we consider the number 243, then here it will already mean tens, not units.

In non-positional systems, the value of a digit is static, regardless of its position in the number. The most striking example is the stick system, where each unit is indicated by a dash. No matter where you assign the wand, the value of the number will only change by one.

Non-positional systems

Non-positional number systems include:

  1. A single system, which is considered one of the first. It used sticks instead of numbers. The more there were, the greater was the value of the number. You can meet an example of numbers written in this way in films where we are talking about people lost at sea, prisoners who mark every day with the help of notches on a stone or tree.
  2. Roman, in which Latin letters were used instead of numbers. Using them, you can write any number. At the same time, its value was determined using the sum and difference of the digits that made up the number. If there was a smaller number to the left of the digit, then the left digit was subtracted from the right one, and if the digit to the right was less than or equal to the digit to the left, then their values ​​were summed up. For example, the number 11 was written as XI, and 9 - IX.
  3. Letters, in which numbers were denoted using the alphabet of a particular language. One of them is the Slavic system, in which a number of letters had not only a phonetic, but also a numerical value.
  4. in which only two designations were used for recording - wedges and arrows.
  5. In Egypt, too, special symbols were used to denote numbers. When writing a number, each character could be used no more than nine times.

Positional systems

Much attention is paid in computer science to positional number systems. These include the following:

  • binary;
  • octal;
  • decimal;
  • hexadecimal;
  • sexagesimal, used when counting time (for example, in a minute - 60 seconds, in an hour - 60 minutes).

Each of them has its own alphabet for writing, translation rules and arithmetic operations.

Decimal system

This system is the most familiar to us. It uses numbers from 0 to 9 to write numbers. They are also called Arabic. Depending on the position of the digit in the number, it can denote different digits - units, tens, hundreds, thousands or millions. We use it everywhere, we know the basic rules by which arithmetic operations are performed on numbers.

Binary system

One of the main number systems in computer science is binary. Its simplicity allows the computer to perform cumbersome calculations several times faster than in the decimal system.

To write numbers, only two digits are used - 0 and 1. At the same time, depending on the position of 0 or 1 in the number, its value will change.

Initially, it was with the help of computers that they received all the necessary information. At the same time, one meant the presence of a signal transmitted using voltage, and zero meant its absence.

Octal system

Another well-known computer number system, which uses numbers from 0 to 7. It was used mainly in those areas of knowledge that are associated with digital devices. But recently it has been used much less frequently, since it has been replaced by the hexadecimal number system.

Binary Decimal

Representing large numbers in the binary system for a person is a rather complicated process. To simplify it, it was developed. It is usually used in electronic watches, calculators. In this system, not the entire number is converted from the decimal system to binary, but each digit is translated into the corresponding set of zeros and ones in the binary system. The same goes for converting from binary to decimal. Each digit, represented as a four-digit set of zeros and ones, is translated into a digit in the decimal number system. In principle, there is nothing complicated.

To work with numbers, in this case, a table of number systems is useful, which will indicate the correspondence between numbers and their binary code.

Hexadecimal system

Recently, the hexadecimal number system has become increasingly popular in programming and computer science. It uses not only numbers from 0 to 9, but also a number of Latin letters - A, B, C, D, E, F.

At the same time, each of the letters has its own meaning, so A=10, B=11, C=12 and so on. Each number is represented as a set of four characters: 001F.

Number conversion: from decimal to binary

Translation in number systems occurs according to certain rules. The most common conversion is from binary to decimal and vice versa.

In order to convert a number from decimal to binary, it is necessary to consistently divide it by the base of the number system, that is, the number two. In this case, the remainder of each division must be fixed. This will continue until the remainder of the division is less than or equal to one. It is best to carry out calculations in a column. Then the resulting division remainders are written to the string in reverse order.

For example, let's convert the number 9 to binary:

We divide 9, since the number is not evenly divisible, then we take the number 8, the remainder will be 9 - 1 = 1.

After dividing 8 by 2, we get 4. We divide it again, since the number is divided by two - we get 4 - 4 = 0 in the remainder.

We carry out the same operation with 2. The remainder is 0.

As a result of division, we get 1.

Regardless of the final number system, the transfer of numbers from decimal to any other will occur according to the principle of dividing the number by the basis of the positional system.

Number conversion: from binary to decimal

It is quite easy to convert numbers to decimal from binary. To do this, it is enough to know the rules for raising numbers to a power. In this case, to a power of two.

The translation algorithm is as follows: each digit from the binary number code must be multiplied by two, and the first two will be to the power of m-1, the second - m-2, and so on, where m is the number of digits in the code. Then add the results of the addition, getting an integer.

For schoolchildren, this algorithm can be explained more simply:

To begin with, we take and write down each digit multiplied by two, then we put down the power of two from the end, starting from zero. Then add up the resulting number.

For example, let's analyze with you the number 1001 obtained earlier, converting it to the decimal system, and at the same time check the correctness of our calculations.

It will look like this:

1*2 3 + 0*2 2 +0*2 1 +1*2 0 = 8+0+0+1 =9.

When studying this topic, it is convenient to use a table with powers of two. This will significantly reduce the amount of time required for calculations.

Other translation options

In some cases, translation can be carried out between binary and octal, binary and hexadecimal. In this case, you can use special tables or run the calculator application on your computer by selecting the “Programmer” option in the view tab.

Arithmetic operations

Regardless of the form in which the number is represented, it is possible to carry out calculations familiar to us with it. This can be division and multiplication, subtraction and addition in the number system you have chosen. Of course, each of them has its own rules.

So for the binary system developed its own tables for each of the operations. The same tables are used in other positional systems.

It is not necessary to memorize them - just print and have at hand. You can also use the calculator on your PC.

One of the most important topics in computer science is the number system. Knowing this topic, understanding the algorithms for translating numbers from one system to another is a guarantee that you will be able to understand more complex topics, such as algorithmization and programming, and will be able to write your first program on your own.

Tasks on the topic "Number systems"

Solution examples

Task number 1. How many significant digits are in the base 3 decimal number 357?Solution:Let's translate the number 35710 into the ternary number system:So, 35710 = 1110203. The number 1110203 contains 6 significant digits.Answer: 6.

Task number 2. Given A=A715, B=2518. Which of the numbers C, written in the binary system, meets the condition A1) 101011002 2) 101010102 3) 101010112 4) 101010002 Solution:Let's convert the numbers A=A715 and B=2518 to the binary number system, replacing each digit of the first number with the corresponding tetrad, and each digit of the second number with the corresponding triad: A715= 1010 01112; 2518 = 010 101 0012.Condition a

Task number 3. What digit does the decimal number 123 end with in base 6?Solution:Let's translate the number 12310 into the number system with base 6:12310 = 3236. Answer: The entry of the number 12310 in the number system with base 6 ends in the number 3.Tasks for performing arithmetic operations on numbers represented in different number systems

Task number 4. Calculate the sum of numbers X and Y if X=1101112, Y=1358. Express the result in binary form.1) 100100112 2) 100101002 3) 110101002 4) 101001002 Solution:Let's translate the number Y=1358 into the binary number system, replacing each of its digits with the corresponding triad: 001 011 1012. Perform the addition:Answer: 100101002 (option 2).

Task number 5. Find the arithmetic mean of the numbers 2368, 6C16 and 1110102. Express your answer in decimal notation.Solution:Let's translate the numbers 2368, 6С16 and 1110102 into the decimal number system:
Let's calculate the arithmetic mean of the numbers: (158+108+58)/3 = 10810.Answer: the arithmetic mean of the numbers 2368, 6C16 and 1110102 is 10810.

Task number 6. Calculate the value of the expression 2068 + AF16 ? 110010102. Make calculations in octal number system. Convert your answer to decimal.Solution:Let's translate all the numbers into the octal number system:2068 = 2068; AF16 = 2578; 110010102 = 3128Let's add the numbers:Let's convert the answer to the decimal system:Answer: 51110.

Tasks for finding the base of the number system

Task number 7. There are 100q fruit trees in the garden: 33q apple, 22q pear, 16q plum and 17q cherry. Find the base of the number system in which the trees are counted.Solution:There are 100q trees in the garden: 100q = 33q+22q+16q+17q.Let's number the digits and present these numbers in expanded form:
Answer: Trees are counted in base 9 number system.

Task number 8. Find the base x of the number system if you know that 2002x = 13010.Solution:Answer:4.

Task number 9. In a number system with some base, the decimal number 18 is written as 30. Specify this base.Solution:Let's take the base of the unknown number system as x and write the following equation:1810 = 30x;We number the digits and write these numbers in expanded form:Answer: The decimal number 18 is written as 30 in base 6 number system.

Service assignment. The service is designed to translate numbers from one number system to another online. To do this, select the base of the system from which you want to translate the number. You can enter both integers and numbers with a comma.

You can enter either whole numbers, such as 34 , or fractional numbers, such as 637.333 . For fractional numbers, the accuracy of the translation after the decimal point is indicated.

The following are also used with this calculator:

Ways to represent numbers

Binary (binary) numbers - each digit means the value of one bit (0 or 1), the most significant bit is always written on the left, the letter “b” is placed after the number. For ease of perception, notebooks can be separated by spaces. For example, 1010 0101b.
Hexadecimal (hexadecimal) numbers - each tetrad is represented by one character 0...9, A, B, ..., F. Such a representation can be denoted in different ways, here only the character "h" is used after the last hexadecimal digit. For example, A5h. In program texts, the same number can be denoted both as 0xA5 and 0A5h, depending on the syntax of the programming language. A non-significant zero (0) is added to the left of the most significant hexadecimal digit represented by a letter to distinguish between numbers and symbolic names.
Decimals (decimal) numbers - each byte (word, double word) is represented by an ordinary number, and the sign of the decimal representation (letter "d") is usually omitted. The byte from the previous examples has a decimal value of 165. Unlike binary and hexadecimal notation, decimal is difficult to mentally determine the value of each bit, which sometimes has to be done.
Octal (octal) numbers - each triple of bits (separation starts from the least significant) is written as a number 0-7, at the end the sign "o" is put. The same number would be written as 245o. The octal system is inconvenient in that the byte cannot be divided equally.

Algorithm for converting numbers from one number system to another

The conversion of integer decimal numbers to any other number system is carried out by dividing the number by the base of the new number system until the remainder leaves a number less than the base of the new number system. The new number is written as the remainder of the division, starting with the last one.
The conversion of the correct decimal fraction to another PSS is carried out by multiplying only the fractional part of the number by the base of the new number system until all zeros remain in the fractional part or until the specified translation accuracy is reached. As a result of each multiplication operation, one digit of the new number is formed, starting from the highest.
The translation of an improper fraction is carried out according to the 1st and 2nd rules. The integer and fractional parts are written together, separated by a comma.

Example #1.



Translation from 2 to 8 to 16 number system.
These systems are multiples of two, therefore, the translation is carried out using the correspondence table (see below).

To convert a number from a binary number system to an octal (hexadecimal) number, it is necessary to divide the binary number into groups of three (four for hexadecimal) digits from a comma to the right and left, complementing the extreme groups with zeros if necessary. Each group is replaced by the corresponding octal or hexadecimal digit.

Example #2. 1010111010.1011 = 1.010.111.010.101.1 = 1272.51 8
here 001=1; 010=2; 111=7; 010=2; 101=5; 001=1

When converting to hexadecimal, you must divide the number into parts, four digits each, following the same rules.
Example #3. 1010111010.1011 = 10.1011.1010.1011 = 2B12.13 HEX
here 0010=2; 1011=B; 1010=12; 1011=13

The conversion of numbers from 2, 8 and 16 to the decimal system is carried out by breaking the number into separate ones and multiplying it by the base of the system (from which the number is translated) raised to the power corresponding to its ordinal number in the translated number. In this case, the numbers are numbered to the left of the decimal point (the first number has the number 0) with increasing, and to the right with decreasing (ie, with a negative sign). The results obtained are added up.

Example #4.
Example of converting from binary to decimal number system.

1010010.101 2 = 1 2 6 +0 2 5 +1 2 4 +0 2 3 +0 2 2 +1 2 1 +0 2 0 + 1 2 -1 +0 2 - 2 +1 2 -3 =
= 64+0+16+0+0+2+0+0.5+0+0.125 = 82.625 10 Example of conversion from octal to decimal number system. 108.5 8 = 1* 8 2 +0 8 1 +8 8 0 + 5 8 -1 = 64+0+8+0.625 = 72.625 10 An example of converting from hexadecimal to decimal number system. 108.5 16 = 1 16 2 +0 16 1 +8 16 0 + 5 16 -1 = 256+0+8+0.3125 = 264.3125 10

Once again, we repeat the algorithm for translating numbers from one number system to another PSS

  1. From the decimal number system:
    • divide the number by the base of the number system being translated;
    • find the remainder after dividing the integer part of the number;
    • write down all remainders from division in reverse order;
  2. From the binary system
    • To convert to the decimal number system, you need to find the sum of the products of base 2 by the corresponding degree of discharge;
    • To convert a number to octal, you need to break the number into triads.
      For example, 1000110 = 1000 110 = 106 8
    • To convert a number from binary to hexadecimal, you need to divide the number into groups of 4 digits.
      For example, 1000110 = 100 0110 = 46 16
The system is called positional., for which the significance or weight of a digit depends on its location in the number. The relationship between systems is expressed in a table.
Table of correspondence of number systems:
Binary SSHexadecimal SS
0000 0
0001 1
0010 2
0011 3
0100 4
0101 5
0110 6
0111 7
1000 8
1001 9
1010 A
1011 B
1100 C
1101 D
1110 E
1111 F

Table for converting to octal number system

Example #2. Convert the number 100.12 from decimal to octal and vice versa. Explain the reasons for the discrepancies.
Solution.
Stage 1. .

The remainder of the division is written in reverse order. We get the number in the 8th number system: 144
100 = 144 8

To translate the fractional part of a number, we successively multiply the fractional part by base 8. As a result, each time we write down the integer part of the product.
0.12*8 = 0.96 (whole part 0 )
0.96*8 = 7.68 (whole part 7 )
0.68*8 = 5.44 (whole part 5 )
0.44*8 = 3.52 (whole part 3 )
We get the number in the 8th number system: 0753.
0.12 = 0.753 8

100,12 10 = 144,0753 8

Stage 2. Converting a number from decimal to octal.
Reverse conversion from octal to decimal.

To translate the integer part, it is necessary to multiply the digit of the number by the corresponding degree of digit.
144 = 8 2 *1 + 8 1 *4 + 8 0 *4 = 64 + 32 + 4 = 100

To translate the fractional part, it is necessary to divide the digit of the number by the corresponding degree of digit
0753 = 8 -1 *0 + 8 -2 *7 + 8 -3 *5 + 8 -4 *3 = 0.119873046875 = 0.1199

144,0753 8 = 100,96 10
The difference of 0.0001 (100.12 - 100.1199) is due to a rounding error when converting to octal. This error can be reduced if we take a larger number of digits (for example, not 4, but 8).

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.