FRANCAIS francophone2.gif ANGLAIS

 

 

Created the, 12/06/2019

 Updated the, 02/01/2020

Visiteurs N°  


Home
Back to Main Sites New Blog Novelty Search engine Your Shopping Cart For Shopping Your Member Area Bookmarks, Your Favorite Games Static Welcome Page Site in French Web Site in English
Summaries
Basic Electronics Fundamental Technology Test your Knowledge Digital Theoretical Electronics Digital Practical Electronics Digital Electronic Lexicon Data book TTL Data book CMOS TVC Troubleshooting Mathematical
Microcomputers
Theoretical of Microcomputers Test your Knowledge Practical Microcomputers Computer Glossaries
Physical
The light Field of Action Electromagnetic Radiation
Technologies
Classification of Resistances Identification of Resistances Classification of Capacitors Identification of Capacitors
Mathematical Forms
Geometry Physical 1. - Electronic 1. 2. - Electronic 1. 3. - Electrical 1. 4. - Electromagnetism
Access to all our Products
E. T. F. - Volume I - 257 Pages E. T. F. - Volume II - 451 Pages E. T. F. - Volume III - 611 Pages E. T. D. - Volume I - 610 Pages N. B. M. - Volume I - 201 Pages E. T. M. - Volume I - 554 Pages Business at Home Books 34 free pages Our E-books Geometry Software Electronic Components Software
Overview of all our Products
E. T. F. - Volume I - 257 Pages E. T. F. - Volume II - 451 Pages E. T. F. - Volume III - 611 Pages E. T. D. - Volume I - 610 Pages E. T. M. - Volume I - 554 Pages Geometry Software Electronic Components Software
Our Lessons in PDF Formats
Basic Electronics Fundamental Technology Digital Theoretical Electronics Digital Practical Electronics Theoretical of Microcomputers Mathematics
Data Processing
Troubleshooting Win98 and WinXP PC Troubleshooting Glossary HTML and Programs JavaScript (in progress) PHP and Programs Creation of several Sites
Forums
Electronic Forum and Infos Electronic Forum and Poetry
Miscellaneous and others
Form of the personal pages News XML Statistics CountUs JavaScript Editor Our Partners and Useful Links Partnership Manager Our MyCircle Partners Surveys 1st Guestbook 2nd Guestbook Site Directories




Signets :
  Decimal System   Binary System   Octal System
  Hexadecimal System   Digital Systems Notations   Conversions Between Digital Systems
  Binary, Octal or Hexadecimal Conversions   Fractional Numbers   Code BCD (Binary Coded Decimal)
     Footer  


Digital systems ; Decimal, Binary, Octal, Hexadecimal and Conversions between Systems :


In this lesson, we will discuss digital systems, some of which are used in computerized devices and in everyday life.

1. - DIGITAL SYSTEMS

It is possible to introduce in the memory of a calculator words, that is to say groups of binary digits having a determined length.

We have already seen in the preceding lesson how these words are to be interpreted ; either as data or as instructions. The instruction or the data may be expressed by one or more words.

Therefore, we will have in the memory :

- instructions in one or more words,

- digital data in one or more words.

Both cases will be repeated in detail in this lesson. Remember, however, that the computer's memory always contains groups of bits equivalent to binary numbers.

Octal, decimal and hexadecimal numbers are used by humans, but can not be accepted in computer circuits.

The universally adopted digital system is the decimal system, so named because it uses ten digits to represent the top ten numerical values.

With two digits we thus form the binary system, with eight the octal system, with sixteen hexadecimal system and with any number of digits, another system, provided however that it presents a practical utility.

We have seen that a computer uses only the binary system since the basic circuits can only have two states indicated by the numbers "0" and "1". Some calculators use the octal and hexadecimal codes.

Expressions in octal and hexadecimal have the advantage of being more concise than binary expressions and of being easily transformable into equivalent binary expressions.

We will now see the characteristics of the various numerical systems, starting with the decimal system.

HAUT DE PAGE 1. 1. - DECIMAL SYSTEM

Each number written in this system is formed by a disposition of digits ranging from 0 to 9 indicating from right to left the units, the tens, the hundreds, the thousands ... that is to say, powers of ten in order croissant.

