Notation. Non-positional number systems Number systems are divided into positional and non-positional

Number system is a method of writing numbers as combinations of graphic symbols. A number is some abstract entity to describe quantity, and numbers are signs used to write numbers. Nowadays, the most common are Arabic numerals, Roman numerals are less common. The Roman numeral system is based on the use of special signs for decimal places: I=1, X=10, C=100, M=1000 and their halves: V=5, L=50, D=500. There are many other ways to write numbers. For example, the ancient Greeks used the letters of their alphabet for this purpose, and the ancient Sumerians used cuneiform characters. Exist positional And non-positional number systems.

Positional number system systemrecording numbers as a sequence of characters in which the numerical value of each character depends on its position in the record.

An example of a positional system is the well-known decimal number system. An example of a non-positional system is the Roman system. Performing arithmetic operations on numbers in a non-positional system is very inconvenient. Therefore, positional systems are currently most widespread.

The invention of the positional system is attributed to the Sumerians and Babylonians. Then it was developed by the Hindus. In medieval Europe, the positional decimal system appeared thanks to Italian merchants, who borrowed it from Muslims. In the 9th century, the great Arab mathematician Muhammad ibn Musa Al Khwarizmi first described the decimal number system and the rules for performing simple arithmetic operations in it. In the 12th century, his works were translated into Latin, thanks to which Europe was able to become acquainted with this invention of the human mind.

      Decimal system

There are various positional number systems, differing in the number of signs used. To distinguish numbers in different number systems, an index is placed at the end of the number - a symbol of the system. For example, the entry means the usual number 483.56 in decimal notation, and the entry
means a completely different number (albeit similar in appearance) in hexadecimal number system(in decimal it is 1155.335938). If it is clear from the context that only the decimal system is used (or only hexadecimal, or some other), then when writing a number, the index is usually omitted.

The decimal system uses ten different signs: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 - which represent natural numbers in ascending order from zero to nine. The number 10 is the base of the decimal system. It does not have a special sign, but is indicated using the first two characters of this system.

For example, writing 483.56 in decimal means that the number is made up of four hundred (
), eight ten (
), three units (
), five tenths of a unit (
) and six hundredths of a unit (
). In other words, we can write:

      Binary system

The binary number system is the simplest of all positional systems. It contains only two characters 0 and 1, and is used in computer technology due to its simplicity and high reliability. The binary system was invented by the great German scientist Gottfried Wilhelm Leibniz (1646-1716), who used it in a mechanical adding machine he created. In the first column of the table. 2.1 shows the decimal numbers, and the second shows the corresponding binary numbers.

Table 2.1

Let's say we need to convert a binary number with a fractional part of 1100.1011 into a more familiar decimal number. In table 2.2 shows how this transformation is carried out.

Table 2.2

Binary number

Decimal

number

Whole part

Fraction

+

+

+

+

+

+

+

=

Reverse decimal conversion d into a binary number (binary code) is carried out in accordance with the following algorithm. Assign to number d index
(
), and look for an integer , satisfying the inequality

,
. (2.2)

If
, then the task is completed - the desired binary number contains one in the most significant bit and zeros behind it.

If
, then we calculate the difference
, and look for the corresponding number for it , using formula (2.2) with
. Difference calculation operation
and finding
repeat until at some point
the condition will not be met:
.

It's obvious that
(those.
). When constructing the desired binary number, use the rule: numerical values correspond to the bits of the binary code, in which there are ones. The remaining bits are filled with zeros.

We use this rule to find the binary code for the decimal number 108.5. According to formula (2.2), we obtain: .

The required binary number is: 1101100.1. The first unit on the left in the number record corresponds to the 6th digit, the second one after it corresponds to the fifth digit. There is no fourth digit, so we write a zero after the first two ones. There are third and second digits - after the zero we write two ones. There are also no one and zero digits - after two ones we write two zeros. There is a minus first digit, so we write one after the decimal point.

Arithmetic operations in the binary system are carried out in the same way as in the decimal system (“column”). For example, let's take the numbers 0111 (
) and 0101 (
), and perform addition and multiplication operations:

,

As a result, we get 1100 (
) and 100011 (
), which is to be expected.

      Gray code

In addition to binary numbers, other codes that use two signs: 0 and 1 are also used in practice. In this section, we will get acquainted with the Gray code. When sorting data, the natural representation is the usual integer description, since among ten digits, each digit is 1 more than the previous one. When moving to a binary description, this naturalness disappears. Consider the bit representation of the numbers 6, 7, 8 and 9:

