**Decimal to Binary**

How we route a packet from one network to other network or subnet. We will begin our discussion by taking at ipv4 and we will begin that discussion by reviewing how binary works because we have to do lots of binary operation. How to Convert Decimal to Binary ? is the major problem. But this article tells you about the binary to decimal conversion step by step. We will take ipv4 address which is 32bit address and we will see how Some of the bit used to represent the network and some of the bits are used to represent host on the network. We will do a different type of subnetting.

Most of the network today is reliant on ipv4 and it is super critical that we understand the operation of ipv4. How we convert a simple number into binary and vice versa. It’s very important to know how we convert. We will see what the structure of ipv4 address. How we assign an ipv4 address to a client machine.

- Ipv4 address has 32 bits, which are made up of four sets of eight bits.
- These sets of 8 bits are called octets.

**Binary Numbering:**

Let’s say we have number **10.1.2.3** the address you seeing is ipv4 address. Before we start working on IP addresses. doing things like subnetting, designing and saying how many hosts belongs to a subnet. First, we have to understand the binary numbering how we represent an IP address into its binary equivalent. Below is the decimal to binary formula:

**Step 1**

First, we have to separate the numbers into 4 columns we also say this dotted decimal notation. we have to represent a single dotted number into 8 digits binary number first we have to convert the decimal numbers into binary.

10 —> 00001010 (1st Octet )

1—–>00000001 (2nd Octet)

2—–>00000010 (3rd Octet)

3——>00000011 (4th Octet)

## How to Convert Decimal to Binary?

How we convert 10 decimal into its binary. First, we have to make a table. These all numbers are present in the power of 2. Like 128 is equal to 2^7, 64 equals to 2^6. Note** ^** symbol show power.

** 128 64 32 16 8 4 2 1**

** 0 0 0 0 1 0 1 0 **

So it’s easy to convert decimal into binary when we make this table. All we have to do is just add the number what we have to make. As in our example, we have to make a binary of 10. So all we have to do is to put 1 under the 8 and 2. it will make the 10 so binary would be **0 0 0 0 1 0 1 0**

Same process with the other decimal numbers.

### Binary of 1 is : 0 0 0 0 0 0 0 1

** 128 64 32 16 8 4 2 1**

** 0 0 0 0 0 0 0 1 **

### Binary of 2 is : 0 0 0 0 0 0 1 0

** 128 64 32 16 8 4 2 1**

** 0 0 0 0 0 0 1 0 **

### Binary of 3 is : 0 0 0 0 0 0 1 1

** 128 64 32 16 8 4 2 1**

** 0 0 0 0 0 0 1 1 **

You will find the simple and quick answer of How to Convert Decimal to Binary?

**Conversion decimal to binary step by step:**

For example, we have a decimal number **167**. We have to calculate the corresponding binary number. It’s very simple and easy steps for the conversion of binary to decimal. How to Convert Decimal to Binary? First, make a table.

** 128 64 32 16 8 4 2 1**

** 1 0 1 0 0 1 1 1 **

- Is 167 is greater than or equal to 128?
- Yes, place a “1” under 128
- Now subtract 128 from 167 is equal to
**39**. - Is 39 greater than or equal to 64?
- No, place “0” under 64
- Is 39 greater than or equal to 32?
- Yes, place “1” under 32
- Subtract 39 from 32 is equal to
**7** - Is 7 greater than or equal to 16?
- No place “0” under 16
- Is 7 greater than or equal to 8?
- No place “0” under 8
- Is 7 greater than or equal to 4?
- Yes, place “1” under 4
- Subtract 7 from 4 is equal to
**3** - Is 3 greater than or equal to 2?
- Yes, place “1” under 2
- Subtract 3 from 2 is equal to 1
- Is 1 greater than or equal to 1?
- Yes, place “1” under 1
- Subtract 1 from 1 is equal to
**0**

**128+32+4+2+1=167**

I think that it will work if you practice more then you will become expert in binary to decimal conversion. Now you will be able to give a proper answer to How to Convert Decimal to Binary?

## Summary:

- IP: 32-bit Binary number for all addresses.
- Reading and Writing 32 bits of a Binary is too hard…!
- Converting all 32 bit to Decimal is too Tedious.
- Break 32 Bits into 4 Groups of 8 bits called Octets.
- Dotted Decimal Notation Converts Octets to Decimal.
- Write down the binary number.
- List the powers of two from right to left.
- Write the digits of the binary number below their corresponding powers.
- Connect the digits in the binary number with their corresponding powers.
- Write down the final value of each power of two.
- Add the final values.
- Write the answer along with its base subscript.

Read more about Computer Networking Concepts…!