103 in decimal system. Converting numbers to binary, hexadecimal, decimal, octal number systems

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 can be up to 30 characters long. Use the symbol to enter fractional numbers. 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 translate the number in the third field, and then click the "Get Record" 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 the 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 Record

Completed translations: 3446071

It may also be interesting:

  • 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 system - it is just not positional. IN positional systems the position of a digit in a number uniquely determines the meaning of that number. This is easy to understand by considering the example of a number.

Example 1... Let's take the number 5921 in decimal notation. Let's 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 determines 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. Let's 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 in the following form: 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

Most in a simple way transferring a number from one number system to another is to transfer 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 the decimal number system

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

1. Convert the number 1001101.1101 2 to decimal notation.
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 E8F.2D 16 to decimal notation.
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 translate numbers from decimal system numbers to another number system, the integer and fractional parts of the number must be translated separately.

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

The integer part is converted from the decimal number system to another number system by sequentially dividing the integer part of the number by the base of the number system until the whole remainder, the smaller of the base of the number system, is obtained. The result of the transfer will be an entry from the balance, 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 calculations are complete. The record from the leftovers 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. This means that the translation was done correctly.
Answer: 273 10 = 421 8

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

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

Recall that the correct decimal fraction is called real number with zero integer part... To convert such a number to the base N number system, you need to sequentially multiply the number by N until the fractional part is zero or the required number of digits is obtained. If, during multiplication, a number with an integer part that is different from zero is obtained, then the integer part is no longer taken into account, since it is sequentially entered into the result.

4. Convert Binary number 0.125 10.
Solution: 0.125 2 = 0.25 (0 is the integer part, which will become 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 equal to zero , then the translation is complete).
Answer: 0.125 10 = 0.001 2

