7.1.2.8 Lab - Using The Windows Calculator With Network Addresses
7.1.2.8 Lab - Using The Windows Calculator With Network Addresses
7.1.2.8 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.
2015 Cisco and/or its affiliates
Page 1 of 10
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 or 8)
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. All rights reserved.
This document is Cisco Public.
2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public.
Page 2 of 10
We are accustomed to using the decimal number system that uses the digits 0
to 9. The decimal numbering system is used in everyday life for all counting,
money, and financial transactions. Computers and other electronic devices use
the binary numbering system with only the digits 0 and 1 for data storage, data
transmission
and
numerical
calculations.
All
computer
calculations
are
Page 3 of 10
c. Click the Hex (Hexadecimal) radio button. Which characters are activated on
the number pad now?
0 to 9
A to F
Because in hexadecimal we need an alphabetical number.
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?
1111
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?
F
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.
2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public.
Page 4 of 10
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.
Decimal
Hexadeci
Binary
mal
86
1010110
56
175
10101111
AF
204
11001100
CC
19
0001
13
0011
77
0100
4D
1101
42
0010
2A
1010
56
00111000
38
147
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?
Yes
Part 3: Convert Host IPv4 Addresses and Subnet Masks into Binary
Internet Protocol version 4 (IPv4) addresses and subnet masks are represented
in
dotted
decimal
format
(four
octets),
such
as
192.168.1.10
and
Page 5 of 10
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? 32 bits
Binary
192
1100 0000
168
1010 1000
0000 0001
10
0000 1010
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
0000 0000
128
1000 0000
192
1100 0000
224
1110 0000
240
1111 0000
248
1111 1000
252
1111 1100
254
1111 1110
255
1111 1111
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.
Part 4: Determine the Number of Hosts in a Network Using Powers of 2
Given an IPv4 network address and a subnet mask, the network portion can be
determined along with the number of hosts available in the network.
2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public.
Page 6 of 10
IP
Address
and
Subnet
Mask
11000000
10101000
00000001
11111111
11111000
00001010
255.255.248.0
11111111
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 11000000
10101000 00000; these represent the network portion of the address. The
remaining 11 bits are 001 00001010 and represent the host portion of the
address.
What is the decimal and binary network number for this address?
192.168.1.10
What is the decimal and binary host portion for this address?
192.168.1.10
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.
2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public.
Page 7 of 10
of
Available Hosts
5
30
14
16382
24
16777214
10
1022
h. For a given subnet mask, determine the number of hosts available and record
the answer in the following table.
Subnet
Numbe
Numbe
r of
r of
Availab
Availab
le Host le
Mask
255.255.255.
11111111.11111111.11111111.000
00000
255.255.240.
11111111.11111111.11110000.000
00000
255.255.255.
11111111.11111111.11111111.100
128
00000
255.255.255.
11111111.11111111.11111111.111
252
11100
255.255.0.0
11111111.11111111.00000000.000
Bits
Hosts
254
12
4094
126
16
65534
00000
Part 5: Convert MAC Addresses and IPv6 Addresses to Binary
Both Media Access Control (MAC) and Internet Protocol version 6 (IPv6)
addresses are represented as hexadecimal digits for readability. However,
2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public.
Page 8 of 10
computers only understand binary digits and use these binary digits for
computations. In this part, you will convert these hexadecimal addresses to
binary addresses.
Step 1: Convert MAC addresses to binary digits.
a. The MAC or physical address is normally represented as 12 hexadecimal
characters, grouped in pairs and separated by hyphens (-). Physical addresses
on a Windows-based computer are displayed in a format of xx-xx-xx-xx-xx-xx,
where each x is a number from 0 to 9 or a letter from A to F. Each of the hex
characters in the address can be converted to 4 binary bits, which is what the
computer understands. If all 12 hex characters were converted to binary, how
many bits would there be?
48 bits, 12 hexadecimal characters and 4 bits per character
or
in
shorter
format:
2001:DB8:ACAD:1::1.
b. An IPv6 address is 128 bits long. Using the Windows Calculator application,
convert the sample IPv6 address into binary numbers and record it in the table
below.
2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public.
Page 9 of 10
Hexadecimal
Binary
2001
0010000000000001
0DB8
0000110110111000
ACAD
1010110010101101
0001
0000000000000001
0000
0000000000000000
0000
0000000000000000
0000
0000000000000000
0001
0000000000000001
Reflection
1. Can you perform all the conversions without the assistance of the calculator?
What can you do to make it happen? Yes, If you want to able to do that you
should know the binary of 1 through 9 and A to F.
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.
62
hosts
2015 Cisco and/or its affiliates. All rights reserved. This document is Cisco Public.
Page 10 of 10