Addition of numbers in the octal system online. Translation of numbers in dviykovu, sixteenadtsyatkovu, ten, vіsіmkovu system of numbers. Reproduction in number systems

Golovna / Usunennya malfunctions

| Informatics and information and communication technologies | Lesson planning and materials before lessons | 10 class | Lesson planning for the primary school (FGOS) | Arithmetic operations in positional number systems

Lesson 15
§12. Arithmetic operations in positional number systems

Arithmetic operations in positional number systems

Arithmetic operations in positional number systems with a basis q follow the rules, similar to the rules that are found in the tenth system of numbers.

At the beginning of the school, for the education of children, there is a vicor table of folding and multiplication. Similar tables can be put together, whether it be a positional number system.

12.1. Addition of numbers in the system of numbers with the substava q

Take a look at the appendices of the supplementary table in the ternary (Table 3.2), sixteenth (Table 3.4) and sixteenth (Table 3.3) number systems.

Table 3.2

Addition in the ternary number system

Table 3.3

Addition in the sixteenth system of numbers

Table 3.4

Addition to the highest system of numbers

q take the sum S two numbers BUTі B, you need to add the numbers that they are approved, for the ranks i left to right:

Yakscho a i + b i< q, то s i = a i + b i , старший (i + 1)-й разряд не изменяется;
if a i + b i q, then s i \u003d a i + b i - q, the senior (i + 1)th digit is increased by 1.

Apply:

12.2. Vіdnіmannya of numbers in the system of numbers with subdstava q

Schob at the system number with the basis q take away the margin R two numbers BUTі AT, the requirement is to calculate the differences and approve their digits for the ranks i left to right:

If a i ≥ b i , then r i = a i - b i the senior (i + 1) digit is not changed;
yakscho a i< b i , то r i = a i - b i + g, старший (i + 1)-й разряд уменьшается на 1 (выполняется заём в старшем разряде).

Service assignment. Appointment service for translating numbers from one number system to another online mode. For whom to choose the basis of the system, for which it is necessary to translate the number. You can enter as a number, i numbers with whom.

You can enter as a whole number, for example 34 and as a fraction, for example, 637.333. For fractional numbers, the accuracy of the translation after Komi is indicated.

At the same time with the sim calculator, you can also use the following:

Ways to submit numbers

Dviykov (binary) numbers - a skin digit means the value of one bit (0 or 1), the most significant bit must always be written in lefthand, after the number the letter “b” is put. For transparency, the spray can be divided into samples. For example, 1010 0101b.
Sixteen (hexadecimal) numbers - leather is represented by one character 0 ... 9, A, B, ..., F. It can be used differently, here the symbol “h” is used instead of the remaining sixteenth digit. For example, A5h. In program texts, the number can be assigned as 0xA5, and as 0A5h, depending on the syntax of the mov programming. A non-significant zero (0) is added with a left hand in the senior sixteenth digit, which is represented by a letter, in order to distinguish between numbers and symbolic names.
Dozens (decimal) numbers - a skin byte (word, subword) is represented by a significant number, and the sign of the tenth manifestation (letter "d") should be omitted. Byte from the front butt in the tenth value 165. On the note in the two and sixteen form of the record, after the tenth it is important in the mind to designate the value of the skin bit, which can sometimes be worked.
Octal (octal) numbers - the skin trio of bits (subject to start from the youngest) is written as numbers 0–7, for example, a “pro” sign is put. Those same number will be written as 245o. The Vіsіmkova system is not handy, because the bytes cannot be divided equally.

Algorithm for converting numbers from one number system to another

Translation of integer tens numbers in any other system of numbers new systems the number until now, until the surplus is less than the introduction of a new system of numbers. The new number is written down as a surplus of the subdivision, starting from the rest.
The translation of the correct decimal fraction into another PSS is to be multiplied only by the fractional part of the number on the basis of the new number system, the docks in the fractional part should not be filled with all zeros, or until the specified accuracy of the translation is reached. As a result of the skin multiplication operation, one digit of a new number is formed, starting from the older one.
The transfer of the wrong fraction is subject to 1 and 2 rules. The number of that shot part is written down at once, in a coma.

