Manuals/calci/BIN2HEX

From ZCubes Wiki
Revision as of 13:29, 15 November 2013 by Swapna (talk | contribs)
Jump to navigation Jump to search

BIN2HEX(number,padding)

  • Where 'number' is the binary number to be converted and
  • 'padding' is the number of characters to display the output.

BIN2HEX() converts a binary number to its hexadecimal equivalent.

Description

BIN2HEX(number, padding)

This function is used to convert a binary number to its hexadecimal equivalent.

  • 'number' must be a binary number.
  • BIN2HEX returns the error value, when 'num' contains more than 10 characters (10 bits).
  • If the number is negative, Calci returns a NAN(error) value.
  • Calci returns an error, if 'padding' is nonnumeric or negative.

For Example,

BIN2HEX(11111011, 3) returns 0FB

BIN2HEX(1110) returns E

Examples

Binary Input Hexadecimal Output
100 4
11110 30
1010101010101010 42666
1111111111 -1
1111000000 -64
1000000000 -512