Data Representation 3
epresentation Topic Learning Outcomes
Understand numbering systems and the rof data using different numbering systems.
Comprehend how data is represented, stored, and manipulated inside a computer.
Learn how to represent data externally for easier understanding and manipulation based on standards.
Numbering Systems and Inter-conversion
Internal Computer Data format
Representation of data based on different standards
Binary System in Computers
Binary (Base 2) is preferred in computers due to:
Reduced complexity and cost of binary representation devices.
Reliability, as electronic signals can easily represent two states (0 and 1).
Transistors in processors represent binary states: ON (1) and OFF (0), similar to a light switch.
A bit is the smallest unit of data (0 or 1).
A byte consists of 8 bits, which represents a character.
Combinations of Bits
Single bit: 2 outputs (0, 1).
Two bits: 4 outputs (00, 01, 10, 11).
General formula:
n ext{ bits }
ightarrow 2^n ext{ outputs}Doubling outputs with each additional bit: increasing bits leads to exponential growth in data representation capability.
Types of Data Units
Bit: Basic unit of data,
Byte: Group of 8 bits (e.g., representing characters),
Nibble: Half a byte (4 bits),
Word: 2 or more bytes; varies in size (16, 32, 64 bits).
Types of Numbering Systems
Numbering System | Base | Symbols Used |
|---|---|---|
Binary | 2 | 0, 1 |
Octal | 8 | 0-7 |
Decimal | 10 | 0-9 |
Hexadecimal | 16 | 0-9, A-F (A=10, B=11, C=12, D=13, E=14, F=15) |
Conversions between Numbering Systems
Binary ↔ Decimal
Octal ↔ Decimal
Hexadecimal ↔ Decimal
Octal ↔ Binary
Hexadecimal ↔ Binary
Octal ↔ Hexadecimal
Practice Conversions
Represent decimal to binary, octal, and hexadecimal, and vice versa.
Practice examples in slides 11 - 22.
Binary Arithmetic
Operations
Addition: Carry over when sums exceed binary limit.
Subtraction: Use borrow methods similar to decimal.
Multiplication: Shift-and-add method is effective.
Example Calculations
Binary Addition:
0011 ext{ (3)} + 0010 ext{ (2)} = 0101 ext{ (5)}Binary Multiplication:
0011 imes 0010 = 000110 ext{ (6)}Binary Subtraction:
0101 - 0010 = 0011 ext{ (3)}Binary Division provides quotient and remainder.
Data vs. Information
Data: Raw facts (e.g., name, date of birth).
Information: Processed data presented meaningfully (e.g., customer details).
Data Processing Cycle
Input: Capturing raw data (e.g., user input).
Processing: Conversion into useful information.
Output: Display or storage of information.
Computer Data Formats
Different formats for representing data:
Alphanumeric (Text): ASCII, Unicode.
Audio: WAV, MP3, AIFF, etc.
Images: JPEG, GIF, etc.
Video: MPEG, QuickTime, etc.
Text Representation Standards
ASCII: 7-bit code (128 characters, mainly English).
Unicode: 16-bit superset of ASCII (supports global characters, emojis).
EBCDIC: Designed for mainframes (not widely used today).
Sound Representation
Analog signals converted to digital via
ADC (Analog to Digital Converter): For converting sound waves to digital.
DAC (Digital to Analog Converter): Converts digital data back to sound.
Image Representation
Pixels: Basic units making up images.
Resolution: Width x Height, affecting detail quality.
Color Depth: Number of bits per pixel (e.g., monochrome, RGB, CMYK).
Video Representation
Comprised of frames (sequences of images).
Frame Rate (FPS): Affects motion smoothness.
Compression: REDUCES file sizes (removing redundant data).
Summary / Recap
Data conversion is required for processing.
Data in modern systems is represented binary.
Each data type has a specific format.
Compression and encoding standards facilitate storage and transmission.
Review Questions
Represent numeric data in several numbering systems.
Explain internal data representation and manipulation by computers.