Encoding Schemes and Number System

This chapter covers encoding schemes used to map characters to binary format, focusing on ASCII, ISCII, and UNICODE. It also explores various number systems such as decimal, binary, octal, and hexadecimal, and conversion methods between them.

2.1 Introduction

In modern computing, the way we interact with computers, specifically through keyboard inputs, is based on specific encoding schemes. These schemes convert input from human-readable form into a format that computers can process (binary). For instance, when typing the letter "A," it is represented as the decimal value 65 and, in binary, it becomes 1000001.

2.1.1 Encoding and Its Importance

Encoding is the process of converting text into specific codes. Standard encoding schemes ensure that a specific character corresponds to a unique code across all systems. This standardization allows for consistent communication and processing of text data across diverse systems.

  • ASCII (American Standard Code for Information Interchange) was one of the earliest encoding schemes, designed to standardize character representations. Initially, ASCII represented characters using 7 bits, allowing for 128 different characters.

| Character | Decimal Value | |------------|---------------| | Space | 32 | | ! | 33 | | A | 65 | | a | 97 |

2.1.2 ASCII Example

To encode the word DATA into its ASCII and binary representations:

  • D: ASCII value 68 (binary 1000100)
  • A: ASCII value 65 (binary 1000001)
  • T: ASCII value 84 (binary 1010100)
    The equivalent ASCII codes are:
  • D: 68
  • A: 65
  • T: 84
  • A: 65
    Constructing a table will help visualize this encoding process.

2.1.3 ISCII and UNICODE

Significantly, ISCII (Indian Script Code for Information Interchange) was developed to accommodate Indian languages on computers, allowing for an 8-bit representation suitable for 256 characters. The UNICODE standard has since replaced many of the older encoding systems, offering a unique identifier for every character in virtually all known languages, enhancing compatibility between platforms.

2.2 Number Systems Overview

Different number systems are critical in computing. Unique characters or symbols in these systems facilitate the representation of numeric values, which relate directly to computer processing. The four primary number systems used are:

  1. Decimal (Base-10): Uses digits 0-9.
  2. Binary (Base-2): Uses digits 0 and 1.
  3. Octal (Base-8): Uses digits 0-7.
  4. Hexadecimal (Base-16): Uses digits 0-9 and letters A-F.

2.2.1 Decimal Number System

The Decimal system is the most familiar, utilizing 10 digits. Each digit's placement and value are crucial (i.e., positional value). An example, 237.25 is computed as:

  • 2 x 10² + 3 x 10¹ + 7 x 10⁰ + 2 x 10⁻¹ + 5 x 10⁻² = 237.25

2.2.2 Binary Number System

The Binary system is essential in computing, as it represents states of transistors through 0s and 1s. Each binary number (e.g., 1011) can convert to decimal or other systems.

2.2.3 Octal and Hexadecimal Systems

  • The Octal system condenses binary numbers into groups of three (base-8). Each octal digit corresponds to 3 bits of binary.
  • The Hexadecimal system simplifies binary to groups of 4 bits (base-16), efficiently representing larger numbers.

2.3 Conversion Between Number Systems

Converting numbers between systems is fundamental in computing:

  • For Decimal to Binary, you repeatedly divide by 2 and record the remainders.
  • For Binary to Decimal, sum the positional values based on the base system.

Conversion Steps:

Decimal to Binary example:

  1. Divide by 2, record remainders:
    • 65 -> 32 R1
    • 32 -> 16 R0
    • 16 -> 8 R0
    • 8 -> 4 R0
    • 4 -> 2 R0
    • 2 -> 1 R0
    • 1 -> 0 R1 Final binary: 1000001

Fractional Conversions follow similar rules; multiply the fraction to convert to desired systems. For instance, to convert 0.25 to binary, multiply by 2: 0.25 x 2 = 0.50 (0)
0.50 x 2 = 1.00 (1)
Binary representation becomes 0.01.

Key Points to Remember

  1. Encoding: The process of converting text into codes for computer processing.
  2. ASCII: An encoding scheme using 7 bits representing up to 128 characters.
  3. UNICODE: Standard encoding that includes characters from all languages.
  4. Number Systems: Decimal (Base-10), Binary (Base-2), Octal (Base-8), and Hexadecimal (Base-16).
  5. Positional Value: The value of a digit in terms of its position based on the system's base.
  6. Binary Representation: Computers communicate in binary using states of 0 or 1.
  7. Conversions: Understanding how to convert and represent numbers across systems is essential in computing.
  8. Character Mapping: Each character has a specific binary representation due to encoding standards which must be recognized across all systems.

Key terms/Concepts

  1. Encoding is the process of text conversion into codes for computer understanding.
  2. ASCII is a 7-bit encoding scheme that standardizes character representation.
  3. UNICODE supports all character representations worldwide for language compatibility.
  4. Number Systems include Decimal, Binary, Octal, and Hexadecimal.
  5. Positional Values indicate the worth of each digit based on its position in the number.
  6. Binary Representation is fundamental as computers operate using 0s and 1s.
  7. Conversion between number systems (Decimal to Binary, etc.) is essential for computer operations.
  8. Characters are uniquely mapped to specific binary codes in encoding schemes.

Other Recommended Chapters