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
Table 15.  Binary and Hexadecimal Comparison Unit and Number As in each of the previous number systems, a unit stands for a single object. A number in the hex system is the symbol used to represent a unit or quantity. The Arabic numerals 0 through 9 are used along with the first six letters of the alphabet. You have probably used letters in math problems to represent unknown quantities, but in the hex system A, B, C, D, E, and F, each have a definite value as shown below: 131
Base (Radix) The base, or radix, of this system is 16, which represents the number of symbols used in the system. A quantity expressed in hex will be annotated by the subscript 16, as shown below: A3EF_{16} Positional Notation Like the binary, octal, and decimal systems, the hex system is a positional notation system. Powers of 16 are used for the positional values of a number. The following bar graph shows the positions: 16^{3} 16^{2} 16^{1} 160 • ^{1} 16^{2} 16^{3} Multiplying the base times itself the number of times indicated by the exponent will show the equivalent decimal value: 132
You can see from the positional values that usually fewer symbol positions are required to express a number in hex than in decimal. The following example shows this comparison: 625_{16} is equal to 1573_{10} MSD and LSD The most significant and least significant digits will be determined in the same manner as the other number systems. The following examples show the MSD and LSD of whole, fractional, and mixed hex numbers: Addition of Hex Numbers The addition of hex numbers may seem intimidating at first glance, but it is no different than addition in any other number system. The same rules apply. Certain combinations of symbols produce a carry while others do not. Some numerals combine to produce a sum represented by a letter. After a little practice you will be as confident adding hex numbers as you are adding decimal numbers. Study the hex addition table in table 16. Using the table, add 7 and 7. Locate the number 7 in both columns X and Y. The point in area Z where these two columns intersect is the sum; in this case 7 + 7 = E. As long as the sum of two numbers is 15_{10} or less, only one symbol is used for the sum. A carry will be produced when the sum of two numbers is 16_{10} or greater, as in the following examples: 133
Table 16.  Hexadecimal Addition Table Use the addition table and follow the solution of the following problems: In this example each column is straight addition with no carry. Now add the addend (784_{16}) and the sum (BDA_{16}) of the previous problem: Here the sum of 4 and A is E. Adding 8 and D is 15_{16}; write down 5 and carry a 1. Add the first carry to the 7 in the next column and add the sum, 8, to B. The result is 13_{16}; write down 3 and carry a 1. Since only the last carry is left to add, bring it down to complete the problem. Now observe the procedures for a more complex addition problem. You may find it easier to add the Arabic numerals in each column first: 134
The sum of 4, E, 1, and 3 in the first column is 16_{16.} Write down the 6 and the carry. In the second column, 1, 1, 9, and 7 equals 12_{16}. Write the carry over the next column. Add B and 2  the sum is D. Write this in the sum line. Now add the final column, 1, 1, 5, and C. The sum is 13_{16}. Write down the carry; then add 3 and B  the sum is E. Write down the E and bring down the final carry to complete the problem. Now solve the following addition problems: Q36. Add: Q37. Add: Q38. Add: Q39. Add: Q40. Add: 135
Q41. Add: Subtraction of Hex Numbers The subtraction of hex numbers looks more difficult than it really is. In the preceding sections you learned all the rules for subtraction. Now you need only to apply those rules to a new number system. The symbols may be different and the amount of the borrow is different, but the rules remain the same. Use the hex addition table (table 16) to follow the solution of the following problems: Working from left to right, first locate the subtrahend (2) in column Y. Follow this line across area Z until you reach C. The difference is located in column X directly above the C  in this case A. Use this same procedure to reach the solution: Now examine the following solutions: In the previous example, when F was subtracted from 1E, a borrow was used. Since you cannot subtract F from E and have a positive difference, a borrow of 10_{16} was taken from the next higher value column. The borrow was added to E, and the higher value column was reduced by 1. The following example shows the use of the borrow in a more difficult problem: 136
In this first step, B cannot be subtracted from 7, so you take a borrow of 10_{16} from the next higher value column. Add the borrow to the 7 in the minuend; then subtract (17_{16} minus B_{16} equals C_{16}). Reduce the number from which the borrow was taken (3) by 1. To subtract 4_{16} from 2_{16} also requires a borrow, as shown below: Borrow 10_{16} from the A and reduce the minuend by 1. Add the borrow to the 2 and subtract 4_{16} from 12_{16}. The difference is E. When solved the problem looks like this: Remember that the borrow is 10_{16} not 10_{10}. There may be times when you need to borrow from a column that has a 0 in the minuend. In that case, you borrow from the next highest value column, which will provide you with a value in the 0 column that you can borrow from. To subtract A from 7, you must borrow. To borrow you must first borrow from the 2. The 0 becomes 10_{16}, which can give up a borrow. Reduce the 10_{16} by 1 to provide a borrow for the 7. Reducing 10_{16} by 1 equals F. Subtracting A_{16} from 17_{16} gives you D16. Bring down the 1 and F for a difference of 1FD_{16}. Now let's practice what we've learned by solving the following hex subtraction problems: 137
Q42. Subtract: Q43. Subtract: Q44. Subtract: Q45. Subtract: Q46. Subtract: Q47. Subtract: CONVERSION OF BASES We mentioned in the introduction to this chapter that digital computers operate on electrical pulses. These pulses or the absence of, are easily represented by binary numbers. A pulse can represent a binary 1, and the lack of a pulse can represent a binary 0 or vice versa. 138
The sections of this chapter that discussed octal and hex numbers both mentioned that their number systems were beneficial to programmers. You will see later in this section that octal and hex numbers are easily converted to binary numbers and vice versa.. If you are going to work with computers, there will be many times when it will be necessary to convert decimal numbers to binary, octal, and hex numbers. You will also have to be able to convert binary, octal, and hex numbers to decimal numbers. Converting each number system to each of the others will be explained. This will prepare you for converting from any base to any other base when needed. DECIMAL CONVERSION Some computer systems have the capability to convert decimal numbers to binary numbers. They do this by using additional circuitry. Many of these systems require that the decimal numbers be converted to another form before entry. Decimal to Binary Conversion of a decimal number to any other base is accomplished by dividing the decimal number by the radix of the system you are converting to. The following definitions identify the basic terms used in division: · DIVIDEND  The number to be divided · DIVISOR  The number by which a dividend is divided · QUOTIENT  The number resulting from the division of one number by another · REMAINDER  The final undivided part after division that is less or of a lower degree than the divisor To convert a base 10 whole number to its binary equivalent, first set up the problem for division: Step 1  Divide the base 10 number by the radix (2) of the binary system and extract the remainder (this becomes the binary number's LSD). Step 2  Continue the division by dividing the quotient of step 1 by the radix (2 139
Step 3  Continue dividing quotients by the radix until the quotient becomes smaller that the divisor; then do one more division. The remainder is our MSD. The remainder in step 1 is our LSD. Now rewrite the solution, and you will see that 5_{10} equals 10_{12}. Now follow the conversion of 23_{10} to binary: Step 1  Set up the problem for division: Step 2  Divide the number and extract the remainder: 140
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
