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-5. - 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:
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:
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:
163 162 161 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:
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:
62516 is equal to 157310
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 1-6. 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 1510 or less, only one symbol is used for the sum. A carry will be produced when the sum of two numbers is 1610 or greater, as in the following examples:
Table 1-6. - 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 (78416) and the sum (BDA16) of the previous problem:
Here the sum of 4 and A is E. Adding 8 and D is 1516; 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 1316; 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:
The sum of 4, E, 1, and 3 in the first column is 1616. Write down the 6 and the carry. In the second column, 1, 1, 9, and 7 equals 1216. 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 1316. 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:
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 1-6) 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 1016 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:
In this first step, B cannot be subtracted from 7, so you take a borrow of 1016 from the next higher value column. Add the borrow to the 7 in the minuend; then subtract (1716 minus B16 equals C16). Reduce the number from which the borrow was taken (3) by 1.
To subtract 416 from 216 also requires a borrow, as shown below:
Borrow 1016 from the A and reduce the minuend by 1. Add the borrow to the 2 and subtract 416 from
1216. The difference is E.
When solved the problem looks like this:
Remember that the borrow is 1016 not 1010.
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 1016, which can give up a borrow. Reduce the 1016 by 1 to provide a borrow for the 7. Reducing 1016 by 1 equals F. Subtracting A16 from 1716 gives you D16. Bring down the 1 and F for a difference of 1FD16.
Now let's practice what we've learned by solving the following hex subtraction problems:
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.
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.
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
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 510 equals 1012. Now follow the conversion of 2310 to binary:
Step 1 - Set up the problem for division:
Step 2 - Divide the number and extract the remainder:
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