Characteristics of the octal number system. Illustrated tutorial on digital graphics


Introduction

Modern man V Everyday life constantly confronted with numbers: we remember the numbers of buses and telephones, in the store

calculate the cost of purchases, keep your family budget in rubles and kopecks (hundredths of a ruble), etc. Numbers, figures. They are with us everywhere.

The concept of number - fundamental concept both mathematics and computer science. Today, at the very end of the 20th century, mankind mainly uses the decimal number system to write numbers. What is a number system?

The number system is a way of writing (imaging) numbers.

The various number systems that existed before and are currently in use are divided into two groups: positional and non-positional. The most perfect are positional number systems, i.e. systems of writing numbers, in which the contribution of each digit to the value of the number depends on its position (position) in the sequence of digits representing the number. For example, our usual decimal system is positional: in the number 34, the number 3 indicates the number of tens and "contributes" to the value of the number 30, and in the number 304 the same number 3 indicates the number of hundreds and "contributes" to the value of the number 300.

Number systems in which each digit corresponds to a value that does not depend on its place in the notation of the number are called non-positional.

Positional number systems are the result of a long historical development of non-positional number systems.


1.History of number systems

  • Unit number system

The need to record numbers appeared in very ancient times, as soon as people began to count. The number of objects, such as sheep, was depicted by drawing lines or serifs on some solid surface: stone, clay, wood (before the invention of paper, it was still very, very far away). Each sheep in such a record corresponded to one line. Archaeologists have found such "records" during excavations of cultural layers belonging to the Paleolithic period (10 - 11 thousand years BC).

Scientists called this way of writing numbers the unit ("stick") number system. In it, only one type of sign was used to write numbers - the "stick". Each number in such a number system was designated using a string made up of sticks, the number of which was equal to the designated number.

The inconveniences of such a system of writing numbers and the limitations of its application are obvious: the larger the number to be written, the longer the string of sticks. Yes, even when recording. a large number it is easy to make a mistake by applying an extra number of sticks or, conversely, not adding them.

It can be suggested that in order to facilitate counting, people began to group objects into 3, 5, 10 pieces. And when recording, they used signs corresponding to a group of several objects. Naturally, the fingers were used in the counting, so the first signs appeared to indicate a group of objects of 5 and 10 pieces (units). Thus, more convenient systems for notating numbers arose.

  • Ancient Egyptian decimal non-positional number system

In the ancient Egyptian number system, which arose in the second half of the third millennium BC, special numbers were used to denote the numbers 1, 10, 10 2 , 10 3 , 10 4 , 10 5 , 10 6 , 10 7 . Numbers in the Egyptian numeral system were written as combinations of these digits, in which each of them was repeated no more than nine times.

Example. The ancient Egyptians wrote the number 345 like this:

Figure 1 Writing a number in the ancient Egyptian number system

The designation of numbers in the non-positional ancient Egyptian number system:

Figure 2 Unit

Figure 3 Tens

Figure 4 Hundreds

Figure 5 Thousands

Figure 6 Tens of thousands

Figure 7 Hundreds of thousands

Both the stick and ancient Egyptian numeral systems were based on the simple principle of addition, according to whichthe value of a number is equal to the sum of the values ​​of the digits involved in its recording. Scientists attribute the ancient Egyptian number system to decimal non-positional.

  • Babylonian (hexadecimal) number system

The numbers in this number system were composed of signs of two types: a straight wedge (Figure 8) served to denote units, a recumbent wedge (Figure 9) to denote tens.

Figure 8 Straight Wedge

Figure 9 Recumbent wedge

Thus, the number 32 was written like this:

Figure 10 Recording the number 32 in the Babylonian sexagesimal number system

The number 60 was again denoted by the same sign (Figure 8) as 1. The same sign denoted the numbers 3600 = 60 2 , 216000 = 60 3 and all other degrees are 60. Therefore, the Babylonian number system was called sexagesimal.

To determine the value of a number, it was necessary to divide the image of the number into digits from right to left. The alternation of groups of identical characters ("numbers") corresponded to the alternation of digits:

Figure 11 Digitization of a number

The value of the number was determined by the values ​​of its constituent "digits", but taking into account the fact that the "digits" in each subsequent digit meant 60 times more than the same "digits" in the previous digit.

The Babylonians wrote all the numbers from 1 to 59 in a decimal non-positional system, and the number as a whole - in a positional system with base 60.

The record of the number among the Babylonians was ambiguous, since there was no "number" to denote zero. The entry of the number 92 could mean not only 92 = 60 + 32, but also 3632 = 3600 + 32 = 602 + 32, etc. For determiningthe absolute value of a numberadditional information was required. Subsequently, the Babylonians introduced a special symbol (Figure 12) to indicate the missing sexagesimal digit, which corresponds to the appearance of the number 0 in the number entry in the decimal system familiar to us. But at the end of the number, this symbol was usually not put, that is, this symbol was not zero in our understanding.

Figure 12 Symbol for a missing sexagesimal digit

Thus, the number 3632 now had to be written like this:

Figure 13 Writing the number 3632

The Babylonians never memorized the multiplication table, as it was almost impossible. When calculating, they used ready-made multiplication tables.

The sixagesimal Babylonian system is the first number system known to us based on the positional principle. The Babylonian system played a large role in the development of mathematics and astronomy, traces of which have survived to this day. So, we still divide an hour into 60 minutes, and a minute into 60 seconds. In the same way, following the example of the Babylonians, we divide the circle into 360 parts (degrees).

  • Roman numeral system

An example of a non-positional number system that has survived to this day is the number system used more than two and a half thousand years ago in ancient Rome.

The Roman numeral system is based on the signs I (one finger) for the number 1, V (open hand) for the number 5, X (two folded hands) for 10, as well as special signs for the numbers 50, 100, 500 and 1000.

The notation for the last four numbers has changed significantly over time. Scientists suggest that initially the sign for the number 100 had the form of a bundle of three dashes like the Russian letter Zh, and for the number 50 the form of the upper half of this letter, which later transformed into the sign L:

Figure 14 Transformation of the number 100

To designate the numbers 100, 500 and 1000, the first letters of the corresponding Latin words began to be used (Centum one hundred, Demimille half a thousand, Mille one thousand).

To write down a number, the Romans used not only addition, but also subtraction of key numbers. In this case, the following rule was applied.

The value of each smaller sign placed to the left of the larger one is subtracted from the value of the larger sign.

For example, the notation IX stands for the number 9, and the notation XI for the number 11. The decimal number 28 is represented as follows:

XXVIII = 10 + 10 + 5 + 1 + 1 + 1.

The decimal number 99 has the following representation:

Figure 15 Number 99

The fact that, when writing new numbers, key numbers can not only be added, but also subtracted, has a significant drawback. Recording in Roman numerals deprives the number of uniqueness of representation. Indeed, in accordance with the above rule, the number 1995 can be written, for example, in the following ways:

MCMXCV = 1000 + (1000 - 100) + (100 -10) + 5,

