Manuals/calci/HEX2DEC

Revision as of 15:11, 4 December 2013 by Swapna (talk | contribs)

HEX2DEC(number, places)

places argument to be included in upcoming version

  • Where 'number' is the hexadecimal number to be converted to decimal number.

HEX2DEC() converts a hexadecimal number to a decimal number.

Description

HEX2DEC(number)

For example, HEX2DEC() returns 5 as a result.

            HEX2DEC() returns 30 as a result. 
  • This function is used to convert a hexadecimal number to a decimal number.
  • Hexadecimal number uses digits from 0 to 9 and characters from A to F.is represented using digits 1 or 0 only. The number can also be entered in text format (e.g "101").
  • The conversion can be obtained for a binary number upto 17 bits for positive numbers and 10 bits for negative numbers.
  • The most significant bit represents the 'sign' of the number (0=positive, 1=negative). Negative numbers are represented using 2's complement notation.
  • Positive numbers may be from 0 (000000000) to 130046 (11111111111111110) and negative numbers from -1 (1111111111) to -512 (1000000000).
  • A number preceding with '0' (e.g 01111111111) should be written in text format ("01111111111") to avoid confusion with octal numbers.
  • A binary number (e.g '101') is converted to decimal number (base 2) as -
(1*2^2)+(0*2^1)+(1*2^0)=4+0+1= 5
  • If the number is not a valid number, 'Calci' returns an #ERROR message.

Below are few examples that show the use of combination of functions and get the result in decimal -

1)SUM(BIN2DEC(100) + BIN2DEC(101)) returns 9 as a result.

2)AVERAGE(BIN2DEC(100) + BIN2DEC(101)) returns 4.5 as a result.

3)BIN2DEC(110)+BIN2DEC(101)-BIN2DEC(100) returns 7 as a result.




HEX2DEC(num)

Where 'num' is the hexadecimal number.


This function ronverts a hexadecimal number to decimal.


HEX2DEC


 Lets see an example,

HEX2DEC(num)

=HEX2DEC("55") is 85

=HEX2DEC("3DA408B") is 64635019


Syntax

Examples

Description

Column1 Column2 Column3 Column4
Row1 85
Row2 64635019
Row3
Row4
Row5
Row6