How to Convert Decimal to Binary in Excel (3 Simple Ways)

Converting decimal numbers to binary is a common task in computer science and digital systems. Binary numbers use only 0s and 1s to represent values, and this format is essential for understanding how computers process information.

You might need to convert decimal values to binary when working with logical operations, network calculations, or learning how binary works. Excel provides built-in functions that let you perform this conversion quickly without doing it manually.

In this guide, we’ll learn how to convert decimal numbers to binary in Excel using step-by-step methods that are simple and effective.

Key Takeaways

The Base function allows you to convert small to large decimal values into any base such as 31, 80, 2360, 2550, or 3300 into binary format.

Here’s how to apply this method:

➤ Open your dataset in Excel.
➤ Click on cell B2 next to the first decimal value.
➤ Type the formula =BASE(A2, 2)
➤ Press Enter. This will convert the decimal number in A2 to its binary equivalent.
➤ Drag the formula down to fill the rest of the cells in Column B.

overview image

Download Practice Workbook
1

Using Excel Built-In DEC2BIN Function

In the following dataset, we have a simple list of decimal numbers that we want to convert into binary. There are two columns labeled Decimal and Binary. Column A contains various decimal values, and Column B is currently empty.

Using Excel Built-In DEC2BIN Function

We’ll use this second column to calculate the binary equivalent of each decimal number using different formulas in Excel.

Excel has a built-in function called DEC2BIN that lets you convert decimal numbers into binary format. This function works well when you’re dealing with smaller numbers, as it only supports values of +/-511 (or 10 binary characters). It’s also one of the easiest ways to perform binary conversion without doing it manually.

In this method, we’ll use the DEC2BIN function to convert each decimal number into binary in Column B.

Here’s how to apply this method:

➤ Open your dataset in Excel.
➤ Click on cell B2 where you want the binary result.
➤ Type the formula:

=DEC2BIN(A2)

Using Excel Built-In DEC2BIN Function

➤ Press Enter. The binary version of the decimal value will appear.

Using Excel Built-In DEC2BIN Function

➤ Now, drag the formula down with the fill handle (+ tool) to fill all the rows in Column B.

Using Excel Built-In DEC2BIN Function


2

Using BASE Function for Large Numbers

In the following dataset, we have a list of small and large decimal numbers. There are two columns labeled Decimal and Binary. Column A contains the decimal values, and Column B is currently empty.

Using BASE Function for Large Numbers

We’ll use this second column to convert each decimal number into binary using the BASE function.

The BASE function in Excel is a powerful alternative when you’re working with decimal numbers that fall outside the supported range of DEC2BIN. It allows you to convert small to large decimal values into any base such as 31, 80, 2360, 2550, or 3300 into binary format.

Here’s how to apply this method:

➤ Open your dataset in Excel.
➤ Click on cell B2 next to the first decimal value.
➤ Type the formula:

=BASE(A2, 2)

Using BASE Function for Large Numbers

➤ Press Enter. This will convert the decimal number in A2 to its binary equivalent.

Using BASE Function for Large Numbers

➤ Drag the formula down to fill the rest of the cells in Column B.

Using BASE Function for Large Numbers


3

Converting Negative Numbers by Combining IF and BASE Function

In the following dataset, we have a list of negative decimal numbers in Column A. Column B is empty and will be used to calculate the binary values.

Converting Negative Numbers by Combining IF and BASE Function

The BASE function in Excel works well for positive decimal numbers, but it doesn’t support negative numbers directly. If you try to convert a negative number using BASE, it will return an error.

To solve this, we can use the IF function along with BASE to handle negative values properly. This method applies 2’s complement logic to show the correct 32-bit binary format for negative numbers.

Here’s how to apply this method:

➤ Open your dataset in Excel.
➤ Click on cell B2 where you want the binary result.
➤ Type the following formula:

=IF(A2<0, BASE(A2 + 2^32, 2, 32), BASE(A2, 2, 32))

Converting Negative Numbers by Combining IF and BASE Function

➤ Press Enter.
➤ This will return the 32-bit 2’s complement binary format for negative numbers.

Converting Negative Numbers by Combining IF and BASE Function

➤ Drag the formula down to apply it to all the rows in Column B.

Converting Negative Numbers by Combining IF and BASE Function

Explanation
This formula works in two ways: For negative numbers, it adds 2^32 and converts to binary using 2’s complement logic. And for positive numbers, it just applies the standard binary conversion and pads the result to 32 bits.

Frequently Asked Questions

What is the formula to convert decimal to binary in Excel?

The simplest formula is =DEC2BIN(A2) for numbers between –512 and 511, or 10 Binary Characters. For larger values such as 1280, 2360, or 3300, use this formula =BASE(A2, 2).

Why is DEC2BIN not working for large numbers?

The DEC2BIN function only supports for only 10 Binary Characters or numbers from -512 to 511. If you input a number outside this range, it won’t work and will return a #NUM! Error.


Wrapping Up

Excel offers several reliable ways to convert decimal numbers into binary using built-in functions and custom formulas. The DEC2BIN function is ideal for smaller values but it has a limit. On the other hand, the BASE function is perfect for handling both small and larger inputs.

For negative numbers, you can combine IF and Base functions to create 2’s complement binary format, which is especially helpful in fixed-bit technical systems.

These methods are great for learning binary logic or working with datasets that need binary representation. With just a few steps, Excel helps simplify complex binary conversions and ensures accurate results every time.

ExcelInsider Team
We will be happy to hear your thoughts

Leave a reply

Excel Insider
Logo