Module 13 - Introduction to Number Systems and Logic
Pages i - ix,
1-1 to 1-10,
1-11 to 1-20,
1-21 to 1-33,
1-31 to 1-40,
1-41 to 1-50,
1-51 to 1-60,
1-61 to 69,
2-1 to 2-10, 2-11 to 2-20,
2-21 to 2-30,
2-31 to 2-36,
3-1 to 3-10,
3-11 to 2-20,
3-21 to 3-30,
3-31 to 3-40,
3-41 to 3-46, Index
Table 1-2. - 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.
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, 12 may be indicated when a device is active (on), and 02 may be indicated when a device is nonactive (off).
Figure 1-1. - Binary Example
Look at the preceding figure. It illustrates a very simple binary counting device. Notice that 12 is indicated by a lighted lamp and 02 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
The sum of each of the first three combinations is obvious:
0 + 0 = 02
0 + 1 = 12
1 + 0 = 12
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 12 and 12 is 102 (spoken as one zero base two), which is equal to 210.
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 10112 and 11012.
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:
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 12, 12, 12, and 12
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:
The same situation occurs in the following example: Add 1002, 1012, and 1112
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:
Now practice what you've learned by solving the following problems:
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: 02 – 02 = 02
Rule 2: 12 – 02 = 12
Rule 3: 02 – 12 = 12
.................................... Rule 4: 12 – 12 = 12.................. 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:
Now observe the following method of borrowing across more than one column in the example, 10002 - 12:
Let's practice some subtraction by solving the following problems:
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 radix-1 or R's-1 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:
Now let's look at the number system that most computers use, the binary system. Just as the decimal system, had the nines (R's-1) and tens (R's) complement, the binary system has two types of complement methods. These two types are the ones (R's-1) complement and the twos (R's) complement. The binary system R's-1 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's-1 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.
.................. 1001002 R's-1 complement
There are two methods of achieving the R's complement. In the first method we perform the R's-1 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 101011012:
The second method of obtaining the R's complement will be demonstrated on the binary number 001011011002.
Step 1 - Start with the LSD, working to the MSD, writing the digits as they are up to and including the first one.
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 Solid-State Devices and
- Introduction to Amplifiers
- Introduction to Wave-Generation and Wave-Shaping
- 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
- Radio-Frequency Communications Principles
- Radar Principles
- The Technician's Handbook, Master Glossary
- Test Methods and Practices
- Introduction to Digital Computers
- Magnetic Recording
- Introduction to Fiber Optics