Binary Decimal System Number Table. Binary-decimal number system

Binary-decimal number system

The binary-decimal number system was widely distributed in modern computers Due to the ease of translation into the decimal system and back. It is used where the focus is not paid to the simplicity of the machine's technical construction, but the convenience of the user. In this number system, all decimal numbers are separately encoded by four binary numbers and in this form are recorded consistently after each other.

The binary-decimal system is not economical from the point of view of the implementation of the technical construction of the machine (the required equipment requires approximately 20%), but it is very convenient when preparing tasks and in programming. In the binary-decimal number system, the base of the number system is number 10, but each decimal number (0, 1, ..., 9) is depicted, that is, is encoded, binary numbers. To represent one decimal digit, four binary are used. Here, of course, there is redundancy, since 4 binary numbers (or binary tetrad) can be depicted not 10, but 16 numbers, but this is already the cost of production in favor of programming. There are a number of binary-coded decimal systems representation of numbers, characterized in that certain combinations of zeros and units inside one tetrad are delivered to those or other values \u200b\u200bof decimal digits.
Posted on Ref.rf
In the most commonly used natural binary-coded decimal system, the weight of the binary discharges inside the tetrad is natural, that is, 8, 4, 2, 1 (Table 6).

Table 6.

Binary-decimal

For example, the decimal number 5673 in the binary-decimal representation has the view 01010110011100011.

Translation of numbers from one number system to another is important part Machine arithmetic. Consider the basic rules of translation.

1. To transfer a binary number to the decimal, it is necessary to write in the form of a polynomial consisting of the number of numbers and the corresponding amount of the number 2, and calculate according to the rules of decimal arithmetic

When transferring it is convenient to use the Double Decade Table

Table 7.

The degree of number 2.

N (degree)

Example.The number is translated into a decimal number system.

2. To transfer the octal number to the decimal, it is necessary to record as a polynomial consisting of the number of numbers and the corresponding amount of the number 8, and calculate according to the rules of decimal arithmetic

When transferring it is convenient to use the Eight Degnese Table

Table 8.

The degree of number 8.

N (degree)
8 N.

The binary-decimal number system is the concept and types. Classification and features of the category "binary-decimal number system" 2015, 2017-2018.

The concept of a mixed number system

Among the number systems, the class of so-called mixed number systems.

Definition 1.

Mixed called such notationin which the numbers specified in a certain number system with a base of $ p $ are depicted using the number of another number system with the base $ Q $, where $ Q

At the same time, in such a system, in order to avoid discharge for the image of each digit of the system with a base of $ p $, the same number of system discharges with a base $ q $ are given, sufficient to represent any digit system with a base $ p $.

An example of a mixed number system is a binary-decimal system.

Practical rationale for the use of a binary-decimal number system

Since a person in his practice is widely used by a decimal number system, and for a computer, it is typical of the operating of binary numbers and binary arithmetic, a compromise version was introduced into practice - binary-decimal system recording systemwhich, as a rule, is used where there is a need for frequent use of the decimal I / O procedure (for example, electronic clocks, calculators, etc.). In such devices, it is not always advisable to apply a universal microcode for the transfer of binary numbers to decimal and back due to the small volume of software memory.

Note 1.

In some types of computer in arithmetic and logic devices (Allu) there are special blocks of decimal arithmetic, which perform operations on the numbers presented in binary-decimal code. This allows in some cases to significantly increase computer performance.

For example, in automated system Data processing is used a large number of numbers, and calculations at the same time a little. In a similar case, the transformation operations from one system to another would significantly exceed the time to perform information processing operations. Microprocessors also use clean binary numbers, but at the same time they understand the conversion commands to a binary-decimal record. Alu AVR microcontroller (like other microprocessors) performs elementary arithmetic and logical operations over the numbers presented in binary code, namely:

    reads the results of the ADC transformation;

    in the format of integers or floating point numbers performs the processing of measurement results.

However, the final result is displayed on the indicator in a decimal format, convenient for perception by man.

Principles of building a binary-decimal number system

When constructing a binary-decimal number system for the image of each decimal digit, $ 4 $ binary discharge is given in it, since the maximum decimal figure of $ 9 $ is encoded as $ 10012 $.

For example: $ 925_ (10) \u003d 1001 0010 0101_ (2-10) $.

Picture 1.

In this record, sequential four binary digits depict a figure of $ 9 $, $ 2 $ and $ 5 $ decimal record, respectively.

To write a number in a binary-decimal number system, it must first be submitted in the decimal system, and then each part that is part of the number, the decimal digit to submit to binary system. At the same time, a different amount of binary discharges is required for writing various decimal digits in a binary number system. To do without the use of any dividing signs, with a binary image of the decimal digit, 4 binary discharge is always recorded. A group of these four digits is called tetraje.