0110 0111 1000 1001.

The numbers 6 and 7, as well as 8 and 9, differ from each other by one bit. However, the numbers 7 and 8 have nothing in common with each other! This property of representation can cause big problems when solving problems that require systematization of numerical data. To solve the problem of representation heterogeneity, Gray code is used.

Gray code a numbering system in which two adjacent values ​​differ by only one digit.

The Gray code is shown in the third column of the table. 2.1. Most often used in practice reflexive binary gray code, although in general there is an infinite number of Gray codes for number systems with any base. In most cases, the term “Gray code” refers to the reflexive binary Gray code. The name reflexive binary code comes from the fact that the second half of the values ​​in Gray code is equivalent to the first half, only in reverse order, except for the most significant bit, which is simply inverted. If you divide each half in half again, the property will be preserved for each of the halves of the half, etc.

Gray's code was developed by Frank Gray, a Bell Labs researcher. He used this code in his pulse communication system (patent No. 2632058 was received for it).

When converting binary to decimal, we multiply zero or one by , Where
– the number of the bit position in the binary code (; etc.), and then we summarize the results.

When converting Gray code to a decimal number, we multiply zero or one by (
), Where
– bit position number in the Gray code (; etc.). Next, we subtract from the result corresponding to the higher unit the result corresponding to the unit of the lower rank, add the result corresponding to the unit of an even lower rank, etc. (see last column of table 2.1).

      Ternary number system

Ternary number system – a positional number system with an integer base equal to 3. It exists in two versions: asymmetrical And symmetrical ternary systems. An asymmetrical system usually uses the symbols: 0, 1 and 2. Symmetrical: –1, 0, +1. In table Figure 2.3 shows decimal numbers and their corresponding numbers in the ternary number system.

Table 2.3

Decimal

Trinity

asymmetrical

Trinity

symmetrical

Elements of the ternary system existed even among the ancient Sumerians. A full-fledged symmetric ternary system was first proposed by an Italian mathematician Fibonacci (Leonardo of Pisa) (1170–1250). The symmetric ternary system allows negative numbers to be represented without using a separate minus sign.

At the time of the birth of computer technology, the ternary system was a serious competitor to the binary system. Its advantage is that it provides the greatest number density compared to other integer systems. Let's illustrate this with the following example.

Suppose that in a computer we use numbers in a positional system with an integer base . Moreover, each number has a maximum discharges. This means that to save a number in computer memory you need memory cells, and each cell must be capable of being in states. Hardware costs are:
.

Using a base system And discharges, we are able to imagine different numbers. The effectiveness of the number system used in a computer can be assessed using the following numerical criterion:

. (2.3)

The more numbers we can represent in a given number system, and the lower the hardware costs, the more efficient the system according to this criterion.

More often the efficiency criterion is used in this form

. (2.4)

In practice, criterion (2.4) is equivalent to criterion (2.3), but is more convenient to use. Equivalence is based on the fact: if
, That
. Graph of a function
shown in Fig. 2.1.

Fig.2.1. Graph of a function

This function has a maximum for . For integer values the maximum is reached for = 3.

;

;

.

Thus, the most effective according to criterion (2.4) is the ternary number system (used in ternary computers), followed by the binary number system (traditionally used in most common computers) and the quaternary number system.

In 1958, Nikolai Petrovich Brusentsov from Moscow State University built the first serial electronic ternary computer “Setun” on cells of ferrite diode magnetic amplifiers of alternating current, operating in a two-bit ternary code; the fourth state of two bits was not used. In 1970, Brusentsov built the second serial electronic ternary computer “Setun-70”.

In 1973, an experimental ternary computer was first created in the USA, and in 2008, a ternary digital computer system TCA2 was built there using 1484 integrated transistors.

However, binary computers currently dominate computer technology due to their simplicity and high reliability.

      Octal and hexadecimal number systems

A positional number system can be constructed using any base. However, the most practical ones are: binary, decimal, octal and hexadecimal. Moreover, the last two are used mainly not for calculations, but for presentation. binary code in a form convenient for humans.

In table 2.4 shows a 24-bit binary word and its corresponding octal and hexadecimal codes.

Table 2.4

Binary code

1011001111000101100010112

