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 Eight

Welcome to the eighth section of MTH140, Number bases.  In this session you will learn to convert numbers in the decimal system to binary, octal, and hexadecimal numbers.

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 decimal 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 button to the left.

Section Eight: Converting Decimal

Numbers to Other Bases

The system that is most familiar is the decimal system. In this section, decimal numbers will be converted to the other bases discussed in this book i.e. binary, octal, and hexadecimal.

8.1 ~ Converting from Decimal Notation to Octal Notation

To convert a decimal number to an octal number, first consider the place values of the number of the octal system.

Table 1 ~ 8.1

Powers of Eight

Power of 8 Decimal Equivalent
80 1
81 8
82 64
83 512
84 4096
85 32768
86 262144
87 2097152
88 16777216
89 134217728
810 1073741824

Example 1: Convert the decimal number 45137 to an octal number.

Solution: Looking at the table above, notice that the largest number contained in 45137 in 32768 or 8 to the fifth power. This means that when the octal number is written in expanded octal notation, the largest power of eight that is included in the given number 45137 is eight to the fifth power. There is one 32768 in 45137. Once 32768 is divided into 45137, there is a remainder of 12369. Next check the next lowest power of eight which is eight to the fourth power or 4096. There are three 4096s in the number 12369. When 4096 is divided into 12369, there is a remainder of 81. Next check the next lowest power of eight which is eight to the third power or 512. There are zero 512s in 81 with a remainder of 81. Next check the next lowest power of eight which is eight to the second power or 64. There is one 64 in 81 with a remainder of 17. Next check the next lowest power of eight which is eight to the first power or 8. There are two 8s in 17 with a remainder of 1. Finally check the lowest power of eight which is eight to the zero power or 1. There are one 1s in the number 1. Therefore, we can say that

45137 = 1 x 85 + 3 x 84 + 0 x 83 + 1 x 82 + 2 x 81 + 1 x 80 or

45137 = 1301218

Another way of thinking of this is as follows:

45137 divided by 32768 is 1, remainder 12369

12369 divided by 4096 is 3, remainder 81

81 divided by 512 is 0, remainder 81

81 divided by 64 is 1, remainder 17

17 divided by 8 is 2, remainder 1

1 divided by 1 is 1

This method leads to the conclusion that the decimal number 45137 is the same as the octal number 130121.

There is another way to determine the octal equivalent of a decimal number. This is done by dividing the number repeatedly by eight and noting the remainders.

45137 divided by 8 is 5642 with a remainder of 1

5642 divided by 8 is 705 with a remainder of 2

705 divided by 8 is 88 with a remainder of 1

88 divided by 8 is 11 with a remainder of 0

11 divided by 8 is 1 with a remainder of 3

1 divided by 8 is 0 with a remainder of 1

This method gives us the solution in the opposite order. This shows that the decimal number 45137 is the same as the octal number 130121.

 

8.1~ Practice Problems

Directions: Turn off your VCR.  Change the following decimal numbers to octal numbers using either method. Check your answers in the Answer Key.  Turn your VCR back on to view the solutions.

  1. 8687
  2. 347828
  3. 465
  4. 3280
  5. 73801

8.1 ~ Homework Problems

Directions: Turn off your VCR.  Change the following decimal numbers to octal numbers using either method.  Check your answers in the Answer Key.  If you have any questions, contact your instructor.

  1. 6473
  2. 57412
  3. 879
  4. 43827
  5. 4570
  6. 9876
  7. 3253
  8. 653
  9. 124
  10. 8531

 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 decimal notation to binary notation, 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 evry section.

8.2 ~ Converting from Decimal Notation to Binary Notation

To convert a decimal number to a binary number, first consider the place values of the

binary number system. The table below is similar to Table 3.2.1 .

Table 8.2.1

Powers of two

Power of 2 Decimal Equivalent 20 1 21 2 22 4 23 8 24 16 25 32 26 64 27 128 28 256 29 512 210 1024

 

Example 1: Convert the decimal number 342 to a binary number.

Solution: First locate the highest power of 2 that is contained in 342. This would be two to the eighth power or 256. Remember the format for writing a binary number in expanded binary notation. Each power of 2 is represented with either a zero or one as a factor. In the number 342 there is one place value of 256. Once this number is taken out of 342, the number that remains is 86. The next lowest power of two is two to the seventh power or 128. There are zero 128s in the number 86. The remainder is 86. The next lower power is two to the sixth power or 64. There is one 64 in the number 86, with a remainder of 22. The next lower power is two to the fifth power or 32. There are zero 32s in 22 with a remainder of 22.. The next lower power is two to the fourth power or 16. There is one 16 in 22 with a remainder of 6. The next lower power is two to the third power or 8. There are zero 8s in 6 with a remainder of 6. The next lower power is two to the second power or 4. There is one 4 in 6 with a remainder of 2. The next lower power is two to the first power or 2. There is one 2 in 2 with a remainder of zero. We must finish up with the lowest power of 2 that is available which is 2 to the zero power or 1. There are zero 1s in zero. Therefore we can say that