The position of each digit in the number is therefore important : each digit on the left represents the unit of higher order compared to that of the digit placed on its right. Thus, for example, in the number 32 875, the different digits respectively take the following values :

5 units                          or 5 single units

7 tens                           or 70 single units

8 hundreds                   or 800 single units

2 thousand                   or 2 000 single units

3 tens of thousands      or 30 000 single units

It should be remembered that the rank can be transcribed in powers of 10 as follows :

Single units = 100, tens = 101, hundreds = 102, thousands = 103.

Now, by multiplying each digit by the corresponding power and adding the products obtained, according to the well-known rules of decimal arithmetic, we obtain the original number :

Addition_decimale.GIF 

In conclusion, we can write the following equality :

32 875 = (3 x 104) + (2 x 103) + (8 x 102) + (7 x 101) + (5 x 100)

Equality thus defined represents in arithmetic form the conventional meaning of the decimal notation.

Some arithmetic calculation rules have been used here, others can be used to extract the value of the same number by a sequence of repetitive operations.

Let us see this new process by referring again to the number 32 875. We multiply the first digit of left by 10 and, to the product obtained, we add the 2 digit ; then we multiply by 10 the total thus obtained and, to the new product, we add the 3rd digit and so on :

This method can be considered as a "repetitive reading of the given number" ; it is especially important because it is similar to that adopted by the calculator in the reading phases.

HAUT DE PAGE 1. 2. - BINARY SYSTEM

In the binary system, only two digits are needed to write the numbers: "0" and "1". The basis of the system is therefore two.

The rules previously seen for the decimal system are also valid for the formation of binary numbers. In binary notation, however, each digit is associated with a power of two instead of a power of ten.

Each binary digit that constitutes the number (we always refer here to a decimal number) is weighted, that is to say that it has a determined weight whose value is associated with a power of 2. This value is increasing. when we read the binary digit from right to left.

In the following table, we show the representation of numbers in weighted base 2.

To find the decimal equivalent of the binary number "101101" in the example of the table, for each "1" binary, the decimal value of the weight occupied by the rank of each of the digits is taken. Then add each partial result. This sum corresponds to the equivalent decimal number.

Numeration_binaire_101101.GIF

In this case, 32 + 8 + 4 + 1 = 45 ; this decimal number is the equivalent of the binary number 101101.

HAUT DE PAGE 1. 3. - OCTAL SYSTEM

In this octal system, the representation of the numbers is done by a succession of groups of numbers, chosen in the first eight decimals, that is to say between 0 and 7. The base is 8 and the weights associated with the numbers are powers of 8.

In a similar way to the systems already seen, it will be possible to decompose an octal number, for example 3 476, as follows :

3 476 = (3 x 83) + (4 x 82) + (7 x 81) + (6 x 80)

Moreover, for the same number, one can make another type of reading ; by doing the calculations with decimals and using the method described above for decimals :

  •     3 x 8 =        24 ;      24 + 4 =      28

  •   28 x 8 =     224 ;    224 + 7 =    231

  • 231 x 8 = 1 848 ; 1 848 + 6 = 1 854

The octal number 3 476 thus corresponds to the decimal number 1 854.

HAUT DE PAGE 1. 4. - THE HEXADECIMAL SYSTEM

This system that uses sixteen digits is 16 based ; therefore, to the ten decimal digits we know, we must add six letters :

{A, B, C, D, E, F}

These alphabetic characters are assigned the following values, expressed in decimal numbers :

A = 10 ; B = 11 ; C = 12 ; D = 13 ; E = 14 ; F = 15.

The weights associated with hexadecimal digits are powers of 16. Example :

E1A3D = (E x 164) + (1 x 163) + (A x 162) + (3 x 161) + (D x 160)

The weights associated with hexadecimal digits are powers of 16. Example :

E x 16 = 14 x 16 = 224   ;    224 + 1 = 225

225 x 16 = 3 600             ;    3 600 + A = 3 600 + 10 = 3 610

3 610 x 16 = 57 760       ;    57 760 + 3 = 57 763

57 763 x 16 = 924 208   ;   924 208 + D = 924 208 + 13 = 924 221

