Text Interpretation and Encoding in Computer Systems
1. Key Interpretation:
- When a key is pressed on the keyboard, it’s internally mapped to a unique code.
- This code is then converted into binary form for the computer to process.
- Example: Pressing the letter ‘A’ might be mapped to the decimal value 65, then converted to binary.
Encoding:
- Encoding is the process of converting data into a cipher using a specific code.
- Each character, numeral, and symbol is assigned a unique code for representation.
- Standard encoding schemes ensure compatibility across systems and keyboards.
ASCII (American Standard Code for Information Interchange):
- Developed in the 1960s to standardize character representation.
- Originally used 7 bits to represent characters, allowing for 128 different characters.
- Primarily used for the English language.
ISCII (Indian Script Code for Information Interchange):
- Developed in the 1980s for Indian languages.
- An 8-bit code representation.
- Retains ASCII codes and uses additional codes for Indian language characters.
UNICODE:
- Developed to incorporate characters from all written languages.
- Provides a unique number for each character, ensuring compatibility across devices and systems.
- Includes encodings like UTF-8, UTF-16, and UTF-32.
- A superset of ASCII, with values 0–128 having the same characters as ASCII.
Introduction to Number Systems:
- Each keyboard key is mapped to an ASCII code, which is then converted into binary for computer understanding.
- A number system represents numbers using unique characters or literals, with the count of these characters called the radix or base.
- Number systems are positional, meaning the value of each symbol depends on its position within the number.
Decimal Number System (Base-10):
- Used in daily life, consisting of 10 digits (0 to 9).
- Numbers are represented by symbol value (0 to 9) and positional value.
Binary Number System (Base-2):
- Utilized in computer circuits, representing on/off states with 1 and 0.
- Base-2 system with only two digits (1 and 0).
- Binary numbers can be converted to decimal for human understanding.
Octal Number System (Base-8):
- Designed for compact representation of binary numbers.
- Base-8 system with eight digits (0 to 7), positional value expressed in powers of 8.
- Each octal digit is represented by three binary digits.
Hexadecimal Number System (Base-16):
- Offers compact representation of binary numbers.
- Consists of 16 symbols (0–9, A–F), with each alphanumeric digit represented by a group of four binary digits.
- Used in memory addressing and color representation on webpages for its ease of use and compactness.
Applications of Hexadecimal Number System:
- Simplifies memory address representation and color description on webpages.
- Memory addresses and color codes are often written in hexadecimal form for ease of use and compact representation.
Conversion between Number Systems
Introduction:
- Decimal system is used by humans, while computers understand binary.
- Octal and hexadecimal systems simplify binary representation for human understanding.
Conversion from Decimal to other Number Systems:
- Steps:
- Divide the decimal number by the base value of the target system.
- Record the remainders and write them in reverse order.
a) Decimal to Binary Conversion:
- Divide by 2 and record remainders until quotient is 0.
- Write remainders in reverse order.
b) Decimal to Octal Conversion:
- Divide by 8 to obtain the equivalent octal number.
c) Decimal to Hexadecimal Conversion:
- Divide by 16 to obtain the equivalent hexadecimal number.
Conversion from other Number Systems to Decimal:
- Steps:
- Write position numbers for each symbol.
- Obtain positional values by raising the position number to the base value.
- Multiply each digit with its positional value and sum them up.
a) Binary Number to Decimal:
- Positional values are computed in terms of powers of 2.
b) Octal Number to Decimal:
- Positional values are computed in terms of powers of 8.
c) Hexadecimal Number to Decimal:
- Positional values are computed in terms of powers of 16.
- Use decimal value equivalents for alphabet symbols.
Conversion between Binary, Octal, and Hexadecimal Numbers
Binary to Octal/Hexadecimal Conversion:
- Group binary digits into sets of 3 or 4 bits for octal or hexadecimal conversion, respectively.
- Replace each group with its equivalent octal or hexadecimal digit.
a) Binary to Octal:
- Example: Convert (10101100)₂ to octal: Group into sets of 3 bits: 010 101 100 → Octal digits: 2 5 4 → Result: (254)₈
b) Octal to Binary:
- Example: Convert (705)₈ to binary: Octal digits: 7 0 5 → Binary: 111 000 101 → Result: (111000101)₂
c) Binary to Hexadecimal:
- Example: Convert (0110101100)₂ to hexadecimal: Group into sets of 4 bits: 0001 1010 1100 → Hexadecimal: 1 AC → Result: (1AC)₁₆
d) Hexadecimal to Binary:
- Each hexadecimal symbol represents a 4-digit binary number.
- Substitute each hexadecimal digit with its 4-bit binary equivalent.
Conversion of Numbers with Fractional Part
Decimal Number with Fractional Part to another Number System:
- Multiply the fractional part of a decimal number by the base value of the target system until it becomes 0.
- Use the integer part from top to bottom to get the equivalent number in the target system.
- Stop if the fractional part repeats or after a certain number of multiplications.
Non-decimal Number with Fractional Part to Decimal Number System:
- Compute the positional value of each digit using its base value.
- Add the product of positional value and the digit to get the equivalent decimal number with the fractional part.
Fractional Binary Number to Octal or Hexadecimal Number:
- Substitute groups of 3 or 4 bits in the integer part with the corresponding digit for octal or hexadecimal.
- Similarly, group bits in the fractional part and substitute them with the equivalent digit or symbol in the target system.
- Add 0s at the end of the fractional part to ensure groups of 3 or 4 bits.