SlideShare a Scribd company logo
1 of 24
www.professordkinney.com
08/08/13
Instructional Design-Computer Networking -
Bridges Educational Group
Mastering Binary For IPv4
08/08/13
Instructional Design-Computer Networking -
Bridges Educational Group
Lessons objectives:
Learn binaries
Converting binary to decimal
Converting decimal to binaries
08/08/13
Instructional Design-Computer Networking -
Bridges Educational Group
Mastering Binary For IPv4
The IP Address Classes
08/08/13
Instructional Design-Computer Networking -
Bridges Educational Group
Mastering Binary For IPv4
Expressing Numbers In Binary And Decimal
Format Where does the term “binary” in “binary math” come from, anyway? Let’s
compare how numbers are expressed in binary and decimal format.
The number format we use every day is expressed in decimal format. If you express a
number as “47”, for instance, that is expressing a number in decimal format. When an IP
address is written as 100.45.45.48, that’s referred to as “dotted decimal”. Binary numbers
are expressed in strings of ones and zeroes.
Throughout your Cisco studies, you’ll see such strings as “01001000”. That’s binary
numbering.
What does that string of zeroes and ones mean? The more familiar decimal numbering is
used to convert a number from binary to decimal, or decimal to binary. Remember when
I said that if you can double the number “1” seven times, you can do any binary math
problem? Here’s the simple table you’ll use to solve many binary math problems. Note
the values in the table start with “1” in the rightmost column, and simply double from
right to left until the boxes are filled:
08/08/13
Instructional Design-Computer Networking -
Bridges Educational Group
Mastering Binary For IPv4
You can also start with 128 in the leftmost box and keep dividing by 2 until all the boxes are
filled, but it’s my experience that most students are more comfortable starting with “1”
and doubling from right to left. You’ll see in future sections how this chart is used in
almost every subnetting question you’ll ever see, and how that chart will help you truly
understand binary math. For now, decide whether you want to start with “1’ and double
from right to left, or start with “128” and divide by 2 from left to right, and use that
method for all your questions. Choose the one you’re more comfortable with, but decide
on your method now and stick with it.
Introduction To The “Boolean AND” Operation
You must be comfortable performing Boolean ANDs as well. I see anxiety in students’ eyes
when I bring this up as well, but this is even simpler than binary math. A Boolean AND
is simply a bit-by-bit comparison of the bits in an IP address and subnet mask. In future
sections, you’ll clearly see how the Boolean AND will help you solve many subnetting
questions. For now, keep in mind that these bits being compared will either be set to “1”
or “0”. If both bits are “1”, the result of the Boolean AND is “1”. Any other combination
will result in “0
08/08/13
Instructional Design-Computer Networking -
Bridges Educational Group
Mastering Binary For IPv4
Here is a quick example using two pairs of six-digit binary numbers
08/08/13
Instructional Design-Computer Networking -
Bridges Educational Group
Mastering Binary For IPv4
Note that the 3rd and 4th numbers are both “1”, so the AND result is “1”. All other
combinations, whether it’s “1” and “0” or “0” and “0”, result in “0”. With a basic
understanding of the default masks of the different types of networks, as well as how
binary and decimal numbers are expressed, you’re ready to begin tackling binary and
decimal conversions.
Converting Binary To Dotted Decimal
An example of a binary-to-dotted decimal question: “What is the dotted decimal equivalent
of the binary number 01100010 00111100 11111100 01010101?” To answer this type of
question, use the chart we developed in Section One. The first set of eight numbers
refers to the first octet of an IP address, and so on, so use the following variation of the
chart:
08/08/13
Instructional Design-Computer Networking -
Bridges Educational Group
For binary-to-decimal conversion, just plug the binary number strings
into the table. After doing so, add up all the values that have a “1” in
them from left to right, and that will give you the decimal value for
each octet.
Let’s take the first octet as an example. The binary string is
01100010. Filling in your chart from left to right, the first octet looks
like this:
Mastering Binary For IPv4
There are ones in the column for 64, 32, and 2. Just add them up, and that is the decimal
value for the first octet – 98. Repeat the process for each octet, and you quickly have the
dotted decimal equivalent of the binary string.
08/08/13
Instructional Design-Computer Networking -
Bridges Educational Group
The dotted decimal equivalent of the binary string we were given is
98.60.252.85.
Mastering Binary For IPv4
Binary-To-Decimal Practice Questions
What is the dotted decimal equivalent of the binary string 11110000 00110101 00110011 11111110?
08/08/13
Instructional Design-Computer Networking -
Bridges Educational Group
Answer? Find out by yourself and check it with your instructor
Mastering Binary For IPv4
What is the dotted decimal equivalent of the binary
string 11100010 00000001 11001010 01110110?
08/08/13
Instructional Design-Computer Networking -
Bridges Educational Group
Mastering Binary For IPv4
Converting Decimal To Binary
What is the binary equivalent of the dotted decimal IP address 217.48.23.190?
Converting decimal to binary uses the same chart as binary to decimal, but the actions
taken to achieve the answer are different. instead of being given the 1s and 0s to be
placed into a chart, you must determine which columns should have 1s and 0s.
The decimal number of the first octet is 217. This number must now
be converted to binary:
08/08/13
Instructional Design-Computer Networking -
Bridges Educational Group
You already know what the decimal value is. You must now determine
whether each column should have a “1” or a “0” in it. Work from left
to right, and ask this question: “Can I subtract this column’s value
from the current octet value with the result being a positive number or
zero?” If so, perform the subtraction, put a “1” in the column, and go
to the next column. If not, place a “0” in the column, and repeat the
process for the next column.
Mastering Binary For IPv4
Let’s look at that chart again:
08/08/13
Instructional Design-Computer Networking -
Bridges Educational Group
Can 128 be subtracted from 217, and result in zero or a positive number?
Sure, with the result being 89. Put a “1” in the 128 column and go to the
next column, repeating the operation WITH THE NEW
RESULT.
Mastering Binary For IPv4
Can 64 be subtracted from the new result, 89? Yes, with a remainder of 25. Put a “1” in the
64 column and repeat the operation in the next column, using the new result of 25.
08/08/13
Instructional Design-Computer Networking -
Bridges Educational Group
Can 32 be subtracted from 25, with the remainder being 0 or a
positive number? No. Place a “0” in the 32 column, and repeat the
operation in the next column with the value of 25.
Can 16 be subtracted from 25? Yes, with a remainder of 9. Place a
“1” in the 16 column, and go to the next column with the new value of
9.
Mastering Binary For IPv4
08/08/13
Instructional Design-Computer Networking -
Bridges Educational Group
Can 8 be subtracted from 9? Yes, with a remainder of 1. Place a “1” in the 8 column, and
repeat the operation in the next column with a remainder of 1.
We can quickly see that neither of the next two columns, 4 or 2, can
be subtracted from 1. Place a “0” in both of those columns.
Subtracting 1 from 1 brings us to zero, and also to the end of the
columns. Place a “1” in the 1 column, and you have the binary
equivalent of the decimal 217.
Mastering Binary For IPv4
The binary equivalent of the decimal 217 is 11011001. Once you can convert one octet, you can
convert any number of octets. Using this method, let’s go through the rest of the practice
question. The second octet’s decimal value is 48. Using the same chart, you can see that
you cannot subtract 128 or 64 from 48. Place a zero in both those columns, and move on
to the next column, moving left to right.
08/08/13
Instructional Design-Computer Networking -
Bridges Educational Group
Can you subtract 32 from 48? Sure, with a remainder of 16. Place a 1
in the 16 column, and go to the next column.
Mastering Binary For IPv4
Can you subtract 16 from 16? Obviously! Place a “1” in the 16 column. You’re actually done
with this octet, since the remainder is now zero. Once the remainder is zero, you can put
a zero in all remaining columns for that octet
08/08/13
Instructional Design-Computer Networking -
Bridges Educational Group
The third octet is 23. Working from left to right, you can see that you
cannot subtract 128, 64, or 32 from this value. Place a zero in all
three of these columns and move to the next column.
Mastering Binary For IPv4
Can 16 be subtracted from 23? Yes, with a remainder of 7. Place a “1’ in the 16 column and go
to the next column.
08/08/13
Instructional Design-Computer Networking -
Bridges Educational Group
Can 8 be subtracted from 7? No. Put a zero in that column.
Can 4 be subtracted from 7? Yes, with a remainder of three. Put a “1”
in the 4 column.
Mastering Binary For IPv4
Finally, 1 is subtracted from the remainder of 1, giving you zero, which is what you want at
the end of the conversion. Place a “1” in the 1 column, and this octet has been converted.
08/08/13
Instructional Design-Computer Networking -
Bridges Educational Group
The last octet is 190. Working from left to right, can 128 be
subtracted from 190? Yes, with a remainder of 62. Put a “1” in the
128 column and move to the next column.
Mastering Binary For IPv4
Can 64 be subtracted from 62? No. Put a zero in the 64 column.
08/08/13
Instructional Design-Computer Networking -
Bridges Educational Group
Can 32 be subtracted from 62? Yes, with a remainder of 30. Put a “1”
in the 32 column, and go to the next column.
Mastering Binary For IPv4
Can 16 be subtracted from 30? Yes, with a remainder of 14. Put a “1” in the 16 column, and go
to the next column.
08/08/13
Instructional Design-Computer Networking -
Bridges Educational Group
Can 8 be subtracted from 14? Yes, with a remainder of 6. Place a “1”
in the 8 column, and go to the next column.
Mastering Binary For IPv4
Can 4 be subtracted from 6? Yes, with a remainder of 2. Place a “1” in the 4 column, and go
to the next column.
08/08/13
Instructional Design-Computer Networking -
Bridges Educational Group
Can 2 be subtracted from 2? Yes, with a remainder of 0. Place a “1” in the 2
column, and since the remainder is 0, place a “0” in the remaining
columns – in this case, the 1 column.
You’ve determined that the binary equivalent of the
dotted decimal number 217.48.23.190 is 11011001 00110000
00010111 10111110.
Mastering Binary For IPv4
Converting Decimal To Binary Questions
What is the binary equivalent of the dotted decimal IP address 100.10.1.200? For decimal-to-
binary conversions, always use this chart, and work from left to right as shown in this
section
08/08/13
Instructional Design-Computer Networking -
Bridges Educational Group
The binary equivalent is 01100100 00001010 00000001 11001000.
Mastering Binary For IPv4
What is the binary equivalent of the dotted decimal
IP address 10.255.18.244?
08/08/13
Instructional Design-Computer Networking -
Bridges Educational Group
Mastering Binary For IPv4

