Admissions Academic Programs Student Information AQIP/Mission/Foundation/Other Helpful Links Student Support Kern Center Lifelong Learning Student Portal/Catalog Information
Academics
Academic Program information Distance Learning Class information Faculty Portal Cooperative Education/Coop Jobs information TechPrep Program information

  

 

Session Five

Welcome to the fifth section of MTH140, Number bases.  In this session you will learn how to convert binary numbers to other bases.

Begin this session by watching the video tape.  If you have purchased a textbook, follow along in your book. If you are using the Internet version, follow along on the webpage. If you have any difficulties, contact your instructor.  After the explanation of converting binary numbers to decimal numbers, turn off the video player and try to work the practice problems.  Once you have worked the problems, check your answers in the answer key listed in the back of your book or click of the Answer Key links at the end of every section.

Section Five

Converting Binary Numbers To Other Bases

Sometimes, we may want to know the value of a binary number in another number system. When binary numbers were first introduced, we said that the number 102 is the same as the decimal number two. Since the number two represents the same value in the octal, hexadecimal and decimal system, we could say that 102 = 28 = 216=210. (We don't usually write the base on any decimal number since it is understood.) We need to have some system of converting numbers from one number system to another.

5.1~ Converting Binary to Decimal

We have shown how to write a binary number in expanded notation. It is a simple process to convert a binary number in expanded notation to decimal notation merely by evaluating the powers of two.

The number 1012 is in standard binary notation. If we looked at the number 1012 and wrote it in a different way, we might put the information in a table such as the one shown in Table 1 ~ 5.1

Table 1 ~ 5.1 

Digit Power of Two = Value
1

20 or 1 =

12

0

21 or 2 =

002

1

22 or 4 =

1002

Total Value 1012

Notice that numbers in the value column are all powers of two. If we wrote the number 101 without using the chart, it would be written as 1 x 1 + 0 x 2 + 1 x 4 . Evaluating that expression following the order of operations yields 1 + 0 + 4 or a value of 5. This means that the binary number 1012 is the same as the decimal number 5.

We may want to count in base two. We could put the information in a table to show the first twenty numbers in the binary system. These numbers would correspond to the first twenty numbers in the decimal system.

 Table 2 ~ 5.1

Binary Number Decimal Number 1 1 10 2 11 3 100 4 101 5 110 6 111 7 1000 8 1001 9 1010 10 1011 11 1100 12 1101 13 1110 14 1111 15 10000 16 10001 17 10010 18 10011 19 10100 20

It would be quite time-consuming to make a chart for all of the decimal values that correspond to a binary number. Students may memorize some of the values merely because some values are encountered quite often. It is not necessary to memorize the table, however, since converting the binary number to expanded notation and then evaluating the number can be done quite easily.

Example: Convert 110012 to a decimal number.

Solution: First, identify the value of each digit. The first digit on the right, the digit 1 is in the units or the two to the zero power place; the next digit 0, is in the twos or two to the first power place; the next digit 0, is in the fours or two to the second power place; the next digit 1 is in the eights or two to the third power place; the final digit 1 is in the sixteens or two to the fourth power place.Table 5.1.3

Digit Power of Two = Value 1

20 or 1 =

12

0

21 or 2 =

002

0

22 or 4 =

0002

1

23 or 8 =

10002

1

24 or 16 =

100002

Total Value 110012

If we wrote the number without using the chart, the number would be

1 x 20 + 0 x 21 + 0 x 22 + 1 x 23 + 1 x 24

or 1 x 1 + 0 x 2 + 0 x 4 + 1 x 8 + 1 x 16

Following the order of operations, this becomes 1 + 0 + 0 + 8 + 16 which equals 25. This means that 110012 is the same as the decimal number 25.

 5.1 ~ Practice Problems

Directions: Turn off your VCR. Convert the following binary numbers to decimal numbers.  When you have finished working the problems, check your answers in the back of the book or click here to view the Answer Key.  Turn on your VCR to view the solutions to the practice problems worked out on the board by the teacher.

  1. 11112
  2. 1000112
  3. 102
  4. 12
  5. 101110112

 5.1 ~ Homework Problems

Directions: Turn off your VCR.  Convert the following binary numbers to decimal numbers.  Keep your work in a notebook to be turned into your instructor at the conclusion of the course.  When you have completed the problems, check your answers in the back of the book or by clicking the ANSWER KEY button found on the left hand side of your screen.  You may also access the Answer Key by clicking here.  If you have any questions, contact your instructor.

  1. 1002
  2. 101112.
  3. 11101012
  4. 1112
  5. 1101101102.
  6. 1102
  7. 111011112
  8. 1011112
  9. 1000001112
  10. 110112

Turn on your VCR and continue with this section.  If you have purchased a textbook, follow along in your book. If you are using the Internet version, follow along on the webpage. If you have any difficulties, contact your instructor.  After the explanation of converting binary numbers to octal numbers, turn off the video player and try to work the practice problems.  Once you have worked the problems, check your answers in the answer key listed in the back of your book or click on the Answer Key links at the end of every section.

5.2 ~ Converting Binary to Octal

Suppose we have a binary number and we want to determine its octal equivalent. First, we must think about the relationship between a binary number and an octal number. One way of thinking about this is to make a table that counts or lists the first twenty values in both systems just like we did when we compared the binary number system to the decimal number system.

Table 1 ~ 5.2

Binary Number Octal Number 001 1 010 2 011 3 100 4 101 5 110 6 111 7 1000 10 1001 11 1010 12 1011 13 1100 14 1101 15 1110 16 1111 17 10000 20 10001 21 10010 22 10011 23 10100 24

Notice that the binary number 1000 is the same as the octal number 10 (which is the decimal value 8.) The largest single digit in the octal system is 7. Looking at Table 5.2.1, we see that the octal number 7 can be written as 111 in the binary system. It takes three digits in the binary system to represent the largest digit in the octal system. It makes sense then to group the digits in a binary number into groups of three to convert the binary number to an octal number.

Example 1: Convert the binary number 1100012 to an octal number.

Solution: First of all group the binary numbers into groups of three starting from the right hand side. This means that there will be two groups since there are six digits. (If the number of digits is not divisible by three, add zeros on the left hand side to make a number of digits divisible by three for the groupings.)

0012 in the binary system is the same as 18 in the units place in the octal system.

1102 in the binary system is the same as 68 in the eights place in the octal system.

This means that the binary number 1100012 is the same as the octal number 618. In order to make sure this is the case, we could convert both of the binary number and the octal number to their decimal equivalent and see if the results are the same. (In this case 618 is 1 + 6 x 8 or 49 and 1100012 is 1 + 1 x 24 + 1 x 25 or 1 + 16 + 32 or 49.)

Example 2: Convert the binary number 111001012 to an octal number.

Solution: First of all group the binary numbers into groups of three starting from the right hand side. Since there are eight digits in the binary number and we want to have groupings of three digits, add a zero to the left hand side of the number to obtain the number 0111001012 which does not change the value of the number.

Now there are three groups of three digits since there are nine digits. The first grouping on the right is 1012 in the binary system which is the same as 58 in the units place in the octal system. (We can determine this either by looking at the chart or by evaluating 1 x 20 + 0 x 21 + 1 x 22 which equals 5.)

The second grouping from the right is 1002 in the binary system which is the same as 48 in the eights place in the octal system. (We can determine this value either by looking at the chart or by evaluating 0 x 20 + 0 x 21 + 1 x 22 which equals 4.)

The third and final grouping from the right is 0112 in the binary system which is the same as 38 in the eight to the second power place in the octal system. (We can determine this value either by looking at the chart or by evaluating 1 x 20 + 1 x 21 + 0 x 22 which equals 3.)

This means that the binary number 111001012 is the same as the octal number 3458. In order to make sure this is the case, we could convert both of the binary number and the octal number to their decimal equivalent and see if the results are the same. In this case 3458 is the same as 5 x 80 + 4 x 81 + 3 x 82 or 5 + 32 + 192 which equals 229. The binary number 111001012 is 1 x 20 + 0 x 21 + 1 x 22 + 0 x 23 + 0 x 24 + 1 x 25 + 1 x 26 + 1 x 27 which is the same as 1 + 0 + 4 + 0 + 0 + 32 + 64 + 128 or 229.)

