Converts a decimal number to octal.
DEC2OCT(number, numdigits)
returns an octal number as text, given the decimal number, which must be between -229 and 229-1 inclusive, and may be text or a number.
The result is an octal number with up to ten digits in two's complement representation.
numdigits is an optional number specifying the number of digits to return.
DEC2OCT(19)
returns 23 as text.
DEC2OCT("19")
returns 23 as text. DEC2OCT will accept a decimal number given as text.
DEC2OCT(19, 3)
returns 023 as text. Leading zeroes are added to make 3 digits.
DEC2OCT(-2)
returns 7777777776 as text.
Computer Systems Engineering
Imagine a junior computer systems engineer, Alex, who is working on a legacy system. This system uses an octal-based addressing scheme for its memory registers. The system's diagnostic tools, however, report errors and data in decimal format. To troubleshoot issues, Alex needs to convert the decimal values from the diagnostic tools into the octal format that the system understands.
One day, Alex receives a report about a series of memory errors. The report lists the following memory addresses in decimal format:
To investigate these errors, Alex needs to find the corresponding octal addresses. Alex can use the DEC2OCT function to perform this conversion quickly.
Here is a table showing the conversion process:
Decimal Address (Reported) | Formula | Octal Address (System Format) | ||
|---|---|---|---|---|
A | B | C | ||
1 | 255 | DEC2OCT(255) | 377 | |
2 | 128 | DEC2OCT(128) | 200 | |
3 | 511 | DEC2OCT(511) | 777 | |
4 | 64 | DEC2OCT(64) | 100 |
PRODUCT & FEATURES
RESOURCES
Terms | Privacy | Spam Policy
© 2026 Zapof