Example number 1.



Translation from 2 to 8 to 16 number system.
Qi of the system is a multiple of two, then, the translation is based on an additional table of evidence (div. below).

To convert a number from a two-fold system of numbers to an eight-fold (sixteenth) number, it is necessary to split the two-digit number into groups of three (chotiri - for sixteenth) order, adding zeros to the extreme group if necessary. The skin group is replaced with a double octal or sixteen digit.

Example number 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 translating into the sixteenth system, it is necessary to divide the number into parts, according to the digits, reaching the same rules.
Example number 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 tenth system of calculation is carried out by a way of splitting the number into the same multiplication of yogo on the basis of the system (from which the number is shifted) the link at the feet is similar to the serial number in the number to be translated. At this number, they are numbered to the left in the form of komi (the first number is number 0) with increasing numbers, and on the right side with decreasing numbers (which is a negative sign). Take away the results add up.

Example number 4.
Butt translated from two to tenth 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 108.5 8 = 1* 8 2 +0 8 1 +8 8 0 + 5 8 -1 = 64+0+8+0.625 = 72.625 10 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 tenth number system:
    • split the number on the basis of the transferred number system;
    • know the surplus in rozpodіlu whole part of the number;
    • write down all the surpluses in the rozpodіlu in the reverse order;
  2. Z dvіykovoї number system
    • To transfer to the tenth system of numbers, it is necessary to know the sum of creations, substituting 2 for the highest rank;
    • For translating the number of the visimkov, it is necessary to break the number into triads.
      For example, 1000110 = 1000110 = 106 8
    • To convert a number from a double number system to a sixteenth number system, it is necessary to divide the number into groups of 4 digits.
      For example, 1000110 = 100 0110 = 46 16
The system is called positional, for some significance or else the number of figures should be deposited in the її roztashuvannya in the number. Spivvіdnoshnja between systems is shown by the table.
Table of types of billing systems:
Dviykova SSShistnadtsyatkova 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 translating to the numeral system

Example number 2. Convert the number 100.12 from the tenth number system y to the twelfth number system back. Explain the reasons for the differences.
Solution.
1 stage. .

The surplus in rozpodіlu is recorded in the reverse order. We take the number from the 8th number system: 144
100 = 144 8

To translate the fractional part of the number, successively multiply the fractional part by the base 8. In the result, the whole part of the creation is written down.
0.12 * 8 = 0.96 (number of parts 0 )
0.96 * 8 = 7.68 7 )
0.68 * 8 = 5.44 5 )
0.44 * 8 = 3.52 3 )
We take the number from the 8th number system: 0753.
0.12 = 0.753 8

100,12 10 = 144,0753 8

2 Stage. Converting the number from the tenth number system to the numeral number system.
Zvorotniy translated from the Vіsіmkovoї system counted to the tenth.

To transfer the whole part, it is necessary to multiply the order of the number by the second step of the order.
144 = 8 2 *1 + 8 1 *4 + 8 0 *4 = 64 + 32 + 4 = 100

To transfer the shot part, it is necessary to divide the order of the number into the next step of the order.
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 in 0.0001 (100.12 - 100.1199) is explained by the error of rounding when converting numbers to the numeral system. You can change the qiu to kill, so that you can take more discharges (for example, not 4, but 8).

Arithmetic operations for two number systems

The rules for arithmetic numbers over two numbers are given by tables of additions, which show that multiplication.

The rule of vykonannya operation folding is the same for all systems of numbers: as the sum of numbers that are added up, more or more substantiates the system of numbers, then one is transferred to the next left-handed category. When you see it, it is necessary to slacken your posture.

