Boundless Tutorial-JavaScript - BIN2HEX Function

describe

The BIN2HEX function converts a binary number to hexadecimal.

grammar

BIN2HEX (number, [places])

debate

Argument describe Required/Optional
number

The binary number you want to convert.

Numbers cannot exceed 10 characters (10 digits). The most significant bit of a number is the sign bit. The remaining 9 bits are magnitude bits.

Negative numbers are represented using two's complement.

Required
places

The number of characters to use.

If the number of digits is omitted, BIN2HEX uses the minimum number of characters required.

Places are useful for padding return values ​​with leading 0s (zeros).

Optional

Notes

  • If number is not a valid binary number, or number contains more than 10 characters (10 digits), BIN2HEX returns #NUM!. wrong value.

  • If number is negative, BIN2HEX ignores the position and returns a 10-character hexadecimal number.

  • If the number of characters required by BIN2HEX exceeds the number of characters, it will return #NUM! error value.

  • If places is not an integer, it is truncated.

  • If place is non-numeric, BIN2HEX returns #VALUE! error value.

  • If the number of digits is negative, BIN2HEX returns the #NUM! error value.

  • If places is > 10, BIN2HEX returns the #NUM! Error value.

applicability

Excel 2007,Excel 2010,Excel 2013,Excel 2016

Example

BIN2HEX Function

BIN2HEX Function in JavaScript - Wuya Tutorial Network Wuya Tutorial Network provides a description of the BIN2HEX function to convert binary numbers to hexadecimal. Syntax BIN2HEX (number, [places]) argument A... https://www.learnfk.com/javascript/advanced-excel-engineering-bin2hex-function.html

Guess you like

Origin blog.csdn.net/w116858389/article/details/132720767