5.1.3 Hexadecimal & Octal Systems

Hexadecimal System

  • Notational system with 16 values per digit.

  • Values: 0-9 are represented by numerals, 10-15 are represented by letters A-F.

  • Used for compact representation of byte values, e.g., MAC and IPv4 addresses.

  • Hex is a base-16 numbering system.

Counting in Hexadecimal

  • Counting beyond F:

    • Replace the first digit of F with 1, and add 1 in the second position.

    • Example: Hex ID of 10 equals decimal 16.

Decimal to Hex Conversion Examples

  • 15 (Decimal) = F (Hex)

  • 23 (Decimal) = 17 (Hex)

  • 24 (Decimal) = 18 (Hex)

  • 25 (Decimal) = 19 (Hex)

  • 26 (Decimal) = 1A (Hex)

  • 27 (Decimal) = 1B (Hex)

Hexadecimal in Computing

  • Important for computer programming and networking.

  • Describes colors, memory locations, characters, etc.

  • Compact form, reduces memory usage.

  • Easily translates to binary; simplified and readable.

Hexadecimal in Network Addresses

  • Each hex digit represents 4 bits; compact for binary data.

  • Utilized in newer IP addresses and MAC addresses (e.g., C3:79:4B:AC:8F:50).

  • Unique MAC addresses identify devices in a network.

  • MAC addresses are 48 bits; the first half denotes the manufacturer's identifier (DUI).

Octal Numbering System

  • Base-8 numbering system (octal)

  • Uses digits from 0 to 7

  • More compact representation of binary numbers

Applications

  • Utilized in low-level programming and coding

  • Employed in assembly languages

  • Linux/UNIX operating systems: octal numbers denote file permissions

    • Each octal digit represents three permissions: read, write, execute for different accounts.