Octal code

Hex code

Obviously, it is easier for a person to perceive binary code in the form of octal or hexadecimal codes. When using octal code, three bits of a binary word are converted into one character. When using a hex word, every four bits of a binary word are converted into one character. In table Figure 2.5 shows how this transformation is carried out. As you can see, hexadecimal numbers are represented using 10 Arabic numerals and six Latin letters.


A number system is a set of symbols used to represent numbers.
The number system includes: the alphabet, i.e. a set of symbols for writing numbers, a way to write numbers, a way to read numbers. They are divided into two classes: positional and non-positional


Positional number systems are those in which the value of a digit depends on its place (position) in the number record. Non-positional number systems are those in which the value of a digit does not depend on its place (position) in the notation of the number.

Positional is the decimal number system that is familiar to us in everyday life, in which the value (weight) of a digit depends on its position in the notation of the number. In the number 1111, the same digit 1 means successively one, ten, hundred, thousand.


All number systems used in computer science (binary, octal, hexadecimal, etc.) are positional. This is important because the rules for forming numbers, converting from one system to another, and performing arithmetic operations in all positional systems are similar.


A non-positional number system is, for example, Roman. The rules for performing arithmetic operations in non-positional number systems are completely different.


In the 2nd system, the base is 2, i.e. only 2 digits are used - 0 and 1. In the 8th system, the base is 8, numbers from 0 to 7 are used. In the 16th system, the base is 16, numbers from 0 to 15 are used. The use of numbers is 10, 11, 12, 13, 14, 15 in writing numbers is inconvenient, because it is difficult to distinguish, for example, the number 12 from two numbers - 1 and 2. Therefore, it was agreed to designate the numbers from 10 to 15 in Latin letters in alphabetical order A, B, C, D, E, F.


Positional number systems are systems in which the size of a digit is determined by its position (position) in a number.
The position of the digits is called the digit of the number. Positional number systems are distinguished by their bases, where the base is the number of digits used in the number systems.
For example: binary number system (A2), octal number system (A8), etc.
Non-positional number systems are systems in which the size of a digit is not determined by its position (position) in the number.
For example: Roman numeral system (II, V, XII)

Notation - a set of techniques and rules for representing numbers with digital signs. Number systems are divided into non-positional and positional

Non-positional number system - a system in which the meaning of a symbol does not depend on its position in the number. Non-positional number systems arose earlier than positional systems. They were used in ancient times by the Romans, Egyptians, Slavs and other peoples. An example of a non-positional number system that has survived to this day is the Roman number system.

Numbers in the Roman system are indicated by various signs: 1-I; 3-III; 5-V; 10-X; 50-L; 100-C; 500-D; 1000-M. There is a rule for recording intermediate values: each smaller sign placed to the right of the larger one is added to its value, and each sign placed on the left is subtracted from it. So, IV stands for 4, VI-6, LX-60, XC-90, etc. The main disadvantage of non-positional systems is the large number of different signs and the complexity of performing arithmetic operations.

Positional number system - a system in which the meaning of a symbol depends on its place in a series of digits representing a number. For example, in the number 7382, the first digit on the left means the number of thousands, the second - the number of hundreds, the third - the number of tens and the fourth - the number of units. Positional number systems (PNS) are more convenient for computational operations, so they have become more widespread. The positional number system is characterized by a base.

Base (basis) of the PSS - the number of signs or symbols used in digits to represent a number in a given number system. For PSS with a common basis, the following equality is valid:

Values ​​of the first 16 integers in various SS

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

Binary number system. Rules of binary arithmetic

In the binary number system, two digits 0 and 1 are used to write numbers. The base of the system q=2 is written as 10 2 = 10

In this SS, any number can be represented by a sequence of binary digits. This entry corresponds to the sum of the powers of the number 2, taken with the coefficients indicated in it

X=am*2m+am-1*2m-1+…+a1*21+a0*20+… . For example, binary number (10101101)2=1*27+0*26+1*25+0*24+1*23+1*22+0*21+1*20=17310

Arithmetic operations on binary numbers are distinguished by their simplicity and ease of technical implementation.

Rules of binary arithmetic:

Addition:

1+1=10 (one is transferred to the most significant digit);

Subtraction:

10-1=1 (a unit is borrowed in the highest digit);

Multiplication:

