5 Number Systems
5 Number Systems
IPv4 addresses begin as binary, a series of only 1s and 0s. These are dicult to manage, so network
administrators must convert them to decimal. This topic shows you a few ways to do this.
Binary is a numbering system that consists of the digits 0 and 1 called bits. In contrast, the decimal
numbering system consists of 10 digits consisting of the digits 0 – 9.
Binary is important for us to understand because hosts, servers, and network devices use binary
addressing. Specically, they use binary IPv4 addresses, as shown in the gure, to identify each other.
11010001.10100101.11001000.11100001
11000000.10101000.00001010.00000001 11000000.10101000.00001011.00000001
PC1 PC2
G0/0/0 G0/0/1
11000000.10101000.00001010.00001010 11000000.10101000.00001011.00001010
https://contenthub.netacad.com/itn/5.1.4 1/12
18/2/2020 Introduction to Networks - Binary Number System
Each address consists of a string of 32 bits, divided into four sections called octets. Each octet contains 8
bits (or 1 byte) separated with a dot. For example, PC1 in the gure is assigned IPv4 address
11000000.10101000.00001010.00001010. Its default gateway address would be that of R1 Gigabit
Ethernet interface 11000000.10101000.00001010.00000001.
Binary works well with hosts and network devices. However, it is very challenging for humans to work with.
For ease of use by people, IPv4 addresses are commonly expressed in dotted decimal notation. PC1 is
assigned the IPv4 address 192.168.10.10, and its default gateway address is 192.168.10.1, as shown in
the gure.
209.165.200.225
192.168.10.1 192.168.11.1
PC1 PC2
G0/0/0 G0/0/1
192.168.10.10 192.168.11.10
For a solid understanding of network addressing, it is necessary to know binary addressing and gain
practical skills converting between binary and dotted decimal IPv4 addresses. This section will cover how
to convert between base two (binary) and base 10 (decimal) numbering systems.
5.1.2
Click Play in the gure for a video demonstrating how to convert between binary and decimal numbering
systems.
https://contenthub.netacad.com/itn/5.1.4 2/12
18/2/2020 Introduction to Networks - Binary Number System
5.1.3
Learning to convert binary to decimal requires an understanding of positional notation. Positional notation
means that a digit represents dierent values depending on the “position” the digit occupies in the
sequence of numbers. You already know the most common numbering system, the decimal (base 10)
notation system.
Radix 10 10 10 10
Position in Number 3 2 1 0
Row 1, Radix is the number base. Decimal notation is based on 10, therefore the radix is 10.
Row 2, Position in number considers the position of the decimal number starting with, from right to left,
0 (1st position), 1 (2nd position), 2 (3rd position), 3 (4th position). These numbers also represent the
https://contenthub.netacad.com/itn/5.1.4 3/12
18/2/2020 Introduction to Networks - Binary Number System
exponential value use to calculate the positional value in the 4th row.
Row 3 calculates the positional value by taking the radix and raising it by the exponential value of its
position in row 2.
Note: n0 is = 1.
Row 4 positional value represents units of thousands, hundreds, tens, and ones.
To use the positional system, match a given number to its positional value. The example in the table
illustrates how positional notation is used with the decimal number 1234.
Result 1,234
Radix 2 2 2 2 2 2 2 2
Position in Number 7 6 5 4 3 2 1 0
Row 1, Radix is the number base. Binary notation is based on 2, therefore the radix is 2.
Row 2, Position in number considers the position of the binary number starting with, from right to left, 0
(1st position), 1 (2nd position), 2 (3rd position), 3 (4th position). These numbers also represent the
exponential value use to calculate the positional value in the 4th row.
Row 3 calculates the positional value by taking the radix and raising it by the exponential value of its
position in row 2.
Note: n0 is = 1.
Row 4 positional value represents units of ones, twos, fours, eights, etc.
The example in the table illustrates how a binary number 11000000 corresponds to the number 192. If the
binary number had been 10101000, then the corresponding decimal number would be 168.
https://contenthub.netacad.com/itn/5.1.4 4/12
18/2/2020 Introduction to Networks - Binary Number System
Result 192
v7.0
Introduction to Networks
5.1.4
System
Check your understanding of binary number system by choosing the BEST answer to the following
questions.
11000000.10101000.00001011.00001010
11000000.10101000.00001010.00001011
11000000.10101000.00001011.00010010
10101000.00010000.00011111.000111110
10101100.00010000.00011110.000111110
10101100.00010000.00011111.000111110
Check Show Me
Reset
https://contenthub.netacad.com/itn/5.1.4 5/12
18/2/2020 Introduction to Networks - Binary Number System
5.1.5
To convert a binary IPv4 address to its dotted decimal equivalent, divide the IPv4 address into four 8-bit
octets. Next apply the binary positional value to the rst octet binary number and calculate accordingly.
For example, consider that 11000000.10101000.00001011.00001010 is the binary IPv4 address of a host.
To convert the binary address to decimal, start with the rst octet, as shown in the table. Enter the 8-bit
binary number under the positional value of row 1 and then calculate to produce the decimal number 192.
This number goes into the rst octet of the dotted decimal notation.
Calculate 128 64 32 16 8 4 2 1
Result 192
Next convert the second octet of 10101000 as shown in the table. The resulting decimal value is 168, and
it goes into the second octet.
Calculate 128 64 32 16 8 4 2 1
Result 168
Calculate 128 64 32 16 8 4 2 1
Result 11
https://contenthub.netacad.com/itn/5.1.4 6/12
18/2/2020 Introduction to Networks - Binary Number System
Convert the fourth octet of 00001010 as shown in the table. This completes the IP address and produces
192.168.11.10.
Calculate 128 64 32 16 8 4 2 1
Result 10
5.1.6
Instructions
This activity allows you to practice 8-bit binary to decimal conversion as much as necessary. We
recommend that you work with this tool until you are able to do the conversion without error. Convery the
binary number shown in the octet to its decimal value.
Decimal Value
Base 2 2 2 2 2 2 2 2
Exponent 7 6 5 4 3 2 1 0
Position 128 64 32 16 8 4 2 1
Bit 1 0 1 0 1 1 0 0
Binary number.
5.1.7
https://contenthub.netacad.com/itn/5.1.4 7/12
18/2/2020 Introduction to Networks - Binary Number System
It is also necessary to understand how to convert a dotted decimal IPv4 address to binary. A useful tool is
the binary positional value table.
Click each position starting at 128 and work your way from left to right to the 1 position.
128 64 32 16 8 4 2 1
Is the decimal number of the octet (n) equal to or greater than the most-signicant bit (128)?
No Yes
n >= 128
128 64 32 16 8 4 2 1
Positional Value
5.1.8
https://contenthub.netacad.com/itn/5.1.4 8/12
18/2/2020 Introduction to Networks - Binary Number System
The rst octet number 192 is converted to binary using the previously explained positional notation
process.
It is possible to bypass the process of subtraction with easier or smaller decimal numbers. For instance,
notice that it is fairly easy to calculate the third octet converted to a binary number without actually going
through the subtraction process (8 + 2 = 10). The binary value of the third octet is 00001010.
The fourth octet is 11 (8 + 2 + 1). The binary value of the fourth octet is 00001011.
Converting between binary and decimal may seem challenging at rst, but with practice it should become
easier over time.
Click each step to see the conversion of the IP address of 192.168.10.11 into binary.
Is the rst octet number 192 equal to or greater than the high-order bit 128?
Yes it is, therefore add a 1 to the high-order positional value to a represent 128.
Subtract 128 from 192 to produce a remainder of 64.
Yes
Example: 192.168.10.11 192 >= 128
Positional Value
https://contenthub.netacad.com/itn/5.1.4 9/12
18/2/2020 Introduction to Networks - Binary Number System
5.1.9
Instructions
This activity allows you to practice decimal conversion to 8-bit binary values. We recommend that you
work with this tool until you are able to do the conversion without error. Convert the decimal number shown
in the Decimal Value row to its binary bits.
Decimal Value 50
Base 2 2 2 2 2 2 2 2
Exponent 7 6 5 4 3 2 1 0
Position 128 64 32 16 8 4 2 1
Bit
5.1.10
https://contenthub.netacad.com/itn/5.1.4 10/12
18/2/2020 Introduction to Networks - Binary Number System
You will need to log in to cisco.com to use this link. It will be necessary to create an account if you do not
already have one.
5.1.11
IPv4 Addresses
As mentioned in the beginning of this topic, routers and computers only understand binary, while humans
work in decimal. It is important for you to gain a thorough understanding of these two numbering systems
and how they are used in networking.
Click each button to contrast the dotted decimal address and the 32-bit address.
192 . 168 . 10 . 10
5.0 5.2
Introduction Hexadecimal Number System
https://contenthub.netacad.com/itn/5.1.4 11/12
18/2/2020 Introduction to Networks - Binary Number System
https://contenthub.netacad.com/itn/5.1.4 12/12
18/2/2020 Introduction to Networks - Hexadecimal Number System
Now you know how to convert binary to decimal and decimal to binary. You need that skill to understand
IPv4 addressing in your network. But you are just as likely to be using IPv6 addresses in your network. To
understand IPv6 addresses, you must be able to convert hexadecimal to decimal and vice versa.
Just as decimal is a base ten number system, hexadecimal is a base sixteen system. The base sixteen
number system uses the digits 0 to 9 and the letters A to F. The gure shows the equivalent decimal and
hexadecimal values for binary 0000 to 1111.
Decimal Binary
https://contenthub.netacad.com/itn/5.2.5 1/6
18/2/2020 Introduction to Networks - Hexadecimal Number System
Binary and hexadecimal work well together because it is easier to express a value as a
single hexadecimal digit than as four binary bits.
IPv6 addresses are 128 bits in length and every 4 bits is represented by a single hexadecimal digit; for a
total of 32 hexadecimal values. IPv6 addresses are not case-sensitive and can be written in either
lowercase or uppercase.
As shown in the gure, the preferred format for writing an IPv6 address is x:x:x:x:x:x:x:x, with each “x”
consisting of four hexadecimal values. When referring to 8 bits of an IPv4 address we use the term octet.
In IPv6, a hextet is the unocial term used to refer to a segment of 16 bits or four hexadecimal values.
Each “x” is a single hextet, 16 bits, or four hexadecimal digits.
X : X : X : X : X : X : X : X
to to to to to to
https://contenthub.netacad.com/itn/5.2.5 2/6
18/2/2020 Introduction to Networks - Hexadecimal Number System
5.2.2
Click Play in the video to see how to convert between hexadecimal and decimal numbering systems.
5.2.3
https://contenthub.netacad.com/itn/5.2.5 3/6
18/2/2020 Introduction to Networks - Hexadecimal Number System
3. Convert each four binary numbers into their equivalent hexadecimal digit.
For example, 168 converted into hex using the three-step process.
5.2.4
Converting hexadecimal numbers to decimal values is also straightforward. Follow the steps listed:
5.2.5
Number System
Check your understanding of hexadecimal number system by choosing the BEST answer to the
following questions.
https://contenthub.netacad.com/itn/5.2.5 4/6
18/2/2020 Introduction to Networks - Hexadecimal Number System
BA
C10
v7.0
CA
Introduction to Networks
2. Which is the hexadecimal equivalent of 254?
ED
FA
FE
169
170
171
125
126
127
Check Show Me
https://contenthub.netacad.com/itn/5.2.5 5/6
18/2/2020 Introduction to Networks - Hexadecimal Number System
Reset
5.1 5.3
Binary Number System Module Practice and Quiz
https://contenthub.netacad.com/itn/5.2.5 6/6
18/2/2020 Introduction to Networks - Module Practice and Quiz
Binary is a numbering system that consists of the numbers 0 and 1 called bits. In contrast, the decimal
numbering system consists of 10 digits consisting of the numbers 0 – 9. Binary is important for us to
understand because hosts, servers, and network devices use binary addressing, specically, binary IPv4
addresses, to identify each other. You must know binary addressing and how to convert between binary
and dotted decimal IPv4 addresses. This topic presented a few ways to convert decimal to binary and
binary to decimal.
Just as decimal is a base ten number system, hexadecimal is a base sixteen system. The base sixteen
number system uses the numbers 0 to 9 and the letters A to F. The hexadecimal numbering system is used
in networking to represent IPv6 addresses and Ethernet MAC addresses. IPv6 addresses are 128 bits in
length and every 4 bits is represented by a single hexadecimal digit; for a total of 32 hexadecimal values.
To convert hexadecimal to decimal, you must rst convert the hexadecimal to binary, then convert the
binary to decimal. To convert decimal to hexadecimal, you must also rst convert the decimal to binary.
5.3.2
https://contenthub.netacad.com/itn/5.3.2 1/6
18/2/2020 Introduction to Networks - Module Practice and Quiz
10100101
10101101
10110101
2. Given the binary address of 11101100 00010001 00001100 00001010, which address does this
represent in dotted decimal format?
234.17.10.9
234.16.12.10
236.17.12.6
236.17.12.10
Topic 5.2.0 - IPv4 addressing space is exhausted by the rapid growth of the
Internet and the devices connected to the Internet. IPv6 expands the IP addressing
space by increasing the address length from 32 bits to 128 bits.
32
48
64
128
256
11000110
10011000
11110010
https://contenthub.netacad.com/itn/5.3.2 2/6
18/2/2020 Introduction to Networks - Module Practice and Quiz
5. Which two statements are correct about IPv4 and IPv6 addresses? (Choose two.)
Topic 5.2.0 - IPv4 addresses are represented as dotted decimal numbers and are
32 bits in length. IPv6 addresses are represented by hexadecimal numbers and are
128 bits in length.
6. Which IPv4 address format was created for ease of use by people and is expressed as
201.192.1.14?
Topic 5.1.0 - For ease of use by people, binary patterns are represented as dotted
decimal. Computer systems were created to understand binary addressing.
binary
dotted decimal
hexadecimal
ASCII
Topic 5.1.0 - Each section (octet) contains eight binary digits. Each digit
represents a specic value (128, 64, 32, 16, 8, 4, 2, and 1). Everywhere there is a 1,
the specic value is relevant. Add all relevant values in a particular octet to obtain the
decimal value. For example binary 11001011 equals 203 in decimal.
192.0.2.199
198.51.100.201
203.0.113.211
209.165.201.223
https://contenthub.netacad.com/itn/5.3.2 3/6
18/2/2020 Introduction to Networks - Module Practice and Quiz
149
157
168
192
63
77
87
93
v7.0
10. What is the dotted decimal representation of the IPv4 address which is represented as the binary
Introduction to Networks
string 00001010.01100100.00010101.00000001?
10.100.21.1
10.10.20.1
100.10.11.1
100.21.10.1
Topic 5.2.0 - 0x refers to the item as hexadecimal. Convert each character into its
corresponding nibble. Then combine the nibbles together and calculate the resulting
decimal equivalent. C has a value of 12. 12 x 16 = 192. 192 + 9 = 201.
185
200
201
199
https://contenthub.netacad.com/itn/5.3.2 4/6
18/2/2020 Introduction to Networks - Module Practice and Quiz
10111010
11010101
11001010
11011010
32
64
128
256
Check Show Me
Reset
5.2 6.0
Hexadecimal Number System Introduction
https://contenthub.netacad.com/itn/5.3.2 5/6
18/2/2020 Introduction to Networks - Module Practice and Quiz
https://contenthub.netacad.com/itn/5.3.2 6/6