More Related Content

What's hot

Fundamentals of digital electronics
 Fundamentals of digital electronics Fundamentals of digital electronics
Fundamentals of digital electronics
sandeep patil
 
Decimal to binary number
Decimal to binary numberDecimal to binary number
Decimal to binary number
guestd8696a
 
Animations Lesson Plan
Animations Lesson PlanAnimations Lesson Plan
Animations Lesson Plan
rusty
 

What's hot (20)

Introduction of digital system
Introduction of digital systemIntroduction of digital system
Introduction of digital system
 
Cblm installing and configuring computer system and networks
Cblm installing and configuring computer system and networksCblm installing and configuring computer system and networks
Cblm installing and configuring computer system and networks
 
Complements of numbers
Complements of numbersComplements of numbers
Complements of numbers
 
History of programming
History of programmingHistory of programming
History of programming
 
Digital Electronics- Number systems & codes
Digital Electronics- Number systems & codes Digital Electronics- Number systems & codes
Digital Electronics- Number systems & codes
 
Getting started with arduino uno
Getting started with arduino unoGetting started with arduino uno
Getting started with arduino uno
 
Scratch Cards All
Scratch Cards AllScratch Cards All
Scratch Cards All
 
Scratch - Intuitive and Accessible Programming
Scratch - Intuitive and Accessible ProgrammingScratch - Intuitive and Accessible Programming
Scratch - Intuitive and Accessible Programming
 