The binary number system is the main one for use in computers, convenient because of the ease of performing arithmetic operations on binary numbers. In terms of equipment costs for creating a computer, this system is second only to the ternary number system.

In binary number systems having bases q other than 2 (q>2), each digit of a number is represented in the binary number system. The hexadecimal number system and the decimal binary-coded number system are most widely used in computers.

Octal and hexadecimal number systems

Octal and hexadecimal number systems are auxiliary systems in preparing a problem for solution. The convenience of their use is that the numbers are 3 and 4 times shorter than the binary system, respectively, and the conversion to the binary number system and vice versa is simple and performed in a simple mechanical way.

Convert the number 137.45 8 to the binary number system. The translation is carried out by replacing each octal digit with a three-digit binary number (triad):

i.e. 5F,94 16 =01011111,10010100 2. Based on the Number 5F,94 16 in the octal number system it looks like 137.45 8.

The binary-coded decimal number system, often called BCD, uses decimal numbers. In it, each digit of a decimal number (from 0 to 9) is replaced by a tetrad.

Convert the number 273.59 10 to the binary decimal number system. The translation will be carried out as follows:

2 7 3, 5 9
0010 0111 0011 0101 1001

those. 273.59 10 = 001001110011.01011001 2-10

Binary decimal notation of a number is used directly or as an intermediate form of notation between its usual decimal notation and machine binary. The computer itself, using a special program, converts binary decimal numbers into binary and vice versa.

Rules for transferring from one positional number system to another

Integer conversion

Let's say the number X from the number system with base q needs to be converted to the number system with base p. The translation is carried out according to the following rule. Divide the whole part of the number by the new base p. The first remainder obtained from division is the lowest digit of the integer part of the number with base p. Divide the whole part of the resulting number again by the base p. As a result, we determine the second remainder, equal to the next after the minor digit of the number with the base p", we will carry out the division until we get a quotient less than the divisor. The last quotient gives the highest digit of the number with the base p.

Convert the number 26 10 to the binary number system. The translation is carried out by the method of sequential division of the decimal number 26 by the base of the new number system - 2. The remainders from the division form the desired number in binary SS. Thus:

As a result, we get 26 10 = 11010 2

Convert the number 191 10 to the octal number system. The translation is carried out by the method of sequential division of the decimal number 191 by the base of the new number system - 8. The remainders of the division form the desired number in the octal SS. The remainders of the division form the octal number

As a result, we get 191 10 = 277 2

Converting from positional SS to decimal:

Conversion from any positional number system to decimal is carried out using the following method:

1) above each digit of the number its number is placed in order from right to left, starting from zero; 2) the digits of the number are coefficients in the base of the number system in powers corresponding to the number of the category; 3) sum up the resulting products of the bases of the number system in powers equal to the corresponding number of digits by the digits of the number.

Let's consider this algorithm using the example of converting 1101001 2 to decimal SS: 1101001 2 = 10 = 105 10

Converting fractional numbers

Suppose that a proper fraction X, represented in a number system with base q, needs to be converted to a number system with base p. The translation is carried out according to the following rule. We multiply the original number by the new base p. The resulting integer part of the product is the first required digit. We multiply the fractional part of the product again by the base p, the integer part of the new product will be the second required digit. We multiply the fractional part again by the base p, etc.

as a result 0.31 10 = 0.0100111 2

From this example it follows that the translation of fractions can be an endless process, and the result of the translation is approximate.

The number of digits in a number represented in a number system with base p is determined from the condition that the accuracy of the number in this system must correspond to the accuracy of the number in the number system with base q.

Let's look at the translation of the binary part of a number using the example of converting a binary fraction to a decimal; it can be done by adding all the digits with powers of 2, corresponding to the positions of the digits of the original binary fraction, in which the digits are equal to 1. That is is carried out similarly to the translation of integers, but the numbers are numbered from left to right with a minus sign.

0,1110111 2 = 10 = 0,9296875

Translation of arbitrary numbers.

Numbers that have an integer and a fractional part are converted in two stages: first the integer part of the number, and then the fractional part.

Selecting a number system

The speed of calculations, memory capacity, and complexity of algorithms for performing arithmetic operations depend on which number system will be used in the computer. When choosing a number system, the dependence of the length of the number and the number of stable states of functional elements (for depicting numbers) on the base of the number system is taken into account. For example, with the decimal number system, a functional element must have ten stable states, and with the binary number system - two. In addition, the number system must be easy to perform arithmetic and logical operations.

