Decimal to Octal Converter
To use decimal to octal converter, type a decimal value e.g. "17" and click on the Convert button and you will get the octal value "21" on the right hand side.
Decimal to Octal Conversion:
- Decimal Numeral System
- Octal Numeral System
- How to Convert Decimal to Octal
- How to Convert Fractional Decimal to Octal
- Decimal to Octal Examples
- FAQs (Decimal to Octal Conversion)
- Decimal to Octal Table
Decimal Numeral System
The decimal system (base-10) uses ten symbols ranging from 0 to 9. In this notation, the value of a digit depends on its position. Digits to the left of the decimal point represent increasing powers of 10 i.e. (…, 102, 101, 100), while digits to the right of the point represent decreasing powers of 10 i.e (10-1, 10-2, 10-3, …). Through this positional method, numbers both very large and very small can be expressed clearly and efficiently.
Example:
Decimal value "2675.97" can be written as:
Digit | Position | Power of 10 | Value |
---|---|---|---|
2 | 103 (Thousands place) | 103 = 1000 | 2 × 1000 = 2000 |
6 | 102 (Hundreds place) | 102 = 100 | 6 × 100 = 600 |
7 | 101 (Tens place) | 101 = 10 | 7 × 10 = 70 |
5 | 100 (Ones place) | 100 = 1 | 5 × 1 = 5 |
9 | 10-1 (Tenths place) | 10-1 = 0.1 | 9 × 0.1 = 0.9 |
7 | 10-2 (Hundredths place) | 10-2 = 0.01 | 7 × 0.01 = 0.07 |
Total = (2 × 103) + (6 × 102) + (7 × 101) + (5 × 100) + (9 × 10-1) + (7 × 10-2) = 2000 + 600 + 70 + 5 + 0.9 + 0.07 = 2675.97
Octal Numeral System
An octal number is a value represented in the base-8 numeral system. This system uses eight unique symbols: 0, 1, 2, 3, 4, 5, 6, and 7. Each position in an octal number corresponds to a power of 8, similar to how the decimal system is based on powers of 10. For example, before octal point the rightmost digit represents 80, the next digit to the left represents 81, then 82, and so on. After the octal point the digits represents the position in decreasing power of 8 i.e. 8-1, 8-2, 8-3 and so on.
Example:
Octal value "175.65" can be written as:
Digit | Position | Power of 8 | Value |
---|---|---|---|
1 | 82 place | 82 = 64 | 1 × 64 = 64 |
7 | 81 place | 81 = 8 | 7 × 8 = 56 |
5 | 80 place | 80 = 1 | 5 × 1 = 5 |
6 | 8-1 place | 8-1 = 0.125 | 6 × 0.125 = 0.75 |
5 | 8-2 place | 8-2 = 0.015625 | 5 × 0.015625 = 0.078125 |
(175.65)8 = (1 × 82) + (7 × 81) + (5 × 80) + (6 × 8-1) + (5 × 8-2) = 64 + 56 + 5 + 0.75 + 0.078125 = (125.828125)10
How to Convert Decimal to Octal
Consider the following steps to conver the decimal value to octal.
Step-1: For decimal numbers between 0 and 7, the octal equivalent is identical to the decimal value itself.
Step-2: For decimal values 8 or higher, repeatedly divide the number by 8, recording the remainders, until the quotient becomes zero.
Step-3: Write the remainders in reverse order (from the last one obtained to the first). This sequence forms the octal value.
How to Convert Fractional Decimal Part to Octal
The fractional part of a decimal number can be converted into octal by following these steps:
Step-1: Isolate the fractional portion of the decimal number. Example: If the number is 15.55, only take 0.55.
Step-2: Multiply this fraction by 8. The integer part of the result becomes the first digit after the octal point. Example: 0.55 × 8 = 4.4, here the integer part is 4, which is placed at 8-1.
Step-3: Use the remaining fractional part (if any) and repeat the multiplication by 8. Example: since the remainder is 0.4 here, proceed with the Step-2 until the fractional remainder value is 0.
Step-4: Keep multiplying the new fractional remainders by 8 until either the remainder becomes zero or you reach the required precision. Each successive integer result gives the next octal digit at positions 8-2, 8-3, 8-4, and so on.
Decimal to Octal Examples
Example 1: Convert (47)10 decimal value to octal value.
Division by 8 | Quotient | Remainder (Decimal) | Remainder (Octal) | Digit Position |
---|---|---|---|---|
47/8 | 5 | 7 | 7 | 80 |
5/8 | 0 | 5 | 5 | 81 |
Example 2: Convert (571)10 decimal value to octal value.
Division by 8 | Quotient | Remainder (Decimal) | Remainder (Octal) | Digit Position |
---|---|---|---|---|
571/8 | 71 | 3 | 3 | 0 |
71/8 | 8 | 7 | 7 | 1 |
8/8 | 1 | 0 | 0 | 2 |
1/8 | 0 | 1 | 1 | 3 |
Example 3: Convert (79856)10 to octal value.
Division by 8 | Quotient | Remainder (Decimal) | Remainder (Octal) | Digit Position |
---|---|---|---|---|
79856/8 | 9982 | 0 | 0 | 0 |
9982/8 | 1247 | 6 | 6 | 1 |
1247/8 | 155 | 7 | 7 | 2 |
155/8 | 19 | 3 | 3 | 3 |
19/8 | 2 | 3 | 3 | 4 |
2/8 | 0 | 2 | 2 | 5 |
Example 4: Convert (7657.75)10 to octal value.
Division by 8 | Quotient | Remainder (Decimal) | Remainder (Octal) | Digit Position |
---|---|---|---|---|
7657/8 | 957 | 1 | 1 | 80 |
957/8 | 119 | 5 | 5 | 81 |
119/8 | 14 | 7 | 7 | 82 |
14/8 | 1 | 6 | 6 | 83 |
1/8 | 0 | 1 | 1 | 84 |
Multiplication by 8 | Product | Integer Part (Decimal) | Integer Part (Octal) | Fractional Remainder | Digit Position |
---|---|---|---|---|---|
0.75 × 8 | 6.0 | 6 | 6 | 0.0 | 8–1 |
Example 5: Convert (87526.140625)10 to octal value.
Division by 8 | Quotient | Remainder (Decimal) | Remainder (Octal) | Digit Position |
---|---|---|---|---|
87526/8 | 10940 | 6 | 6 | 80 |
10940/8 | 1367 | 4 | 4 | 81 |
1367/8 | 170 | 7 | 7 | 82 |
170/8 | 21 | 2 | 2 | 83 |
21/8 | 2 | 5 | 5 | 84 |
2/8 | 0 | 2 | 2 | 85 |
Multiplication by 8 | Product | Integer Part (Decimal) | Integer Part (Octal) | Fractional Remainder | Digit Position |
---|---|---|---|---|---|
0.140625 × 8 | 1.125 | 1 | 1 | 0.125 | 8–1 |
0.125 × 8 | 1.0 | 1 | 1 | 0 | 8–2 |
Frequently Ask Questions: Decimal to Octal Conversion
Q1: How to convert decimal (0.1)10 to octal?
It will result in a repeated fractions and never terminated:
0.1 × 8 = 0.8, Fractional Remainder = 0.8, Interger Part = 0
0.8 × 8 = 6.4, Fractional Remainder = 0.4, Interger Part = 6
0.4 × 8 = 3.2, Fractional Remainder = 0.2, Interger Part = 3
0.2 × 8 = 1.6, Fractional Remainder = 0.6, Interger Part = 1
0.6 × 8 = 4.8, Fractional Remainder = 0.8, Interger Part = 4
.....
(0.1)10 = (0.06314....)8
Q2: What is the maximum decimal value that can be converted to octal if there is a limitation of 4 digits?
If the number of octal digits is limited, large decimal numbers may exceed storage capacity and overflow can occur and results are truncated. If there is a limitation of 4 octal digits then the maximum value of octal is (7777)8 = (4095)10. 4095 is the maximum Decimal value that can be correctly converted to octal in 4 digits without overflow or truncation. Overflow must be prevented to avoid erroneous computations.
Q3: What is the maximum value of octal digit?
Octal numbers are represented with 8 digits or symbols: 0, 1, 2, 3, 4, 5, 6 and 7. The maximum value of octal digit is 7. The value 8 in decimal is equal to 10 in octal. The values "8" and "9" are invalid in octal numeral system.
Q4: How to convert decimal (-75)10 to signed 8-bit octal value?
8-bit signed numbers can represent −128 to 127, -75 is within the range, Therefore,
(75)10 = (01001011)2 (8-bit)
Take two's complement (Invert all bits + Add 1):
Inverted Bits: (10110100)2
Add 1: (10110101)2, As Octal digits are 3 bit values and to make a group of 3 bits the first is zero padded on the left side. Therefore, 010 = 2, 110 = 6 and 101 = 5
(-75)10 = (265)8 (Signed 8-bit octal value)
Q5: Which values of decimal and octal are exactly the same?
Only the values from 0 to 7 are exactly the same as decimal values.
Decimal to Octal Table
Decimal | Octal |
---|---|
1 | 1 |
2 | 2 |
3 | 3 |
4 | 4 |
5 | 5 |
6 | 6 |
7 | 7 |
8 | 10 |
9 | 11 |
10 | 12 |
11 | 13 |
12 | 14 |
13 | 15 |
14 | 16 |
15 | 17 |
16 | 20 |
17 | 21 |
18 | 22 |
19 | 23 |
20 | 24 |
21 | 25 |
22 | 26 |
23 | 27 |
24 | 30 |
25 | 31 |
26 | 32 |
27 | 33 |
28 | 34 |
29 | 35 |
30 | 36 |
31 | 37 |
32 | 40 |
33 | 41 |
34 | 42 |
35 | 43 |
36 | 44 |
37 | 45 |
38 | 46 |
39 | 47 |
40 | 50 |
41 | 51 |
42 | 52 |
43 | 53 |
44 | 54 |
45 | 55 |
46 | 56 |
47 | 57 |
48 | 60 |
49 | 61 |
50 | 62 |
51 | 63 |
52 | 64 |
53 | 65 |
54 | 66 |
55 | 67 |
56 | 70 |
57 | 71 |
58 | 72 |
59 | 73 |
60 | 74 |
61 | 75 |
62 | 76 |
63 | 77 |
64 | 100 |
Decimal | Octal |
---|---|
65 | 101 |
66 | 102 |
67 | 103 |
68 | 104 |
69 | 105 |
70 | 106 |
71 | 107 |
72 | 110 |
73 | 111 |
74 | 112 |
75 | 113 |
76 | 114 |
77 | 115 |
78 | 116 |
79 | 117 |
80 | 120 |
81 | 121 |
82 | 122 |
83 | 123 |
84 | 124 |
85 | 125 |
86 | 126 |
87 | 127 |
88 | 130 |
89 | 131 |
90 | 132 |
91 | 133 |
92 | 134 |
93 | 135 |
94 | 136 |
95 | 137 |
96 | 140 |
97 | 141 |
98 | 142 |
99 | 143 |
100 | 144 |
101 | 145 |
102 | 146 |
103 | 147 |
104 | 150 |
105 | 151 |
106 | 152 |
107 | 153 |
108 | 154 |
109 | 155 |
110 | 156 |
111 | 157 |
112 | 160 |
113 | 161 |
114 | 162 |
115 | 163 |
116 | 164 |
117 | 165 |
118 | 166 |
119 | 167 |
120 | 170 |
121 | 171 |
122 | 172 |
123 | 173 |
124 | 174 |
125 | 175 |
126 | 176 |
127 | 177 |
128 | 200 |
Decimal | Octal |
---|---|
129 | 201 |
130 | 202 |
131 | 203 |
132 | 204 |
133 | 205 |
134 | 206 |
135 | 207 |
136 | 210 |
137 | 211 |
138 | 212 |
139 | 213 |
140 | 214 |
141 | 215 |
142 | 216 |
143 | 217 |
144 | 220 |
145 | 221 |
146 | 222 |
147 | 223 |
148 | 224 |
149 | 225 |
150 | 226 |
151 | 227 |
152 | 230 |
153 | 231 |
154 | 232 |
155 | 233 |
156 | 234 |
157 | 235 |
158 | 236 |
159 | 237 |
160 | 240 |
161 | 241 |
162 | 242 |
163 | 243 |
164 | 244 |
165 | 245 |
166 | 246 |
167 | 247 |
168 | 250 |
169 | 251 |
170 | 252 |
171 | 253 |
172 | 254 |
173 | 255 |
174 | 256 |
175 | 257 |
176 | 260 |
177 | 261 |
178 | 262 |
179 | 263 |
180 | 264 |
181 | 265 |
182 | 266 |
183 | 267 |
184 | 270 |
185 | 271 |
186 | 272 |
187 | 273 |
188 | 274 |
189 | 275 |
190 | 276 |
191 | 277 |
192 | 300 |
Decimal | Octal |
---|---|
193 | 301 |
194 | 302 |
195 | 303 |
196 | 304 |
197 | 305 |
198 | 306 |
199 | 307 |
200 | 310 |
201 | 311 |
202 | 312 |
203 | 313 |
204 | 314 |
205 | 315 |
206 | 316 |
207 | 317 |
208 | 320 |
209 | 321 |
210 | 322 |
211 | 323 |
212 | 324 |
213 | 325 |
214 | 326 |
215 | 327 |
216 | 330 |
217 | 331 |
218 | 332 |
219 | 333 |
220 | 334 |
221 | 335 |
222 | 336 |
223 | 337 |
224 | 340 |
225 | 341 |
226 | 342 |
227 | 343 |
228 | 344 |
229 | 345 |
230 | 346 |
231 | 347 |
232 | 350 |
233 | 351 |
234 | 352 |
235 | 353 |
236 | 354 |
237 | 355 |
238 | 356 |
239 | 357 |
240 | 360 |
241 | 361 |
242 | 362 |
243 | 363 |
244 | 364 |
245 | 365 |
246 | 366 |
247 | 367 |
248 | 370 |
249 | 371 |
250 | 372 |
251 | 373 |
252 | 374 |
253 | 375 |
254 | 376 |
255 | 377 |
Related Conversions
Please find the related numeric conversions.