Service purpose... 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 both whole numbers, such as 34, and fractional numbers, such as 637.333. For fractional numbers, the translation precision is indicated after the decimal point.

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, after the number is the letter "b". For convenience, tetrads 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" after the last hexadecimal digit is used. For example, A5h. In program texts, the same number can be designated both as 0xA5 and as 0A5h, depending on the syntax of the programming language. A minor zero (0) is added to the left of the most significant hexadecimal digit represented by a letter to distinguish between numbers and symbolic names.
Decimal (decimal) numbers - each byte (word, double word) is represented by an ordinary number, and the decimal representation (the 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 meaning of each bit, which sometimes you have to do.
Octal (octal) numbers - each triplet of bits (the division starts with the least significant) is written as a digit 0–7, at the end the sign "o" is put. The same number will be written as 245 °. The octal system is inconvenient because a byte cannot be divided equally.

Algorithm for translating numbers from one number system to another

Conversion of decimal integers to any other number system is carried out by dividing the number by the base new system numbers until the remainder remains 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.
Translation of a correct decimal fraction into 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 achieved. As a result of performing each multiplication operation, one digit of a new number is formed, starting with the oldest one.
The translation of an incorrect fraction is carried out according to 1 and 2 rules. The whole 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 octal (hexadecimal), it is necessary to split from the comma to the right and left binary number into groups of three (four - for hexadecimal) digits, supplementing 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 a hexadecimal system, it is necessary to divide the number into parts, four digits each, observing the same rules.
Example No. 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 number system is carried out by dividing 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 number to be translated. In this case, the numbers are numbered to the left of the decimal point (the first number has the number 0) with increasing number, and in right side descending (i.e. with a negative sign). The results are added up.

Example No. 4.
An example of conversion 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 converting 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 Example of conversion 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 converting numbers from one number system to another PSS

  1. From the decimal number system:
    • divide the number by the base of the number system to be translated;
    • find the remainder of the division of the integer part of the number;
    • write all the remainders of the division into reverse order;
  2. Binary number system
    • To convert to the decimal number system, you need to find the sum of the products of the base 2 by the corresponding degree of the digit;
    • To convert a number to octal, you need to split the number into triads.
      For example, 1000110 = 1000 110 = 106 8
    • To convert a number from binary to hexadecimal, you need to split the number into groups of 4 digits.
      For example, 1000110 = 100 0110 = 46 16
A positional system is called, for which the significance or weight of a digit depends on its location in the number. The relationship between the systems is expressed in the table.
Number system correspondence table:
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

Octal conversion table

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

We write the remainder of the division in the 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 the base 8. As a result, each time we write down the whole 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 Decimal to Octal.
Reverse translation from octal to decimal.

To translate the integer part, it is necessary to multiply the digit of the number by the corresponding degree of the 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 the 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 explained by the rounding error when converting to the octal system. This error can be reduced by taking a larger number of digits (for example, not 4, but 8).

With this online calculator, you can convert whole and fractional numbers from one number system to another. A detailed solution with explanations is given. To translate, enter the original number, set the base of the base of the base of the base number, set the base of the base into which you want to translate the number and click on the "Translate" button. For the theoretical part and numerical examples, see below.

The result has already been received!

Converting whole and fractional numbers from one number system to any other - theory, examples and solutions

There are positional and non-positional number systems. The Arabic numeral system that we use in everyday life is positional, but the Roman one is not. In positional numeration systems, the position of a number uniquely determines the magnitude of the number. Let's look at this using the decimal number 6372 as an example. Let's enumerate this number from right to left starting from zero:

Then the number 6372 can be represented as follows:

6372 = 6000 + 300 + 70 + 2 = 6 · 10 3 + 3 · 10 2 + 7 · 10 1 + 2 · 10 0.

The number 10 defines the number system (in this case this is 10). The values ​​of the position of the given number are taken as degrees.

Consider the real decimal number 1287.923. Let's number it starting from the zero position of the number from the decimal point to the left and to the right:

Then the number 1287.923 can be represented as:

1287.923 = 1000 + 200 + 80 + 7 + 0.9 + 0.02 + 0.003 = 1 · 10 3 + 2 · 10 2 + 8 · 10 1 + 7 · 10 0 + 9 · 10 -1 + 2 · 10 -2 + 3 · 10 -3.

In general, the formula can be represented as follows:

C n s n + C n-1 s n-1 + ... + C 1 s 1 + C 0 s 0 + D -1 s -1 + D -2 s -2 + ... + D -k s -k

where Ц n is an integer in position n, D -k - fractional number in position (-k), s- number system.

A few words about number systems. The number in the decimal number system consists of many digits (0,1,2,3,4,5,6,7,8,9), in the octal number system - from the set of numbers (0,1, 2,3,4,5,6,7), in the binary number system - from a set of digits (0,1), in hexadecimal system numbers - from a set of digits (0,1,2,3,4,5,6,7,8,9, A, B, C, D, E, F), where A, B, C, D, E, F correspond to the numbers 10,11,12,13,14,15. Table Table 1 shows the numbers in different systems reckoning.

Table 1
Notation
10 2 8 16
0 0 0 0
1 1 1 1
2 10 2 2
3 11 3 3
4 100 4 4
5 101 5 5
6 110 6 6
7 111 7 7
8 1000 10 8
9 1001 11 9
10 1010 12 A
11 1011 13 B
12 1100 14 C
13 1101 15 D
14 1110 16 E
15 1111 17 F

Converting numbers from one number system to another

To convert numbers from one number system to another, the easiest way is to first convert the number to the decimal number system, and then, from the decimal number system, to the required number system.

Converting numbers from any number system to the decimal number system

Using formula (1), you can convert numbers from any number system to the decimal number system.

Example 1. Convert the number 1011101.001 from binary number system (SS) to decimal SS. Solution:

1 2 6 +0 2 5 + 1 2 4 + 1 · 2 3 + 1 · 2 2 + 0 · 2 1 + 1 2 0 + 0 2 -1 + 0 2 -2 + 1 2 -3 = 64 + 16 + 8 + 4 + 1 + 1/8 = 93.125

Example2. Convert 1011101.001 from octal number system (SS) to decimal SS. Solution:

Example 3 ... Convert the number AB572.CDF from hexadecimal base to decimal SS. Solution:

Here A-replaced by 10, B- at 11, C- at 12, F- by 15.

Converting numbers from a decimal number system to another number system

To convert numbers from the decimal number system to another number system, you need to translate separately the integer part of the number and the fractional part of the number.

The integer part of the number is converted from the decimal SS to another number system - by sequentially dividing the integer part of the number by the base of the number system (for a binary SS - by 2, for an 8-ary SS - by 8, for a 16-ary - by 16, etc.) ) until a whole residue is obtained, less than the base CC.