The decimal number system, which is familiar to us in everyday life, is not the best for use in computers. This is explained by the fact that currently known functional elements with ten stable states (elements based on ferroelectric ceramics, dekatrons, etc.) have a low switching speed and, thus, cannot meet the requirements for computer speed. Therefore, in most cases, computers use binary or binary-coded number systems. The wide distribution of these systems is due to the fact that computer elements are capable of being in only one of two stable states. For example, a semiconductor transistor in switching mode can be in the on or off state, and therefore have a high or low voltage output. A ferrite core in a steady state can have a positive or negative remanent magnetic induction. Such elements are usually called two-position. If one of the stable positions of the element is taken as 0, and the other as 1, then the digits of a binary number are depicted quite simply.

Definition. A number system is a set of rules for designating (writing) real numbers using digital signs. Exist positional And non-positional number systems.

In a non-positional number system, the quantitative equivalent of each digit included in the record of a given number does not depend on the place (position) of this digit in a number of other digits. The Roman number system uses the following symbols to represent various integers:

I=1; V=5; X=10; L=50; C=100; D=500; M=1000

For example, MCMLXXXV=1000+(1000-100)+50+10+10+10+5=1985

The disadvantage of such a number system is obvious - the difficulty of representing large numbers in it.

The first positional number system was invented in ancient Babylon and was sexagesimal, i.e. it used 60 digits. It is interesting that we still use this number system when measuring time.

In the 19th century, the duodecimal number system became quite widespread. We still often use the word “dozen”, for example – 12 months, 24 hours, 360°.

      Decimal number system.

An example of a positional number system is the generally accepted decimal number system. In a positional number system, the value represented by a digit (its “weight”) depends on the position of this digit in the notation of the number.

Definition. The position of a digit in a number notation is called its discharge.

Definition. The number of different digits in the alphabet of the positional number system is called basis this system.

Definition. Alphabet A number system is an ordered set of numbers.

Characteristics positional number system:

    The number of digits of a number system is equal to its base;

    The largest digit is one less than its base;

    When writing a number, each digit is multiplied by the base of the number system to a power that determines the position of the digit, starting from 0.

In the decimal number system, the “weight” of each digit is 10 times greater than the “weight” of the previous one.

For example: in expanded form the number 555.55 =5×10 2 +5×10 1 +5×10 0 +5×10 -1 +5×10 -2

Since in practice they usually use the decimal number system, omitting various powers of 10, they write abbreviatedly only the coefficients at these powers. Thus, a pattern has emerged that allows you to write down any number, no matter how large, using 10 digits. Then rules (algorithms) for addition, multiplication, subtraction and division appeared.

But from a technical point of view, using a 10-digit alphabet is inconvenient. Considering the characteristics of positional number systems, it can be argued that the smallest base that a positional number system can have is 2.

      Binary number system.

In the binary number system, the base is 2, and the alphabet consists of two digits (0 and 1). Consequently, numbers in the binary system in expanded form are written as a sum of powers of base 2 with coefficients, which are the numbers 0 and 1.

For example, an expanded binary number might look like this:

1×2 2 +0×2 1 +1×2 0 +0×2 -1 +1×2 -2 = 101.01 2

Generally speaking, it is possible to use multiple positional number systems. In number systems with base q, numbers in expanded form are written as a sum of powers of base q with coefficients, which are the numbers 0,1,...,q-1.

A=a n-1 ×q n-1 +a n-2 ×q n-2 +…+a 1 ×q 1 +a 0 ×q 0 +a -1 ×q -1 +…+a m ×q - m

Exercise : Write the following numbers in expanded form:

19.99 10 =1×10 1 +9×10 0 +9×10 -1 +9×10 -2

10.10 2 =1×2 1 +0×2 0 +1×2 -1 +0×2 -2

64.5 8 =6×8 1 +4×8 0 +5×8 -1

39,F 16 =3×16 1 +9×16 0 +F×16 -1

      Translation of numbers 10 → 2.

Algorithm for solving the problem:

    Divide the number by 2, record the remainder and quotient.

    If the quotient ≠0, then divide it by 2, etc. Continue dividing as long as possible.

    At the end of the division, write down all the resulting remainders from right to left.

Examples: 7 10 =111 2 ; 26 10 =11010 2 ; 35 10 =100011 2 ; 101 10 =1100101 2 ;