MDCCCCLXXXXV = 1000 + 500 + 100 + 100 + 100 + 100 + 50 + 10 + 10 + 10 + 10 + 5

MVM = 1000 + (1000 - 5),

MDVD = 1000 + 500 + (500 - 5) and so on.

There are still no uniform rules for writing Roman numbers, but there are proposals to adopt an international standard for them.

Nowadays, any of the Roman numerals is proposed to be written in one number no more than three times in a row. Based on this, a table was built, which is convenient to use to indicate numbers in Roman numerals:

Units

Dozens

hundreds

thousands

10 X

100C

1000M

2II

20XX

200CC

2000MM

3III

30XXX

300CC

3000MM

4IV

40XL

400 CDs

50L

500D

6VI

60LX

600 DC

7 VII

70LXX

700 DCC

8 VIII

80 LXXX

800 DCCC

9IX

90XC

900CM

Table 1 Table of Roman Numerals

Roman numerals have been used for a very long time. Even 200 years ago, in business papers, numbers should have been indicated by Roman numerals (it was believed that ordinary Arabic numerals were easy to fake).

Currently, the Roman numeral system is not used, with some exceptions:

  • Designations of centuries (XV century, etc.), years AD e. (MCMLXXVII etc.) and months when specifying dates (for example, 1.V.1975).
  • Notation of ordinal numbers.
  • The notation for derivatives of small orders, greater than three: yIV, yV, etc.
  • The designation of the valency of chemical elements.
    • Slavic number system

This numbering was created along with the Slavic alphabetic system for correspondence. sacred books for the Slavs by the Greek monks brothers Cyril (Konstantin) and Methodius in the 9th century. This form of writing numbers was widely used due to the fact that it had a complete resemblance to the Greek notation of numbers.

Units

Dozens

hundreds

Table 2 Slavic number system

If you look carefully, you will see that after "a" comes the letter "c", and not "b" as it should be according to the Slavic alphabet, that is, only the letters that are in Greek alphabet. Until the 17th century, this form of writing numbers was official in the territory modern Russia, Belarus, Ukraine, Bulgaria, Hungary, Serbia and Croatia. Until now, this numbering is used in Orthodox church books.

  • Mayan number system

This system was used for calendar calculations. In everyday life, the Maya used a non-positional system similar to the ancient Egyptian one. The Maya digits themselves give an idea of ​​this system, which can be interpreted as a record of the first 19 natural numbers in the quinary non-positional number system. A similar principle of compound digits is used in the Babylonian sexagesimal number system.

Maya digits consisted of zero (shell sign) and 19 compound digits. These numbers were constructed from the sign of one (dot) and the sign of five (horizontal line). For example, the numeral for the number 19 was written as four dots in a horizontal row above three horizontal lines.

Figure 16 Mayan number system

Numbers over 19 were written according to the positional principle from bottom to top in powers of 20. For example:

32 was written as (1)(12) = 1×20 + 12

429 as (1)(1)(9) = 1x400 + 1x20 + 9

4805 as (12)(0)(5) = 12x400 + 0x20 + 5

Images of deities were sometimes also used to write the numbers from 1 to 19. Such figures were used extremely rarely, preserved only on a few monumental stelae.

The positional number system requires the use of zero to denote empty digits. The first date with zero that has come down to us (on stele 2 in Chiapa de Corso, Chiapas) is dated 36 BC. e. The first positional number system in Eurasia, created in ancient Babylon in 2000 BC. e., initially did not have zero, and subsequently the zero sign was used only in intermediate digits of the number, which led to ambiguous notation of numbers. The non-positional number systems of the ancient peoples, as a rule, did not have zero.

In the "long count" of the Mayan calendar, a variation of the 20-decimal number system was used, in which the second digit could contain only the numbers from 0 to 17, after which one was added to the third digit. Thus, the unit of the third category did not mean 400, but 18 × 20 = 360, which is close to the number of days in a solar year.

  • History of Arabic numbers

This is the most common numbering today. The name "Arab" for her is not entirely correct, because although they brought her to Europe from the Arab countries, she was also not native there. The real birthplace of this numbering is India.

In different parts of India, there were various numbering systems, but at some point one of them stood out among them. In it, the numbers looked like the initial letters of the corresponding numerals in the ancient Indian language - Sanskrit, using the Devanagari alphabet.

Initially, these signs represented the numbers 1, 2, 3, ... 9, 10, 20, 30, ..., 90, 100, 1000; with their help other numbers were written down. But later a special sign was introduced - a bold dot, or a circle, to indicate an empty discharge; and the "Devanagari" numbering became the local decimal system. How and when this transition took place is still unknown. By the middle of the 8th century, the positional numbering system was widely used. At the same time, it penetrates into neighboring countries: Indochina, China, Tibet, Central Asia.

A decisive role in the spread of Indian numbering in the Arab countries was played by the manual compiled at the beginning of the 9th century by Muhammad Al Khorezmi. It was translated into Western Europe on Latin language in the twelfth century. In the thirteenth century, Indian numbering takes over in Italy. In other countries, it spreads by the 16th century. The Europeans, having borrowed the numbering from the Arabs, called it "Arabic". This historically incorrect name is retained to this day.

From Arabic the word "figure" (in Arabic "syfr") is also borrowed, meaning literally "empty place" (translation of the Sanskrit word "sunya", which has the same meaning). This word was used to name the sign of an empty discharge, and retained this meaning until the 18th century, although the Latin term "zero" (nullum - nothing) appeared in the 15th century.

The form of Indian numerals has undergone many changes. The form that we now use was established in the 16th century.

  • History of Zero

Zero is different. First, zero is a digit that is used to indicate a blank bit; secondly, zero is an unusual number, since it is impossible to divide by zero, and when multiplied by zero, any number becomes zero; thirdly, zero is needed for subtraction and addition, otherwise, how much will it be if 5 is subtracted from 5?

Zero first appeared in the ancient Babylonian number system, it was used to denote missing digits in numbers, but numbers such as 1 and 60 were written the same way, since they did not put zero at the end of the number. In their system, zero served as a space in the text.

The great Greek astronomer Ptolemy can be considered the inventor of the form of zero, since in his texts the space sign is replaced by the Greek letter omicron, which is very reminiscent of the modern zero sign. But Ptolemy uses zero in the same sense as the Babylonians.

On a wall inscription in India in the 9th century AD. the first time a null character occurs at the end of a number. This is the first generally accepted notation for the modern zero sign. It was the Indian mathematicians who invented zero in all its three senses. For example, the Indian mathematician Brahmagupta back in the 7th century AD. actively began to use negative numbers and operations with zero. But he claimed that a number divided by zero is zero, which is certainly a mistake, but a real mathematical audacity, which led to another remarkable discovery by Indian mathematicians. And in the XII century, another Indian mathematician Bhaskara makes another attempt to understand what will happen when divided by zero. He writes: "A quantity divided by zero becomes a fraction whose denominator is zero. This fraction is called infinity."

