Changes

Jump to navigation Jump to search
no edit summary
Line 1: Line 1:  
=HEX2BIN(number, places)=
 
=HEX2BIN(number, places)=
   −
*Where 'number' is the hexadecimal number to be converted, and
+
*Where <math>number</math> is the hexadecimal number to be converted, and
*'places' is the number of characters to display the output.
+
*<math>places</math> is the number of characters to display the output.
    
HEX2BIN() converts a hexadecimal number to its binary equivalent.
 
HEX2BIN() converts a hexadecimal number to its binary equivalent.
Line 15: Line 15:  
HEX2BIN("4F",4) ''returns 1001111''
 
HEX2BIN("4F",4) ''returns 1001111''
   −
*The 'number' can be maximum of 10 characters (40 bits). If it exceeds the limit, Calci gives a #NUM! error.
+
*The <math>number</math> can be maximum of 10 characters (40 bits). If it exceeds the limit, Calci gives a #NUM! error.
 
*Hexadecimal number uses numbers from 0 to 9 and characters from A to F. Hence, the number argument should be entered in quotes (e.g. "1FF").  
 
*Hexadecimal number uses numbers from 0 to 9 and characters from A to F. Hence, the number argument should be entered in quotes (e.g. "1FF").  
 
*The most significant bit of the number is the sign bit and remaining bits are magnitude bits. A negative number is represented in 2's complement form.
 
*The most significant bit of the number is the sign bit and remaining bits are magnitude bits. A negative number is represented in 2's complement form.
*Calci returns an #ERROR message, if the 'number' is not a valid hexadecimal number.
+
*Calci returns an #ERROR message, if the <math>number</math> is not a valid hexadecimal number.
*'places' argument is used to return the output with leading zeros. If 'places' argument is not used, 'Calci' uses the minimum number of characters required to display the binary output.  
+
*<math>places</math> argument is used to return the output with leading zeros. If <math>places</math> argument is not used, 'Calci' uses the minimum number of characters required to display the binary output.  
*If 'places' is negative, Calci ignores the places and uses the minimum number of characters required to display the binary output.
+
*If <math>places</math> is negative, Calci ignores the places and uses the minimum number of characters required to display the binary output.
*If 'places' is not an integer, Calci rounds the value and uses the integer part as input.
+
*If <math>places</math> is not an integer, Calci rounds the value and uses the integer part as input.
*If 'places' is less than the number of output characters, Calci ignores the places and uses the minimum number of characters required to display the output.
+
*If <math>places</math> is less than the number of output characters, Calci ignores the places and uses the minimum number of characters required to display the output.
    
== Examples ==
 
== Examples ==
writer
2,661

edits

Navigation menu