Note:
You can perform actions only in one number system if you are given different systems number system, first convert all numbers into one number system
If you are working with a number system whose base is greater than 10 and you have a letter in your example, mentally replace it with a number in the decimal system, carry out the necessary operations and convert the result back to the original number system

Addition:
Everyone remembers how in elementary school we were taught to add in a column, place by place. If, when adding in a digit, a number greater than 9 was obtained, we subtracted 10 from it, the resulting result was written down in the answer, and 1 was added to the next digit. From this we can formulate a rule:

  1. It’s more convenient to fold in a “column”
  2. Adding place by place, if the digit in the place > is greater than the largest digit of the alphabet of a given number system, we subtract the base of the number system from this number.
  3. We write the result in the required category
  4. Add one to the next digit
Example:

Add 1001001110 and 100111101 in binary number system

1001001110

100111101

1110001011

Answer: 1110001011

Add F3B and 5A in hexadecimal notation

FE0

Answer: FE0


Subtraction: Everyone remembers how in elementary school we were taught to subtract by column, place value from place value. If, when subtracting in a digit, a number less than 0 was obtained, then we “borrowed” one from the highest digit and added 10 to the required digit, and subtracted the required one from the new number. From this we can formulate a rule:

  1. It is more convenient to subtract in a “column”
  2. Subtracting placewise if the digit is in place< 0, вычитаем из старшего разряда 1, а к нужному разряду прибавляем основание системы счисления.
  3. We perform subtraction
Example:

Subtract the number 100111101 from 1001001110 in binary number system

1001001110

100111101

100010001

Answer: 100010001

Subtract 5A from F3B in hexadecimal notation

D96

Answer: D96

Most importantly, do not forget that you only have numbers of a given number system at your disposal, and also do not forget about transitions between digit terms.
Multiplication:

Multiplication in other number systems occurs in exactly the same way as we are used to multiplying.

  1. It is more convenient to multiply in a “column”
  2. Multiplication in any number system follows the same rules as in the decimal system. But we can only use the alphabet, given system dead reckoning
Example:

Multiply 10111 by 1101 in binary number system

10111

1101

10111

10111

10111

100101011

Answer: 100101011

Multiply F3B by number A in hexadecimal notation

F3B

984E

Answer: 984E

Answer: 984E

Most importantly, do not forget that you only have numbers of a given number system at your disposal, and also do not forget about transitions between digit terms.

Division:

Division in other number systems occurs in exactly the same way as we are used to dividing.

  1. It is more convenient to divide in a “column”
  2. Division in any number system follows the same rules as in the decimal system. But we can only use the alphabet given by the number system

Example:

Divide 1011011 by 1101 in binary number system

Divide F 3 B for number 8 in hexadecimal number system

Most importantly, do not forget that you only have numbers of a given number system at your disposal, and also do not forget about transitions between digit terms.

NON-POSITIONAL

Non-positional number systems

Non-positional number systems appeared historically first. In these systems, the meaning of each digital character is constant and does not depend on its position. The simplest case of a non-positional system is the unit system, for which a single symbol is used to denote numbers, usually a bar, sometimes a dot, of which the quantity corresponding to the designated number is always placed:

  • 1 - |
  • 2 - ||
  • 3 - |||, etc.

So this single character has meaning units, from which the required number is obtained by successive addition:

||||| = 1+1+1+1+1 = 5.

A modification of the unit system is the system with a base, in which there are symbols not only to designate the unit, but also for the degrees of the base. For example, if the number 5 is taken as the base, then there will be additional symbols to indicate 5, 25, 125, and so on.

An example of such a base 10 system is the ancient Egyptian one, which arose in the second half of the third millennium BC. This system had the following hieroglyphs:

  • pole - units,
  • arc - tens,
  • palm leaf - hundreds,
  • lotus flower - thousands.

The numbers were obtained by simple addition; the order could be any. So, to designate, for example, the number 3815, three lotus flowers, eight palm leaves, one arc and five poles were drawn. More complex systems with additional signs - old Greek, Roman. The Roman one also uses an element of the positional system - a larger number in front of a smaller one is added, a smaller one in front of a larger one is subtracted: IV = 4, but VI = 6, this method, however, is used exclusively to denote the numbers 4, 9, 40, 90, 400 , 900, 4000, and their derivatives by addition.