Although only $ 0 $ and $ 1 $ numbers are used in binary decimal record, it differs from binary image of this numberSince the decimal equivalent of a binary number is several times more than the decimal equivalent of a binary-decimal number.

For example:

$1001 0010 0101_{(2)} = 2341_{(10)}$,

$1001 0010 0101_{(2)} = 925_{(2-10)}$.

Such an entry is often used as an intermediate stage when transferring a number from a decimal system to binary and back. Since the number of $ 10 $ is not an accurate degree of $ 2 $, not all $ 16 $ Tetrad (notebooks depicting numbers from $ A $ to $ F $ are discarded, since these numbers are considered forbidden), algorithms arithmetic operations Over multi-valued numbers in this case more complex than in the main number systems. And, nevertheless, the binary-decimal number system is used even at this level in many microcalculators and some computers.

To adjust the results of arithmetic operations over the numbers presented in the binary-decimal code, commands that convert operations into a binary-decimal number system are used in microprocessor technology. In this case, the following rule is used: when obtaining as a result of an operation (addition or subtraction) in the number of numbers greater than $ 9 $, the number $ 6 $ is added to this tetrade.

For example: $ 75 + 18 \u003d 93 $.

$ 10001101 \\ (8D) $

In the younger tetrade there appeared a prohibited figure of $ d $. I will add $ 6 $ to younger notebook and get:

$10010011 \ (93)$

As we see, despite the fact that the addition was carried out in a binary number system. The result of the operation turned into a binary-decimal.

Note 2.

The bonnetal balancing is often carried out on the basis of binary-decimal number system. The use of a binary and binary-decimal number system is most appropriate, since in this case the number of balancing clocks is the smallest among other number systems. Note that the use of binary code allows an approximately $ 20 \\% $ to reduce the processing time of the compensating voltage compared to the binary-decimal.

Advantages of using a binary-decimal number system

The transformation of the numbers from the decimal system into the binary-decimal number system is not associated with the calculations and it is easy to implement using the simplest electronic circuits, since it is converted a small amount of (4) binary digits. The opposite conversion occurs in the computer automatically using a special translation program.

The use of a binary-decimal number system together with one of the main numbering systems (binary) allows you to develop and create high-performance computers, since the use of a block of decimal arithmetic in Allu excludes when solving tasks, the need for a programmed translation of numbers from one number system to another.

Since two binary-decimal digits make up $ 1 $ bytes with which you can present the values \u200b\u200bof numbers from $ 0 $ to $ 99 $, and not from $ 0 $ to $ 255 $, as using a $ 8 $---bit binary number, then using $ 1 $ byte for Especially every two decimal digits, you can form binary-decimal numbers with any desired number of decimal discharges.

(Methodical development)

Task: Convert numbers expressed in decimal form, in binary shape, then produce multiplication.

Note: Multiplication rules are exactly the same as in a decimal number system.

Multiply: 5 × 5 \u003d 25

We convert a decimal number 5 to binary code

5: 2 \u003d 2 residue 1 result

2: 2 \u003d 1 residue 0 Write in the opposite

1: 2 \u003d 0 residue 1

Thus: 5 (10) \u003d 101 (2)

We convert the decimal number 25 to binary code

25: 2 \u003d 12 residue 1

12: 2 \u003d 6 residue 0 result

6: 2 \u003d 3 residue 0 Write in the opposite

3: 2 \u003d 1 residue 1

1: 2 \u003d 0 residue 1

Thus: 11001 (2) \u003d 25 (10)

We produce check:

We produce binary multiplication

×
101
+
101

The rules of multiplication in the binary system are exactly the same as in the decimal number system.

1) 1 × 1, will be 1, write 1.

2) 1 × 0, will be 0, write 0.

3) 1 × 1, there will be 1, write 1.

4) We write three scratch, and the first zero under the second sign (zero).

5) Multiplication of 1 × 101 exactly the same as p.p. 1, 2, 3.

We produce the operation of addition.

6) demolish and write 1.

7) 0 +0 will be zero, write 0.

8) 1 + 1 will be 10, write zero, and the unit is transferred to the older discharge.

9) 0 + 0 + 1 will be 1, write 1

10) demolish and write 1.

Task 1: Perform multiplication in binary form

Task: Convert numbers, expression in decimal form, in binary shape, then make a division.

Note: The rules of division are exactly the same - as in the decimal number system.

If the result is divided without the residue, write - 0, otherwise (with the residue) - 1

Divide: 10: 2 \u003d 5

We convert a decimal number 10 to binary code:

10: 2 \u003d 5 residue 0 5: 2 \u003d 2 residue 1 2: 2 \u003d 1 residue 0 1: 2 \u003d 0 residue 1

Received result

write in the opposite

