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 2  Now R's1 complement the remaining digits: Now let's R's complement the same number using both methods: Now let's do some subtracting by using the R's complement method. We will go through the subtraction of 3_{10} from 9_{10} (0011_{2}from 1001_{2}): Step 1  Leave the minuend alone: 1001_{2} remains 1001_{2} Step 2  Using either method, R's complement the subtrahend: 1101_{2} R's complement of subtrahend Step 3  Add the R's complement found in step 2 to the minuend of the original problem: 121
Step 4  Remember to discard any carry beyond the size of the original number. Our original problem had four digits, so we discard the carry that expanded the difference to five digits. This carry we disregard is significant to the computer. It indicates that the difference is positive. Because we have a carry, we can read the difference directly without any further computations. Let's check our answer: If we do not have a carry, it indicates the difference is a negative number. In that case, the difference must be R's complemented to produce the correct answer. Let's look at an example that will explain this for you. Subtract 9_{10} from 5_{10} (1001_{2} from 0101_{2}): Step 1  Leave the minuend alone: 0101_{2} remains 0101_{2} Step 2  R's complement the subtrahend: 0111_{2} R's complement of subtrahend Step 3  Add the R's complement found in step 2 to the minuend of the original problem: Step 4  We do not have a carry; and this tells us, and any computer, that our difference (answer) is negative. With no carry, we must R's complement the difference in step 3. We will then have arrived at the answer (difference) to our original problem. Let's do this R's complement step and then check our answer: 0100_{2} R's complement of difference in step 3 Remember, we had no carry in step 3. That showed us our answer was going to be negative. Make sure you indicate the difference is negative. Let's check the answer to our problem: 122
Try solving a few subtraction problems by using the complement method: Q21. Subtract: Q22. Subtract: Q23. Subtract: OCTAL NUMBER SYSTEM The octal, or base 8, number system is a common system used with computers. Because of its relationship with the binary system, it is useful in programming some types of computers. Look closely at the comparison of binary and octal number systems in table 13. You can see that one octal digit is the equivalent value of three binary digits. The following examples of the conversion of octal 2258 to binary and back again further illustrate this comparison: 123
Table 13.  Binary and Octal Comparison Unit and Number The terms that you learned in the decimal and binary sections are also used with the octal system. The unit remains a single object, and the number is still a symbol used to represent one or more units. Base (Radix) As with the other systems, the radix, or base, is the number of symbols used in the system. The octal system uses eight symbols  0 through 7. The base, or radix, is indicated by the subscript 8. Positional Notation The octal number system is a positional notation number system. Just as the decimal system uses powers of 10 and the binary system uses powers of 2, the octal system uses power of 8 to determine the value of a number's position. The following bar graph shows the positions and the power of the base: 8^{3} 8^{2} 8^{1} 8^{0} • ^{1} 8^{2} 8^{3} 124
Remember, that the power, or exponent, indicates the number of times the base is multiplied by itself. The value of this multiplication is expressed in base 10 as shown below: All numbers to the left of the radix point are whole numbers, and those to the right are fractional numbers. MSD and LSD When determining the most and least significant digits in an octal number, use the same rules that you used with the other number systems. The digit farthest to the left of the radix point is the MSD, and the one farthest right of the radix point is the LSD. Example: If the number is a whole number, the MSD is the nonzero digit farthest to the left of the radix point and the LSD is the digit immediately to the left of the radix point. Conversely, if the number is a fraction only, the nonzero digit closest to the radix point is the MSD and the LSD is the nonzero digit farthest to the right of the radix point. Addition of Octal Numbers The addition of octal numbers is not difficult provided you remember that anytime the sum of two digits exceeds 7, a carry is produced. Compare the two examples shown below: 125
The octal addition table in table 14 will be of benefit to you until you are accustomed to adding octal numbers. To use the table, simply follow the directions used in this example: Add: 6_{8} and 5_{8} Table 14.  Octal Addition Table Locate the 6 in the X column of the figure. Next locate the 5 in the Y column. The point in area Z where these two columns intersect is the sum. Therefore, If you use the concepts of addition you have already learned, you are ready to add octal numbers. Work through the solutions to the following problems: 126
As was mentioned earlier in this section, each time the sum of a column of numbers exceeds 7, a carry is produced. More than one carry may be produced if there are three or more numbers to be added, as in this example: The sum of the augend and the first addend is 6_{8} with a carry. The sum of 6_{8} and the second addend is 5_{8} with a carry. You should write down the 5_{8} and add the two carries and bring them down to the sum, as shown below: Now let's try some practice problems: Q24. Add: Q25. Add: 127
Q26. Add: Q27. Add: Q28. Add Q29. Add: Subtraction of Octal Numbers The subtraction of octal numbers follows the same rules as the subtraction of numbers in any other number system. The only variation is in the quantity of the borrow. In the decimal system, you had to borrow a group of 1010. In the binary system, you borrowed a group of 210. In the octal system you will borrow a group of 810. Consider the subtraction of 1 from 10 in decimal, binary, and octal number systems: 128
In each example, you cannot subtract 1 from 0 and have a positive difference. You must use a borrow from the next column of numbers. Let's examine the above problems and show the borrow as a decimal quantity for clarity: When you use the borrow, the column you borrow from is reduced by 1, and the amount of the borrow is added to the column of the minuend being subtracted. The following examples show this procedure: In the octal example 7_{8} cannot be subtracted from 6_{8}, so you must borrow from the 4. Reduce the 4 by 1 and add 10_{8} (the borrow) to the 6_{8} in the minuend. By subtracting 7_{8} from 16_{8}, you get a difference of 7_{8}. Write this number in the difference line and bring down the 3. You may need to refer to table 14, the octal addition table, until you are familiar with octal numbers. To use the table for subtraction, follow these directions. Locate the subtrahend in column Y. Now find where this line intersects with the minuend in area Z. The remainder, or difference, will be in row X directly above this point. Do the following problems to practice your octal subtraction: Q30. Subtract: Q31. Subtract: 129
Q32. Subtract: Q33. Subtract: Q34. Subtract: Q35. Subtract: Check your answers by adding the subtrahend and difference for each problem. HEXADECIMAL (HEX) NUMBER SYSTEM The hex number system is a more complex system in use with computers. The name is derived from the fact the system uses 16 symbols. It is beneficial in computer programming because of its relationship to the binary system. Since 16 in the decimal system is the fourth power of 2 (or 2^{4}); one hex digit has a value equal to four binary digits. Table 15 shows the relationship between the two systems. 130
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
