Converting The Decimal IP Address To Binary - Study CCNA
Converting The Decimal IP Address To Binary - Study CCNA
Menu
Home What is CCNA? CCNA 200-301 exam Free CCNA Study Guide PDF Recommended Resources
Recommended CCNA Training Remember that IPv4 addresses are typically written in decimal digits, formatted as four 8-bit fields separated by
Course: periods. Each 8-bit field, called an octet, represents a byte of the IPv4 address.
Decimal Number
A decimal is a base 10 numbering system with which most of us are familiar. We use ten different numerals to repre
the decimal numbers from zero to nine. The numerals are 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. Once we get to the number
there is no numeral to represent this value, so we go one place value up from ones to tens and so on and so forth.
20 = 1
21 = 2
22 = 4
So since there are only two numerals that represent a binary digit, a usual example of it can be seen below.
11100101
0001100
11110100
Below is an example of an IPv4 address in dotted decimal format and its corresponding binary format.
:
Understanding the IP address given in the example above, below are the corresponding equivalent of the decimal
numbers to binary.
192 = 11000000
168 = 10101000
32 = 00100000
47 = 00101111
The first thing to do in converting decimal to binary system is to understand the corresponding decimal digits of the
byte. As stated earlier, there are 8 bits in 1 byte, and every bit corresponds to specific digits based on the most
significant bit (MSB) and the least significant bit (LSB).
Now we take the number 168, for example, and convert it to a binary number. To do so, we must do a simple additio
method of values based on the table above to get the corresponding decimal number. Each 1’s should be added, a
0’s should be disregarded.
Now, subtract the decimal value from the MSB value of the octet and continue the process until you subtract the LS
value or your result is already zero. All the results with a positive value or zero will be counted as a 1, subtracted to
next value, and, if not, will be considered 0.
40 – 64 = -24 (0)
40 – 32 = 8 (1)
8 – 16 = -8 (0)
8 – 8 = 0 (1)
0 – 4 = -4 (0)
0 – 2 = -2 (0)
0 – 1 = (0)
Once the difference is zero, the rest of the value up to the LSB shall be zero. Therefore the binary equivalent of 168
10101000.
Download our Free CCNA Study Guide PDF for complete notes on all the CCNA 200-301 exam topics in one book
:
We recommend the Cisco CCNA Gold Bootcamp as your main CCNA training course. It’s the highest rated C
course online with an average rating of 4.8 from over 30,000 public reviews and is the gold standard in CCNA traini
What is IPv4 Address and its Role in the Network? Subnet Mask Explain