Hey there! I remember you asking about decimal (base10) to binary (base2). The same method can be used for decimal (base10) to octal (base
. The poster above gave you octal (base
to decimal (base 10).
Anyway we are going to use the same number from your binary (500(base10)) to demonstrate conversion to Octal.
As a reminder / is integer division, % is modulus which gives you the remainder (which is the octal digit for that position)
500 / 8 = 62. 500 % 8 = 4 -> 4
62 / 8 = 7. 62 % 8 = 6 -> 6
7 / 8 = 0. 7 % 8 = 7 -> 7
Now we go from the bottom to the top and find that 500(base10) is 764(base
.
The process is the same from base10 to any lower base.
Bookmarks