Leonardo Fibonacci, in his Liber abaci (1202), calls the sign 0 in Arabic zephirum. The word zephirum is the Arabic word as-sifr, which comes from the Indian word sunya, i.e. empty, which was the name of zero. From the word zephirum came the French word zero (zero) and the Italian word zero. On the other hand, the Russian word digit came from the Arabic word as-sifr. Until the middle of the 17th century, this word was used specifically to denote zero. The Latin word nullus (none) came into use for zero in the 16th century.

Zero is unique sign. Zero is a purely abstract concept, one of the greatest achievements of man. It does not exist in nature around us. You can safely do without zero in mental counting, but it is impossible to do without for accurate recording of numbers. In addition, zero is in contrast to all other numbers, and symbolizes an endless world. And if “everything is number”, then nothing is everything!

  • Disadvantages of non-positional number system

Non-positional number systems have a number of significant disadvantages:

1. There is a constant need to introduce new characters to write large numbers.

2. It is impossible to represent fractional and negative numbers.

3. It is difficult to perform arithmetic operations, since there are no algorithms for their implementation. In particular, all peoples, along with number systems, had finger counting methods, and the Greeks had an abacus counting board something like our accounts.

But we still use elements of a non-positional number system in everyday speech, in particular, we say one hundred, not ten tens, a thousand, a million, a billion, a trillion.


2. Binary number system.

There are only two digits 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, and so on. 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. Binary coding attracts engineers 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.

  • History of the binary number system

Engineers and mathematicians put the binary on-off nature of the elements of computer technology into the basis of the search.

Take, for example, a two-pole electronic device - a diode. It can only be in two states: either conducts electric current - “open”, or does not conduct it - “locked”. And the trigger? It also has two stable states. Memory elements work on the same principle.

Why not use the binary number system then? After all, it has only two digits: 0 and 1. And this is convenient for working on an electronic machine. And new machines began to count using 0 and 1.

Do not think that the binary system is a contemporary of electronic machines. No, she's much older. People have been interested in binary calculus for a long time. They were especially fond of him from the end of the XVI to early XIX century.

Leibniz considered the binary system to be simple, convenient, and beautiful. He said that "calculation with the help of twos ... is fundamental for science and generates new discoveries ... When numbers are reduced to the simplest principles, which are 0 and 1, a wonderful order appears everywhere."

At the request of the scientist in honor of the "dyadic system" - as the binary system was then called - a medal was knocked out. It depicted a table with numbers and the simplest actions with them. Along the edge of the medal was a ribbon with the inscription: "To bring everything out of insignificance, one is enough."

Formula 1 Amount of information in bits

  • Converting from binary to decimal number system

The task of converting numbers from binary to decimal most often arises when the values ​​calculated or processed by the computer are converted back into decimal digits that are more understandable to the user. The algorithm for converting binary numbers to decimal is quite simple (it is sometimes called the substitution algorithm):

To convert a binary number to decimal, it is necessary to represent this number as the sum of the products of the degrees of the base of the binary number system and the corresponding digits in the digits of the binary number.

For example, you want to convert the binary number 10110110 to decimal. This number has 8 digits and 8 digits (the digits are counted starting from zero, which corresponds to the least significant bit). In accordance with the rule already known to us, we represent it as a sum of powers with base 2:

10110110 2 = (1 2 7 )+(0 2 6 )+(1 2 5 )+(1 2 4 )+(0 2 3 )+(1 2 2 )+(1 2 1 )+(0 2 0 ) = 128+32+16+4+2 = 182 10

In electronics, a device that performs a similar conversion is called decoder (decoder, English decoder).

Decoder this is a circuit that converts the binary code supplied to the inputs into a signal at one of the outputs, that is, the decoder decodes the number in binary code, representing it as a logical unit at the output, the number of which corresponds to the decimal number.

  • Converting from binary to hexadecimal number system

Each bit of a hexadecimal number contains 4 bits of information.

Thus, to convert a binary integer to hexadecimal, it must be divided into groups of four digits (tetrads), starting from the right, and if the last left group contains less than four digits, pad it with zeros on the left. To convert a fractional binary number (proper fraction) to hexadecimal, you need to split it into tetrads from left to right, and if the last right group contains less than four digits, then you need to pad it with zeros on the right.

Then you need to convert each group to a hexadecimal digit, using a previously compiled correspondence table of binary tetrads and hexadecimal digits.

Shestnad-

teric

number

Binary

tetrad

Table 3 Table of hexadecimal digits and binary tetrads

  • Converting from binary to octal number system

Converting a binary number to an octal system is quite simple, for this you need:

  1. Break a binary number into triads (groups of 3 binary digits), starting with the least significant digits. If there are less than three digits in the last triad (most significant digits), then we will supplement it to three with zeros on the left.
    1. Under each triad of a binary number, write down the corresponding digit of the octal number from the following table.

Octal

number

binary triad

Table 4 Table of octal numbers and binary triads


3. Octal number system

Octal number system is a positional number system with base 8. To write numbers in the octal system, 8 digits from zero to seven (0,1,2,3,4,5,6,7) are used.

Application: the octal system, along with binary and hexadecimal, is used in digital electronics and computer technology, but is rarely used today (previously used in low-level programming, superseded by hexadecimal).

The widespread use of the octal system in electronic computing is explained by the fact that it is characterized by easy conversion to binary and vice versa using a simple table in which all digits of the octal system from 0 to 7 are presented as binary triplets (Table 4).

  • History of the octal number system

History: the emergence of the octal system is associated with such a technique for counting on fingers, when not fingers were counted, but the spaces between them (there are only eight of them).

In 1716, King Charles XII of Sweden invited the famous Swedish philosopher Emanuel Swedenborg to develop a number system based on 64 instead of 10. However, Swedenborg believed that for people with less intelligence than the king, it would be too difficult to operate with such a number system and proposed the number as the basis 8. The system was developed, but the death of Charles XII in 1718 prevented its introduction as generally accepted, this work of Swedenborg is not published.

  • Convert from octal to decimal number system

To translate an octal number into a decimal number, it is necessary to represent this number as the sum of the products of the degrees of the base of the octal number system by the corresponding digits in the digits of the octal number. [ 24]

For example, you want to convert the octal number 2357 to decimal. This number has 4 digits and 4 digits (the digits are counted starting from zero, which corresponds to the least significant bit). In accordance with the rule already known to us, we represent it as a sum of powers with base 8:

23578 = (2 83)+(3 82)+(5 81)+(7 80) = 2 512 + 3 64 + 5 8 + 7 1 = 126310

  • Convert from octal to binary number system

To convert from octal to binary, each digit of the number must be converted into a group of three binary digits triad (Table 4).

  • Converting from octal to hexadecimal number system

To convert from hexadecimal to binary, each digit of the number must be converted into a group of three binary digits in a tetrad (Table 3).


3. Hexadecimal number system

Positional number system in integer base 16.

Usually, decimal digits from 0 to 9 and Latin letters from A to F are used as hexadecimal digits to represent numbers from 1010 to 1510, that is, (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F).

It is widely used in low-level programming and computer documentation, since in modern computers the minimum unit of memory is an 8-bit byte, the values ​​\u200b\u200bof which are conveniently written in two hexadecimal digits.