E1A3D in hexadecimal is therefore equal to 924 221 in decimal.

HAUT DE PAGE 1. 5. - NOTATIONS OF DIGITAL SYSTEMS

In any numerical system, whether it be two, eight, ten, or sixteen, the representation of a number is unique ; this means that for each integer number, there corresponds one and only one sequence of digits within a given system, the possible insignificant zeros (that is to say those to the left of the number) not being taken into account.

A decimal quantity can always be expressed in another digital system ; this operation is called the coding of a number.

For example, the decimal number 318 is as follows :

  • - 100111110  in the binary system,

  • -         476       in the octal system,

  • -         13E       in the hexadecimal system.

To immediately recognize the numerical system chosen in the writing of a number, we note in subscript and in decimal the corresponding base of the system.

Example :

31810 = 1001111102 = 4768 = 13E16

The subscript H (hexadecimal) is used instead of 16 ; it is therefore the same thing to write : 13E16 or 13EH.

HAUT DE PAGE 2. - CONVERSIONS BETWEEN DIGITAL SYSTEMS

Converting a number written in one digital system to another means finding the corresponding layout of the numbers for the new system.

We will see successively the methods, that is to say the calculations necessary to do such operations and we will analyze the conversions between the previously described digital systems.

We will not describe the conversion of any digital system to a decimal system, because we have done enough in the previous examples. For more information at this address : http://www.electronique-et-informatique.fr/Electronique-et-Informatique/Digit/Digit_7T.php

To convert a decimal number into its binary, octal and hexadecimal equivalents, the following method can be adopted :

- We divide the decimal number by the base of the new system : we obtain an integer quotient and a remainder that we will use to form a number of the new system.

- We continue by dividing by the base the whole quotient of the previous operation and we draw a remainder as before ; we repeat this operation until we obtain a quotient equal to zero.

- The result obtained consists of all the remains of the divisions, written from right to left, starting from the last to the first.

We suppose, for example, to want to convert the decimal number 123 in the three systems (binary, octal, hexadecimal).

Starting with the binary system, divide 123 by 2 and get a quotient of "61" and a remainder of "1" ; the operation is repeated for quotient 61 and for each successive quotient until it is equal to zero.

The full conversion of 123 to binary is as follows :

Conversion_decimal_binaire.GIF 

As a second example, let's see the conversion of the decimal number 218 to a binary number :

Conversion_decimal_binaire_2.GIF  

One can easily check this kind of conversions, performing the reverse reading of the found binary numbers and thus noting the equivalence with the respective decimal numbers.

Here is an example of verification for the second conversion :

  •     1 x 2 =     2  ;        2 + 1 =    3

  •     3 x 2 =     6  ;        6 + 0 =    6

  •     6 x 2 =   12  ;     12 + 1 =   13     

  •   13 x 2 =   26  ;     26 + 1 =   27

  •   27 x 2 =   54  ;     54 + 0 =   54

  •   54 x 2 = 108  ;  108 + 1 = 109

  • 109 x 2 = 218  ;  218 + 0 = 218

The number 218 is precisely the number sought.

Obviously, turning decimal numbers into binary and vice versa is a boring exercise, at least for the man, and moreover presents a lot of risks of errors.

Anyone who wants to practice a little could look for the binary equivalent of relatively large decimal numbers, such as 1 947 563. After doing 21 divisions, we find that this number expressed in binary form is equivalent to 111 011 011 011 110 101 011 and there, we understand very well why humans do not use binary numbers in calculations.

Binary numbers have on average about three times more digits than equivalent decimal numbers, they are difficult to distinguish between them and to memorize.

Let us now see the conversion to the octal system of the decimal number 123 of the first example.

The process to follow is always the same ; only the basis of the new system differs :

Conversion_Decimal_Octal.GIF    

If, on the other hand, we want to represent 123 in hexadecimal notation, we will successively divide the number by 16 :

Conversion_Decimal_Hexadecimal.GIF

HAUT DE PAGE 2. 1. - CONVERSIONS BETWEEN BINARY SYSTEM AND OCTAL OR HEXADECIMAL SYSTEM AND VICE VERSA

