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 12.  Decimal and Binary Comparison MSD and LSD When you're determining the MSD and LSD for binary numbers, use the same guidelines you used with the decimal system. As you read from left to right, the first nonzero digit you encounter is the MSD, and the last nonzero digit is the LSD. If the number is a whole number, then the first digit to the left of the radix point is the LSD. 111
Here, as in the decimal system, the MSD is the digit that will have the most effect on the number; the LSD is the digit that will have the least effect on the number. The two numerals of the binary system (1 and 0) can easily be represented by many electrical or electronic devices. For example, 1_{2} may be indicated when a device is active (on), and 0_{2} may be indicated when a device is nonactive (off). Figure 11.  Binary Example Look at the preceding figure. It illustrates a very simple binary counting device. Notice that 1_{2} is indicated by a lighted lamp and 0_{2} is indicated by an unlighted lamp. The reverse will work equally well. The unlighted state of the lamp can be used to represent a binary 1 condition, and the lighted state can represent the binary 0 condition. Both methods are used in digital computer applications. Many other devices are used to represent binary conditions. They include switches, relays, diodes, transistors, and integrated circuits (ICs). Addition of Binary Numbers Addition of binary numbers is basically the same as addition of decimal numbers. Each system has an augend, an addend, a sum, and carries. The following example will refresh your memory: Since only two symbols, 0 and 1, are used with the binary system, only four combinations of addition are possible. 0 + 0 1 + 0 0 + 1 1 + 1 112
The sum of each of the first three combinations is obvious: 0 + 0 = 0_{2} 0 + 1 = 1_{2} 1 + 0 = 1_{2} The fourth combination presents a different situation. The sum of 1 and 1 in any other number system is 2, but the numeral 2 does not exist in the binary system. Therefore, the sum of 1_{2} and 1_{2} is 10_{2} (spoken as one zero base two), which is equal to 2_{10}. Study the following examples using the four combinations mentioned above: When a carry is produced, it is noted in the column of the next higher value or in the column immediately to the left of the one that produced the carry. Example: Add 1011_{2} and 1101_{2}. Solution: Write out the problem as shown: As we noted previously, the sum of 1 and 1 is 2, which cannot be expressed as a single digit in the binary system. Therefore, the sum of 1 and 1 produces a carry: 113
The following steps, with the carry indicated, show the completion of the addition: When the carry is added, it is marked through to prevent adding it twice. In the final step the remaining carry is brought down to the sum. In the following example you will see that more than one carry may be produced by a single column. This is something that does not occur in the decimal system. Example: Add 1_{2}, 1_{2}, 1_{2}, and 1_{2} The sum of the augend and the first addend is 0 with a carry. The sum of the second and third addends is also 0 with a carry. At this point the solution resembles the following example: The sum of the carries is 0 with a carry, so the sum of the problem is as follows: 114
The same situation occurs in the following example: Add 100_{2}, 101_{2}, and 111_{2} As in the previous example, the sum of the four 1s is 0 with two carries, and the sum of the two carries is 0 with one carry. The final solution will look like this: In the addition of binary numbers, you should remember the following binary addition rules: 115
Now practice what you've learned by solving the following problems: Q9. Q10. Q11. Q12. Q13. 116
Q14. Subtraction of Binary Numbers Now that you are familiar with the addition of binary numbers, subtraction will be easy. The following are the four rules that you must observe when subtracting: Rule 1: 0_{2} – 0_{2} = 0_{2} Rule 2: 1_{2} – 0_{2} = 1_{2} Rule 3: 0_{2} – 1_{2} = 1_{2} .................................... Rule 4: 1_{2} – 1_{2} = 1_{2}.................. with a borrow The following example (101102  11002) demonstrates the four rules of binary subtraction: Rule 4 presents a different situation because you cannot subtract 1 from 0. Since you cannot subtract 1 from 0 and have a positive difference, you must borrow the 1 from the next higher order column of the minuend. The borrow may be indicated as shown below: 117
Now observe the following method of borrowing across more than one column in the example, 1000_{2}  1_{2}: Let's practice some subtraction by solving the following problems: Q15. Subtract: Q16. Subtract: Q17. Subtract: 118
Q18. Subtract: Q19. Subtract: Q20. Subtract: Complementary Subtraction If you do any work with computers, you will soon find out that most digital systems cannot subtract¾they can only add. You are going to need a method of adding that gives the results of subtraction. Does that sound confusing? Really, it is quite simple. A COMPLEMENT is used for our subtractions. A complement is something used to complete something else. In most number systems you will find two types of complements. The first is the amount necessary to complete a number up to the highest number in the number system. In the decimal system, this would be the difference between a given number and all 9s. This is called the nines complement or the radix1 or R's1 complement. As an example, the nines complement of 254 is 999 minus 254, or 745. The second type of complement is the difference between a number and the next higher power of the number base. As an example, the next higher power of 10 above 999 is 1,000. The difference between 1,000 and 254 is 746. This is called the tens complement in the decimal number system. It is also called the radix or R's complement. We will use complements to subtract. Let's look at the magic of this process. There are three important points we should mention before we start: (1) Never complement the minuend in a problem, (2) always disregard any carry beyond the number of positions of the largest of the original numbers, and (3) add the R's complement of the original subtrahend to the original minuend. This will have the same effect as subtracting the original number. Let's look at a base ten example in which we subtract 38 from 59: 119
Now let's look at the number system that most computers use, the binary system. Just as the decimal system, had the nines (R's1) and tens (R's) complement, the binary system has two types of complement methods. These two types are the ones (R's1) complement and the twos (R's) complement. The binary system R's1 complement is the difference between the binary number and all 1s. The R's complement is the difference between the binary number and the next higher power of 2. Let's look at a quick and easy way to form the R's1 complement. To do this, change each 1 in the original number to 0 and each 0 in the original number to 1 as has been done in the example below. 1011011_{2} .................. 100100_{2} R's1 complement There are two methods of achieving the R's complement. In the first method we perform the R's1 complement and then add 1. This is much easier than subtracting the original number from the next higher power of 2. If you had subtracted, you would have had to borrow. Saying it another way, to reach the R's complement of any binary number, change all 1s to 0s and all 0s to 1s, and then add 1. As an example let's determine the R's complement of 10101101_{2}: The second method of obtaining the R's complement will be demonstrated on the binary number 00101101100_{2}. Step 1  Start with the LSD, working to the MSD, writing the digits as they are up to and including the first one. 120
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
