8.1.2.7 Lab - Using The Windows Calculator With Network Addresses
8.1.2.7 Lab - Using The Windows Calculator With Network Addresses
8.1.2.7 Lab - Using The Windows Calculator With Network Addresses
Objectives
Part 1: Access the Windows Calculator
Part 2: Convert between Numbering Systems
Part 3: Convert Host IPv4 Addresses and Subnet Masks into Binary
Part 4: Determine the Number of Hosts in a Network Using Powers of 2
Part 5: Convert MAC Addresses and IPv6 Addresses to Binary
Background / Scenario
Network technicians use binary, decimal, and hexadecimal numbers when working with computers and
networking devices. Microsoft provides a built-in Calculator application as part of the operating system. The
Windows 7 version of Calculator includes a Standard view that can be used to perform basic arithmetic tasks
such as addition, subtract, multiplication, and division. The Calculator application also has advanced
programming, scientific, and statistical capabilities.
In this lab, you will use the Windows 7 Calculator application Programmer view to convert between the binary,
decimal, and hexadecimal number systems. You will also use the Scientific view powers function to determine
the number of hosts that can be addressed based on the number of host bits available.
Required Resources
1 PC (Windows 7, Vista, or XP)
Note: If using an operating system other than Windows 7, the Calculator application views and functions
available may vary from those shown in this lab. However, you should be able to perform the calculations.
2013 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 1 of 7
Lab Using the Windows Calculator with Network Addresses
Step 1: Click the Windows Start button and select All Programs.
2013 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 2 of 7
Lab Using the Windows Calculator with Network Addresses
________________________________________ABCDEF
1,2,3,4,5,6,7,8,9____________________________________________
d. Click the Dec radio button. Using your mouse, click the number 1 followed by the number 5 on the
number pad. The decimal number 15 is now entered.
Note: The numbers and letters on the keyboard can also be used to enter the values. If using the
numerical keypad, type the number 15. If the number does not enter into the calculator, press the Num
Lock key to enable the numeric keypad.
Click the Bin radio button. What happened to the number 15?
_____________________________________________Turning to
F"_______________________________________
e. Numbers are converted from one numbering system to another by selecting the desired number mode.
Click the Dec radio button again. The number converts back to decimal.
f. Click the Hex radio button to change to Hexadecimal mode. Which hexadecimal character (0 through 9
or A to F) represents decimal 15? _______________________
g. As you were switching between the numbering systems, you may have noticed the binary number 1111 is
displayed during the conversion. This assists you in relating the binary digits to other numbering system
values. Each set of 4 bits represents a hexadecimal character or potentially multiple decimal characters.
h. Clear the values in the window by clicking C above the 9 on the calculator keypad. Convert the following
numbers between the binary, decimal, and hexadecimal numbering systems.
86 01010110 56
175 10101111 AF
204 11001100 CC
19 0001 0011 13
77 0100 1101 4D
42 0010 1010 2A
56 00111000 38
93 10010011 93
228 11100100 E4
i. As you record the values in the table above, do you see a pattern between the binary and hexadecimal
numbers?
_________________________________________________________the pattern is kinda llike we must
change pattern examples:if the questions is binary we must turned to decimal after that turn the decimal
to hexadecimal___________________________
2013 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 3 of 7
Lab Using the Windows Calculator with Network Addresses
____________________________________________________________________________________
Part 3: Convert Host IPv4 Addresses and Subnet Masks into Binary
Internet Protocol version 4 (IPv4) addresses and subnet masks are represented in a dotted decimal format
(four octets), such as 192.168.1.10 and 255.255.255.0, respectively. This makes these addresses more
readable to humans. Each of the decimal octets in the address or a mask can be converted to 8 binary bits.
An octet is always 8 binary bits. If all 4 octets were converted to binary, how many bits would there be?
________________________
a. Use the Windows Calculator application to convert the IP address 192.168.1.10 into binary and record the
binary numbers in the following table:
Decimal Binary
192 110000000
168 101010000
1 000000001
10 00001010
b. Subnet masks, such as 255.255.255.0, are also represented in a dotted decimal format. A subnet mask
will always consist of four 8-bit octets, each represented as a decimal number. Using the Windows
Calculator, convert the 8 possible decimal subnet mask octet values to binary numbers and record the
binary numbers in the following table:
Decimal Binary
0
128
192
224
240
248
252
254
255
c. With the combination of IPv4 address and the subnet mask, the network portion can be determined and
the number of hosts available in a given IPv4 subnet can also be calculated. The process is examined in
Part 4.
2013 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 4 of 7
Lab Using the Windows Calculator with Network Addresses
Using the example of 192.168.1.10 with a subnet of 255.255.248.0, the address and subnet mask are
converted to binary numbers. Align the bits as you record your conversions to binary numbers.
Decimal IP Address and Subnet Mask Binary IP Address and Subnet Mask
192.168.1.10 11000000.10101000.00000001.00001010
255.255.248.0 11111111.11111111.11111000.00000000
Because the first 21 bits in the subnet mask are consecutive numeral ones, the corresponding first 21 bits
in the IP address in binary is 110000001010100000000; these represent the network portion of the
address. The remaining 11 bits are 00100001010 and represent the host portion of the address.
What is the decimal and binary network number for this address?
____________________________________________________________________________________
What is the decimal and binary host portion for this address?
____________________________________________________________________________________
Because the network number and the broadcast address use two addresses out of the subnet, the
formula to determine the number of hosts available in an IPv4 subnet is the number 2 to the power of the
number of host bits available, minus 2:
Number of available hosts = 2 (number of host bits) 2
b. Using the Windows Calculator application, switch to the Scientific mode by clicking the View menu, then
select Scientific.
c. Input 2. Click the xy key. This key raises a number to a power.
d. Input 11. Click =, or press Enter on the keyboard for the answer.
e. Subtract 2 from the answer by using the calculator if desired.
f. In this example, there are 2046 hosts are available on this network (211-2).
g. If given the number of host bits, determine the number of hosts available and record the number in the
following table.
5
14
24
10
2013 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 5 of 7
Lab Using the Windows Calculator with Network Addresses
h. For a given subnet mask, determine the number of hosts available and record the answer in the following
table.
Number of Number of
Available Available
Subnet Mask Binary Subnet Mask Host Bits Hosts
255.255.255.0 11111111.11111111.11111111.00000000
255.255.240.0 11111111.11111111.11110000.00000000
255.255.255.128 11111111.11111111.11111111.10000000
255.255.255.252 11111111.11111111.11111111.11111100
255.255.0.0 11111111.11111111.00000000.00000000
2013 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 6 of 7
Lab Using the Windows Calculator with Network Addresses
Hexadecimal Binary
2001
0DB8
ACAD
0001
0000
0000
0000
0001
Reflection
1. Can you perform all the conversions without the assistance of the calculator? What can you do to make it
happen?
_______________________________________________________________________________________
2. For most IPv6 addresses, the network portion of the address is usually 64 bits. How many hosts are available
on a subnet where the first 64 bits represent the network? Hint: All host addresses are available in the subnet
for hosts.
_______________________________________________________________________________________
2013 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public. Page 7 of 7