In the Unicode standard, it is customary to write a character number in hexadecimal form using at least 4 digits (if necessary, with leading zeros).

Hexadecimal color writes the three color components (R, G and B) in hexadecimal form.

  • History of the hexadecimal number system

The hexadecimal number system was introduced by the American corporation IBM. Widely used in programming for IBM-compatible computers. The minimum addressable (sent between computer components) unit of information is a byte, usually consisting of 8 bits (eng. bit binary digit binary digit, binary system digit), and two bytes, that is, 16 bits, make up a machine word ( command). Thus, it is convenient to use the base 16 system for writing commands.

  • Converting from hexadecimal to binary number system

The algorithm for converting numbers from hexadecimal to binary is extremely simple. It is only necessary to replace each hexadecimal digit with its binary equivalent (in the case of positive numbers). We only note that each hexadecimal number should be replaced by a binary number, complementing it up to 4 digits (in the direction of higher digits).

  • Converting from hexadecimal to decimal number system

To convert a hexadecimal number to a decimal one, this number must be represented as the sum of the products of the degrees of the base of the hexadecimal number system and the corresponding digits in the digits of the hexadecimal number.

For example, you want to convert the hexadecimal number F45ED23C to decimal. This number has 8 digits and 8 digits (remember that the digits are counted starting from zero, which corresponds to the least significant bit). In accordance with the above rule, we represent it as a sum of powers with base 16:

F45ED23C 16 = (15 16 7 )+(4 16 6 )+(5 16 5 )+(14 16 4 )+(13 16 3 )+(2 16 2 )+(3 16 1 )+(12 16 0 ) = 4099854908 10

  • Converting from hexadecimal to octal number system

Usually, when converting numbers from hexadecimal to octal, first convert the hexadecimal number to binary, then break it into triads, starting with the least significant bit, and then replace the triads with their corresponding equivalents in the octal system (Table 4).


Conclusion

Now in most countries of the world, despite the fact that they speak different languages, consider the same, "in Arabic".

But it was not always so. Some five hundred years ago, there was nothing of the kind even in enlightened Europe, not to mention some Africa or America.

But nevertheless, people still somehow wrote down the numbers. Each nation had its own system of recording numbers or borrowed from a neighbor. Some used letters, others - icons, others - squiggles. Some were more comfortable, some not so much.

At the moment we use different number systems different peoples, despite the fact that the decimal number system has a number of advantages over the others.

The Babylonian sexagesimal number system is still used in astronomy. Her footprint has survived to this day. We still measure time in sixty seconds, sixty minutes in hours, and it is also used in geometry to measure angles.

The Roman non-positional number system is used by us to designate paragraphs, sections and, of course, in chemistry.

Computer technology uses the binary system. It is precisely because of the use of only two numbers 0 and 1 that it underlies the operation of a computer, since it has two stable states: low or high voltage, current or no current, magnetized or not magnetized. For people, the binary number system is not convenient from - due to the cumbersomeness of writing the code, but converting numbers from binary to decimal and vice versa is not so convenient, so they began to use octal and hexadecimal number systems.


List of drawings


List of tables


Formulas


