How to use BIN2DEC Function in Excel?

Excel’s BIN2DEC function is a powerful tool for converting binary numbers into their decimal equivalents. This function is particularly useful when working with binary data or performing binary-to-decimal conversions. This short tutorial will cover the basics of the BIN2DEC function in Excel and guide you through its usage.

This Tutorial Covers:

  1. What is BIN2DEC function in Excel
    • Syntax
    • Parameters or Arguments
    • Returns
    • Applies To
  2. To convert binary to decimal in Excel, use the BIN2DEC function
  3. Utilize a combination of functions in Excel to convert binary to decimal
  4. Things to Remember
  1. What is BIN2DEC function in Excel?

The BIN2DEC function in Microsoft Excel transforms binary numbers into decimal numbers.

An engineering function that is a built-in feature of Excel is the BIN2DEC function. In Excel, it can be utilized as a worksheet function (WS). The BIN2DEC function can be used as a worksheet function and entered as an ingredient in a formula in a worksheet cell.

  • Syntax:

The BIN2DEC function in Microsoft Excel has the following syntax:

=BIN2DEC(number)

BIN2DEC function

  • Parameters or Arguments:

The binary number you want to convert is the only argument provided to the BIN2DEC function.

The following is the argument for Excel’s BIN2DEC function:

number (Required): Your target conversion is the binary number. There can be no more than 10 characters (10 bits) in a number. The sign bit is the most important bit in a number. Magnitude bits make up the final 9 bits. The notation two’s complement is used to express negative numbers.

  • Returns:

A numerical value is returned by the BIN2DEC function.

  • Applies To:

The following versions of Excel are available: Excel 2019, Excel 2016, Excel 2013, Excel 2011 for Mac, Excel 2010, and Excel 2007.

  1. To convert binary to decimal in Excel, use the BIN2DEC function:

Using the Excel BIN2DEC function is the first approach. The binary numbers will be converted to decimal numbers using this function.

To demonstrate how to use the BIN2DEC function in Excel, let’s consider the below dataset, where we have a dataset of binary values.

BIN2DEC function

The steps to use BIN2DEC function are described below:

Step 1: Enter the following formula in cell B2 and copy and paste the formula in the rest cells as well.

=BIN2DEC(A2)

BIN2DEC function

3. Utilize a combination of functions in Excel to convert binary to decimal:

Utilizing a number of different functions is the next approach. The SUMPRODUCT, MID, LEN, ROW, and INDIRECT functions are among them.

Let’s consider the below dataset, where we have a dataset of binary values.

BIN2DEC function

The steps to use BIN2DEC function are described below:

Step 1: Enter the following formula in cell B2 and copy and paste the formula in the rest cells as well.

=SUMPRODUCT(–MID(A2,LEN(A2)+1-ROW(INDIRECT(“1:”&LEN(A2))),1),(2^(ROW(INDIRECT(“1:”&LEN(A2)))-1)))

BIN2DEC function

Formula Breakdown:

Here is a breakdown of the formula:

SUMPRODUCT(): This function multiplies the two arrays and returns the sum of the products. The first array is the binary digits, and the second array is the powers of 2.

MID(): This function returns a specified number of characters from a string starting at a specified position. The first argument is the cell containing the binary digits, the second argument is the starting position, and the third argument is the number of characters to return.

LEN(): This function returns the length of a string. The argument is the cell containing the binary digits.

ROW(): This function returns the row number of a cell. The argument is the cell containing the range of binary digits.

INDIRECT(): This function returns the value of a cell referenced by a text string. The argument is the text string that contains the range of binary digits.

The formula works by first converting the binary digits to their corresponding powers of 2. Then, it multiplies the powers of 2 by the binary digits and sums the products. The result is the decimal value of the binary number.

For example, the binary number 10100101 is converted to its corresponding powers of 2 as follows:

1 * 2^0 = 1

0 * 2^1 = 0

1 * 2^2 = 4

0 * 2^3 = 0

1 * 2^4 = 16

0 * 2^5 = 0

The products of the powers of 2 and the binary digits are then summed to get the decimal value of the binary number, which is 165.

4. Things to Remember:

There are just 2 digits in binary numbers: 0 and 1. Other numbers are irrelevant in this context. The results won’t be correct if you enter numbers other than 0 and 1.

You may be interested:

  1. Financial Dashboards
  2. Sales Dashboards
  3. HR Dashboards
  4. Data Visualization Charts

Leave a Comment

Your email address will not be published. Required fields are marked *

Categories