Module 13  Introduction to Number Systems and Logic
Pages i  ix,
11 to 110,
111 to 120,
121 to 133,
131 to 140,
141 to 150,
151 to 160,
161 to 69,
21 to 210, 211 to 220,
221 to 230,
231 to 236,
31 to 310,
311 to 220,
321 to 330,
331 to 340,
341 to 346, Index
Step 3  Rewrite the solution from MSD to LSD: 10111_{2} No matter how large the decimal number may be, we use the same procedure. Let's try the problem below. It has a larger dividend: We can convert fractional decimal numbers by multiplying the fraction by the radix and extracting the portion of the product to the left of the radix point. Continue to multiply the fractional portion of the previous product until the desired degree of accuracy is attained. 141
Let's go through this process and convert 0.25_{10} to its binary equivalent: The first figure to the left of the radix point is the MSD, and the last figure of the computation is the LSD. Rewrite the solution from MSD to LSD preceded by the radix point as shown: .01_{2} Now try converting .625_{10} to binary: As we mentioned before, you should continue the operations until you reach the desired accuracy. For example, convert .425_{10} to five places in the binary system: 142
Although the multiplication was carried out for seven places, you would only use what is required. Write out the solution as shown: .01101_{2} To convert a mixed number such as 37.62510 to binary, split the number into its whole and fractional components and solve each one separately. In this problem carry the fractional part to four places. When the conversion of each is completed, recombine it with the radix point as shown below: 37_{10} = 100101_{2} .625_{10} = .1010_{2} 37.625_{10} = 100101.1010_{2} Convert the following decimal numbers to binary: Q48. 72_{10}. Q49. 97_{10}. Q50. 243_{10}. Q51. 0.875_{10} (four places). Q52. 0.33_{10} (four places). Q53. 17.42_{10} (five places) Decimal to Octal The conversion of a decimal number to its base 8 equivalent is done by the repeated division method. You simply divide the base 10 number by 8 and extract the remainders. The first remainder will be the LSD, and the last remainder will be the MSD. Look at the following example. To convert 15_{10} to octal, set up the problem for division: Since 8 goes into 15 one time with a 7 remainder, 7 then is the LSD. Next divide 8 into the quotient (1). The result is a 0 quotient with a 1 remainder. The 1 is the MSD: 143
Now write out the number from MSD to LSD as shown: 17_{8} The same process is used regardless of the size of the decimal number. Naturally, more divisions are needed for larger numbers, as in the following example: Convert 264_{10} to octal: By rewriting the solution, you find that the octal equivalent of 264_{10} is as follows: 410_{8} To convert a decimal fraction to octal, multiply the fraction by 8. Extract everything that appears to the left of the radix point. The first number extracted will be the MSD and will follow the radix point. The last number extracted will be the LSD. Convert 0.05_{10} to octal: 144
Write the solution from MSD to LSD: .03146_{8} You can carry the conversion out to as many places as needed, but usually four or five places are enough. To convert a mixed decimal number to its octal equivalent, split the number into whole and fractional portions and solve as shown below: Convert 105.589_{10} to octal: Combine the portions into a mixed number: 151.4554_{8} Convert the following decimal numbers to octal: Q54. 7_{10} 145
Q55. 43_{10} Q56. 499_{10} Q57. 0.951_{10} (four places). Q58. 0.004_{10} (five places). Q59. 252.17_{10} (three places). Decimal to Hex To convert a decimal number to base 16, follow the repeated division procedures you used to convert to binary and octal, only divide by 16. Let's look at an example: Convert 63_{10} to hex: Therefore, the hex equivalent of 63_{10} is 3F_{16}. You have to remember that the remainder is in base 10 and must be converted to hex if it exceeds 9. Let's work through another example: Convert 174_{10} to hex: 146
Write the solution from MSD to LSD: AE_{16} There will probably be very few times when you will have to convert a decimal fraction to a hex fraction. If the occasion should arise, the conversion is done in the same manner as binary or octal. Use the following example as a pattern: Convert 0.695_{10} to hex: The solution: .B1EB_{16} Should you have the need to convert a decimal mixed number to hex, convert the whole number and the fraction separately; then recombine for the solution. Convert the following decimal numbers to hex: Q60. 42_{10}. Q61. 83_{10}. Q62. 176_{10} . Q63. 491_{10}. Q64. 0.721_{10} (four places). The converting of binary, octal, and hex numbers to their decimal equivalents is covered as a group later in this section. 147
BINARY CONVERSION Earlier in this chapter, we mentioned that the octal and hex number systems are useful to computer programmers. It is much easier to provide data to a computer in one or the other of these systems. Likewise, it is important to be able to convert data from the computer into one or the other number systems for ease of understanding the data. Binary to Octal Look at the following numbers: 10111001001101_{2} 27115_{8} You can easily see that the octal number is much easier to say. Although the two numbers look completely different, they are equal. Since 8 is equal to 2^{3}, then one octal digit can represent three binary digits, as shown below: With the use of this principle, the conversion of a binary number is quite simple. As an example, follow the conversion of the binary number at the beginning of this section. Write out the binary number to be converted. Starting at the radix point and moving left, break the binary number into groups of three as shown. This grouping of binary numbers into groups of three is called binarycoded octal (BCO). Add 0s to the left of any MSD that will fill a group of three: Next, write down the octal equivalent of each group: 148
To convert a binary fraction to its octal equivalent, starting at the radix point and moving right, expand each digit into a group of three: Add 0s to the right of the LSD if necessary to form a group of three. Now write the octal digit for each group of three, as shown below: To convert a mixed binary number, starting at the radix point, form groups of three both right and left: Convert the following binary numbers to octal: Binary to Hex The table below shows the relationship between binary and hex numbers. You can see that four binary digits may be represented by one hex digit. This is because 16 is equal to 2^{4}. 149
Using this relationship, you can easily convert binary numbers to hex. Starting at the radix point and moving either right or left, break the number into groups of four. The grouping of binary into four bit groups is called binarycoded hexadecimal (BCH). Convert 111010011_{2} to hex: Add 0s to the left of the MSD of the whole portion of the number and to the right of the LSD of the fractional part to form a group of four. Convert .111_{2} to hex: In this case, if a 0 had not been added, the conversion would have been .7_{16}, which is incorrect. Convert the following binary numbers to hex: 150
NEETS Table of Contents
 Introduction to Matter, Energy,
and Direct Current
 Introduction to Alternating Current and Transformers
 Introduction to Circuit Protection,
Control, and Measurement
 Introduction to Electrical Conductors, Wiring
Techniques, and Schematic Reading
 Introduction to Generators and Motors
 Introduction to Electronic Emission, Tubes,
and Power Supplies
 Introduction to SolidState Devices and
Power Supplies
 Introduction to Amplifiers
 Introduction to WaveGeneration and WaveShaping
Circuits
 Introduction to Wave Propagation, Transmission
Lines, and Antennas
 Microwave Principles
 Modulation Principles
 Introduction to Number Systems and Logic Circuits
 Introduction to Microelectronics
 Principles of Synchros, Servos, and Gyros
 Introduction to Test Equipment
 RadioFrequency Communications Principles
 Radar Principles
 The Technician's Handbook, Master Glossary
 Test Methods and Practices
 Introduction to Digital Computers
 Magnetic Recording
 Introduction to Fiber Optics
