Electronics World articles Popular Electronics articles QST articles Radio & TV News articles Radio-Craft articles Radio-Electronics articles Short Wave Craft articles Wireless World articles Google Search of RF Cafe website Sitemap Electronics Equations Mathematics Equations Equations physics Manufacturers & distributors Engineer Jobs LinkedIn Crosswords Engineering Humor Kirt's Cogitations Engineering Event Calendar RF Engineering Quizzes USAF radar shop Notable Quotes App Notes Calculators Education Engineering Magazines Engineering magazine articles Engineering software Engineering smorgasbord RF Cafe Archives RF Cascade Workbook 2018 RF Stencils for Visio RF & EE Shapes for Word Advertising RF Cafe Homepage Sudoku puzzles Thank you for visiting RF Cafe!
Innovative Power Products Couplers

Module 13 - Introduction to Number Systems and Logic
Navy Electricity and Electronics Training Series (NEETS)
Chapter 1:  Pages 1-51 through 1-60

 

 

Q76.   110111.0101012.
 
OCTAL CONVERSION
 
The conversion of one number system to another, as we explained earlier, is done to simplify computer programming or interpreting of data.
 
Octal to Binary
 
For some computers to accept octal data, the octal digits must be converted to binary. This process is the reverse of binary to octal conversion.
 
To convert a given octal number to binary, write out the octal number in the following format. We will convert octal 5678:

 

Octal to Binary - RF Cafe

 

Next, below each octal digit write the corresponding three-digit binary-coded octal equivalent:

 

Octal to Binary - RF Cafe

 

 Solution: 5678  equals 101 110 1112
 
Remove the conversion from the format:

 

1011101112

 

As you gain experience, it may not be necessary to use the block format.
 
An octal fraction (.1238) is converted in the same manner, as shown below:

 

Octal to Binary - RF Cafe

 

Solution: .1238  equals .0010100112
 
Apply these principles to convert mixed numbers as well.
 
Convert 32.258  to binary:

 

Octal to Binary - RF Cafe

 

 

1-51


Solution: 32.258  equals 011010.0101012
 
Convert the following numbers to binary:
 
 Octal to Binary - RF Cafe
 
Octal to Hex
 
You will probably not run into many occasions that call for the conversion of octal numbers to hex. Should the need arise, conversion is a two-step procedure. Convert the octal number to binary; then convert the binary number to hex. The steps to convert 53.78  to hex are shown below:

 

Octal to Hex - RF Cafe

 

Regroup the binary digits into groups of four and add zeros where needed to complete groups; then convert the binary to hex.

 

Octal to Hex - RF Cafe

 

Solution: 53.78  equals 2B.E16
 
Convert the following numbers to hex:
 
 Octal to Hex - RF Cafe
 
HEX CONVERSION
 
The procedures for converting hex numbers to binary and octal are the reverse of the binary and octal conversions to hex.

 

 

1-52


Hex to Binary
 
To convert a hex number to binary, set up the number in the block format you used in earlier conversions. Below each hex digit, write the four-digit binary equivalent. Observe the following example:
 
Convert ABC16  to binary:

 

Hex to Binary - RF Cafe

 

Solution: ABC16  = 1010101111002
 
Hex to Octal
 
Just like the conversion of octal to hex, conversion of hex to octal is a two-step procedure. First, convert the hex number to binary; and second, convert the binary number to octal. Let's use the same example we used above in the hex to binary conversion and convert it to octal:

 

Hex to Binary - RF Cafe

 

Convert these base 16 numbers to their equivalent base 2 and base 8 numbers:
 
Q87.   2316
 
Q88.   1B16
 
Q89.   0.E416
 
Q90.   45.A16
 
 
 
CONVERSION TO DECIMAL
 
Computer data will have little meaning to you if you are not familiar with the various number systems. It is often necessary to convert those binary, octal, or hex numbers to decimal numbers. The need for understanding is better illustrated by showing you a paycheck printed in binary. A check in the amount of $10,010,101.002  looks impressive but in reality only amounts to $149.0010

 

 