Example 4 ... Let's convert the number 159 from decimal SS to binary SS:

159 2
158 79 2
1 78 39 2
1 38 19 2
1 18 9 2
1 8 4 2
1 4 2 2
0 2 1
0

As seen from Fig. 1, the number 159 when divided by 2 gives the quotient 79 and the remainder 1. Further, the number 79 when divided by 2 gives the quotient 39 and the remainder 1, and so on. As a result, having built a number from the remainder of the division (from right to left), we get the number in the binary SS: 10011111 ... Therefore, we can write:

159 10 =10011111 2 .

Example 5 ... Let's convert the number 615 from decimal SS to octal SS.

615 8
608 76 8
7 72 9 8
4 8 1
1

When converting a number from decimal SS to octal SS, you need to sequentially divide the number by 8 until you get a whole remainder less than 8. As a result, constructing a number from the remainders of the division (from right to left), we get the number in octal SS: 1147 (see Fig. 2). Therefore, we can write:

615 10 =1147 8 .

Example 6 ... Converting the number 19673 from decimal to hexadecimal SS.

19673 16
19664 1229 16
9 1216 76 16
13 64 4
12

As can be seen from Figure 3, by sequentially dividing 19673 by 16, we obtained the remainders 4, 12, 13, 9. In the hexadecimal number system, 12 corresponds to C, and 13 corresponds to D. Therefore, our hexadecimal number is 4CD9.

To convert correct decimal fractions (real number with zero integer part) to base s, you need given number multiply sequentially by s until you get a pure zero in the fractional part, or you get the required number of digits. If, during multiplication, a number with an integer part that is different from zero is obtained, then this integer part is not taken into account (they are sequentially added to the result).

Let's consider the above with examples.

Example 7 ... Convert the number 0.214 from decimal to binary SS.

0.214
x 2
0 0.428
x 2
0 0.856
x 2
1 0.712
x 2
1 0.424
x 2
0 0.848
x 2
1 0.696
x 2
1 0.392

As can be seen from Fig. 4, the number 0.214 is sequentially multiplied by 2. If the multiplication results in a nonzero number with an integer part, then the integer part is written separately (to the left of the number), and the number is written with a zero integer part. If, when multiplying, a number with a zero integer part is obtained, then zero is written to the left of it. The multiplication process continues until a pure zero is obtained in the fractional part, or the required number of digits is obtained. Writing down the bold numbers (Fig. 4) from top to bottom, we get the required number in the binary number system: 0. 0011011 .

Therefore, we can write:

0.214 10 =0.0011011 2 .

Example 8 ... Let's convert the number 0.125 from the decimal number system to the binary SS.

0.125
x 2
0 0.25
x 2
0 0.5
x 2
1 0.0

To convert the number 0.125 from decimal SS to binary, this number is sequentially multiplied by 2. In the third stage, it turned out to be 0. Therefore, the following result was obtained:

0.125 10 =0.001 2 .

Example 9 ... Let's convert the number 0.214 from decimal to hexadecimal SS.

0.214
x 16
3 0.424
x 16
6 0.784
x 16
12 0.544
x 16
8 0.704
x 16
11 0.264
x 16
4 0.224

Following examples 4 and 5, we get the numbers 3, 6, 12, 8, 11, 4. But in the hexadecimal SS, the numbers 12 and 11 correspond to the numbers C and B. Therefore, we have:

0.214 10 = 0.36C8B4 16.

Example 10 ... Convert Decimal to Octal SS.

0.512
x 8
4 0.096
x 8
0 0.768
x 8
6 0.144
x 8
1 0.152
x 8
1 0.216
x 8
1 0.728

Got:

0.512 10 =0.406111 8 .

Example 11 ... Converting the number 159.125 from Decimal to Binary SS. To do this, we translate separately the integer part of the number (Example 4) and the fractional part of the number (Example 8). Further, combining these results, we get:

159.125 10 =10011111.001 2 .

Example 12 ... Converting the number 19673.214 from decimal to hexadecimal SS. To do this, we translate separately the integer part of the number (Example 6) and the fractional part of the number (Example 9). Further, combining these results, we get.