BASE HELP

G

Guest

Guest
Can someone please explain how to convert base two numerals into base eight numerals?

1001

10101010

110110

101111

Al are base two
 
There are probably various methods, but one would be to convert from binary (base-2) to decimal (base-10) and then to octal (base-8).

For instance:

. . . . .1001<sub>2</sub>

. . . . .1001<sub>2</sub> = 1×2<sup>3</sup> + 0×2<sup>2</sup> + 0×2<sup>1</sup> + 1×2<sup>0</sup>

. . . . .1001<sub>2</sub> = 1×8 + 0×4 + 0×2 + 1×1

. . . . .1001<sub>2</sub> = 8 + 1 = 9<sub>10</sub>

. . . . .9<sub>10</sub> = 1×8 + 1×1

. . . . .9<sub>10</sub> = 1×8<sup>1</sup> + 1×8<sup>0</sup>

. . . . .9<sub>10</sub> = 11<sub>8</sub>

Do the others the same way.

Eliz.
 
The easiest way is to separate into groups of three and substitute from
000=0
001=1
010=2
011=3
100=4
101=5
110=6
111=7

010 101 010 = 252
 
Hello, bware!

Eliz is right: there is another way.
. . There's a trick to it, known to programmers.

Can someone please explain how to convert base-2 numerals to base-8 numerals?

(a)1,001<sub>2</sub> . . (b) 10,101,010<sub>2</sub> . . (c) 110,110<sub>2</sub> . . (d) 101,111<sub>2</sub>
.

Group the digits in sets-of-three, starting from the right.
Convert each three-digit binary number to octal (or decimal).


(d) 101,111<sub>2</sub>

. . We have: . (101) (111)
. . . . . . . . . . . . \ / . . . \ /
. . . . . . . . . . . . .5 . . . .7

. . Therefore: .101,111<sub>2</sub> .= .57<sub>8</sub>


(b) .10,101,010<sub>2</sub>

. . We have: . ( 10)(101)(010)
. . . . . . . . . . . . .| . . \ / . . .\ /
. . . . . . . . . . . . .2 . . 5 . . . .2

. . Therefore: .10,101,010<sub>2</sub> .= .252<sub>8</sub>
 
Top