# Decimal To Binary Conversion Example (Free Preview)

In this lesson, we are going to look at how to convert the decimal IPv4 address 172.16.10.1 to its binary representation. Using the previously explained process and the binary positional value table, start with the first decimal number 172.

Figure 172 = 10101100

- Is 172 greater than or equal to 128? Yes. Then add a 1 in the 128 positional value. Calculate remainder =172 – 128 = 44.
- Is 44 greater than or equal to 64? No. Then add a 0 in the 64 positional value.
- Is 44 greater than or equal to 32? Yes. Then add a 1 in the 34 positional value. Calculate remainder =44 – 32 = 12.
- Is 12 greater than or equal to 16? No. Add a 0 in the 16 positional value.
- Is 12 greater than or equal to 8? Yes. Then add a 1 in the 8 positional value. Calculate remainder =12 – 8 = 4
- Is 4 greater than or equal to 4? Yes. Then add a 1 in the 4 positional value. Calculate remainder =4 – 4 = 0.

The result is 10101100.

Figure 16 = 00010000

- Is 16 greater than or equal to 128? No. Then add a 0 in the 128 positional value.
- Is 16 greater than or equal to 64? No. Then add a 0 in the 64 positional value.
- Is 16 greater than or equal to 32? No. Then add a 0 in the 34 positional value.
- Is 16 greater than or equal to 16? Yes. Then add a 1 in the 16 positional value. Calculate remainder =16 – 16 = 0

The result is 00010000.

Figure 10 = 00001010

- Is 10 greater than or equal to 128? No. Then add a 0 in the 128 positional value.
- Is 10 greater than or equal to 64? No. Then add a 0 in the 64 positional value.
- Is 10 greater than or equal to 32? No. Then add a 0 in the 34 positional value.
- Is 10 greater than or equal to 16? No. Then add a 0 in the 16 positional value.
- Is 10 greater than or equal to 8? Yes. Then add a 1 in the 8 positional value. Calculate remainder =10 – 8 = 2.
- Is 2 greater than or equal to 4? No. Then add a 0 in the 4 positional value.
- Is 2 greater than or equal to 2? Yes. Then add a 1 in the 2 positional value. Calculate remainder =2 – 2 = 0.

The result is 00001010.

Figure 1 = 00000001

- Is 1 greater than or equal to 128? No. Then add a 0 in the 128 positional value.
- Is 1 greater than or equal to 64? No. Then add a 0 in the 64 positional value.
- Is 1 greater than or equal to 32? No. Then add a 0 in the 34 positional value.
- Is 1 greater than or equal to 16? No. Then add a 0 in the 16 positional value.
- Is 1 greater than or equal to 8? No. Then add a 0 in the 8 positional value.
- Is 1 greater than or equal to 4? No. Then add a 0 in the 4 positional value.
- Is 1 greater than or equal to 2? No. Then add a 0 in the 2 positional value.
- Is 1 greater than or equal to 1? Yes. Then add a 1 in the 1 positional value. Calculate remainder =1 – 1 = 0.

The result is 00000001.