1-53


Binary to Decimal
 
The computer that calculates your pay probably operates with binary numbers, so a conversion takes place in the computer before the amount is printed on your check. Some computers, however, don't automatically convert from binary to decimal. There may be times when you must convert mathematically.
 
To convert a base 2 number to base 10, you must know the decimal equivalent of each power of 2. The decimal value of a power of 2 is obtained by multiplying 2 by itself the number of times indicated by the exponent for whole numbers; for example, 24  = 2 x 2 x 2 x 2 or 1610.
 
For fractional numbers, the decimal value is equal to 1 divided by 2 multiplied by itself the number of times indicated by the exponent. Look at this example:

 

Binary to Decimal - RF Cafe

 

The table below shows a portion of the positions and decimal values of the binary system:

 

Binary to Decimal - RF Cafe

 

Remember, earlier in this chapter you learned that any number to the 0 power is equal to 110.
 
Another method of determining the decimal value of a position is to multiply the preceding value by
2 for whole numbers and to divide the preceding value by 2 for fractional numbers, as shown below:

 

Binary to Decimal - RF Cafe

 

Let's convert a binary number to decimal by using the positional notation method. First, write out the number to be converted; then, write in the decimal equivalent for each position with a 1 indicated. Add these values to determine the decimal equivalent of the binary number. Look at our example:

 

 

1-54


 

 

Binary to Decimal - RF Cafe

 

You may want to write the decimal equivalent for each position as we did in the following example. Add only the values indicated by a 1.

 

Binary to Decimal - RF Cafe

 

You should make sure that the decimal values for each position are properly aligned before adding. For practice let's convert these binary numbers to decimal:
 
 Binary to Decimal - RF Cafe
 
Octal to Decimal
 
Conversion of octal numbers to decimal is best done by the positional notation method. This process is the one we used to convert binary numbers to decimal.
 
First, determine the decimal equivalent for each position by multiplying 8 by itself the number of times indicated by the exponent. Set up a bar graph of the positions and values as shown below:

 

 

1-55


 

 

Octal to Decimal - RF Cafe

 

To convert an octal number to decimal, write out the number to be converted, placing each digit under the proper position.
 
Example:

 

Octal to Decimal - RF Cafe

 

Next, multiply the decimal equivalent by the corresponding digit of the octal number; then, add this column of figures for the final solution:

 

Octal to Decimal - RF Cafe

 

Solution: 7438  is equal to 48310
 
Now follow the conversion of 265258  to decimal:

 

Octal to Decimal - RF Cafe

 

Solution: 11,60510  is the decimal equivalent of 26,5258
To convert a fraction or a mixed number, simply use the same procedure. Example: Change .58  to decimal:

 

 

1-56


 

 

Octal to Decimal - RF Cafe

 

Example: Convert 24.368  to decimal:

 

Octal to Decimal - RF Cafe

 

Solution: 24.368  equals 20.4687510
 
If your prefer or find it easier, you may want to convert the octal number to binary and then to decimal.
 
Convert the following numbers to decimal:
 
 Octal to Decimal - RF Cafe
 
Hex to Decimal
 
It is difficult to comprehend the magnitude of a base 16 number until it is presented in base 10; for instance, E016  is equal to 22410. You must remember that usually fewer digits are necessary to represent a decimal value in base 16.
 
When you convert from base 16 to decimal, you may use the positional notation system for the powers of 16 (a bar graph). You can also convert the base 16 number to binary and then convert to base
10.
 
Note in the bar graph below that each power of 16 results in a tremendous increase in the decimal equivalent. Only one negative power (16-1) is shown for demonstration purposes:

 

 

1-57


 

 

Hex to Decimal - RF Cafe

 

Just as you did with octal conversion, write out the hex number, placing each digit under the appropriate decimal value for that position. Multiply the decimal value by the base 16 digit and add the values. (Convert A through F to their decimal equivalent before multiplying). Let's take a look at an example.
 