List of references and sources

  1. Berman N.G. "Count and number". OGIZ Gostekhizdat Moscow 1947.
  2. Brugsch G. All about Egypt M:. Association of Spiritual Unity "Golden Age", 2000. 627 p.
  3. Vygodsky M. Ya. Arithmetic and algebra in ancient world M.: Nauka, 1967.
  4. Van der Waerden Awakening Science. Mathematics of ancient Egypt, Babylon and Greece / Per. with a goal I. N. Veselovsky. M., 1959. 456 p.
  5. G. I. Glazer. History of mathematics at school. Moscow: Enlightenment, 1964, 376 p.
  6. Bosova L. L. Informatics: A textbook for grade 6
  7. Fomin S.V. Number systems, M.: Nauka, 2010
  8. All kinds of numbering and number systems (http://www.megalink.ru/~agb/n/numerat.htm)
  9. Mathematical Encyclopedic Dictionary. M.: “Owls. encyclopedia”, 1988. P. 847
  10. Talakh V.N., Kuprienko S.A. America is original. Sources on the history of the Maya, science (Aztec) and the Incas
  11. Talakh V.M. Introduction to Mayan hieroglyphics
  12. A.P. Yushkevich, History of Mathematics, Volume 1, 1970
  13. I. Ya. Depman, History of arithmetic, 1965
  14. L.Z. Shautsukova, "Fundamentals of Informatics in Questions and Answers", Publishing Center "El-Fa", Nalchik, 1994
  15. A. Kostinsky, V. Gubailovsky, Triune zero(http://www.svoboda.org/programs/sc/2004/sc.011304.asp)
  16. 2007-2014 "Computer History" (http://chernykh.net/content/view/50/105/)
  17. Computer science. Basic course. / Ed. S.V.Simonovich. - St. Petersburg, 2000
  18. Zaretskaya I.T., Kolodyazhny B.G., Gurzhiy A.N., Sokolov A.Yu. Computer science: Tutorial for 10 11 cells. medium general education schools. K.: Forum, 2001. 496 p.
  19. GlavSprav 20092014( http://edu.glavsprav.ru/info/nepozicionnyje-sistemy-schisleniya/)
  20. Computer science. Computer technology. Computer techologies. / Manual, ed. O.I.Pushkarya. - Publishing Center "Academy", Kyiv, - 2001
  21. Textbook "Arithmetic foundations of computers and systems." Part 1. Number systems
  22. O. Efimova, V. Morozova, N. Ugrinovich "Course of computer technology" textbook for high school students
  23. Kagan B.M. Electronic computers and systems.- M.: Energoatomizdat, 1985
  24. Maiorov S.A., Kirillov V.V., Pribluda A.A., Introduction to microcomputers, L .: Mashinostroenie, 1988.
  25. Fomin S.V. Number systems, M.: Nauka, 1987
  26. Vygodsky M.Ya. Handbook of elementary mathematics, M.: State publishing house of technical and theoretical literature, 1956.
  27. Mathematical encyclopedia. M: "Soviet Encyclopedia" 1985.
  28. Shauman A. M. Fundamentals of machine arithmetic. Leningrad, Leningrad University Press. 1979
  29. Voroshchuk A. N. Fundamentals of digital computers and programming. M: "Science" 1978
  30. Rolich Ch. N. From 2 to 16, Minsk, Higher School, 1981










Back forward

Attention! The slide preview is for informational purposes only and may not represent the full extent of the presentation. If you are interested in this work, please download the full version.

Lesson type: lesson on introducing new material in 8th grade.

Didactic goal of the lesson: familiarization of students with the octal number system, with the transfer of numbers from the octal to the decimal number system, and vice versa, as well as the translation from the octal number system to the binary number system and vice versa. Practicing translation skills from one number system to another.

Developmental goal of the lesson: development of the ability to reason, compare, draw conclusions. The development of memory, attentiveness, cognitive interest in the subject using appropriate tasks.

Educational: formation of self-control in schoolchildren.

Lesson steps:

  1. Organization of the beginning of the lesson - 2 min.
  2. Checking homework - 10 min.
  3. Preparing students to learn new knowledge - 5 min.
  4. Introduction of new material - 8 min.
  5. Primary fixation of new material - 5 min.
  6. Control and self-examination of knowledge - 10 min.
  7. Information about homework - 3 min.
  8. Summing up the lesson - 2 min.

Lesson structure:

  • Checking homework.
  • Introduction to octal numbers.
  • Converting an integer from octal to decimal with verification.
  • Converting a number from octal to binary and vice versa.
  • Information about homework.
  • Summing up the lesson.

Means of education:

  1. Application operating system Windows XP-Calculator.
  2. Student's individual card.
  3. The algorithm of work in the application o.s. Windows XP Calculator.
  4. Presentation.
  5. A card with a task for converting numbers from the octal number system to the decimal number system.
  6. A card with tasks for converting from one number system to another using a binary-octal table.
  7. Card with a creative task.

During the classes

Stage 1. Organization of the beginning of the lesson.

The purpose of the stage: preparing students for work in the classroom.

Hello guys!

Today in the lesson we will get acquainted with the octal number system and work out the skills of translating from one number system to another.

They receive individual cards that they sign and where they will enter the answers to the tasks.

F.I.
№1 №2 №3

Stage 2. Checking homework.

The purpose of the stage: establishing the correctness and awareness of homework by all students, identifying gaps and correcting them.

Let's check the homework using the standard Windows XP-Calculator application.

Homework: convert numbers from binary to decimal and check.

They receive sheets with the algorithm of work in the Calculator application, check their homework for a PC.

We will check the answers with the help of the presentation for the lesson.

  1. 10 2 =2 10
  2. 11 2 =3 10
  3. 100 2 =4 10
  4. 101 2 =5 10
  5. 110 2 =6 10
  6. 111 2 =7 10

Stage 3. Introduction of new material.

The purpose of the stage: ensuring the perception, comprehension and primary memorization of knowledge and methods of action, connections and relationships in the object of study.

Write down the topic of today's lesson: "Octal number system" .

Base: 8

Alphabet numbers: 0, 1, 2, 3, 4, 5, 6, 7

Consider the translation of an integer from octal to decimal and perform a check.

Algorithm for converting an integer from octal to decimal.

Write the octal number in expanded form and calculate its value.

10
21 8 =2*8 1 +1*8 0 =16+1=17 10

Let's do a check.

Algorithm for converting an integer from decimal system reckoning in octal.

  1. Consistently perform the division of the original integer decimal number by 8 until the result is strictly less than the base of the system.
  2. The resulting residues are written in reverse order.

10
71 8 =7*8 1 +1*8 0 =56+1=57 10

Stage 4. Primary consolidation of new material.

The purpose of the stage: establishing the correctness and awareness of the assimilation of new educational material.

Task No. 1 for the primary consolidation of new material. Annex 3

Convert the number from octal to decimal and check.

210
114 8 =1*8 2 +1*8 1 +4*8 0 =64+8+4=76 10

Examination:

Choose the correct answer under the corresponding letter and write the letter on an individual card.

O) 84 10
U) 76 10
E) 97 10

Stage 5 Control and self-examination of knowledge.

The purpose of the stage: identifying the quality and level of mastery of knowledge and methods of action.

We have learned how to translate numbers from one system to another, and now we will consider translation methods that do not require any calculations from us. To do this, draw a table in a notebook, consisting of two columns. The number in the 8th number system corresponds to the three digits of the binary number system. For example, 0 8 \u003d 000 2, 1 8 \u003d 001 2, then we turn to the homework that is checked at the beginning of the lesson. The table is easy to complete.

Binary-octal number system.

8 2
0 000
1 001
2 010
3 011
4 100
5 101
6 110
7 111

When converting an octal number to binary, each octal digit is replaced by the corresponding triple of digits from the table. For the reverse operation, that is, to convert from binary to octal, the binary number is divided into triplets of digits, then each group is replaced with one octal digit.

For example:

714 8 =111 001 100 2
101 110 100 2 =564 8 .

Students are given task cards. After solving them, the correct answers are placed in the student's individual card.

Tasks No. 2, No. 3 for control and self-examination of knowledge. Appendix 4

Convert numbers from one number system to another (using the binary-octal table).

2. Convert the number from octal to binary.

c) 1101001 2 ; p) 101 011 010 2 ; c) 111001100 2 ;

3. Convert from binary to octal.

a) 77 8 ; o) 64 8 ; c) 29 8 ;

Hand in individual cards and handouts. Let's check the answers with the help of slide No. 7 of the presentation for the lesson.

Right answers:

№2 p)101 011 010 2

The individual card will look like this:

F.I.
№1 №2 №3
At R A

Students receive handouts with creative assignments. The coordinates of the points are given in different number systems. It is necessary to convert the coordinates to the decimal number system, mark and connect the points on the coordinate plane.

The coordinates of the points are given:

1 (100 2 ,1 2)
2 (100 2 , 110 2)
3 (100 2 , 1000 2)
4 (10 8 ,10 8)
5 (6 8 ,7 8)
6 (10 8 ,6 8)

Perform the conversion of numbers to the decimal number system and put and connect all the points in the coordinate plane.

Answer (in decimal notation):

1 2 3 4 5 6
(4,1) (4,6) (4,8) (8,8) (6,7) (8,6)


Picture 1

Stage 6 Information about homework.

Purpose of the stage: providing an understanding of the purpose, content and methods of doing homework.

Convert numbers from octal to binary, then to decimal.

35 8 →A 2 →A 10

65 8 → A 2 → A 10

215 8 → A 2 → A 10

Stage 7. Summing up the lesson.

The purpose of the stage: to analyze and evaluate the success of achieving the goal.

If you got the word: URA in your individual card, then you got "5".

If you coped with 2 tasks, then the score is "4".

If you solved the 1st task, then you got "3".

Today in the lesson we got acquainted with the octal number system, considered different ways converting numbers from one number system to another. Some of the methods required us to solve problems by mathematical methods, others with the involvement of a computer, and still others did not require us to do any calculations.

Converting numbers from one number system to another is an important part of machine arithmetic. Consider the basic rules of translation.

1. To convert a binary number into a decimal one, it is necessary to write it as a polynomial consisting of the products of the digits of the number and the corresponding power of the number 2, and calculate according to the rules of decimal arithmetic:

When translating, it is convenient to use the table of powers of two:

Table 4. Powers of 2

n (degree)

Example.

2. To translate an octal number into a decimal one, it is necessary to write it as a polynomial consisting of the products of the digits of the number and the corresponding power of the number 8, and calculate according to the rules of decimal arithmetic:

When translating, it is convenient to use the table of powers of eight:

Table 5. Powers of 8

n (degree)

Example. Convert the number to decimal number system.

3. To translate a hexadecimal number into a decimal one, it is necessary to write it as a polynomial consisting of the products of the digits of the number and the corresponding power of the number 16, and calculate according to the rules of decimal arithmetic:

When translating, it is convenient to use blitz of powers of 16:

Table 6. Powers of 16

n (degree)

Example. Convert the number to decimal number system.

4. To convert a decimal number to the binary system, it must be successively divided by 2 until there is a remainder less than or equal to 1. A number in the binary system is written as a sequence of the last result of division and the remainder of the division in reverse order.

Example. Convert the number to binary number system.

5. To convert a decimal number to the octal system, it must be successively divided by 8 until there is a remainder less than or equal to 7. A number in the octal system is written as a sequence of digits of the last result of division and the remainder of the division in reverse order.

Example. Convert the number to octal number system.

6. To convert a decimal number to the hexadecimal system, it must be successively divided by 16 until there is a remainder less than or equal to 15. The number in the hexadecimal system is written as a sequence of digits of the last result of division and the remainder of the division in reverse order.

Example. Convert the number to hexadecimal.

Studying encodings, I realized that I did not understand the number systems well enough. Nevertheless, he often used 2-, 8-, 10-, 16-th systems, translated one into another, but everything was done on the “automatic”. After reading many publications, I was surprised by the lack of a single, written in simple language, article on such basic material. That is why I decided to write my own, in which I tried to present the basics of number systems in an accessible and orderly manner.

Introduction

Notation is a way of writing (representing) numbers.

What is meant by this? For example, you see several trees in front of you. Your task is to count them. To do this, you can bend your fingers, make notches on a stone (one tree - one finger / notch) or match 10 trees with some object, for example, a stone, and a single copy with a wand and lay them on the ground as you count. In the first case, the number is represented as a line of bent fingers or notches, in the second - a composition of stones and sticks, where the stones are on the left, and the sticks are on the right.

Number systems are divided into positional and non-positional, and positional, in turn, into homogeneous and mixed.

non-positional- the most ancient, in it each digit of a number has a value that does not depend on its position (digit). That is, if you have 5 dashes, then the number is also equal to 5, since each dash, regardless of its place in the line, corresponds to only 1 one item.

Positional system- the value of each digit depends on its position (digit) in the number. For example, the 10th number system, which is familiar to us, is positional. Consider the number 453. The number 4 indicates the number of hundreds and corresponds to the number 400, 5 - the number of tens and is similar to the value 50, and 3 - units and the value 3. As you can see, the larger the digit, the higher the value. The final number can be represented as the sum of 400+50+3=453.

homogeneous system- for all digits (positions) of the number, the set of valid characters (digits) is the same. As an example, let's take the 10th system mentioned earlier. When writing a number in a homogeneous 10th system, you can use only one digit from 0 to 9 in each digit, so the number 450 is allowed (1st digit - 0, 2nd - 5, 3rd - 4), but 4F5 is not, since the character F is not part of the digits 0 through 9.

mixed system- in each digit (position) of the number, the set of valid characters (numbers) may differ from the sets of other digits. A striking example is the time measurement system. In the category of seconds and minutes, 60 different characters are possible (from "00" to "59"), in the category of hours - 24 different characters(from "00" to "23"), in the discharge of the day - 365, etc.

Non-positional systems

As soon as people learned to count, there was a need to record numbers. In the beginning, everything was simple - a notch or dash on some surface corresponded to one object, for example, one fruit. This is how the first number system appeared - unit.
Unit number system
A number in this number system is a string of dashes (sticks), the number of which is equal to the value of the given number. Thus, a crop of 100 dates will be equal to a number consisting of 100 dashes.
But this system has obvious inconveniences - the larger the number, the longer the string of sticks. In addition, you can easily make a mistake when writing a number by accidentally adding an extra stick or, conversely, not adding it.

For convenience, people began to group sticks by 3, 5, 10 pieces. At the same time, each group corresponded to a certain sign or object. Initially, fingers were used for counting, so the first signs appeared for groups of 5 and 10 pieces (units). All this made it possible to create more convenient systems for recording numbers.

ancient Egyptian decimal system
IN Ancient Egypt special characters (numbers) were used to denote the numbers 1, 10, 10 2 , 10 3 , 10 4 , 10 5 , 10 6 , 10 7 . Here are some of them:

Why is it called decimal? As it was written above - people began to group symbols. In Egypt, they chose a grouping of 10, leaving the number “1” unchanged. IN this case, the number 10 is called the base of the decimal number system, and each symbol is a representation of the number 10 to some extent.

Numbers in the ancient Egyptian number system were written as a combination of these
characters, each of which was repeated no more than nine times. The final value was equal to the sum of the elements of the number. It is worth noting that this method of obtaining a value is characteristic of each non-positional number system. An example is the number 345:

Babylonian sexagesimal system
Unlike the Egyptian system, only 2 symbols were used in the Babylonian system: a “straight” wedge for units and a “lying” one for tens. To determine the value of a number, it is necessary to divide the image of the number into digits from right to left. A new discharge begins with the appearance of a straight wedge after a recumbent one. Let's take the number 32 as an example:

The number 60 and all its degrees are also indicated by a straight wedge, as is "1". Therefore, the Babylonian number system was called sexagesimal.
All numbers from 1 to 59 were written by the Babylonians in a decimal non-positional system, and big values- in positional with base 60. Number 92:

The notation of the number was ambiguous, as there was no digit for zero. The representation of the number 92 could mean not only 92=60+32, but also, for example, 3632=3600+32. To determine the absolute value of the number, a special character was introduced to indicate the missing sexagesimal digit, which corresponds to the appearance of the digit 0 in the decimal notation:

Now the number 3632 should be written as:

The Babylonian sexagesimal system is the first number system based in part on the positional principle. This number system is used today, for example, when determining time - an hour consists of 60 minutes, and a minute of 60 seconds.

Roman system
The Roman system is not much different from the Egyptian. It uses the capital Latin letters I, V, X, L, C, D, and M, respectively, to denote the numbers 1, 5, 10, 50, 100, 500, and 1000, respectively. A number in the Roman numeral system is a set of consecutive digits.

Methods for determining the value of a number:

  1. The value of a number is equal to the sum of the values ​​of its digits. For example, the number 32 in the Roman numeral system is XXXII=(X+X+X)+(I+I)=30+2=32
  2. If there is a smaller number to the left of the larger digit, then the value is equal to the difference between the larger and smaller digits. At the same time, the left digit can be less than the right one by a maximum of one order: for example, before L (50) and C (100) of the “younger” ones, only X (10) can stand, before D (500) and M (1000) - only C(100), before V(5) - only I(1); the number 444 in the considered number system will be written as CDXLIV = (D-C)+(L-X)+(V-I) = 400+40+4=444.
  3. The value is equal to the sum of the values ​​​​of groups and numbers that do not fit under 1 and 2 points.
In addition to digital, there are also alphabetic (alphabetic) number systems, here are some of them:
1) Slavic
2) Greek (Ionian)

Positional number systems