Similarly, arithmetic numbers are counted in the highest, sixteenth and other number systems. If necessary, it is necessary to be sure that the value of the transfer to the offensive rank when folded to the position of the senior rank when taken is determined by the value of the basis of the numerical system.

Arithmetic operations in the octal number system

For the representation of numbers in the octal system, the numbers are victorious in all digits (0, 1, 2, 3, 4, 5, 6, 7), the shards are the basis of the octal number system. All operations are performed by looking at eight digits. The operations of adding and multiplying in the octal system of numbers are viroblyayutsya for additional advancing tables:

Tables of folding and multiplication in the highest system of numbers

butt 5.See big numbers 5153-1671і2426.63-1706.71

Example 6

Arithmetic operations in the sixteenth number system

To represent numbers in the sixteenth number system, sixteen digits are written: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F. In the sixteenth number system, sixteen digits are written yak10. The numbering of arithmetic operations in the sixteenth system is carried out as in the decimal system, and when performing the arithmetic operations on great numbers, it is necessary to complete the tables and add the multiplication of numbers in the sixteenth number system.

Table of additions in the sixteenth system of numbers

Multiplication table for the sixteenth system of numbers

Example 7. Add sixteen numbers

Storing that visualization of numbers in any positional system of numbers is numbered bit by bit. For znakhodzhennya sumi, units of the same and tієї order are added up, starting from the units of the first category (right-handed). As soon as the sum is one of the order, which is added, the number is changed, equal to the system, then the sum of the sum is seen as the one of the senior order, and it is added to the judicial order of evil. This addition can be carried out without interruption, like in the tenth system, in the "stovpchik", vicorist table of folding single-digit numbers.

For example, in a system of numbers with a support 4, a folding table may look like this:

An even simpler table is the addition in the dual number system:

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

Butt:

Vidnimannya vikonuєmo just like that, like in the tenth system: signing the change of numbers in the ranks, starting from the first. It’s impossible to see alone at the rank, “borrow” the loneliness from the greater rank and we can remake them from the loneliness of the court right rank.

Butt: 2311 4 - 1223 4 .

  1. At the first category, type 1, it is not possible to select 3, "borrow" one from another category, you can take revenge on one of the first category. Before them, we add one unit of the first category, in total we take five units from the first category - in the fourth system, the stench is recorded as 11.
  2. It can be seen that the first row has five singles three singles: 11-3=2.
  3. The other rank did not lose one single, we borrow from the third (the third loses 2 singles). One of the third order to revenge 4 one of the other. It can be seen from another row: 4-2 = 2.
  4. For the third row: 2-2 = 0.
  5. For the fourth row: 2-1 = 1.

Apply the translation of numbers from different number systems

Butt #1
Transferring the number 12 from the tenth to the two number system
Solution

Let's transfer the number 12 10 to the 2-ichnu system of numbers, for the additional successive subdivision to 2, the docks will not be equal to zero more privately. As a result, the number of leftovers will be taken away from the right-handed written down.

12 : 2 = 6 surplus: 0
6 : 2 = 3 surplus: 0
3 : 2 = 1 overage: 1
1 : 2 = 0 overage: 1

12 10 = 1100 2

Butt #2
Transferring the number 12.3 from the tenth to the two number system

12.3 10 = 1100.010011001100110011001100110011 2

Solution

Let's transfer the integer part of the 12th of 12.3 10 to the 2-ichnu number system, for the additional successive subdivision to 2, the docks will not be equal to zero. As a result, the number of leftovers will be taken away from the right-handed written down.

12 : 2 = 6 surplus: 0
6 : 2 = 3 surplus: 0
3 : 2 = 1 overage: 1
1 : 2 = 0 overage: 1

12 10 = 1100 2

We transfer the fractional part 0.3 of the number 12.3 10 to the 2-ichnu system of numbers, for the additional successive multiplication by 2, doti, until the fractional part of the creation does not see zero, otherwise the necessary number of signs after Komi will not be reached. As a result of multiplying the integer part is not equal to zero, it is necessary to replace the value of the integer part by zero. As a result, the number of whole parts of creations will be taken away, written evil to the right.