Larger binary numbers can be treated in a similar fashion. Remember when converting a binary number to an octal number, group the binary numbers into sets of three digits (counting from the right). If the total number of digits is not divisible by three, add zeros on the left hand side of the number to make to total number of digits divisible by three. Then convert each set of digits to an octal number. Write these digits in the proper order and the result will be the octal equivalent to the given binary number.

 5.2 ~ Practice Problems

Directions: Turn off your VCR. Convert the following binary numbers to octal numbers.  When you have completed the problems, check your answers in the back of your book or click here to view the Answer Key.   Turn on your VCR to see the solutions to the practice problems worked on the board by a teacher.

  1. 1011112
  2. 1000112
  3. 102
  4. 10101112
  5. 101110112

 5.2 ~ Homework Problems

Directions: Turn off your VCR.  Convert the following binary numbers to octal numbers.  Keep your work in a notebook to be turned into your instructor at the conclusion of the course.  When you have finished working the problems, check your answers in the back of the book or click here to view the Answer Key.  If you have any questions, contact your instructor.

  1. 1002
  2. 101112
  3. 11101012
  4. 111012
  5. 1101101102
  6. 10101102
  7. 111011112
  8. 1011112
  9. 1000001112
  10. 110112

 Turn on your VCR and continue with this section.  If you have purchased a textbook, follow along in your book. If you are using the Internet version, follow along on the webpage. If you have any difficulties, contact your instructor.  After the explanation of converting binary numbers to hexadecimal numbers, turn off the video player and try to work the practice problems.  Once you have worked the problems, check your answers in the answer key listed in the back of your book or click on the Answer Key button to the left.

5.3 ~ Converting Binary to Hexadecimal

Suppose we have a binary number and we want to determine its hexadecimal equivalent. First, we must think about the relationship between a binary number and a hexadecimal number. One way of thinking about this is to make a table that counts or lists the first twenty values in both systems just like we did when we compared the binary number system to the decimal number system.