342 = 1 x 28 + 0 x 27 + 1 x 26 + 0 x 25 + 1 x 24 + 0 x 23 + 1 x 22 + 1 x 21 + o x 20

or 342 = 1010101102

Another way of thinking of this is as follows:

342 divided by 256 is 1 remainder 86

86 divided by 128 is 0 remainder 86

86 divided by 64 is 1 remainder 22

22 divided by 32 is 0 remainder 22

22 divided by 16 is 1 remainder 6

6 divided by 8 is 0 remainder 6

6 divided by 4 is 1 remainder 2

2 divided by 2 is 1 remainder 0

0 divided by 1 is 0

This method leads to the conclusion that the decimal number 342 is the same as the binary number 101010110.

There is another way to determine the binary equivalent of a decimal number. This is done by dividing the number repeatedly by two and noting the remainders.

342 divided by 2 is 171 with a remainder of 0

171 divided by 2 is 85 with a remainder of 1

85 divided by 2 is 42 with a remainder of 1

42 divided by 2 is 21 with a remainder of 0

21 divided by 2 is 10 with a remainder of 1

10 divided by 2 is 5 with a remainder of 0

5 divided by 2 is 2 with a remainder of 1

2 divided by 2 is 1 with a remainder of 0

1 divided by 2 is 0 with a remainder of 1

This method gives us the solution in the opposite order. This shows that the decimal number 342 is the same as the binary number 101010110.

8.2 ~ Practice Problems

Directions: Turn off your VCR.  Change the following decimal numbers to binary numbers using any method.  Check your answers in the Answer Key.  Turn your VCR back on the view the solutions.

  1. 874
  2. 328
  3. 45
  4. 9
  5. 301

8.2 ~ Homework Problems

Directions: Turn off your VCR.  Change the following decimal numbers to binary numbers using any method.  Check your answers in the Answer Key.  If you have any questions, contact your instructor.

  1. 647
  2. 74
  3. 879
  4. 3827
  5. 457
  6. 9876
  7. 325
  8. 65
  9. 124
  10. 531

 

 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 decimal notation to hexadecimal notation, 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.

8.3 ~ Converting from Decimal Notation to Hexadecimal Notation

To convert a decimal number to a hexadecimal number, first consider the place values in the hexadecimal system.

 

Table 1 ~ 3.1

Powers of Sixteen

Power of 16 Decimal Equivalent 160 1 161 16 162 256 163 4096 164 65536 165 1048576 166 16777216

 

Example 1: Convert the decimal number 45137 to hexadecimal number.

Solution: Looking at the table above, notice that the largest number contained in 45137 in 4096 or 16 to the third power. This means that when the hexadecimal number is written in expanded hexadecimal notation, the largest power of sixteen that is included in the given number 45137 is sixteen to the third power. There are eleven 4096s in 45137. Once 4096 is divided into 45137, there is a remainder of 81. Next check the next lowest power of sixteen which is sixteen to the second power or 256. There are zero 256s in the number 81. When 256 is divided into 81, there is a remainder of 81. Next check the next lowest power of sixteen which is sixteen to the first power or 16. There are five 16s in 81 with a remainder of 1. Finally check the lowest power of sixteen which is sixteen to the zero power or 1. There are one 1s in the number 1. Therefore, we can say that

45137 = 11 x 163 + 0 x 162 + 5 x 161 + 1 x 160

Remember that in the hexadecimal system the decimal number 10 is represented by the hexadecimal number B. We could write the number in another way and say that

45137 = B0518

Another way of thinking of this is as follows:

45137 divided by 4096 is 11, remainder 81

81 divided by 256 is 0, remainder 81

81 divided by 16 is 5, remainder 1

1 divided by 1 is 1

This method leads to the conclusion that the decimal number 45137 is the same as the hexadecimal number B051.

There is another way to determine the hexadecimal equivalent of a decimal number. This is done by dividing the number repeatedly by sixteen and noting the remainders.

45137 divided by 16 is 2821 with a remainder of 1

2821 divided by 16 is 176 with a remainder of 5

176 divided by 16 is 11 with a remainder of 0

11 divided by 16 is 0 with a remainder of 11

This method gives us the solution in the opposite order. This shows that the decimal number 45137 is the same as the hexadecimal number B051.

8.3 ~ Practice Problems

Directions: Turn off your VCR.  Change the following decimal numbers to hexadecimal numbers using nay method.  Check your answers in the Answer Key.  Turn your VCR back on the view the solutions.

  1. 86874
  2. 347828
  3. 465
  4. 3280
  5. 273801

8.3 ~ Homework Problems

Directions: Turn off your VCR.  Change the following decimal numbers to hexadecimal numbers using any method.  Check your answers in the Answer Key.  Contact your instructor if you have any questions.

  1. 647382
  2. 57412
  3. 879
  4. 438271
  5. 4570921
  6. 9876
  7. 3253
  8. 653
  9. 124
  10. 8531

 This Concludes Session Eight

  Access IMail
  Session One
  Session Two
  Session Three
  Session Four
  Session Five
  Session Six
  Session Seven
  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