Converting a binary number in the octal or hexadecimal system is very easy and does not require large calculations.

Let's first look at the conversion in the octal system.

A binary number can be converted to octal by applying the following rule :

- Starting from the right, divide the binary number in groups of 3 bits, called triplets, possibly adding zeros on the left to complete the left triplet.

- for each triplet, the value is written in octal digits.

- by putting these numbers next to each other, in the same order, we obtain the octal number sought.

Example :

Let's turn the binary number 10 101 001 110 100 into octal.

The binary to octal conversion rule is a special case that extends to all digital systems based on a power of 2. For example, this rule can be valid for the system based on 4 equal to 22, the octal system equal to 23 and the hexadecimal system equal to 24.

The general rule of conversion is as follows :

- going from right to left, divide the binary expression into groups of digits, the number of the latter being equal to the exponent of the power of 2 characterizing the base in which this conversion is made.

- for each group, write the numerical value in order, using the appropriate digit of the new system.

Example :

Let's transform the binary number from the previous example into hexadecimal.

For the hexadecimal system, the base being 16, we divide the binary number into groups of 4 bits (24 = 16) :

Conversion_binaire_en_Hexadecimal.GIF

Now let's look at the conversions from octal and hexadecimal to binary. These are reverse operations, based on the same correspondence between hexadecimal digits and binary quartets on the one hand, then octal digits and binary triplets on the other hand (Figure 1).

Correspondances_Octaux_Hexadecimaux.GIF

Examples :

- The octal number 7336 is converted to binary as follows :

Conversion_Octal_en_Binaire.GIF

- The hexadecimal number AA1B is converted to binary as follows :

Conversion_Hexadecimale_en_Binaire.GIF

HAUT DE PAGE 2. 2. - FRACTIONAL NUMBERS

To represent a fractional number, we still use the method of assigning each digit an appropriate weight, related to the position occupied by the same digit within the number written. The figures preceding the decimal point are assigned the same weights as in the case of an integer ; on the other hand, we attribute to the figures which follow the comma, weights consisting of powers with negative exponents, of increasing absolute value, going to the right.

For example, the number 512,374 should be defined as follows :

Conversion_Nombre_Fractionnaire_Deci_Binaire.GIF 

Reading a fractional number is done in two stages, always using the same process. First, we read the whole part as if it were a whole number ; then we take care of the fractional part as for the previous one but always keeping in mind that it comes after the decimal point.

By taking the number from the previous example, we read it as follows :

Resultat_du_Nombre_Fractionnaire_512_374.GIF

We could now extend these same observations to the binary, octal or hexadecimal system and, therefore, deal with conversions of fractional numbers from one system to another. Such work could be interesting as an arithmetic exercise but we will stop there, knowing that a fractional number can be considered by the computer as a union of two integers : the first which precedes the comma and which represents a quantity of units ; the second which follows the decimal point and which represents a fraction of these same units. The rules of whole numbers are therefore sufficient.

HAUT DE PAGE 2. 3. - CODE BCD (Binary Coded Decimal)

The BCD codification of a decimal digit is nothing other than a substitution of this digit by a group of four binary digits. These are more than enough to encode decimal digits from "0" to "9" therefore, six of the sixteen possible codes will not be used in the BCD representation (see the table in Figure 2).

Code_BCD.GIF

Let us take as an example the conversion of the number 146 into BCD code, defined according to the correspondences of Figure 2.

Conversion_Decimal_en_Code_BCD.GIF

The existence of the BCD code has been mentioned because the digital information, on many circuits, in particular on those of the digital measuring instruments, is provided in BCD form (Figure 3).

Instrument_Electronique_Digital_en_code_BCD.JPG







Nombre de pages vues, à partir de cette date : le 27 Décembre 2019

compteur visite blog gratuit


Mon audience Xiti



Send an email to Corporate Webmaster for any questions or comments about this Web Site.

Web Site Version : 11. 5. 12 - Web Site optimization 1280 x 1024 pixels - Faculty of Nanterre - Last modification : JANUARY 02, 2020.

This Web Site was Created on, 12 JUNE 2019 and has Remodeled, in JANUARY 2020.