OCT2DEC


Converts an octal number to decimal.

Syntax:

OCT2DEC(octalnumber)


returns a (decimal) number, given octalnumber, which may be text, or a number (taken to be octal although it is not).

octalnumber may have up to ten digit in twos complement representation; positive numbers are 0 to 3777777777 (representing 0 to 229-1 decimal) and negative numbers 7777777777 to 4000000000 (representing -1 to -229 decimal).

Example:

OCT2DEC("31")

returns 25 as a (decimal) number.

OCT2DEC(31)

returns 25 as a (decimal) number. The number 31 is read as octal.

OCT2DEC("7777777776")

returns -2 as a (decimal) number.


Application:

Digital Control Systems


Imagine you're working with a legacy digital control system for a manufacturing plant. This system's logging output uses octal numbers to represent sensor readings and status codes. For a supervisor to easily understand and analyze this data, you need to convert it to the more familiar decimal format.


You have a table with the following octal data:

Octal Value (from system log)

A
1
10
2
17
3
23
4
44
5
100

To convert these values to decimal, you can use the OCT2DEC function. The formula would be applied in a new column, referencing the cell containing the octal value.


Let's assume the octal values are in column A, starting at A1. You would enter the formula OCT2DEC(A1) in cell B1, and do the same for the other cells in Column B.


Resulting Table:

Octal Value (from system log)

Decimal Equivalent

A
B
1
10
8
2
17
15
3
23
19
4
44
36
5
100
64

By using the OCT2DEC function, you can quickly and accurately translate the raw octal data into a human-readable decimal format, making it much easier to analyze and report on the system's performance.





This page is protected by Google reCAPTCHA. Privacy - Terms.
 
Built using Zapof