Two’s complement
Two’s complementTwo’s complement
Two’s complement
 
Python
PythonPython
Python
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 
What is a creative technologist?
What is a creative technologist?What is a creative technologist?
What is a creative technologist?
 
K to 12 computer hardware servicing NCII
K to 12 computer hardware servicing NCIIK to 12 computer hardware servicing NCII
K to 12 computer hardware servicing NCII
 
Fundamentals of digital electronics
 Fundamentals of digital electronics Fundamentals of digital electronics
Fundamentals of digital electronics
 
Decimal to binary number
Decimal to binary numberDecimal to binary number
Decimal to binary number
 
Programming
ProgrammingProgramming
Programming
 
Kicad 101
Kicad 101Kicad 101
Kicad 101
 
Number system conversion
Number system conversionNumber system conversion
Number system conversion
 
Animations Lesson Plan
Animations Lesson PlanAnimations Lesson Plan
Animations Lesson Plan
 
Arduino presentation
Arduino presentationArduino presentation
Arduino presentation
 

Viewers also liked (8)

Implementing an EGIRP Based Solution
Implementing an EGIRP Based SolutionImplementing an EGIRP Based Solution
Implementing an EGIRP Based Solution
 
IPV6
IPV6 IPV6
IPV6
 
Presentation 4 for students of professordkinney.com
Presentation 4 for students of professordkinney.comPresentation 4 for students of professordkinney.com
Presentation 4 for students of professordkinney.com
 
