Summary

This document provides a comprehensive overview of numbering systems, focusing on binary, octal, and hexadecimal. It explains the conversion between these systems and the decimal system. This document is designed to provide students with learning objectives for a course relating to aviation and digital techniques.

Full Transcript

Numbering Systems (5.2) Learning Objectives 5.2.1 Identify the binary, octal and hexadecimal numbering systems (Level 1). 5.2.2.1 Recall how conversions from decimal to the binary, octal and hexadecimal numbering systems are performed (Level 1). 5.2.2.2 Recall how conversions from bin...

Numbering Systems (5.2) Learning Objectives 5.2.1 Identify the binary, octal and hexadecimal numbering systems (Level 1). 5.2.2.1 Recall how conversions from decimal to the binary, octal and hexadecimal numbering systems are performed (Level 1). 5.2.2.2 Recall how conversions from binary, octal and hexadecimal numbering systems to the decimal numbering system are performed (Level 1). 2023-11-23 B1-05a Digital Techniques / Electronic Instrument Systems Page 11 of 286 CASA Part 66 - Training Materials Only Numbering Systems Applications of Numbering Systems Computers are now employed wherever repeated calculations or the processing of huge amounts of data is needed. The greatest applications are found in aviation, military, scientific and commercial fields, ranging from mail sorting to engineering design and navigation around the globe. The advantages of digital computers include speed, accuracy and manpower savings. Often computers are able to take over routine jobs and release personnel for more important work, work that cannot be handled by a computer. People and computers do not normally speak the same language. Methods of translating information into forms that are understandable and usable to both are necessary. Humans generally speak in words and numbers expressed in the decimal number system, while computers understand only coded electronic pulses that represent digital information. © Lufthansa Aviation Training 2021 Numbering systems are used in all areas of aviation This topic will cover number systems in general, and binary, octal and hexadecimal (which we will refer to as hex) number systems specifically. Methods for converting numbers in the binary, octal and hex systems to equivalent numbers in the decimal system (and vice versa) will also be described. You will see that these number systems can be easily converted to the electronic signals necessary for digital equipment. Until now, you have likely only used one number system: the decimal system. You may also be familiar with the Roman numeral system even though you seldom use it. 2023-11-23 B1-05a Digital Techniques / Electronic Instrument Systems Page 12 of 286 CASA Part 66 - Training Materials Only Numbering Systems Most numbering systems have certain things in common. These common terms will be defined using the decimal system as our base. Each term will be related to each number system as that number system is introduced. Each of the number systems covered is built around the following components: unit, number and base. © Aviation Australia Common numbering systems 2023-11-23 B1-05a Digital Techniques / Electronic Instrument Systems Page 13 of 286 CASA Part 66 - Training Materials Only Units and Numbers The terms unit and number, when used with the decimal system, are almost self-explanatory. By definition, the unit is a single object, that is, an apple, or a dollar, or a day. A number is a symbol representing a unit or a quantity. The figures 0, 1, 2 and 3 through 9 are the symbols used in the decimal system. These symbols are called Arabic numerals or figures. Other symbols may be used for different number systems. For example, the symbols used with the Roman numeral system are letters: V is the symbol for 5, X for 10, M for 1000 and so forth. We will use Arabic numerals and letters in the number system discussions. Creative Commons The Arabic numerals 2023-11-23 B1-05a Digital Techniques / Electronic Instrument Systems Page 14 of 286 CASA Part 66 - Training Materials Only Numbering Systems - Base The base of a number system tells you the number of symbols used in that system. The base of any system is always expressed in decimal numbers. The base of the decimal system is 10. This means there are 10 symbols – 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9 – used in the system. A number system using three symbols – 0, 1 and 2 – would be Base 3; four symbols would be Base 4; and so on. Remember to count the zero or the symbol used for zero when determining the number of symbols used in a number system. The base of a number system is indicated by a subscript (decimal number) following the value of the number. The following are examples of numerical values in different bases with the subscript to indicate the base. For example, 10102 is 1010 binary, 101010 is 1010 decimal and 101016 is hexadecimal, all of which represent totally different values. © Aviation Australia Base of binary, decimal and hexadecimal You should notice the highest value symbol used in a number system is always one less than the base of the system. In Base 10 the largest value symbol possible is 9; in Base 5 it is 4; in Base 3 it is 2. 2023-11-23 B1-05a Digital Techniques / Electronic Instrument Systems Page 15 of 286 CASA Part 66 - Training Materials Only © Aviation Australia Numerals A unit is a single object or quantity, for example, a dollar, or a litre of fuel, or a day. A numeral is the symbol that represents a unit or quantity, for example, 5 = ♣ ♣ ♣ ♣ ♣. The base of a numbering system indicates how many symbols are used in the system. System Number of Symbols Symbols Base 10 10 0123456789 Base 8 8 01234567 Base 2 2 01 Base 16 16 0123456789ABCDEF © Aviation Australia The base of a number system is indicated by subscript 2023-11-23 B1-05a Digital Techniques / Electronic Instrument Systems Page 16 of 286 CASA Part 66 - Training Materials Only Positional Notation and Zero You must observe two principles when counting or writing quantities or numerical values: the positional notation and zero principles. Positional notation is a system in which the value of a number is defined not only by the symbol but by the symbol’s position. Let us examine the decimal (Base 10) value of 427. You know from experience that this value is four hundred twenty-seven. Now examine the position of each number: If 427 is the quantity you wish to express, then each number must be in the position shown. If you exchange the positions of the 2 and the 7, then you change the value. Each position in the positional notation system represents a power of the base, or radix. A power is the number of times a base is multiplied by itself. The power is written above and to the right of the base and is called an exponent. Aviation Australia Base 10 numbering system In the bottom example, the number 6348 is equal to 41210. Where the 2 in the upper number indicated 2 times 10, the 3 in the lower number equals 3 times 8, and so on, for the hundreds columns. Aviation Australia Base 8 numbering system 2023-11-23 B1-05a Digital Techniques / Electronic Instrument Systems Page 17 of 286 CASA Part 66 - Training Materials Only Just as important as positional notation is the use of the zero. The placement of the zero in a number can have quite an effect on the value being represented. Sometimes a position in a number does not have a value between 1 and 9. Consider how this would affect your next paycheque. If you were expecting a cheque for $605.47, you would not want it to be $65.47. Leaving out the zero in this case means a difference of $540.00. In the number 605.47, the zero indicates that there are no tens and is a very important numeral to include. Digital Numbering Systems The Base 10 system (Decimal) is the universal method of counting and recording values. The Base 2 system (Binary) is used by computers to perform all calculations and processes. It is the consequence of transistor state: either ON or OFF (1 or 0). The Base 8 system (Octal) is widely used in computer application sectors and digital numbering systems. Octal numerals can be easily converted from binary by grouping consecutive binary digits into groups of three (starting from the right). Thus an octal value represents 3 binary bits. For example, the binary representation for decimal 74 is 1001010. Two zeroes can be added at the left: (00)1 001 010, corresponding the octal digits 1 1 2, yielding the octal representation 112. The Base 16 system (Hexadecimal) is similar to octal with respect to ease of conversion from binary. A hexadecimal numeral represents four binary bits. The decimal numbering system is, of course, the system used universally. © Aviation Australia Binary converts more easily to octal and hexadecimal 2023-11-23 B1-05a Digital Techniques / Electronic Instrument Systems Page 18 of 286 CASA Part 66 - Training Materials Only Unlike analogue, which uses continuously changing values, digital uses discrete numerical values to represent waveforms. Those values are not represented by the familiar decimal numbering system that we use in our daily lives, but rather the binary number system. To represent 10 different values, a computer would need to incorporate 10 levels, for example, brightness of lights, voltages, clock- pulses and so on. A computer works only in digital, using zeros and ones. This is easily represented: something is either ‘on’ (1) or ‘off’ (0). So when you type a decimal number into your calculator, it converts it to digital, performs the calculation, and then converts the answer back into decimal for display. In order to comprehend how a computer functions, you must understand the different numbering systems. In addition to the decimal system, we will cover Base 2 (Binary), Base 8 (Octal) and Base 16 (Hexadecimal). As mentioned before, with one digit (a bit, short for binary digit), there are two possible values. With two bits, there are four possible values. With 3 bits, there are 8 possible values. With 4 bits (a nibble), there are 16 possible values, and so on. Terms Number of bits Representation Bit 1 1 Nibble 4 0101 Byte 8 0000 0101 Word 16 0000 0000 0000 0101 Long word 32 2 x word Very long word 64 4 x word © Aviation Australia Graphical representation of binary terms and representations 2023-11-23 B1-05a Digital Techniques / Electronic Instrument Systems Page 19 of 286 CASA Part 66 - Training Materials Only Binary Numbering System The binary numbering system is the base 2 numbering system. In the base 2 system only two symbols, 0 and 1, are used. Every numbering system can be defined through a table demonstrating the value of digits (increasing from right to left). For example, the decimal numbering system (base 10) looks as follows. The decimal system uses powers of 10 to determine the value of a position. The binary system uses powers of 2 to determine the value of a position. © Aviation Australia Decimal truth table Often the binary numbering system will need to be converted to decimal to be understood by humans. This is conversion is determined by the binary number truth table. Because each position is the base of the number lifted to a power, for example, 21, 22, 23, 24 and so on, we simply calculate the values and write them across a page. Below the values, record the number to be converted and then add each of the values which has a 1 in its column. 2023-11-23 B1-05a Digital Techniques / Electronic Instrument Systems Page 20 of 286 CASA Part 66 - Training Materials Only Octal Numbering System Each octal numeral can be represented by three binary digits, and the two number systems are readily converted from one to the other by substitution. So 778 is followed by 1008, in a similar sequence as 9910 is followed by 10010. 1008 is quite a bit smaller than 10010. 1008 = 6410. The advantage is that a binary number sequence or readout can be displayed as an octal number, which can then be readily converted back to binary, for example, fault isolation. Instead of displaying 110 011 010 010 111 1102 on a readout, 6322768 can be displayed. This is far more easily written and remembered than the binary equivalent. Writing the binary number would increase the chances of transposing a digit while copying, plus it is simply a large unwieldy number, difficult to write and difficult to memorise. 6322768, by comparison, is more simply remembered. A common method of interpreting data in aircraft is to memory inspect a computer memory location and to interpret the data stored there. Of course, the data is stored digitally. Some aircraft may have computer systems which convert the data into useable information, but others will simply only provide the digital data as it is stored. It is then the engineer’s task to interpret the digital data. The octal numbering system has a base of 8. Numerals used are 0 1 2 3 4 5 6 7. 08 18 28 38 → 78 108 118 128 → 168 178 208 218 → 268 278 308 318 → 768 778 → 1008 Each octal digit represents three binary digits: Aviation Australia Octal numbering system 2023-11-23 B1-05a Digital Techniques / Electronic Instrument Systems Page 21 of 286 CASA Part 66 - Training Materials Only Hexadecimal Numbering System The hexadecimal number system is referred to as Base 16 and uses 16 unique symbols: 0–9 and A–F (the radix). This number system is useful because it can represent every byte (8-bits of binary) as two symbols. Hex uses the first 10 numbers of the decimal system: 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9. The number 10 has two digits, so in hexadecimal it is represented by the letter A, the number 11 by B, 12 by C, 13 by D, 14 by E and 15 by F. This gives 16 single-digit values: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F. To go higher, to the decimal number 16, we must use two digits, setting the first digit to 1 and increasing the second digit from 0 to F: 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 1A, 1B, 1C, 1D, 1E, 1F The decimal number 16 equals 10 in hexadecimal: (1 × 16) + 0. Continuing in the series, 17 (decimal) equals 11 (hexadecimal), 18 (decimal) equals 12 (hexadecimal), and so on until 31 (decimal), which equals 1F (hexadecimal). To increment to the number 32, we must change the first digit to 2 and increase the second digit from F to 0: 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 2A, and so on. So FF16 is followed by 10016 in a similar sequence as 9910 is followed by 10010, although 10016 is quite a bit larger than 10010. 10016 = 25610. Each hexadecimal digit represents four binary digits: Aviation Australia Hexadecimal numbering system 2023-11-23 B1-05a Digital Techniques / Electronic Instrument Systems Page 22 of 286 CASA Part 66 - Training Materials Only Converting Between Numbering Systems Binary to Decimal Conversion Converting from binary to decimal is relatively straightforward using the binary truth table. Example 1: 100012 (Binary Number) = 1710 (Decimal) Example 2: 110011012 (Binary Number) = 20510 (Decimal) © Aviation Australia Binary truth table and binary to decimal conversions When you are working with the decimal system, you normally do not use the subscript. Now that you will be working with number systems other than the decimal system, it is important that you use the subscript so that you are sure of the system being referred to. For example. you could say that 11001101 equals 205, and it would be assumed that the first value is binary and the latter is decimal. However, other numbering systems you cannot make this assumption, and therefore require the base annotation. 2023-11-23 B1-05a Digital Techniques / Electronic Instrument Systems Page 23 of 286 CASA Part 66 - Training Materials Only Decimal to Binary Conversion There are two basic ways to do a decimal to binary conversion. You may decide which method you prefer to use. Decimal to Binary Conversion - Division (Method 1) This method repeatedly divides a decimal number by 2 and records the quotient and remainder. The remainder digits (a sequence of zeros and ones) form the binary equivalent. Example 1: Find the binary equivalent of the decimal number 19. Example 2: Find the binary equivalent of the decimal number 52. The digits in the remainder column form the binary equivalent of the decimal number. Once a decimal value is divided to it's maximum, write the binary value starting from the bottom value and from left to right. Aviation Australia Decimal to binary conversion For example, divide 19 by 2 (using whole number division) and you will find that 2 fits into 19, 9 times with 1 remainder. And then, 9 divided by two is 4 remainder 1, and so on until 1 is divided by 2, which cannot be done via whole number division and the value is zero. The final binary values for each decimal example (respectively) is 10011 and 110100. 2023-11-23 B1-05a Digital Techniques / Electronic Instrument Systems Page 24 of 286 CASA Part 66 - Training Materials Only Decimal to Binary Conversion - Subtraction (Method 2) The subtraction method involves repeatedly subtracting powers of 2 from the decimal number. You need to have a list of powers of 2 up to the highest power of 2 that is less than or equal to the number you are converting. In our case, we are converting decimal 11, and the largest power of two less than or equal to 11 is 8 (23). Example: Convert 7510 to binary. Step 1: Start with the largest power of 2 which can be subtracted from the number to be converted. In this case the number is 75, so 64 is the largest truth table value that can be subtracted from 75. Annotate a 1 in the column under 64. Then subtract 64 from 75 to give 11. Step 2: What is the highest power of 2 that is subtractable from 11? The answer is 8. Annotate a 1 in the column under 8 and then calculate, 11 – 8 = 3. Step 3: What is the highest truth table value subtractable from 3? The answer is 2. Annotate a 1 in the column under 2 and then, finally, calculate 3 – 2 = 1. Step 4: Annotate a 1 in the column under 1, which leaves 1 – 1 = 0. Now fill in all the spaces between the 1s with 0s. © Aviation Australia Binary truth table for Seventy five base ten Therefore, 7510 = 1 001 0112. 2023-11-23 B1-05a Digital Techniques / Electronic Instrument Systems Page 25 of 286 CASA Part 66 - Training Materials Only Binary/Decimal Exercises Complete the following exercises to practice converting from binary to decimal and from decimal back to binary. 1. Count from zero to 10 using binary numbers. 2. Convert 1112 to decimal. 3. Convert 510 to binary by the division method. 4. Convert 710 to binary by the division method. 5. Convert 1710 to binary by the subtraction method. 6. Convert 2410 to binary by the subtraction method. Octal to Decimal Conversions One method is to convert the octal number to binary, and then convert the binary number to decimal, as already explained by using the binary to decimal truth table. To convert straight across, use the octal truth table. octal 8 5 8 4 8 3 2 8 8 8 1 0 truth table 32 768 4 096 512 64 8 1 decimal value Example 1: 2 051 2 0 5 1 Example 2: 1024 + 0 + 40 + 1 = 1 065 362 415 3 6 2 4 1 5 98 304+24 576+1 024+256 + 8 + 5 = 124 173 Aviation Australia Octal to decimal conversion using the octal truth table 2023-11-23 B1-05a Digital Techniques / Electronic Instrument Systems Page 26 of 286 CASA Part 66 - Training Materials Only Decimal to Octal Conversions There are two basic ways to do decimal-octal conversion. You may find one or the other easier to understand and use. Decimal to Binary to Octal (Method 1) Convert the decimal number to binary as previously explained, and then substitute each set of three binary bits for an octal digit. The advantage of this method is that if you learn how to convert everything to and from digital, you can use digital as the base system and need only remember how to convert each system to and from digital. Of the three systems we describe for converting to and from binary, decimal is the only difficult method. Both octal and hexadecimal are easily converted to and from binary. Decimal to Octal Conversion – Division (Method 2) The division method works on the same basis as the decimal to binary conversions already covered, but in this case we divide by 8. All the remainders represent the octal number. Aviation Australia Decimal to octal conversion 2023-11-23 B1-05a Digital Techniques / Electronic Instrument Systems Page 27 of 286 CASA Part 66 - Training Materials Only Decimal/Octal Exercises Complete the following exercises to practice converting from binary to decimal and from decimal back to binary. 1. Count from zero to twelve using octal numbering 2. Convert 001 0102 to octal 3. Convert 101 1102 to octal 4. Convert 118 to decimal using the octal truth table 5. Convert 258 to decimal using the octal truth table 6. Convert 2710 to octal by the division method 7. Convert 38410 to octal by the division method Hexadecimal to Decimal Conversions One method of converting hexadecimal to decimal is to convert the hexadecimal number to binary and then convert the binary number to decimal, as already explained, by using the binary to decimal truth table. To convert straight across, use the hexadecimal truth table. The hexadecimal number 20, (2 × 16) + 0, equals 32 in decimal. The hexadecimal number 9C equals (9 × 16) + 12 = 156 in decimal. hexadecimal 16 4 16 3 2 16 16 16 1 0 truth table 65 536 4096 256 16 1 decimal value Example 1: B7F2 B 7 F 2 45 656+1792+240 +2 = 47 090 Example 2: 9B82A 9 B 8 2 A 589 824 +45 656+2 048 +32 +11 =636 970 Aviation Australia Hexadecimal to decimal conversion using a truth table 2023-11-23 B1-05a Digital Techniques / Electronic Instrument Systems Page 28 of 286 CASA Part 66 - Training Materials Only Decimal to Hexadecimal Conversions To convert a decimal number to hexadecimal, it is quite difficult to use the division method and divide by 16, but it will work. Remainders higher than 9 must be represented by the appropriate letter. Decimal to Hexadecimal Conversions - Division Method Aviation Australia Decimal to hexadecimal conversions An easier method is to first convert the decimal number to binary. Convert decimal to binary using either the division or subtraction method. Substitute each set of four binary bits with a hexadecimal numeral. Example conversion 18 36510 Decimal Number (18 365) 1 8 3 6 5 Base 10 Binary (grouped in 4 digits) 0100 0111 1011 1101 Base 2 Hexadecimal 4 7 B D Base 16 Decimal Number (7 985) 7 9 8 5 Base 10 Binary (grouped in 4 digits) 0001 1111 0011 0001 Base 2 Hexadecimal 1 F 3 1 Base 16 2023-11-23 B1-05a Digital Techniques / Electronic Instrument Systems Page 29 of 286 CASA Part 66 - Training Materials Only Decimal/Hexadecimal Exercises Complete the following exercises to practice converting from hexadecimal to decimal and from decimal back to hexadecimal. 1. Count from zero to twenty using hexadecimal numbering 2. Convert 0011 00102 to hexadecimal 3. Convert 1010 11112 to hexadecimal 4. Convert 516 to decimal using the hexadecimal truth table 5. Convert 5116 to decimal using the hexadecimal truth table 6. Convert 2710 to hexadecimal by the division method 7. Convert 38410 to binary, then hexadecimal Numbering Systems Conversions Summary The following text illustrates how to convert everything to binary and vice versa. Using this common language (binary), conversions may be simpler. Aviation Australia Summary of conversions 2023-11-23 B1-05a Digital Techniques / Electronic Instrument Systems Page 30 of 286 CASA Part 66 - Training Materials Only Numbering Systems Conversions Revision Exercises Complete the following exercises to practice converting between numbering systems. 1. Convert 87910 to hexadecimal 2. Convert DEAF16 to decimal 3. Convert 110 010 0112 to octal and hexadecimal 4. Convert 2516 to octal 5. Convert 43710 to octal 6. Convert 11 3248 to decimal 2023-11-23 B1-05a Digital Techniques / Electronic Instrument Systems Page 31 of 286 CASA Part 66 - Training Materials Only

Use Quizgecko on...
Browser
Browser