Direct Conversion of Binary to OctalDate: 05/14/2002 at 13:49:23 From: greg Subject: conversions Given the base two number 110110100 2 give a brief explanation of how this number can be converted directly to a base eight number (without first converting to base ten and then back to a base eight). Hint: 10110100 = 264 2 8 I just don't understand the problem at all! Date: 05/14/2002 at 16:05:03 From: Doctor Peterson Subject: Re: conversions Hi, Greg. See this page from our archives (which is about base 16, but the same idea applies): http://mathforum.org/dr.math/problems/hamilton12.8.98.html To convert base 2 to base 8, you divide the digits into groups of 3, starting at the right, and write each group as one octal digit: 10 110 100(base 2) \ / \ / \ / 2 6 4 (base 8) This works because 8 = 2^3, so that each group of three bits takes values from 0 to 7, exactly what you need for octal. For example, the middle group above is 1*2^5 + 1*2^4 + 0*2^3 as part of the binary expansion, but can be factored to give (1*2^2 + 1*2^1 + 0*2^0)*2^3 = 6*8^1 which corresponds to the middle digit in octal. - Doctor Peterson, The Math Forum http://mathforum.org/dr.math/ |
Search the Dr. Math Library: |
[Privacy Policy] [Terms of Use]
Ask Dr. Math^{TM}
© 1994-2013 The Math Forum
http://mathforum.org/dr.math/