Vlan configuration in medium sized network
Vlan configuration in medium sized networkVlan configuration in medium sized network
Vlan configuration in medium sized network
 
Implementing a scalable ospf based solution
Implementing a scalable ospf based solutionImplementing a scalable ospf based solution
Implementing a scalable ospf based solution
 
Wan networks
Wan networksWan networks
Wan networks
 
Building a medium sized network
Building a medium sized networkBuilding a medium sized network
Building a medium sized network
 
Troubleshooting basic networks
Troubleshooting basic networksTroubleshooting basic networks
Troubleshooting basic networks
 

Similar to Mastering Binary For IPV4

Data Representation
Data RepresentationData Representation
Data Representation
Rick Jamil
 

Similar to Mastering Binary For IPV4 (20)

Spreadsheets for developers
Spreadsheets for developersSpreadsheets for developers
Spreadsheets for developers
 
Binary, Decimal and Hexadecimal
Binary, Decimal and HexadecimalBinary, Decimal and Hexadecimal
Binary, Decimal and Hexadecimal
 
Ipv4 Final
Ipv4 FinalIpv4 Final
Ipv4 Final
 
GSP 215 Entire Course NEW
GSP 215 Entire Course NEWGSP 215 Entire Course NEW
GSP 215 Entire Course NEW
 
Number bases
Number basesNumber bases
Number bases
 
Binary codes
Binary codesBinary codes
Binary codes
 
binarycodes.pdf
binarycodes.pdfbinarycodes.pdf
binarycodes.pdf
 
04 chapter03 02_numbers_systems_student_version_fa16
04 chapter03 02_numbers_systems_student_version_fa1604 chapter03 02_numbers_systems_student_version_fa16
04 chapter03 02_numbers_systems_student_version_fa16
 
Dee 2034 chapter 1 number and code system (Baia)
Dee 2034 chapter 1 number and code system (Baia)Dee 2034 chapter 1 number and code system (Baia)
Dee 2034 chapter 1 number and code system (Baia)
 
hexadecimal notes By ZAK
hexadecimal notes By ZAKhexadecimal notes By ZAK
hexadecimal notes By ZAK
 
As Level Computer Science Book -1
As Level Computer Science  Book -1As Level Computer Science  Book -1
As Level Computer Science Book -1
 
My excel reviewer
My excel reviewerMy excel reviewer
My excel reviewer
 
My excel reviewer_2
My excel reviewer_2My excel reviewer_2
My excel reviewer_2
 
Manoch1raw 160512091436
Manoch1raw 160512091436Manoch1raw 160512091436
Manoch1raw 160512091436
 
Data representation in a computer
Data representation in a computerData representation in a computer
Data representation in a computer
 
10 hexadecimal number system
10   hexadecimal number system10   hexadecimal number system
10 hexadecimal number system
 
Number codes students
Number codes studentsNumber codes students
Number codes students
 
Data Representation
Data RepresentationData Representation
Data Representation
 
