13 - Understanding IPv4 Addresses & Binary Math
13 - Understanding IPv4 Addresses & Binary Math
InstructorAlton.com
Understanding IPv4 Addresses
• An IP Address is a logical address used in order to uniquely identify a device
on an IP network.
• It’s a Network Layer Address
• There are Two Versions:
o IP version 4 (IPv4)
o IP version 6 (IPv6)
• This lesson focuses on IPv4, and we’ll discuss IPv6 later in the course.
InstructorAlton.com
IPv4 Address Anatomy
• Made up of 32 binary bits, which can be divided into a network portion and a
host portion with the help of a subnet mask.
o The 32 binary bits are broken into four octets (1 octet = 8 bits).
o Each octet is converted to decimal and separated by a period (dot).
o For this reason, an IP address is said to be expressed in dotted decimal format.
InstructorAlton.com
IPv4 Address Anatomy
InstructorAlton.com
IPv4 Address Components
• Each device on a network is assigned an IP address, subnet mask and default
gateway:
o IP Address: Unique logical address assigned to each device on a network.
o Subnet Mask: Used by the device to determine what subnet it’s on, specifically the
network and host portions of the IP address.
o Default Gateway: The IP address of a network’s router that allows devices on the local
network to communicate with other networks.
InstructorAlton.com
Understanding IPv4 Addresses & Binary Math Section
InstructorAlton.com
Basics of Binary Math
Lecture Goals
• Convert Binary to Decimal
• Convert Decimal to Binary
InstructorAlton.com
Basics of Binary Math
Why is it important?
We need to know basic binary math to perform subnetting, as well as to
understand how IPv4 addresses work.
Remember This
128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255
InstructorAlton.com
What is the binary 11111111 in decimal?
128 64 32 16 8 4 2 1
Binary 1 1 1 1 1 1 1 1
Decimal 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255 Decimal
InstructorAlton.com
What is the binary 10101010 in decimal?
128 64 32 16 8 4 2 1
Binary 1 0 1 0 1 0 1 0
Decimal 128 + 0 + 32 + 0 + 8 + 0 + 2 + 0 = 170 Decimal
InstructorAlton.com
What is the binary 10000011 in decimal?
128 64 32 16 8 4 2 1
Binary 1 0 0 0 0 0 1 1
Decimal 128 + 0 + 0 + 0 + 0 + 0 + 2 + 1 = 131 Decimal
InstructorAlton.com
What’s 192 in binary?
128 64 32 16 8 4 2 1
Binary 1 1 0 0 0 0 0 0 = 11000000
Decimal 128 + 64 + 0 + 0 + 0 + 0 + 0 + 0 = 192 Decimal
Start adding the numbers from left to right until you achieve the decimal amount
you are looking for!
InstructorAlton.com
What’s 202 in binary?
128 64 32 16 8 4 2 1
Binary 1 1 0 0 1 0 1 0 = 11001010
Decimal 128 + 64 + 0 + 0 + 8 + 0 + 2 + 0 = 202 Decimal
Start adding the numbers from left to right until you achieve the decimal amount
you are looking for!
InstructorAlton.com
What’s 54 in binary?
128 64 32 16 8 4 2 1
Binary 0 0 1 1 0 1 1 0 = 00110110
Decimal 0 + 0 + 32 + 16 + 0 + 4 + 2 + 0 = 54 Decimal
Start adding the numbers from left to right until you achieve the decimal amount
you are looking for!
InstructorAlton.com
IP Address Conversion Process
InstructorAlton.com