Number systems are ways to represent numbers using different bases. In computing, several number systems are commonly used: binary, octal, decimal, and hexadecimal. Each system has a different base and is useful for specific applications. Let’s explore each one.


1. Binary Number System (Base-2)

  • Base: 2
  • Digits Used: 0, 1
  • Explanation: The binary system is the foundation of all modern computing. Every number is represented using only two digits: 0 and 1.
  • Applications: Used in digital electronics and computers because they work with two states (on/off, true/false).
  • Example:
    • Binary: 1010
    • Decimal equivalent: 1×23+0×22+1×21+0×20=8+0+2+0=101 \times 2^3 + 0 \times 2^2 + 1 \times 2^1 + 0 \times 2^0 = 8 + 0 + 2 + 0 = 10

2. Octal Number System (Base-8)

  • Base: 8
  • Digits Used: 0 to 7
  • Explanation: The octal system uses eight digits (0-7). It is useful because it can represent binary numbers in a more compact form. Every octal digit corresponds to a group of 3 binary digits (bits).
  • Applications: Historically used in older computer systems and as shorthand for binary in certain applications.
  • Example:
    • Octal: 12
    • Binary equivalent: 0010102001 010_2
    • Decimal equivalent: 1×81+2×80=8+2=101 \times 8^1 + 2 \times 8^0 = 8 + 2 = 10

3. Decimal Number System (Base-10)

  • Base: 10
  • Digits Used: 0 to 9
  • Explanation: The decimal system is the number system used in everyday life. It has ten digits (0-9), and each position of a number represents a power of 10.
  • Applications: Used in human-centric calculations and everyday arithmetic.
  • Example:
    • Decimal: 456
    • This is simply: 4×102+5×101+6×100=400+50+6=4564 \times 10^2 + 5 \times 10^1 + 6 \times 10^0 = 400 + 50 + 6 = 456

4. Hexadecimal Number System (Base-16)

  • Base: 16
  • Digits Used: 0-9, A-F (where A = 10, B = 11, C = 12, D = 13, E = 14, F = 15)
  • Explanation: The hexadecimal system uses sixteen digits. Each hexadecimal digit can represent a group of 4 binary digits (bits), making it a compact way to represent binary data.
  • Applications: Widely used in programming, memory addresses, and color codes in web design (e.g., #FFFFFF for white).
  • Example:
    • Hexadecimal: 1A
    • Binary equivalent: 0001101020001 1010_2
    • Decimal equivalent: 1×161+A×160=1×16+10=261 \times 16^1 + A \times 16^0 = 1 \times 16 + 10 = 26

Number System Conversion:

1. Binary to Decimal Conversion:

  • To convert from binary to decimal, multiply each binary digit by 2 raised to the power of its position (starting from 0 on the right).
  • Example: Binary: 1011
    • Calculation: 1×23+0×22+1×21+1×20=8+0+2+1=111 \times 2^3 + 0 \times 2^2 + 1 \times 2^1 + 1 \times 2^0 = 8 + 0 + 2 + 1 = 11 (decimal).

2. Decimal to Binary Conversion:

  • Divide the decimal number by 2, record the remainders, and read them in reverse order.
  • Example: Decimal: 19
    • Calculation: 19/2=919 / 2 = 9 remainder 11; 9/2=49 / 2 = 4 remainder 11; 4/2=24 / 2 = 2 remainder 00; 2/2=12 / 2 = 1 remainder 00; 1/2=01 / 2 = 0 remainder 11.
    • Binary equivalent: 10011.

3. Binary to Octal Conversion:

  • Group the binary digits in sets of 3 from right to left and convert each group to its octal equivalent.
  • Example: Binary: 101010
    • Grouping: 101 and 010.
    • Octal equivalent: 52.

4. Binary to Hexadecimal Conversion:

  • Group the binary digits in sets of 4 from right to left and convert each group to its hexadecimal equivalent.
  • Example: Binary: 10110100
    • Grouping: 1011 and 0100.
    • Hexadecimal equivalent: B4.

5. Decimal to Hexadecimal Conversion:

  • Divide the decimal number by 16, record the remainders, and convert any remainder above 9 to the corresponding letter (A-F).
  • Example: Decimal: 255
    • 255/16=15255 / 16 = 15 remainder 1515 (which is F in hex).
    • Hexadecimal equivalent: FF.

Comparison Table:

Number System BaseDigitsExampleDecimal Equivalent
Binary20, 1101010
Octal80-71210
Decimal                   10            0-9              1010
Hexadecimal160-9, A-F A10

Applications:

  1. Binary: Used in all computing systems and digital electronics. It's the language of machines.
  2. Octal: Historically used in some computing systems but less common today.
  3. Decimal: Used in everyday life by humans for counting and arithmetic.
  4. Hexadecimal: Commonly used by programmers and in digital systems for memory addresses, error codes, and color codes.

Each number system has its purpose and utility, with the binary system being crucial for how computers operate at the most basic level, while hexadecimal is widely used to simplify complex binary numbers in various applications.