125 10 =1111101 2 ; 253 10 =11111101 2

Exercise : build a table in your notebook. Fill in the first two columns.

      Converting numbers 2 → 10.

To convert numbers from the binary system to the decimal system, we will use the expanded formula for writing a number:

1000001001 2 =1×2 9 +0×2 8 +0×2 7 +0×2 6 +0×2 5 +0×2 4 +1×2 3 +0×2 2 +0×2 1 +1× 2 0 = 512+8+1=521 10

Examples:

  1. 10101000 2 =168 10

    11,11 2 =3,75 10

    101111001 2 =377 10

    10,11 2 =2,75 10

      Octal number system.

When representing data outside the machine (for example, numerical information), it is inconvenient to use the binary system with its cumbersome records. In this case, the octal number system is often used, which uses the numbers from 0 to 7. The convenience of the octal number system is that the transition from the octal system to the binary system is very simple: it is enough to replace each octal digit with its binary triad.

0→000 1→001 2→010 3→011

4→100 5→101 6→110 7→111

Exercise: fill in the third column of the table.

The reverse transition from the binary number system to the octal number system is also quite simple. To do this, you need to select triads in the binary notation of a number (to the right and left of the decimal point) and replace each triad with the corresponding octal digit. If necessary, incomplete triads are supplemented with zeros.

Examples:

    1111110 2 =001 111 110=176 8

    273,54 8 =010 111 011,101 100 2

    101 011 101,101 101 110 2 =535,556 8

Converting numbers from the decimal number system to octal is carried out by dividing by the base of the number system (in this case, by 8). For example, 1678 10 =3216 8.

Conversion from the octal number system to the decimal number system is carried out using the expanded number formula:

    703 8 =7×8 2 +0×8 1 +3×8 0 =448+0+8=451 10

    327 8 =3×8 2 +2×8 1 +7×8 0 =192+16+7=215 10

    571 8 =5×8 2 +7×8 1 +1×8 0 =377 10

    67.5 8 =6×8 1 +7×8 0 +5×8 -1 =48+7+0.625=55.625 10

      Hexadecimal number system.

When processing information internally and to describe the operation of modern computers, the hexadecimal number system is used. To write numbers in this system, you must have sixteen characters. The initial letters of the English alphabet are used as missing digits in this number system.

Exercise: fill in the fourth column of the table.

The connection with the binary number system in this case is obvious: each hexadecimal digit is replaced by four binary ones. The conversion from binary to hexadecimal is also obvious: the binary number is divided into tetrads and then each is replaced by a hexadecimal digit.

    AF,C 16 =1010 1111.1100 2

    B3 16 =10110011 2

    101011101,101101111 2 =0001 0101 1101,1011 01111=15D,B7 16

    100110101111 2 =9AF 16