Table 1 ~ 5.3

 

Binary Number Hexadecimal Number
001 1
010 2
011 3
100 4
101 5
110 6
111 7
1000 8
1001 9
1010 A
1011 B
1100 C
1101 D
1110 E
1111 F
10000 10
10001 11
10010 12
10011 13
10100 14

 Notice that the binary number 10000 is the same as the hexadecimal number 10 (which is the decimal value 16.) The largest single digit in the hexadecimal system is F. Looking at Table 5.3.1, we see that the hexadecimal number F can be written as 1111 in the binary system. It takes four digits in the binary system to represent the largest digit in the hexadecimal system. It makes sense then to group the digits in a binary number into groups of four to convert a binary number to a hexadecimal number.

Example 1: Convert the binary number 111001012 to a hexadecimal number.

Solution: First of all group the binary numbers into groups of four starting from the right hand side. This means that there will be two groups since there are eight digits. (If the number of digits is not divisible by four, add zeros on the left hand side to make a number of digits divisible by four for the groupings.)

01012 in the binary system is the same as 516 in the units place in the hexadecimal system.

11102 in the binary system is the same as E16 in the sixteens place in the hexadecimal system.

This means that the binary number 111001012 is the same as the hexadecimal number E516. In order to make sure this is the case, we could convert both of the binary number and the hexadecimal number to their decimal equivalent and see if the results are the same. (In this case E516 is the same as 5 x 160 + E x 161 which is the same as 5 x 1 + 14 x 16 or 5 + 224 which equals 229. The binary number 111001012 is 1 x 20 + 0 x 21 + 1 x 22 + 0 x 23 + 0 x 24 + 1 x 25 + 1 x 26 + 1 x 27 which is the same as 1 + 0 + 4 + 0 + 0 + 32 + 64 + 128 or 229.)

Example 2: Convert the binary number 11101011012 to a hexadecimal number.

Solution: First of all group the binary numbers into groups of four starting from the right hand side. Since there are only ten digits in the given number, it is necessary to add two zeros to the left hand side of the number to make a total of twelve digits. Once we do this we will have three groups of four digits.

11012 in the binary system is the same as D16 in the units place in the hexadecimal system.

10102 in the binary system is the same as A16 in the sixteens place in the hexadecimal system.

00112 in the binary system is the same as 316 in the sixteen to the second power place in the hexadecimal system.

This means that the binary number 11101011012 is the same as the hexadecimal number 3AD16. In order to make sure this is the case, we could convert both of the binary number and the hexadecimal number to their decimal equivalent and see if the results are the same. (In this case 3AD16 is the same as D x 160 + A x 161 + 3 x 162 which is the same as 13 x 1 + 10 x 16 + 3 x 256 or 13 + 160 + 768 which equals 941. The binary number 11101011012 is 1 x 20 + 0 x 21 + 1 x 22 + 1 x 23 + 0 x 24 + 1 x 25 + 0 x 26 + 1 x 27 + 1 x 28 + 1 x 29 which is the same as 1 + 0 + 4 + 8 + 0 + 32 + 0 + 128 + 256 + 512 or 941.)

Larger binary numbers can be treated in a similar fashion. Remember when converting a binary number to a hexadecimal number, group the binary numbers into sets of four digits (counting from the right). If the total number of digits is not divisible by four, add zeros on the left hand side of the number to make to total number of digits divisible by four. Then convert each set of digits to a hexadecimal number. Write these digits in the proper order and the result will be the hexadecimal equivalent to the given binary number.

5.3 ~ Practice Problems

Directions: Turn off your VCR.  Convert the following binary numbers to hexadecimal numbers.  When you have completed the problems, check your answers in the Answer Key.   Turn on the VCR to view the solutions to the practice problems worked out on the board by a teacher.

  1. 100110112
  2. 100011002
  3. 1002
  4. 10101112
  5. 10100110112

 5.3 ~ Homework Problems

Directions: Turn off your VCR.  Convert the following binary numbers to hexadecimal numbers.  Keep your work in a notebook to be turned into your instructor at the conclusion of the course.  When you have finished working the problems, check your answers in the back of your book or click here to view the Answer Key.  If you have any questions, contact your instructor.

  1. 10002
  2. 101111012
  3. 111011012
  4. 111012
  5. 1101101102
  6. 10101102
  7. 111011112
  8. 1011112
  9. 10001001112
  10. 111110001110112

  This concludes Section Five

Updated January 2004

  Access IMail
  Session One
  Session Two
  Session Three
  Session Four
  Session Six
  Session Seven
  Session Eight
  Session Nine

HOME Terra Homepage CONTACT US Terra Building Hours/Contact phone numbers and offices/email contacts CAMPUS DIRECTORY Names and email contacts at Terra MAPS
Area Maps SITE SEARCH Academic Quality Improvement Program AQIP  AQIP
Terra Community College
2830 Napoleon Road   Fremont, Ohio   43420-9670
Telephone: 419.334.8400 or 1.866.AT TERRA (866.288.3772)
Accredited by the Higher Learning Commission of the North Central Association of Colleges and Schools