0.3 · 2 = 0 .6
0.6 · 2 = 1 .2
0.2 · 2 = 0 .4
0.4 · 2 = 0 .8
0.8 · 2 = 1 .6
0.6 · 2 = 1 .2
0.2 · 2 = 0 .4
0.4 · 2 = 0 .8
0.8 · 2 = 1 .6
0.6 · 2 = 1 .2
0.2 · 2 = 0 .4
0.4 · 2 = 0 .8
0.8 · 2 = 1 .6
0.6 · 2 = 1 .2
0.2 · 2 = 0 .4
0.4 · 2 = 0 .8
0.8 · 2 = 1 .6
0.6 · 2 = 1 .2
0.2 · 2 = 0 .4
0.4 · 2 = 0 .8
0.8 · 2 = 1 .6
0.6 · 2 = 1 .2
0.2 · 2 = 0 .4
0.4 · 2 = 0 .8
0.8 · 2 = 1 .6
0.6 · 2 = 1 .2
0.2 · 2 = 0 .4
0.4 · 2 = 0 .8
0.8 · 2 = 1 .6
0.6 · 2 = 1 .2

0.3 10 = 0.010011001100110011001100110011 2
12.3 10 = 1100.010011001100110011001100110011 2

Butt #3
Transferring the number 10011 from the two system to the tenth number system
Solution

We transfer the number 10011 2 to the tenth number system, for which we write the position of the skin number in the right number, starting from zero

The skin position of the number will be a step of the number 2, but the number system is 2-a. It is necessary to sequentially multiply the skin number 10011 2 by 2 steps of the second position of the number and then add the next step of the second position with the next addition of the step of the second position.

10011 2 = 1 ⋅ 2 4 + 0 ⋅ 2 3 + 0 ⋅ 2 2 + 1 ⋅ 2 1 + 1 ⋅ 2 0 = 19 10

Butt #4
Transferring the number 11.101 from the two system to the tenth number system

11.101 2 = 3.625 10

Solution

We translate the number 11.101 2 from the tenth number system, for which we write the position of the skin number in the number

The skin position of the number will be a step of the number 2, but the number system is 2-a. It is necessary to sequentially multiply the skin number 11.101 2 by 2 steps of the second position of the number and then add the step of the second position with the next addition of the step of the second position.

11.101 2 = 1 ⋅ 2 1 + 1 ⋅ 2 0 + 1 ⋅ 2 -1 + 0 ⋅ 2 -2 + 1 ⋅ 2 -3 = 3.625 10

Butt #5
Transferring the number 1583 from the tenth system to the sixteenth number system

1583 10 = 62F 16

Solution

Let's transfer the number 1583 10 to the 16th number system, for an additional successive subdivision to 16, the docks will not be more privately equal to zero. As a result, the number of leftovers will be taken away from the right-handed written down.

1583 : 16 = 98 excess: 15, 15 = F
98 : 16 = 6 overage: 2
6 : 16 = 0 overage: 6

1583 10 = 62F 16

Butt #6
Transferring the number 1583.56 from the tenth system to the sixteenth number system

1583.56 10 = 62F.8F5C28F5C28F5C28F5C28F5C28F5C2 16

Solution

Let's transfer the integer part 1583 of the number 1583.56 10 to the 16-digit number system, for the additional successive subdivision to 16, the docks will not be equal to zero. As a result, the number of leftovers will be taken away from the right-handed written down.

1583 : 16 = 98 excess: 15, 15 = F
98 : 16 = 6 overage: 2
6 : 16 = 0 overage: 6

1583 10 = 62F 16

