Engineering All versions ◉ 6 views

=HEX2BIN()

Converts a hexadecimal number to binary.

Applies To: Excel for Microsoft 365Excel for Microsoft 365 for MacExcel 2024Excel 2024 for MacExcel 2021Excel 2021 for MacExcel 2019Excel 2016
=HEX2BIN(number, [places])
Hover argument names in the table for details.
Output typeNumber/Text
Popularity16 / 100
VolatileNo
Dynamic ArrayNo
📥 Download sample .xlsx — Coming soon ▦ Try in Playground Dedicated file for this function — safe & lightweight · sample data + live formulas
Share:

⬇ Download Sample Workbook

A dedicated .xlsx for =HEX2BIN() with Persian sample data & live formulas — open in Excel and practice.

  • Sheet “Sample” — data table + formula in place
  • Sheet “Guide” — syntax, arguments & tips from this page
  • Instant & secure (token + rate limit)
📥 Download HEX2BIN.xlsx — Coming soon ~ 8–12 KB · No macros

⇪ Share

Send this function to friends

🧠 🧠 Quiz this function

%d questions — syntax, example & errors — test yourself!

◧ Arguments

ArgumentTypeRequiredDescription
number Text Required The hexadecimal number you want to convert. Number cannot contain more than 10 characters. The most significant bit of number is the sign bit (40th bit from the right). The remaining 9 bits are magnitude bits. Negative numbers are represented using two's-complement notation.
places Number Optional The number of characters to use. If places is omitted, HEX2BIN uses the minimum number of characters necessary. Places is useful for padding the return value with leading 0s (zeros).

▣ Examples

تبدیل هگزادسیمال F به باینری با ۸ نویسه (۴ صفر ابتدایی به عنوان پرکننده) =HEX2BIN("F", 8)
تبدیل هگزادسیمال B7 به باینری =HEX2BIN("B7")
تبدیل هگزادسیمال FFFFFFFFFF به باینری =HEX2BIN("FFFFFFFFFF")

✦ Tips

  • If number is negative, HEX2BIN ignores places and returns a 10-character binary number.
  • If number is negative, it cannot be less than FFFFFFFE00, and if number is positive, it cannot be greater than 1FF.
  • If places is not an integer, it is truncated.

⚠ Common Errors

#NUM! If number is not a valid hexadecimal number, HEX2BIN returns the #NUM! error value. If HEX2BIN requires more than places characters, it returns the #NUM! error value. If places is negative, HEX2BIN returns the #NUM! error value.
Fix: Up to 10 characters
#VALUE! If places is nonnumeric, HEX2BIN returns the #VALUE! error value.
Fix: برای places یک مقدار عددی وارد کنید.

💬 Comments & Q&A 0 approved

🔒 Your comment will be published after review.

Share your thoughts — visible after admin approval

No comments yet — be the first!

✍️ Add comment / question

captcha
🔒 Your comment will be published after review.