Octal and hexadecimal to decimal conversion

Chapter 1.5 Octal and hexadecimal to decimal conversion

Lessons In Electric Circuits Volume IV – Digital Book
Pages 501
Views 5,099
Downloads : 9 times
PDF Size : 2.6 MiB

Summary of Contents

Lessons In Electric Circuits Volume IV – Digital Book

  • 12CHAPTER 1. NUMERATION SYSTEMSLikewise, the conversion from either octal or hexadecimal to binary is done by taking each octalor hexadecimal digit and converting it to its equivalent binary (3 or 4 bit) group, then putting allthe binary bit groups together.Incidentally, hexadecimal notation is more popular, because binary bit groupings in digital equip-ment are commonly multiples of eight (8, 16, 32, 64, and 128 bit), which are also multiples of 4.Octal, being based on binary bit groups of 3, doesn’t work out evenly with those common bit groupsizings.1.5Octal and hexadecimal to decimal conversionAlthough the prime intent of octal and hexadecimal numeration systems is for the ”shorthand”representation of binary numbers in digital electronics, we sometimes have the need to convert fromeither of those systems to decimal form. Of course, we could simply convert the hexadecimal oroctal format to binary, then convert from binary to decimal, since we already know how to do both,but we can also convert directly.Because octal is a base-eight numeration system, each place-weight value differs from eitheradjacent place by a factor of eight. For example, the octal number 245.37 can be broken down intoplace values as such:octaldigits =245.37.------weight =68111(in decimal4//notation)86.4The decimal value of each octal place-weight times its respective cipher multiplier can be deter-mined as follows:(2 x 6410)+(4 x 810)+(5 x 110)+(3 x 0.12510)+(7 x 0.01562510)=165.48437510The technique for converting hexadecimal notation to decimal is the same, except that eachsuccessive place-weight changes by a factor of sixteen. Simply denote each digit’s weight, multiplyeach hexadecimal digit value by its respective weight (in decimal form), then add up all the decimalvalues to get a total. For example, the hexadecimal number 30F.A916 can be converted like this:hexadecimaldigits =30F.A9.------weight =21111(in decimal56//notation)612.65