Convert 2C16  to decimal:

 

Hex to Decimal - RF Cafe

 

The decimal equivalent of 2C16  is 4410.

Use the same procedure we used with binary and octal to convert base 16 fractions to decimal.

If you choose to convert the hex number to binary and then to decimal, the solution will look like this:

 

Hex to Decimal - RF Cafe

 

Convert these base 16 numbers to base 10:
 
Q103.   2416
 
Q104.   A516
 
Q105.   DB16

 

 

1-58


Q106.   3E6.516
 
 
 
BINARY-CODED DECIMAL
 
In today's technology, you hear a great deal about microprocessors. A microprocessor is an integrated circuit designed for two purposes: data processing and control.
 
Computers and microprocessors both operate on a series of electrical pulses called words. A word can be represented by a binary number such as 101100112. The word length is described by the number of digits or BITS in the series. A series of four digits would be called a 4-bit word and so forth. The most common are 4-, 8-, and 16-bit words. Quite often, these words must use binary-coded decimal inputs.
 
Binary-coded decimal, or BCD, is a method of using binary digits to represent the decimal digits 0 through 9. A decimal digit is represented by four binary digits, as shown below:

 

Binary-coded decimal - RF Cafe

 

decimal digit. Since many devices use BCD, knowing how to handle this system is important. You must realize that BCD and binary are not the same. For example, 4910  in binary is 1100012, but 4910  in BCD is 01001001BCD. Each decimal digit is converted to its binary equivalent.
 
BCD Conversion
 
You can see by the above table, conversion of decimal to BCD or BCD to decimal is similar to the conversion of hexadecimal to binary and vice versa.
 
For example, let's go through the conversion of 26410  to BCD. We'll use the block format that you used in earlier conversions. First, write out the decimal number to be converted; then, below each digit write the BCD equivalent of that digit:

 

 

1-59


 

 

BCD Conversion - RF Cafe

 

The BCD equivalent of 26410  is 001001100100BCD. To convert from BCD to decimal, simply reverse the process as shown:

 

BCD Conversion - RF Cafe

 

BCD Addition
 
The procedures followed in adding BCD are the same as those used in binary. There is, however, the possibility that addition of BCD values will result in invalid totals. The following example shows this:
 
Add 9 and 6 in BCD:

 

BCD Conversion - RF Cafe

 

The sum 11112  is the binary equivalent of 1510; however, 1111 is not a valid BCD number. You cannot exceed 1001 in BCD, so a correction factor must be made. To do this, you add 610  (0110BCD) to the sum of the two numbers. The "add 6" correction factor is added to any BCD group larger than 10012. Remember, there is no 10102, 10112, 11002, 11012, 11102, or 11112 in BCD:

 

BCD Conversion - RF Cafe

 

The sum plus the add 6 correction factor can then be converted back to decimal to check the answer. Put any carries that were developed in the add 6 process into a new 4-bit word:

 

BCD Conversion - RF Cafe

 

Now observe the addition of 6010  and 5510 in BCD: 

 

 

1-60



NEETS Table of Contents

Windfreak Technologies MPDevice microwave devices - RF Cafe
Res-Net Microwave - RF Cafe
About RF Cafe
Kirt Blattenberger - RF Cafe Webmaster
Copyright: 1996 - 2024
Webmaster:
    Kirt Blattenberger,
    BSEE - KB3UON

RF Cafe began life in 1996 as "RF Tools" in an AOL screen name web space totaling 2 MB. Its primary purpose was to provide me with ready access to commonly needed formulas and reference material while performing my work as an RF system and circuit design engineer. The Internet was still largely an unknown entity at the time and not much was available in the form of WYSIWYG ...

All trademarks, copyrights, patents, and other rights of ownership to images and text used on the RF Cafe website are hereby acknowledged.

My Hobby Website:  AirplanesAndRockets.com

spacer