HOW TO CONVERT DECIMAL NUMBER TO 16 BIT BINARY NUMBER [with Excel Addin]

INTRODUCTION

Excel is the SPREADSHEET APPLICATION offered by Microsoft.

Spreadsheet applications are very helpful in different types of mathematical applications.

The functions present in the EXCEL are useful in the different areas of the work. These functions are categorized as per their genre.

For Example,

There are Text functions, time functions, array function, statistical functions, mathematical functions, engineering functions and so on.

We do have the dedicated functions to create the BINARY NUMBER from the given DECIMAL NUMBER.

The function is known as DEC2BIN FUNCTION but it won’t help us here.

It only gives the output up 9 bits. Although it says the result is up to 10 bits but the leftmost bit is the sign bit.

WE’LL INTRODUCE YOU TO AN ADDIN WHICH WILL CONVERT THE DECIMAL NUMBER UPTO 64 BIT BINARY NUMBER WITHIN SECONDS

In this article, we’ll discuss the use of the function GYANKOSH_DEC2BIN which will let you convert any decimal number to the binary number without the limit of bits.

It can convert your decimal number to 16 bits or 32 bits or even 64 bits.



WHAT IS A DECIMAL NUMBER SYSTEM ?

1,2,3,4…0 are the normal numerals which we all know.

Actually these are the ARABIC NUMERALS.

We can see that we have 10 numbers in this system and all the other numbers are made from these numbers.

So, when we are having the ten numbers in a system , we call it a decimal system. [ DECA – 10 ]

Similar to a DECIMAL system, we have got many systems like BINARY, OCTAL, HEXADECIMAL and so on.


WHAT IS A BINARY NUMBER SYSTEM?

As DECIMAL NUMBER SYSTEM contains TEN DIGITS, we have a BINARY NUMBER SYSTEM where we have got just two digits which are 0 and 1.

The counting goes something like

0

01

10

11



WHY TO CONVERT THE DECIMAL SYSTEM INTO BINARY SYSTEM?

Every number system was developed through the history for some specific reasons.

BINARY SYSTEM HAS GOT THE IMPORTANCE IN THE DIGITAL WORLD. THE DIGITAL DEVICES RESPOND TO THE TWO VOLTAGE LEVELS ONLY WHICH REPRESENT THE OUTCOME AS A 0 OR 1.

SO, BINARY SYSTEM PROVIDES US THE EASE TO CALCULATE THE OUTCOMES AND HELP IN DESIGNING OF THE DIGITAL DEVICES.

All the calculations can be done using the binary mathematics but WE ARE ACQUAINTED TO USE DECIMAL MATHEMATICS which is comparitively easier to understand.

As you can see

3 is written as 11 in Binary system.

This is easier and can be learnt but what if the binary number is 101011100101.

This one is not easier for us to understand but for the machines, this is the best.

So , the conclusion is WE NEED THE UNDERSTANDING OF THE BINARY MATHEMATICS FOR THE DIGITAL ELECTRONICS, whereas we need the DECIMAL NUMBER FOR OUR EASY UNDERSTANDING.

This is the reason why we need the conversion from DECIMAL TO BINARY and BINARY TO DECIMAL.


WHY DEC2BIN FUNCTION IS NOT WORKING FOR HIGHER DECIMAL NUMBERS ?

There is a dedicated function known as DEC2BIN which converts the DECIMAL NUMBER to the BINARY number but it has a limit.

It only gives the output up to the 9 bits + 1 bit as the sign bit.

It means it’ll work within the range -511 to +511.

If you need the binary output outside this range, this given function won’t be a success for you which creates a need for a dedicated function with the extended capabilities.

The following picture shows the trial of both the function DEC2BIN and GYANKOSH_DEC2BIN


DEC2BIN VERSUS GYANKOSH_DEC2BIN FUNCTION

In the picture above, you can see that the standard DEC2BIN function fails once the value becomes greater than 511. But GYANKOSH_DEC2BIN will still work.


DOWNLOAD THE ADDIN

Click the link below to download the ADDIN FILE and save it anywhere you want.


THE ADDIN WILL WORK ON 64 BIT EXCEL APPLICATION. THE ADDIN WILL SOON BE UPDATED FOR 32 BIT EXCEL APPLICATION. IF YOU TRY IT ON 32 BIT EXCEL, THE FUNCTION WON’T WORK AND PRODUCE AN ERROR.

SAFETY WHILE INSTALLING THE ADDINS

DON'T WORRY ABOUT THE SAFETY OF YOUR DEVICE WHILE INSTALLING ANY ADDIN FROM THIS WEBSITE. 
WE ARE A GROUP OF TECHNOLOGY ENTHUSIASTS AND HAVE CREATED THIS RESOURCE FOR HELPING OTHERS.

