S1 / 05 MODULE 5 / NUMBER SYSTEMS
Read the numbers.
Work with the bits.
Networking uses several number systems. Binary represents the bits computers process, decimal is familiar to people, and hexadecimal provides a compact way to write binary values.
Understand positional number systems
A positional number system assigns each digit a value based on its position and the system's base. Decimal is base 10 and uses digits 0–9. Binary is base 2 and uses 0 and 1. Hexadecimal is base 16 and uses 0–9 plus A–F, where A=10, B=11, C=12, D=13, E=14, and F=15. The rightmost position represents the lowest power of the base.
IMG-0390 · IMG-0393Convert binary to decimal
Each bit position in an 8-bit octet has a power-of-two weight: 128, 64, 32, 16, 8, 4, 2, and 1. Add the weights where the bit is 1. For example, 11000000₂ is 128 + 64 = 192₁₀. The binary value 11111111₂ has every bit set, so its decimal value is 255.
IMG-0395Convert decimal to binary
To convert a decimal value to binary, start with the largest power of two that fits. At each position, compare the remaining value with that weight: write 1 and subtract the weight if it fits; otherwise write 0. Continue down to 1. For 192, subtract 128 and then 64, leaving zero, so the result is 11000000. For an IPv4 octet, the result must fit in eight bits, representing values from 0 through 255.
IMG-0395 · IMG-0398Convert hexadecimal to binary and decimal
One hexadecimal digit represents exactly four bits, called a nibble. For example, hexadecimal C is decimal 12 and binary 1100. Hexadecimal FF is 15 × 16 + 15 = 255, or binary 11111111. Two hexadecimal digits therefore represent one 8-bit octet. To convert decimal 210 to hexadecimal using the binary method, first write 11010010, split it into 1101 and 0010, convert those nibbles to D and 2, and combine them as D2.
IMG-0393 · IMG-0400Why networking uses these systems
IPv4 addresses and subnet masks are commonly displayed in decimal dotted notation, but subnet calculations depend on binary network and host bits. MAC addresses and IPv6 addresses are commonly written in hexadecimal because their binary representations are long. Being able to convert between systems makes it easier to identify network boundaries, prefix lengths, and address values.
IPv4 addressing · IPv6 addressing · Ethernet MAC addressesRead MAC addresses in hexadecimal
An Ethernet MAC address is 48 bits long. Grouped into six 8-bit bytes, it is written as twelve hexadecimal digits, commonly displayed as six pairs separated by colons. For example, 00:1A:2B:3C:4D:5E contains six byte pairs, or 12 hexadecimal digits. This is a representation exercise; MAC address functions and frame processing are covered in the Data Link and Ethernet modules.
Hexadecimal · Ethernet MAC address representationWORKED EXAMPLE
Convert 192 to binary
128 + 64 = 192, so 11000000₂ = 192₁₀.
CHECK YOUR UNDERSTANDING
Practice conversions.
Build speed with binary place values, hexadecimal nibbles, and networking examples.