Computer Science 2210: Data Representation & Software Notes
Chapter 1: Data Representation
1.1 Binary Systems
- Computers use binary (base-2) to store and process data.
- Only digits 0 and 1 are used.
1.2 Denary to Binary and Binary to Denary Conversion
- Convert denary to binary using repeated division by 2.
- Convert binary to denary by summing powers of 2.
1.3 Binary Addition
- Follow simple binary rules:
0+0=0
0+1=1
1+0=1
1 + 1 = 10 (carry 1)
1.4 Overflow
- Occurs when result exceeds available bits (e.g., 8-bit system can't store 300).
1.5 Two's Complement (for negative numbers)
- Flip bits and add 1 to represent negative numbers in binary.
- Allows for binary subtraction and representation of negative integers.
1.6 Binary Shift
- Shifting left: multiplies by 2 each shift.
- Shifting right: divides by 2 each shift.
1.7 Hexadecimal
- Base-16 number system using digits 0-9 and A-F.
- Used in colour codes, MAC addresses, and debugging.
- Convert between binary, hex, and denary.
1.8 Character Representation
- ASCII: 7-bit code for English characters.
- Unicode: Supports characters from all languages.
1.9 Images
- Stored as pixels; each pixel has a colour value.
- Metadata includes resolution, height, width, etc.
- File size = height x width x colour depth.
1.10 Sound
- Digitised by sampling the sound wave.
- Sample rate: number of samples per second.
- Sample resolution: number of bits per sample.
1.11 Compression
- Reduces file size.
- Lossy: removes some data (e.g., JPEG, MP3).
- Lossless: keeps all original data (e.g., PNG, FLAC).
Chapter 4: Software
Chapter 4: Software
4.1 Types of Software
- Software: Set of instructions that tell a computer what to do.
- Two main types:
a. System Software
b. Application Software
4.2 System Software
- Helps run the computer hardware and system.
a. Operating System (OS): Manages hardware, provides user interface.
- Handles memory management, file management, and process scheduling.
b. Utility Programs: Support tasks like antivirus, defragmenting, compression.
c. Library Programs: Pre-written code used by other programs.
d. Translators:
- Compiler: Translates whole code at once.
- Interpreter: Translates and executes line-by-line.
- Assembler: Converts assembly language into machine code.
4.3 Application Software
- Performs specific user tasks.
a. General-purpose: Word processor, spreadsheet, browser.
b. Special-purpose: Payroll system, flight booking software.
c. Custom-written: Built for specific organisations or needs.
4.4 User Interface Types
- Graphical User Interface (GUI): Uses windows, icons, menus, pointers.
- Command Line Interface (CLI): Text-based, user types commands.
- Menu-driven: User navigates through predefined menus.
- Touch interface: Used in mobile phones, ATMs, etc.
4.5 Differences Between Software Types
- System software is essential for running the computer.
- Application software is for the user's needs.