Number-Systems presentation of the mathematics
Number-Systems presentation of the mathematicsNumber-Systems presentation of the mathematics
Number-Systems presentation of the mathematics
 
Computer data representation (integers, floating-point numbers, text, images,...
Computer data representation (integers, floating-point numbers, text, images,...Computer data representation (integers, floating-point numbers, text, images,...
Computer data representation (integers, floating-point numbers, text, images,...
 

More from Arnold Derrick Kinney (9)

Windows 7 configuration
Windows 7 configurationWindows 7 configuration
Windows 7 configuration
 
Network device management
Network device managementNetwork device management
Network device management
 
Basics of unix
Basics of unixBasics of unix
Basics of unix
 
Managing Network Device Security
Managing Network Device SecurityManaging Network Device Security
Managing Network Device Security
 
Cisco data center
Cisco data centerCisco data center
Cisco data center
 
Ccnp route
Ccnp routeCcnp route
Ccnp route
 
Presentation 3 for Students of professordkinney.com
Presentation 3 for Students of professordkinney.comPresentation 3 for Students of professordkinney.com
Presentation 3 for Students of professordkinney.com
 
Lesson 2 slideshow
Lesson 2 slideshowLesson 2 slideshow
Lesson 2 slideshow
 
Lesson 1 slideshow
Lesson 1 slideshowLesson 1 slideshow
Lesson 1 slideshow
 

Recently uploaded

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Recently uploaded (20)

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 

Mastering Binary For IPV4

  • 2. Mastering Binary For IPv4 08/08/13 Instructional Design-Computer Networking - Bridges Educational Group
  • 3. Lessons objectives: Learn binaries Converting binary to decimal Converting decimal to binaries 08/08/13 Instructional Design-Computer Networking - Bridges Educational Group Mastering Binary For IPv4
  • 4. The IP Address Classes 08/08/13 Instructional Design-Computer Networking - Bridges Educational Group Mastering Binary For IPv4
  • 5. Expressing Numbers In Binary And Decimal Format Where does the term “binary” in “binary math” come from, anyway? Let’s compare how numbers are expressed in binary and decimal format. The number format we use every day is expressed in decimal format. If you express a number as “47”, for instance, that is expressing a number in decimal format. When an IP address is written as 100.45.45.48, that’s referred to as “dotted decimal”. Binary numbers are expressed in strings of ones and zeroes. Throughout your Cisco studies, you’ll see such strings as “01001000”. That’s binary numbering. What does that string of zeroes and ones mean? The more familiar decimal numbering is used to convert a number from binary to decimal, or decimal to binary. Remember when I said that if you can double the number “1” seven times, you can do any binary math problem? Here’s the simple table you’ll use to solve many binary math problems. Note the values in the table start with “1” in the rightmost column, and simply double from right to left until the boxes are filled: 08/08/13 Instructional Design-Computer Networking - Bridges Educational Group Mastering Binary For IPv4
  • 6. You can also start with 128 in the leftmost box and keep dividing by 2 until all the boxes are filled, but it’s my experience that most students are more comfortable starting with “1” and doubling from right to left. You’ll see in future sections how this chart is used in almost every subnetting question you’ll ever see, and how that chart will help you truly understand binary math. For now, decide whether you want to start with “1’ and double from right to left, or start with “128” and divide by 2 from left to right, and use that method for all your questions. Choose the one you’re more comfortable with, but decide on your method now and stick with it. Introduction To The “Boolean AND” Operation You must be comfortable performing Boolean ANDs as well. I see anxiety in students’ eyes when I bring this up as well, but this is even simpler than binary math. A Boolean AND is simply a bit-by-bit comparison of the bits in an IP address and subnet mask. In future sections, you’ll clearly see how the Boolean AND will help you solve many subnetting questions. For now, keep in mind that these bits being compared will either be set to “1” or “0”. If both bits are “1”, the result of the Boolean AND is “1”. Any other combination will result in “0 08/08/13 Instructional Design-Computer Networking - Bridges Educational Group Mastering Binary For IPv4
  • 7. Here is a quick example using two pairs of six-digit binary numbers 08/08/13 Instructional Design-Computer Networking - Bridges Educational Group Mastering Binary For IPv4 Note that the 3rd and 4th numbers are both “1”, so the AND result is “1”. All other combinations, whether it’s “1” and “0” or “0” and “0”, result in “0”. With a basic understanding of the default masks of the different types of networks, as well as how binary and decimal numbers are expressed, you’re ready to begin tackling binary and decimal conversions.
  • 8. Converting Binary To Dotted Decimal An example of a binary-to-dotted decimal question: “What is the dotted decimal equivalent of the binary number 01100010 00111100 11111100 01010101?” To answer this type of question, use the chart we developed in Section One. The first set of eight numbers refers to the first octet of an IP address, and so on, so use the following variation of the chart: 08/08/13 Instructional Design-Computer Networking - Bridges Educational Group For binary-to-decimal conversion, just plug the binary number strings into the table. After doing so, add up all the values that have a “1” in them from left to right, and that will give you the decimal value for each octet. Let’s take the first octet as an example. The binary string is 01100010. Filling in your chart from left to right, the first octet looks like this: Mastering Binary For IPv4
  • 9. There are ones in the column for 64, 32, and 2. Just add them up, and that is the decimal value for the first octet – 98. Repeat the process for each octet, and you quickly have the dotted decimal equivalent of the binary string. 08/08/13 Instructional Design-Computer Networking - Bridges Educational Group The dotted decimal equivalent of the binary string we were given is 98.60.252.85. Mastering Binary For IPv4
  • 10. Binary-To-Decimal Practice Questions What is the dotted decimal equivalent of the binary string 11110000 00110101 00110011 11111110? 08/08/13 Instructional Design-Computer Networking - Bridges Educational Group Answer? Find out by yourself and check it with your instructor Mastering Binary For IPv4
  • 11. What is the dotted decimal equivalent of the binary string 11100010 00000001 11001010 01110110? 08/08/13 Instructional Design-Computer Networking - Bridges Educational Group Mastering Binary For IPv4
  • 12. Converting Decimal To Binary What is the binary equivalent of the dotted decimal IP address 217.48.23.190? Converting decimal to binary uses the same chart as binary to decimal, but the actions taken to achieve the answer are different. instead of being given the 1s and 0s to be placed into a chart, you must determine which columns should have 1s and 0s. The decimal number of the first octet is 217. This number must now be converted to binary: 08/08/13 Instructional Design-Computer Networking - Bridges Educational Group You already know what the decimal value is. You must now determine whether each column should have a “1” or a “0” in it. Work from left to right, and ask this question: “Can I subtract this column’s value from the current octet value with the result being a positive number or zero?” If so, perform the subtraction, put a “1” in the column, and go to the next column. If not, place a “0” in the column, and repeat the process for the next column. Mastering Binary For IPv4
  • 13. Let’s look at that chart again: 08/08/13 Instructional Design-Computer Networking - Bridges Educational Group Can 128 be subtracted from 217, and result in zero or a positive number? Sure, with the result being 89. Put a “1” in the 128 column and go to the next column, repeating the operation WITH THE NEW RESULT. Mastering Binary For IPv4
  • 14. Can 64 be subtracted from the new result, 89? Yes, with a remainder of 25. Put a “1” in the 64 column and repeat the operation in the next column, using the new result of 25. 08/08/13 Instructional Design-Computer Networking - Bridges Educational Group Can 32 be subtracted from 25, with the remainder being 0 or a positive number? No. Place a “0” in the 32 column, and repeat the operation in the next column with the value of 25. Can 16 be subtracted from 25? Yes, with a remainder of 9. Place a “1” in the 16 column, and go to the next column with the new value of 9. Mastering Binary For IPv4
  • 15. 08/08/13 Instructional Design-Computer Networking - Bridges Educational Group Can 8 be subtracted from 9? Yes, with a remainder of 1. Place a “1” in the 8 column, and repeat the operation in the next column with a remainder of 1. We can quickly see that neither of the next two columns, 4 or 2, can be subtracted from 1. Place a “0” in both of those columns. Subtracting 1 from 1 brings us to zero, and also to the end of the columns. Place a “1” in the 1 column, and you have the binary equivalent of the decimal 217. Mastering Binary For IPv4
  • 16. The binary equivalent of the decimal 217 is 11011001. Once you can convert one octet, you can convert any number of octets. Using this method, let’s go through the rest of the practice question. The second octet’s decimal value is 48. Using the same chart, you can see that you cannot subtract 128 or 64 from 48. Place a zero in both those columns, and move on to the next column, moving left to right. 08/08/13 Instructional Design-Computer Networking - Bridges Educational Group Can you subtract 32 from 48? Sure, with a remainder of 16. Place a 1 in the 16 column, and go to the next column. Mastering Binary For IPv4
  • 17. Can you subtract 16 from 16? Obviously! Place a “1” in the 16 column. You’re actually done with this octet, since the remainder is now zero. Once the remainder is zero, you can put a zero in all remaining columns for that octet 08/08/13 Instructional Design-Computer Networking - Bridges Educational Group The third octet is 23. Working from left to right, you can see that you cannot subtract 128, 64, or 32 from this value. Place a zero in all three of these columns and move to the next column. Mastering Binary For IPv4
  • 18. Can 16 be subtracted from 23? Yes, with a remainder of 7. Place a “1’ in the 16 column and go to the next column. 08/08/13 Instructional Design-Computer Networking - Bridges Educational Group Can 8 be subtracted from 7? No. Put a zero in that column. Can 4 be subtracted from 7? Yes, with a remainder of three. Put a “1” in the 4 column. Mastering Binary For IPv4
  • 19. Finally, 1 is subtracted from the remainder of 1, giving you zero, which is what you want at the end of the conversion. Place a “1” in the 1 column, and this octet has been converted. 08/08/13 Instructional Design-Computer Networking - Bridges Educational Group The last octet is 190. Working from left to right, can 128 be subtracted from 190? Yes, with a remainder of 62. Put a “1” in the 128 column and move to the next column. Mastering Binary For IPv4
  • 20. Can 64 be subtracted from 62? No. Put a zero in the 64 column. 08/08/13 Instructional Design-Computer Networking - Bridges Educational Group Can 32 be subtracted from 62? Yes, with a remainder of 30. Put a “1” in the 32 column, and go to the next column. Mastering Binary For IPv4
  • 21. Can 16 be subtracted from 30? Yes, with a remainder of 14. Put a “1” in the 16 column, and go to the next column. 08/08/13 Instructional Design-Computer Networking - Bridges Educational Group Can 8 be subtracted from 14? Yes, with a remainder of 6. Place a “1” in the 8 column, and go to the next column. Mastering Binary For IPv4
  • 22. Can 4 be subtracted from 6? Yes, with a remainder of 2. Place a “1” in the 4 column, and go to the next column. 08/08/13 Instructional Design-Computer Networking - Bridges Educational Group Can 2 be subtracted from 2? Yes, with a remainder of 0. Place a “1” in the 2 column, and since the remainder is 0, place a “0” in the remaining columns – in this case, the 1 column. You’ve determined that the binary equivalent of the dotted decimal number 217.48.23.190 is 11011001 00110000 00010111 10111110. Mastering Binary For IPv4
  • 23. Converting Decimal To Binary Questions What is the binary equivalent of the dotted decimal IP address 100.10.1.200? For decimal-to- binary conversions, always use this chart, and work from left to right as shown in this section 08/08/13 Instructional Design-Computer Networking - Bridges Educational Group The binary equivalent is 01100100 00001010 00000001 11001000. Mastering Binary For IPv4
  • 24. What is the binary equivalent of the dotted decimal IP address 10.255.18.244? 08/08/13 Instructional Design-Computer Networking - Bridges Educational Group Mastering Binary For IPv4

Editor's Notes

  1. When solving binary-to-decimal questions, don’t be concerned about octets that resolve to “0” or “255”. As you’ll read later, those addresses are considered unusable for host addresses. When performing an address conversion, don’t worry about whether it’s a valid host address. Just perform the conversion as the question asks.
  2. Answer: 226.1.202.118.
  3. The binary equivalent is 00001010 11111111 00010010 11110100.