The modern Greek and ancient Russian systems used 27 letters of the alphabet as numbers, where they denoted each number from 1 to 9, as well as tens and hundreds. This approach made it possible to write numbers from 1 to 999 without repeating numbers.

In the old Russian system, special frames around the numbers were used to indicate large numbers.

A non-positional numbering system is still used almost everywhere as a verbal numbering system. Verbal numbering systems are strongly tied to the language, and their common elements mainly relate to the general principles and names of large numbers (trillion and above). The general principles underlying modern verbal numberings involve the formation of designations through addition and multiplication of the meanings of unique names.

Addition and subtraction of numbers in any positional number system is performed bitwise. To find the sum, units of the same digit are added, starting with the units of the first digit (on the right). If the sum of units of the added digit exceeds the number equal to the base of the system, then a unit of the highest digit is selected from this sum, which is added to the adjacent digit on the left. Therefore, addition can be done directly, as in the decimal system, in a “column”, using a table for adding single-digit numbers.

For example, in a base 4 number system, the addition table looks like this:

Even simpler is the addition table in the binary number system:

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

Example:

Subtraction We perform it in the same way as in the decimal system: we sign the subtrahend under the minuend and subtract the numbers in digits, starting from the first. If subtracting ones in a digit is not possible, we “occupy” the 1 in the highest digit and convert it to the units of the adjacent right digit.

Example: 2311 4 - 1223 4 .

  1. In the first digit, 3 cannot be subtracted from 1; we “occupy” a unit of the second digit; it contains four units of the first digit. We add to them the existing unit of the first digit, in total we get five units in the first digit - in the quaternary system they are written as 11.
  2. In the first digit we subtract three units from five ones: 11-3=2.
  3. There are no units left in the second category, we occupy the third (there will be 2 units left in the third). A unit of the third category contains 4 units of the second. Subtract in the second digit: 4-2 = 2.
  4. In the third digit: 2-2=0.
  5. In the fourth digit: 2-1=1.

Arithmetic operations in the binary number system

The rules for performing arithmetic operations on binary numbers are specified by addition, subtraction and multiplication tables.

The rule for performing the addition operation is the same for all number systems: if the sum of the added digits is greater than or equal to the base of the number system, then the unit is transferred to the next digit on the left. When subtracting, if necessary, make a loan.

Arithmetic operations are performed similarly in octal, hexadecimal and other number systems. It is necessary to take into account that the amount of transfer to the next digit when adding and borrowing from the highest digit when subtracting is determined by the value of the base of the number system.

Arithmetic operations in the octal number system

To represent numbers in the octal number system, eight digits are used (0, 1, 2, 3, 4, 5, 6, 7), since the base of the octal number system is 8. All operations are performed using these eight digits. Addition and multiplication operations in the octal number system are performed using the following tables:

Addition and multiplication tables in the octal number system

Example 5.Subtract octal numbers 5153- 1671 and 2426.63- 1706.71

Example 6. Multiply octal numbers 51 16 and 16.6 3.2

Arithmetic operations in hexadecimal number system

To represent numbers in the hexadecimal number system, sixteen digits are used: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F. In the hexadecimal system, the number sixteen is written as 10. Performing arithmetic operations in the hexadecimal system is the same as in the decimal system, but when performing arithmetic operations on large numbers, it is necessary to use tables for adding and multiplying numbers in the hexadecimal number system.

Addition table in hexadecimal number system

Multiplication table in hexadecimal number system

Example 7.Add hexadecimal numbers

| Computer Science and Information and Communication Technologies | Lesson planning and lesson materials | 10th grade | Planning lessons for the academic year (FSES) | 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 base q are performed according to rules similar to the rules in force in the decimal number system.

In elementary school, addition and multiplication tables are used to teach children to count. Similar tables can be compiled for any positional number system.

12.1. Addition of numbers in the number system with base q

Consider examples of addition tables in ternary (Table 3.2), octal (Table 3.4) and hexadecimal (Table 3.3) number systems.

Table 3.2

Addition in ternary number system

Table 3.3

Addition in hexadecimal number system

Table 3.4

Addition in octal number system

q get the amount S two numbers A And B, you need to sum up the digits that form them by digits i from right to left:

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

Examples:

12.2. Subtracting numbers in the base q number system

So that in a number system with a base q get the difference R two numbers A And IN, it is necessary to calculate the differences between the digits forming them by digits i from right to left:

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