Thus: 1010 (2) \u003d 10 (10)

We transform decimal 2 to binary code

2: 2 \u003d 1 residue 0

1: 2 \u003d 0 residue 1



Thus: 10 (2) \u003d 2 (10)

We transform decimal 5 to binary code

5: 2 \u003d 2 residue 1

2: 2 \u003d 1 residue 0

1: 2 \u003d 0 residue 1

Thus: 101 (2) \u003d 5 (10)

We produce check:

1010 (2) \u003d 0 × 2 0 + 1 × 2 1 + 0 × 2 2 + 1 × 2 3 \u003d 0 + 2 + 0 + 8 \u003d 10 (10)

10 (2) \u003d 0 × 2 0 + 1 × 2 1 \u003d 0 +2 \u003d 2 (10)

101 (2) \u003d 1 × 2 0 + 0 × 2 1 + 1 × 2 2 \u003d 1+ 0 + 4 \u003d 5 (10)

We produce binary division:

1010 (2) : 10 (2) = 101 (2)

1010 (2) 10
10

The rules of division in the binary system are exactly the same as in decimal.

1) 10 divided by 10. Take 1, in the result, write 1.

2) demolish 1 (unit), not enough, occupy 0 (zero).

3) Take 1. out of 10 (ten) subtract 10, it turns out zero, which corresponds to
reality.

Task 1: Perform division in binary form

1) 10010 (2) : 110 (2) =

11000 (2) : 110 (2) =

2) 110110 (2) : 110 (2) =

Task 2: The result is restored in decimal form.

Task: Subtract numbers expressed in binary form, the result obtained to restore in a decimal form.

Subtract: 1100 (2) - 110 (2) \u003d

Deduction rules in binary form.

Subtraction in binary form is similar to subtraction in the decimal system.

110 0 + 0 = 0

110 0 + 1 = 1

1) 0 plus 0 is 0 (see the rules for the addition of numbers).

2) 1 plus 1 equal to 10. Record zero, and one is transferred to a senior discharge, as in the decimal system

3) 1 plus 1 plus 1 equals 11 - binary number. Write 1, and the second unit
We transfer to the senior discharge. We get: 1100 (2), which is true.

Task: Check the result obtained.

1100 (2) \u003d 0 × 2 0 + 0 × 2 1 + 1 × 2 2 + 1 × 2 3 \u003d 0 + 0 + 4 + 8 \u003d 12 (10)

110 (2) \u003d 0 × 2 0 + 1 × 2 1 + 1 × 2 2 \u003d 0 + 2 + 4 \u003d 6 (10)

Thus, we obtain: 6 + 6 \u003d 12, which corresponds to reality.

Perform yourself:

Task 1. Perform subtraction in binary form:

+
1010 10 (10)

110 6 (10)

10,000 corresponding: 16 (10)

The actions occurs as follows.

1) 0 plus 0 equals about

2) 1 plus 1 equal to 10 (that 2 (two) in the binary system is presented as 10);
Historically, there was ten fingers for adding numbers and on the contrary:

9 + 1 = 10; 8 + 2 = 10; 1 + 9 = 10; 2 + 8 = 10.

Therefore, there has been a decimal number system. And in binary 2 (two) sign: 1 and 0

3) 1 plus 0 plus 1 is 10. Write 0 and transfer 1.

4) 1 plus 1 equal to 10 because it last action, write down 10, just made it in the decimal system.

Task: Check the result obtained:

