Purpose

Return value

Syntax

=HEX2OCT(number,[places])
  • number - The hexadecimal number you want to convert to octal.
  • places - [optional] Pads the resulting binary number with zeros up to the specified number of digits. If omitted returns the least number of characters required to represent the number.

Using the HEX2OCT function

  • Excel only converts to octal numbers of 10-digits or less, restricting the range of valid input to [0, 7777777777] (octal).
  • The input number must be less than or equal to ten alpha-numeric characters, otherwise the function returns the #NUM! error value.

Negative Numbers

Excel interprets both octal and hexadecimal numbers using two’s complement notation. Two’s complement notation is a convention that computers use to represent negative numbers in binary.

Example of two's complement for HEX2OCT function - 1

Purpose

Return value

Syntax

=IMABS(inumber)
  • inumber - The string representing a complex number.

Using the IMABS function

The Excel IMABS function returns the absolute value of a complex number. For example:

=IMABS("4+3i") // returns 5

Excel handles complex numbers as strings formatted like “x+yi” or “x+yj”. Use the COMPLEX function to get the string representing a complex number.

Explanation

The absolute value of a complex number goes by several other names: modulus, length, or magnitude. All of them refer to the same thing. When we draw the arrow representing a complex number, the absolute value is equal to the distance from the origin to the tip of the complex number.

The absolute value of a complex number. - 2

The IMABS function always returns a positive number. For example, consider the complex number “-12-5i” which points in a different direction.

The absolute value of a complex number pointing in a different direction. - 3

The absolute value of this complex number is positive 13.

=IMABS("-12-5i") // returns 13

In general, the absolute value of a complex number “z=x+yi” is given by the formula below.

=SQRT(x^2 + y^2)

Notes

  • IMABS returns a #NUM error when the input does not represent a valid complex number.

Images courtesy of wumbo.net .