Let's transfer the fractional part 0.56 of the number 1583.56 10 to the 16-ary system of numbers, for the additional successive multiplication by 16, doti, until you see zero in the fractional part of the creation, otherwise the necessary number of signs after the Komi will not be reached. As a result of multiplying the integer part is not equal to zero, it is necessary to replace the value of the integer part by zero. As a result, the number of whole parts of creations will be taken away, written evil to the right.

0.56 · 16 = 8 .96
0.96 · 16 = 15.36, 15 = F
0.36 · 16 = 5 .76
0.76 · 16 = 12.16, 12=C
0.16 · 16 = 2 .56
0.56 · 16 = 8 .96
0.96 · 16 = 15.36, 15 = F
0.36 · 16 = 5 .76
0.76 · 16 = 12.16, 12=C
0.16 · 16 = 2 .56
0.56 · 16 = 8 .96
0.96 · 16 = 15.36, 15 = F
0.36 · 16 = 5 .76
0.76 · 16 = 12.16, 12=C
0.16 · 16 = 2 .56
0.56 · 16 = 8 .96
0.96 · 16 = 15.36, 15 = F
0.36 · 16 = 5 .76
0.76 · 16 = 12.16, 12=C
0.16 · 16 = 2 .56
0.56 · 16 = 8 .96
0.96 · 16 = 15.36, 15 = F
0.36 · 16 = 5 .76
0.76 · 16 = 12.16, 12=C
0.16 · 16 = 2 .56
0.56 · 16 = 8 .96
0.96 · 16 = 15.36, 15 = F
0.36 · 16 = 5 .76
0.76 · 16 = 12.16, 12=C
0.16 · 16 = 2 .56

0.56 10 = 0.8F5C28F5C28F5C28F5C28F5C28F5C2 16
1583.56 10 = 62F.8F5C28F5C28F5C28F5C28F5C28F5C2 16

Butt #7
Transferring the number A12DCF from the sixteenth system to the tenth number system

A12DCF 16 = 10563023 10

Solution

We transfer the number A12DCF 16 to the tenth number system, for which we write the position of the skin digit in the right number, starting from zero

The skin position of the number will be a step of the number 16, but the system is 16-number. It is necessary to sequentially multiply the skin number A12DCF 16 by the 16th step of the second position of the number and then add the next step of the second position with the next addition of the next step of the second position.
2

1 0 -1 -2 -3 NumberA1 2 DCF1 2 A
The skin position of the number will be a step of the number 16, but the system is 16-number. It is necessary to sequentially multiply the skin number A12DCF.12A 16 by the 16th step of the second position of the number and then add it with the next addition of the next step of the second step of the second position.
A16 = 1010
D16 = 1310
C16 = 1210
F16 = 1510

A12DCF.12A 16 = 10 ⋅ 16 5 + 1 ⋅ 16 4 + 2 ⋅ 16 3 + 13 ⋅ 16 2 + 12 ⋅ 16 1 + 15 ⋅ 16 0 + 1 ⋅ 1

1 0 Number1 0 1 0 1 0 0 0 1 1
The skin position of the number will be a step of the number 2, but the number system is 2-a. It is necessary to sequentially multiply the skin number 1010100011 2 by 2 steps of the second position of the number and then add the next step of the second position with the next addition of the next step.

1010100011 2 = 1 ⋅ 2 9 + 0 ⋅ 2 8 + 1 ⋅ 2 7 + 0 ⋅ 2 6 + 1 ⋅ 2 5 + 0 ⋅ 2 4 + 0 ⋅ 2 3 + 0 ⋅ 2 2 + 1 ⋅ 2 1 + 1 ⋅ 2 0 = 675 10

Let's transfer the number 675 10 to the 16th number system, for the help of the successive division by 16, the docks will not be more privately equal to zero. As a result, the number of leftovers will be taken away from the right-handed written down.

675 : 16 = 42 overage: 3
42 : 16 = 2 overage: 10, 10 = A
2 : 16 = 0 overage: 2

675 10 = 2A3 16

© 2022 androidas.ru - All about Android