Chapter 1: Data Representation - ISC Class 11 Computer Science
1. Introduction
Data representation refers to the methods used internally to represent information stored in a computer.
Since computers operate in binary (only two states: ON and OFF or 1 and 0), all types of data such as text,
numbers, images, and sounds must be converted into binary format before a computer can process them.
2. Numeral Systems
Numeral systems are different ways to represent numbers. There are two main types:
- Positional number systems: These depend on the position of the digit. Examples include decimal, binary,
octal, and hexadecimal.
- Non-positional number systems: Here, digits have fixed values regardless of their position. An example is
Roman numerals.
3. Digital Number Systems
- Decimal (Base 10): Uses digits from 0 to 9. Its the number system we use daily.
- Binary (Base 2): Uses only 0 and 1. Computers use binary because it aligns with electronic circuit states
(OFF = 0, ON = 1).
- Octal (Base 8): Uses digits from 0 to 7. Its a shorter form to represent binary.
- Hexadecimal (Base 16): Uses digits from 0 to 9 and A to F (where A = 10, ..., F = 15). Used for memory
addressing.
4. Number Conversions
- Decimal to Binary: Divide the number by 2 and record remainders. Read from bottom to top.
- Binary to Decimal: Multiply each binary digit by 2 raised to the position's power.
- Octal to Binary: Convert each octal digit to its 3-bit binary equivalent.
- Binary to Octal: Group bits in 3s from right and convert each group to an octal digit.
- Decimal to Hex: Divide by 16 and reverse the remainders.
- Binary to Hex: Group bits in 4s from right and convert.
- Hex to Binary: Replace each hex digit with a 4-bit binary number.
5. Binary Representation of Numbers
Chapter 1: Data Representation - ISC Class 11 Computer Science
Unsigned Binary Numbers: Only represent positive numbers.
Signed Binary Numbers: Can represent positive and negative values using methods like:
- Sign-Magnitude: Leftmost bit is the sign bit.
- Ones Complement: Invert all bits.
- Twos Complement: Ones complement + 1. Most commonly used for negative representation.
6. Floating-Point Representation
Used for representing real numbers (with fractional part).
- Fixed-point: Limited range, decimal is fixed.
- Floating-point: Uses Mantissa × Base^Exponent.
- Normalized Form: Only one digit before the decimal point.
- IEEE Standard: Single Precision (32-bit) and Double Precision (64-bit).
7. Binary Arithmetic
- Addition: Same rules as decimal, but with binary logic.
- Subtraction: Using borrowing or complements.
- Multiplication: Similar to decimal, with shifting.
- Division: Like long division in decimal.
- Ones Complement: Flip all bits.
- Twos Complement: Add 1 to ones complement to get the negative number.
8. Octal Arithmetic
- Octal Addition: Add digits as usual; if sum 8, carry over.
- Octal Subtraction: Borrow from higher octal place.
9. Hexadecimal Arithmetic
- Hex Addition: A (10) + 5 = F (15), etc. Carry if sum 16.
- Hex Subtraction: Similar to decimal with borrowing.
10. Character Encoding Systems
Chapter 1: Data Representation - ISC Class 11 Computer Science
Characters are stored using encoding systems:
- ASCII: 7-bit encoding for English characters.
- ISCII: 8-bit encoding for Indian scripts.
- Unicode: Universal standard supporting over 1 lakh characters from multiple languages.