How to Use Excel's BIN2HEX Function

By eHow Computers Editor

Rate: (0 Ratings)

Excel's BIN2HEX function converts a binary number (base 2) to a hexadecimal number (base 16). Computer programming frequently utilizes this conversion because machine language is in binary but is often represented with hexadecimal characters. The hexadecimal numerals are the decimal numerals 0 to 9 followed by the alphabetic characters A to F. The following steps will show how to use Excel's BIN2HEX function.

Instructions

Difficulty: Moderate

Step1
Learn the syntax for BIN2HEX. It's BIN2HEX(value[,precision]) where value is the binary number to convert and precision is an optional argument specifying the minimum number of digits of precision that that the return value will have.
Step2
Ensure value is not longer than 10 bits, including the sign bit. Negative numbers may be expressed with two’s complement notation.
Step3
Provide precision if you need the return value to be zero filled to a certain number of places. Precision will be truncated to an integer if needed. The return value will have the minimum number of digits if precision is omitted.
Step4
Interpret the error values that may be returned by BIN2HEX. The #VALUE! error value will be returned if precision is non-numeric. The #NUM! error value will be returned if value is not a binary number, value has more than 10 bits, the return value needs more than precision digits or precision is negative.
Step5
Look at an example of BIN2HEX. =BIN2HEX(11111011,4) returns 00FB because 1111 in binary is F in hexadecimal and 1011 is B. Note that this value was padded to four digits as specified by precision.

Post a Comment

POST A COMMENT

Request a New How-To Article

Looking for more How To information? Chances are there’s an eHow member who knows how to do what you’re looking to do. Submit an article request now!

eHow Article:  How to Use Excel's BIN2HEX Function

eHow Computers Editor

eHow Computers Editor

Category: Computers

Articles: See my other articles

Related Ads