As mentioned above, the first prerequisites for the emergence of a positional system arose in ancient Babylon. In India, the system took the form of positional decimal numbering using zero, and from the Hindus this system of numbers was borrowed by the Arabs, from whom it was adopted by the Europeans. For some reason, in Europe, the name "Arab" was assigned to this system.
Decimal number system
This is one of the most common number systems. This is what we use when we call the price of the goods and pronounce the bus number. Only one digit from the range from 0 to 9 can be used in each digit (position). The base of the system is the number 10.

For example, let's take the number 503. If this number were written in a non-positional system, then its value would be 5 + 0 + 3 = 8. But we have a positional system, which means that each digit of the number must be multiplied by the base of the system, in this case the number “ 10”, raised to the power equal to the digit number. It turns out that the value is 5*10 2 + 0*10 1 + 3*10 0 = 500+0+3 = 503. To avoid confusion when working with several number systems at the same time, the base is indicated as a subscript. Thus, 503 = 503 10 .

In addition to the decimal system, 2-, 8-, 16-th systems deserve special attention.

Binary number system
This system is mainly used in computing. Why did not they begin to use the 10th that we are used to? The first computer was created by Blaise Pascal, who used the decimal system in it, which turned out to be inconvenient in modern electronic machines, since it required the production of devices capable of operating in 10 states, which increased their price and the final size of the machine. These shortcomings are deprived of the elements working in the 2nd system. Nevertheless, the system under consideration was created long before the invention of computers and goes back to the Inca civilization, where quipu was used - complex rope plexuses and knots.

The binary positional number system has a base of 2 and uses 2 characters (digits) to write a number: 0 and 1. Only one digit is allowed in each bit - either 0 or 1.

An example is the number 101. It is similar to the number 5 in the decimal number system. In order to convert from 2nd to 10th, it is necessary to multiply each digit of the binary number by the base “2”, raised to a power equal to the digit. Thus, the number 101 2 = 1*2 2 + 0*2 1 + 1*2 0 = 4+0+1 = 5 10 .

Well, for machines, the 2nd number system is more convenient, but we often see that we use numbers in the 10th system on a computer. How then does the machine determine which number the user enters? How does it translate a number from one system to another, because it has only 2 characters at its disposal - 0 and 1?

In order for a computer to work with binary numbers (codes), they must be stored somewhere. To store each individual digit, a trigger is used, which is an electronic circuit. It can be in 2 states, one of which corresponds to zero, the other to one. To store a single number, a register is used - a group of triggers, the number of which corresponds to the number of digits in a binary number. And the totality of registers is RAM. The number contained in the register is a machine word. Arithmetic and logical operations with words are carried out by an arithmetic logic unit (ALU). To simplify access to the registers, they are numbered. The number is called the register address. For example, if you need to add 2 numbers, it is enough to indicate the numbers of cells (registers) in which they are located, and not the numbers themselves. Addresses are written in 8- and hexadecimal systems (they will be discussed below), since the transition from them to the binary system and vice versa is quite simple. To transfer from the 2nd to the 8th number, it is necessary to divide it into groups of 3 digits from right to left, and to go to the 16th - 4 digits each. If there are not enough digits in the leftmost group of digits, then they are filled from the left with zeros, which are called leading. Let's take the number 101100 2 as an example. In octal it is 101 100 = 54 8 and in hexadecimal it is 0010 1100 = 2C 16 . Great, but why do we see decimal numbers and letters on the screen? When a key is pressed, a certain sequence of electrical impulses is transmitted to the computer, and each character has its own sequence of electrical impulses (zeros and ones). The keyboard and screen driver program accesses the character code table (for example, Unicode, which allows you to encode 65536 characters), determines which character the received code corresponds to, and displays it on the screen. Thus, texts and numbers are stored in the computer's memory in binary code, and are programmatically converted into images on the screen.

Octal number system
The 8th number system, like the binary one, is often used in digital technology. It has base 8 and uses the digits from 0 to 7 to represent the number.

An example of an octal number: 254. To convert to the 10th system, each digit of the original number must be multiplied by 8 n, where n is the digit number. It turns out that 254 8 = 2*8 2 + 5*8 1 + 4*8 0 = 128+40+4 = 172 10 .

Hexadecimal number system
The hexadecimal system is widely used in modern computers, for example, it is used to indicate the color: #FFFFFF - white color. The system under consideration has base 16 and uses to write the number: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B. C, D, E, F, where the letters are 10, 11, 12, 13, 14, 15 respectively.

Let's take the number 4F5 16 as an example. To convert to the octal system, first we convert the hexadecimal number to binary, and then, breaking it into groups of 3 digits, into octal. To convert a number to 2, each digit must be represented as a 4-bit binary number. 4F5 16 = (100 1111 101) 2 . But in groups 1 and 3 there is not enough digit, so let's fill each with leading zeros: 0100 1111 0101. Now we need to divide the resulting number into groups of 3 digits from right to left: 0100 1111 0101 \u003d 010 011 110 101. Let's translate each binary group into the octal system, multiplying each digit by 2n, where n is the digit number: (0*2 2 +1*2 1 +0*2 0) (0*2 2 +1*2 1 +1*2 0) (1*2 2 +1*2 1 +0*2 0) (1*2 2 +0*2 1 +1*2 0) = 2365 8 .

In addition to the considered positional number systems, there are others, for example:
1) Ternary
2) Quaternary
3) Duodecimal

Positional systems are divided into homogeneous and mixed.

Homogeneous positional number systems
The definition given at the beginning of the article describes homogeneous systems quite fully, so a clarification is unnecessary.
Mixed number systems
To the already given definition, we can add the theorem: “if P=Q n (P, Q, n are positive integers, while P and Q are bases), then the notation of any number in the mixed (P-Q)-th number system identically coincides with writing the same number in a number system with base Q.”

Based on the theorem, we can formulate the rules for transferring from the Pth to Q system and vice versa:

  1. To transfer from Q-th to P-th, you need a number in the Q-th system, split into groups of n digits, starting from the right digit, and replace each group with one digit in the P-th system.
  2. To transfer from P-th to Q-th, it is necessary to translate each digit of the number in the P-th system into the Q-th and fill in the missing digits with leading zeros, except for the left one, so that each number in the base Q system consists of n digits .
A striking example is the translation from binary to octal. Let's take a binary number 10011110 2, to convert it to octal, we will divide it from right to left into groups of 3 digits: 010 011 110, now we multiply each digit by 2 n, where n is the digit number, 010 011 110 \u003d (0 * 2 2 +1 *2 1 +0*2 0) (0*2 2 +1*2 1 +1*2 0) (1*2 2 +1*2 1 +0*2 0) = 236 8 . It turns out that 10011110 2 = 236 8 . For the uniqueness of the image of a binary-octal number, it is divided into triplets: 236 8 \u003d (10 011 110) 2-8.

Mixed number systems are also, for example:
1) Factorial
2) Fibonacci

Translation from one number system to another

Sometimes you need to convert a number from one number system to another, so let's look at how to translate between different systems.
Decimal conversion
There is a number a 1 a 2 a 3 in the number system with base b. To convert to the 10th system, each digit of the number must be multiplied by b n, where n is the digit number. So (a 1 a 2 a 3) b = (a 1 *b 2 + a 2 *b 1 + a 3 *b 0) 10 .