INSTALLING THE GYANKOSH_ENGINEERING ADDIN

ADDIN is in the form of a simple excel file with a .xlam extension.

IF YOU FIND DIFFICULTY IN INSTALLING THE ADDIN, CLICK ANYWHERE ON THIS LINE TO LEARN THE COMPLETE ARTICLE ON THE INSTALLATION OF THE ADDINS IN EXCEL.

Follow the steps to install the ADDIN in Excel.

  • OPEN EXCEL.
  • Go to OPTIONS>ADDINS
  • Select EXCEL ADD-INS
  • Click GO.
  • A new dialog box will open as shown in the picture containing all the EXCEL ADD-INS list.
  • We can select the Addins we want to activate.
  • In our case we want to install the add in , so click BROWSE.
  • An OPEN FILE DIALOG BOX will open.
  • Choose the ADD-IN file and click OK.
  • The Add in will show in the list.
  • Select it and click ok.
  • Add in is installed.

IF YOU FIND DIFFICULTY IN INSTALLING THE ADDIN, CLICK ANYWHERE ON THIS LINE TO LEARN THE COMPLETE ARTICLE ON THE INSTALLATION OF THE ADDINS IN EXCEL.

USING THE GYANKOSH_DEC2BIN FUNCTION

After the ADDIN has been installed, we are all ready to use our custom function to convert any number to upto 64 bits.

You can convert the number to 16 bits or 32 bits or 64 bits as per the requirement.

SYNTAX FORMULA OF GYANKOSH_DEC2BIN FUNCTION

The syntax [ The way a function is used or written ] is

=GYANKOSH_DEC2BIN(DECIMAL NUMBER)

DECIMAL NUMBER is the number which is to be converted into BINARY NUMBER.

STEPS TO USE GYANKOSH_DEC2BIN FUNCTION

After we have installed the ADD IN, the function GYANKOSH_DEC2BIN will behave like the BUILT-IN FUNCTIONS only.

It means, we can simply type the function in the mentioned format and we’ll get the result.

FOLLOW THE STEPS TO USE THE GYANKOSH_DEC2BIN function.

  • Select the cell where you want the result.
  • Enter the function as =GYANKOSH_DEC2BIN( DECIMAL NUMBER).
  • Press ENTER.
  • The result will appear.

Let us take a few examples and check the function.

EXAMPLE 1: CONVERT 1011 DECIMAL NUMBER INTO BINARY NUMBER

So, 1011 is greater than 511 and DEC2BIN function would not be able to convert this number into Binary.

so, we’ll make use of our Addin based custom function to convert this number.

Follow the steps to convert 1011 to binary number.

  • Select the cell where result is required. For our example we’ll select J5
  • The decimal number 1011 is present in the cell G5
  • Enter the formula as =GYANKOSH_DEC2BIN(G5)
  • Press ENTER.
  • The result appeared as 1111110011 which is correct.

CONVERSION FROM DECIMAL SYSTEM TO BINARY SYSTEM

EXAMPLE 2: CONVERT 654898745 DECIMAL NUMBER INTO BINARY NUMBER

So, 654898745 is far far greater than 511 and DEC2BIN function would not be able to convert this number into Binary.

so, we’ll make use of our Addin based custom function to convert this number.

Follow the steps to convert 654898745 to binary number.

  • Select the cell where result is required. For our example we’ll select J7.
  • The decimal number is present in the cell G7.
  • Enter the formula as =GYANKOSH_DEC2BIN(G7)
  • Press ENTER.
  • The result appeared as 100111000010001111011000111001 which is correct.

CONVERSION FROM DECIMAL SYSTEM TO BINARY SYSTEM

EXAMPLE 3: CONVERT 316545649 DECIMAL NUMBER INTO BINARY NUMBER

The given number is again too big and DEC2BIN function would not be able to convert this number into Binary.

so, we’ll make use of our Addin based custom function to convert this number.

Follow the steps to convert 316545649 to binary number.

  • Select the cell where result is required. For our example we’ll select J9
  • The decimal number 316545649 is present in the cell G9
  • Enter the formula as =GYANKOSH_DEC2BIN(G9).
  • Press ENTER.
  • The result appeared as 10010110111100001101001110001 which is correct.

CONVERSION FROM DECIMAL SYSTEM TO BINARY SYSTEM

So in this article, we got an EXCEL ADDIN which help us to convert

DECIMAL NUMBER TO 8 BIT BINARY NUMBER or

DECIMAL NUMBER TO 16 BIT BINARY NUMBER or

DECIMAL NUMBER TO 32 BIT BINARY NUMBER or

DECIMAL NUMBER TO 64 BIT BINARY NUMBER.