According to well-known rules, numbers are converted from the decimal number system to hexadecimal and vice versa:

  1. 1F4 16 =1×16 2 +F×16 1 +4×16 0 =256+15×16+4=500 10

    1E 16 =1×16 1 +E×16 0 =16+14=30 10

    D7 16 =13×16 1 +7×16 0 =215 10

  2. 19F 16 =1×16 2 +9×16 1 +F×16 0 =256+144+15=415 10

  1. 1. The concept of information coding. Universality of discrete (digital) information representation. Positional and non-positional number systems. Algorithms

    Document

    ... (digital) representation of information. Positional And non-positional systems dead reckoning. Decimal conversion algorithms systems dead reckoning to free and vice versa. Connection...

  2. A number system is a way of writing numbers using a given set of special characters (digits)

    Document

    Special characters (numbers). Exist positional And non-positional systems dead reckoning. Systems dead reckoning binary (digits 0, 1 are used); ... into a cell. Arithmetic operations in positional systems dead reckoning. Addition Basic arithmetic operations: ...

  3. No. 1: Number systems. Transferring numbers from system to system. Arithmetic operations on numbers in binary, octal and hexadecimal number systems

    Lesson

    ...: Get to know the concepts system dead reckoning, positional And non-positional system dead reckoning, base positional systems. Learn to create a correspondence table between systems dead reckoning, translate numbers...

  4. personal computer architecture

    Introduction

    Depending on the way numbers are represented using digits, number systems are divided into positional and non-positional.

    Computers, in principle, can be built in any number system. But the decimal system so familiar to us will turn out to be extremely inconvenient. If in mechanical computing devices using the decimal system it is enough to simply use an element with many states (a wheel with ten teeth), then in electronic machines it would be necessary to have 10 different potentials in the circuits.

    1. Number systems

    Non-positional and positional number systems

    A number system is a set of rules for designating (writing) real numbers using digital signs. To write numbers in specific number systems, a certain finite alphabet is used, consisting of the numbers a1, a2, a3,…., an. In this case, each digit ai in the notation of a number is assigned a certain quantitative equivalent. There are non-positional and positional number systems.

    Non-positional number systems

    In it, the quantitative equivalent of each digit included in the record of a given number does not depend on the place (position) of this digit in a number of other digits. Example: Roman number system. It uses the symbols I, V, X, L, C, D, M, etc. to write various integers, indicating 1, 5, 10, 50, 100, 500, 1000, etc., respectively. For example, the notation MCMLXXXV means the number 1985. A common disadvantage of non-positional systems is the difficulty of representing sufficiently large numbers in them, since this results in an extremely cumbersome notation of numbers or requires a very large alphabet of numbers used. Computers use only positional number systems, in which the quantitative equivalent of each digit of the alphabet depends not only on the type of this digit, but also on its location in the notation of the number.

    Positional number systems

    In positional number systems, the weight of each digit varies depending on its position in the sequence of digits representing the number. Any positional system is characterized by its base. The base of a positional number system is the number of different signs or symbols used to represent numbers in a given system. Any natural number can be taken as a base - two, three, four, sixteen, etc. Therefore, an infinite number of positional systems are possible.

    2. Basic positional number systems

    Decimal number system

    It came to Europe from India, where it appeared no later than the 6th century AD. This system has 10 digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, but information is carried not only by the number, but also by the place where the number stands (that is, its position). In the decimal number system, a special role is played by the number 10 and its powers: 10, 100, 1000, etc. The rightmost digit of the number shows the number of units, the second from the right - the number of tens, the next - the number of hundreds, etc. The positions of the digits in a number are called its digits. In the decimal number system, the weight of each digit is 10 times greater than the weight of the previous one. Any number in the decimal number system can be represented as a sum of various integer powers of ten with the corresponding coefficients ai (0-9), taken from the alphabet of a given number system.

    For example: 245.83 = 2 * 102 + 4 * 101 + 5 * 100 + 8 * 10-1 + 3 * 10-2. Any decimal positional number N can be represented using integer powers of ten, taken with appropriate coefficients, i.e.

    N10 = am * 10m + am-1 * 10m-1 + …+ a1*10+ +a0 * 100 + a-1 * 10-1 +…+ a-n * 10-n.

    Binary number system.

    There are only two numbers in this system - 0 and 1. The number 2 and its powers play a special role here: 2, 4, 8, etc. The rightmost digit of the number shows the number of ones, the next digit shows the number of twos, the next one shows the number of fours, etc. The binary number system allows you to encode any natural number - represent it as a sequence of zeros and ones. In binary form, you can represent not only numbers, but also any other information: texts, pictures, films and audio recordings. Engineers are attracted to binary coding because it is easy to implement technically. The simplest from the point of view of technical implementation are two-position elements, for example, an electromagnetic relay, a transistor switch.

    Octal number system.

    This number system has 8 digits: 0, 1, 2, 3, 4, 5, 6, 7. The digit 1, indicated in the lowest digit, means - as in a decimal number - simply one. The same number 1 in the next digit means 8, in the next 64, etc. The number 100 (octal) is nothing other than 64 (decimal). To convert, for example, the number 611 (octal) to binary, you need to replace each digit with its equivalent binary triad (three digits). It is easy to guess that to convert a multi-digit binary number into the octal system, you need to break it into triads from right to left and replace each triad with the corresponding octal digit.

    Hexadecimal number system.

    Writing a number in the octal number system is quite compact, but it is even more compact in the hexadecimal system. The first 10 of 16 hexadecimal digits are the usual numbers 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, but the remaining 6 digits are the first letters of the Latin alphabet: A, B, C, D, E, F. The number 1, written in the least significant digit, simply means one. The same number 1 in the next one is 16 (decimal), in the next one it is 256 (decimal), etc. The least significant digit F indicates 15 (decimal). Conversion from hexadecimal to binary and back is done in the same way as for the octal system.