Example: 101 2 = 1*2 2 + 0*2 1 + 1*2 0 = 4+0+1 = 5 10

Converting from decimal number system to others
Whole part:
  1. We successively divide the integer part of the decimal number by the base of the system into which we are transferring, until the decimal number becomes zero.
  2. The remainders obtained by division are the digits of the desired number. The number in the new system is written starting from the last remainder.
Fraction:
  1. We multiply the fractional part of the decimal number by the base of the system into which you want to translate. We separate the whole part. We continue to multiply the fractional part by the base of the new system until it becomes 0.
  2. The number in the new system is the integer parts of the results of multiplication in the order corresponding to their receipt.
Example: convert 15 10 to octal:
15\8 = 1, remainder 7
1\8 = 0, remainder 1

Having written all the remainders from the bottom up, we get the final number 17. Therefore, 15 10 \u003d 17 8.

Binary to octal and hexadecimal conversion
To convert to octal, we divide the binary number into groups of 3 digits from right to left, and fill in the missing extreme digits with leading zeros. Next, we transform each group by multiplying successively the digits by 2 n , where n is the digit number.

Let's take the number 1001 2 as an example: 1001 2 = 001 001 = (0*2 2 + 0*2 1 + 1*2 0) (0*2 2 + 0*2 1 + 1*2 0) = (0+ 0+1) (0+0+1) = 11 8

To convert to hexadecimal - we divide the binary number into groups of 4 digits from right to left, then - similarly to the conversion from 2nd to 8th.

Converting from octal and hexadecimal systems to binary
Converting from octal to binary - we convert each digit of an octal number into a binary 3-digit number by dividing by 2 (for more information about division, see the “Conversion from decimal to other” paragraph above), the missing extreme digits will be filled in with leading zeros.

For example, consider the number 45 8: 45 = (100) (101) = 100101 2

Translation from 16th to 2nd - we convert each digit of the hexadecimal number into a binary 4-digit number by dividing by 2, filling in the missing extreme digits with leading zeros.

Converting the fractional part of any number system to decimal

The conversion is carried out in the same way as for integer parts, except that the digits of the number are multiplied by the base to the power “-n”, where n starts from 1.

Example: 101.011 2 = (1*2 2 + 0*2 1 + 1*2 0), (0*2 -1 + 1*2 -2 + 1*2 -3) = (5), (0 + 0 .25 + 0.125) = 5.375 10

Converting the fractional part of the binary system to the 8th and 16th
The translation of the fractional part is carried out in the same way as for the integer parts of the number, with the only exception that the breakdown into groups of 3 and 4 digits goes to the right of the decimal point, the missing digits are padded with zeros to the right.

Example: 1001.01 2 = 001 001, 010 = (0*2 2 + 0*2 1 + 1*2 0) (0*2 2 + 0*2 1 + 1*2 0), (0*2 2 + 1*2 1 + 0*2 0) = (0+0+1) (0+0+1), (0+2+0) = 11.2 8

Converting the fractional part of the decimal system to any other
To translate the fractional part of a number into other number systems, you need to turn the integer part to zero and start multiplying the resulting number by the base of the system to which you want to translate. If, as a result of multiplication, integer parts appear again, they must be turned to zero again, after remembering (writing down) the value of the resulting integer part. The operation ends when the fractional part completely vanishes.

For example, let's translate 10.625 10 into the binary system:
0,625*2 = 1,25
0,250*2 = 0,5
0,5*2 = 1,0
Writing down all the remainders from top to bottom, we get 10.625 10 = (1010), (101) = 1010.101 2

With the help of 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 number system of the original number, set the base of the number system to which you want to convert the number and click the "Translate" button. See the theoretical part and numerical examples below.

The result has already been received!

Translation of integer and fractional numbers from one number system to any other - theory, examples and solutions

There are positional and non-positional number systems. The Arabic number system that we use in everyday life is positional, while the Roman one is not. In positional number systems, the position of a number uniquely determines the magnitude of the number. Consider this using the example of the number 6372 in the decimal number system. Let's number 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 it is 10). The values ​​of the position of the given number are taken as degrees.

Consider the real decimal number 1287.923. We 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 C n is an integer in position n, D -k - fractional number in position (-k), s- number system.

A few words about number systems. A number in the decimal number system consists of a set of digits (0,1,2,3,4,5,6,7,8,9), in the octal number system it consists of a set of digits (0,1, 2,3,4,5,6,7), in the binary system - from the set of digits (0.1), in the hexadecimal number system - from the 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 numbers 10,11,12,13,14,15. In Table 1 numbers are represented in different number systems.

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 translate 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, translate it into the required number system.

Converting numbers from any number system to 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 the number 1011101.001 from octal number system (SS) to decimal SS. Solution:

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

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

Converting numbers from a decimal number system to another number system

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

The integer part of the number is translated from the decimal SS to another number system - by successively dividing the integer part of the number by the base of the number system (for binary SS - by 2, for 8-digit SS - by 8, for 16-digit - by 16, etc. ) to obtain a whole remainder, less than the base of the SS.

Example 4 . Let's translate 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 can be seen from Fig. 1, the number 159, when divided by 2, gives the quotient 79 and the remainder is 1. Further, the number 79, when divided by 2, gives the quotient 39 and the remainder is 1, and so on. As a result, by constructing a number from the remainder of the division (from right to left), we get a number in 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 an integer remainder less than 8. As a result, building a number from the remainder of the division (from right to left) we get a number in octal SS: 1147 (see Fig. 2). Therefore, we can write:

615 10 =1147 8 .

Example 6 . Let's translate the number 19673 from the decimal number system to hexadecimal SS.

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

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

To convert correct decimals (a real number with zero integer part) to a number system with base s, you need given number successively multiply by s until the fractional part is a pure zero, or we get the required number of digits. If the multiplication results in a number with an integer part other than zero, then this integer part is not taken into account (they are sequentially included in the result).

Let's look at the above with examples.

Example 7 . Let's translate the number 0.214 from the decimal number system 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 successively multiplied by 2. If the result of multiplication is a number with an integer part other than zero, 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 multiplied, 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 bold numbers (Fig. 4) from top to bottom, we get the required number in the binary system: 0. 0011011 .

Therefore, we can write:

0.214 10 =0.0011011 2 .

Example 8 . Let's translate 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 successively multiplied by 2. In the third stage, 0 was obtained. Therefore, the following result was obtained:

0.125 10 =0.001 2 .

Example 9 . Let's translate the number 0.214 from the decimal number system 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 hexadecimal SS, the numbers C and B correspond to the numbers 12 and 11. Therefore, we have:

0.214 10 =0.36C8B4 16 .

Example 10 . Let's translate the number 0.512 from the decimal number system to the 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 . Let's translate the number 159.125 from the decimal number system 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). Combining these results, we get:

159.125 10 =10011111.001 2 .

Example 12 . Let's translate the number 19673.214 from the decimal number system 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.

Encyclopedia of diseases