110 Addition of positive numbers The addition of multi-digit numbers is carried out according to the rules of binary arithmetic; The feature is manifested in addition of two units. For S \u003d. Yu (10) The sum of the two units is equal to two, which is equivalent to 10 (2). Thus, instead of one discharge, two are formed. In that...
(Computer Engineering)
  • Arithmetic actions on floating semicolons
    Addition of numbers When the floating semicolons are addition, the result is defined as the amount of mantiss terms with a common for the component terms. If the signs of both mantiss are the same, then they fold in direct codes, if different - in additional or reverse codes. In tab. 2.8 shows the procedure ...
    (Computer Engineering)
  • Numbers in a decimal number system
    10 ° - unit 109 - billion 1024 - Septillion 101 - ten 1012 - Trillion. 1027 - Octillion. 102 - one hundred 1015 - Quadrillion YU30 - Nonillion 103 - thousand 1018 - Quintillion 1033 - Decillion 106 - Million 1021 - ...
    (Physics)
  • Number systems
    A man since sincerversion had to consider various items and record their number. For these purposes arose unarythe recording system at which the numbers were denoted by the corresponding number of drops (or serifs). For example, the number 5 seemed to be 111 |. Unary recording is very cumbersome and ...
    (Computer architecture)
  • Efficiency of the number system
    Number in the number system river discharge will obviously be the greatest value if all the numbers are maximum, i.e. equal (R - one). Then (gr) tah =(/>-1)...(/>-!) = / -1. to The number of digits of the number during the transition from one number system ...
    (Computer architecture)
  • Proof following the position of one position
    When approaching the coast, the situation may have to work out that the lifetaker has the ability to get only one position line. For example, the peak of the mountain opened to which only bearing can be measured, or only one radio beaches are listened. The same setting is also developing when determining ...
    (Analysis and processing of navigation measurements)
  • The binary-decimal number system was widely distributed in modern computers due to the ease of translation into the decimal system and back. It is used where the focus is not paid to the simplicity of the machine's technical construction, but the convenience of the user. In this number system, all decimal numbers are separately encoded by four binary numbers and in this form are recorded consistently after each other.

    The binary-decimal system is not economical from the point of view of the implementation of the technical construction of the machine (the required equipment increases by about 20%), but it is very convenient when preparing tasks and when programming. In the binary-decimal system, the base system base is the number of ten, but each of 10 decimal digits (0, 1, ..., 9) is depicted using binary digits, that is, coded by binary numbers. To represent one decimal digit, four binary are used. Here there is, of course, redundancy, since four binary numbers (or binary tetrad) can be portrayed not 10, but 16 numbers, but it is already the cost of production in favor of programming convenience. There are a number of two-coded decimal systems representing numbers, characterized in that certain combinations of zeros and units inside one tetrad are delivered to those or other values \u200b\u200bof decimal numbers 1.

    In the most frequently used natural binary-coded decimal system for the weight of the binary discharges, inside the tetrad is natural, that is, 8, 4, 2, 1 (Table 3.1).

    Table 3.1. Table of binary codes of decimal and hexadecimal numbers

    Numeral The code Numeral The code
    A.
    B.
    C.
    D.
    E.
    F.

    For example, a decimal number of 9703 in the binary-decimal system looks like this: 1001011100000011.

    18 Question. OS.Logical foundations of computer work. Operations Logic algebra

    Logic algebra provides many logical operations. However, three of them deserve special attention, because With their help, you can describe all the rest, and, therefore, use less diverse devices when designing schemes. Such operations are conjunction (AND), disjunction (Or) and negation (NOT). Often conjunction indicate & , disjunction - || , and denial - a feature above the variable denoting the statement.

    In conjunction, the truth of the complex expression occurs only in the event of the truth of all simple expressions, of which it consists of complex. In all other cases, the complex expression will be false.

    When disjunction, the truth of a complex expression comes with the truth of at least one simple expression or two in it. It happens that the complex expression consists more than two simple. In this case, it is enough that one simple was true and then all the statement will be true.

    The denial is a unary operation, because it is performed with respect to one simple expression or relative to the result of complex. As a result of the denial, a new statement is opposite to the original one.

    19 question.Basic Rules Logic Algebra

    Normal record of these laws in formal logic:

    20 question.Tank truth

    Tatasets of truth

    Logical operations It is convenient to describe the so-called titles of truth, in which they reflect the results of computing complex statements in various values \u200b\u200bof the initial simple statements. Simple statements are denoted by variables (for example, a and b).

    21 question. Logic elements. Their names and designations on the scheme

    How to use our knowledge from the area mathematical logic For design electronic devices? We know that about and 1 in logic are not just numbers, but the designation of the states of some object of our world, conditionally referred to as "Lies" and "Truth". Such a subject that has two fixed states can be an electric current. Devices fixing two stable states are called bistable (for example, switch, relay). If you remember, the first computing machines were relay. Later, new electricity control devices were created - electronic circuitsconsisting of a set of semiconductor elements. Such electronic circuits that convert only two fixed voltages signals electric current (bistable), began to call logical elements.

    Logical element of computer - this is part of the electronic logic scheme that implements the elementary logical function.

    Logical elements of computers are electronic circuits and, or, not, not, or not and others (called also valves), as well as trigger.

    Using these schemes, you can implement any logical function describing the operation of the computer devices. Usually, the valves sometimes happen from two to eight inputs and one or two outputs.

    To present two logic state - "1" and "0" in the valves corresponding to them input and output signals have one of two installed levels Voltage. For example, +5 volts and 0 volts.

    High level Usually corresponds to the value of "Truth" ("1"), and the low - the "lies" value ("0").

    Each logical element has its own symbol,which expresses its logical function, but does not indicate which exactly electronic circuit It is implemented. It simplifies the recording and understanding of complex logic schemes.

    The logical elements are described using truth tables.

    Tank truth This is a tabular representation of a logic circuit (operation), which lists all possible combinations of the values \u200b\u200bof the truth of the input signals (operands) along with the value of the truth of the output signal (the result of the operation) for each of these combinations.