CIE AS Level Computer Science Notes (2024-2025 Syllabus)

1. Information Representation

1.1. Data Representation

  • The two fundamental characteristics of any number system are:
    1. Base: The number of different digits that a system can use to represent numbers.
    2. Place value: The specific value of a digit based on its position within a number.
  • Denary - Base 10
  • Binary Systems - Base 2: Possible bits (binary digits): 0 and 1. All data and characters are represented in binary.

Example1

65 in binary is 0100001.

Denary vs. Binary prefixes

Denary Prefix Factor Value Binary Prefix Factor Value
kilo- (k) × 10^3 kibi- (Ki) × 2^10
mega- (M) × 10^6 mebi- (Mi) × 2^20
giga- (G) × 10^9 gibi- (Gi) × 2^30
tera- (T) × 10^12 tebi- (Ti) × 2^40

Binary Coded Decimal (BCD)

  • Binary representation where each positive denary digit is represented by a sequence of 4 bits (nibble).

Example2

To represent 429 in BCD:

  • 4 = 0100
  • 2 = 0010
  • 9 = 1001
  • Concatenate the 3 nibbles: 0100 0010 1001

Applications

  • A string of digits on electronic devices (e.g., calculators).
  • Accurately measuring decimal fractions.
  • Electronically coding denary numbers.

Two's Complement

  • We can represent negative numbers in binary by using the most significant bit (MSB) as a sign bit.

Example3

To convert -42 to binary two's complement:

  1. Convert 42 to binary: 101010.
  2. Format to 8 bits: 00101010.
  3. Flip the bits (one's complement): 11010101.
  4. Add 1 (two's complement): 11010110.
  • Hexadecimal Systems - Base 16: Possible digits: 0-9 and A-F.

Example4

A5 in Denary = (16×10) + (1×5) = 165

Character Sets

  • Character Encoding Standards:
    • ASCII: 7 bits, 128 possible characters.
    • Extended ASCII: 8 bits, 256 possible characters.
    • Unicode: Superset for ASCII, recognized by various global languages, uses 2 or 4 bytes per character.

2. Communication

2.1. Networks, including the Internet

  • LAN: Connects devices within a small geographical area.
  • WAN: Connects devices over a large area.
  • Client-Server Model: A server provides applications and resources for client computers.

Network Topologies

  • Bus Topology: A single line connects all devices.
  • Star Topology: Central server with all other devices connected via dedicated connections.
  • Mesh Topology: Every device is interconnected with others.

3. Hardware: Computers and Their Components

  • Embedded systems: Miniature computer systems performing specific functions.
  • Laser Printer: Uses a laser beam to draw an image on a photosensitive drum.
  • 3D Printer: Creates objects by adding layers of material based on a digital file.

RAM vs ROM

RAM ROM
Volatile, loses content when power is off Non-volatile, retains content
Can be read and altered Can only be read

Types of RAM

  • Static RAM (SRAM): Does not need to be refreshed, faster.
  • Dynamic RAM (DRAM): Needs refreshing, slower but cheaper.

Monitoring and Control System

  • Monitoring System: Monitors external states, without feedback.
  • Control System: Alters system behavior based on events.

4. Processor Fundamentals

4.1. CPU Architecture

  • Von Neumann Architecture: Uses a single processor to fetch, decode, and execute instructions.
  • Registers: Smallest storage unit for fast data transfer.

Fetch-Execute Cycle

  1. Fetch: PC holds the next instruction’s address.
  2. Decode: The opcode and operand parts of the instruction are identified.
  3. Execute: The control unit sends signals to execute the instruction.

5. System Software

5.1. Operating System

  • Manages memory, files, security, hardware, and processes.
  • Utility Software: Includes disk formatting, virus checkers, and defragmentation software.

5.2. Language Translators

  • Assembler: Translates assembly language to machine code.
  • Compiler: Translates high-level language to machine code at once.
  • Interpreter: Translates high-level language line-by-line.

6. Security, Privacy, and Data Integrity

6.1. Data Security

  • Malware: Includes viruses and spyware.
  • Hacking: Illegal access to a system.
  • Phishing: Attempts to gain confidential data through emails.

Data Security Measures

  • Encryption: Converts data into a code to prevent unauthorized access.
  • Access Rights: Assign different authorization levels to users.
  • Backup: Regularly create a copy of important data.

7. Ethics and Ownership

  • Computer Ethics: Regulates the behavior of computing professionals.
  • Software Licensing:
    • Free Software: Allows users to run, copy, and modify the software freely.
    • Open Source: Source code is available for users to modify and share.

8. Database and Data Modelling

8.1. File-Based System

  • Stores data in discrete files, accessed by users, but lacks control over the organization or structure of data.

8.2. Database Management Systems (DBMS)

  • Features of a DBMS:
    • Data storage in relational databases.
    • Provides data security and management.

8.3. Relational Database Modelling

  • Entity: Object or event.
  • Primary Key: Uniquely defines each tuple in a relation.

8.4. Data Manipulation Language (DML)

  • SQL statements used to query or modify data. Here’s the continuation of the markdown version:

9. Ethics and Ownership (continued)

9.1 Artificial Intelligence (AI)

  • AI: The ability of a computer to perform tasks conventionally associated with human intelligence, such as learning from past mistakes and adapting to new situations.

AI Applications

  • Autonomous mechanical products.
  • Machine learning through data sets.

AI Impacts

  • Social: Automation could replace manual labor, potentially leading to unemployment.
  • Economic: Increased innovation and efficiency in manufacturing, resulting in lower costs.
  • Environmental: AI systems require resources for production, contributing to environmental concerns related to waste disposal.

10. Database Systems

10.1. File-Based Systems

  • Data stored in discrete files on a computer that users can access, modify, or remove.
  • Disadvantages:
    • No structure or control over file organization.
    • Redundancy due to duplicated data across files.
    • Difficulties in multi-user environments.

10.2. Database Management Systems (DBMS)

  • A DBMS manages and defines databases, providing structure, security, and tools for efficient data handling.

Features of a DBMS

  • Data Management: Stores data in relational tables.
  • Data Dictionary: Holds information about the database structure, such as fields and records.
  • Data Security: Handles access control, user privileges, and backups.

11. Relational Database Design

11.1. Normalization

  • The process of organizing data in a relational database to minimize redundancy.

1st Normal Form (1NF)

  • No repeating groups or attributes. Each attribute contains atomic values.

2nd Normal Form (2NF)

  • It is in 1NF, and all non-primary key attributes are fully dependent on the primary key.

3rd Normal Form (3NF)

  • It is in 2NF, and all non-key attributes are independent of each other, depending solely on the primary key.

12. SQL and Data Manipulation

12.1 Data Definition Language (DDL)

  • DDL is used to define and modify the structure of a database.

Example

1
2
3
4
5
6
7
CREATE TABLE Training (
EmpID INT NOT NULL,
CourseTitle VARCHAR(30) NOT NULL,
CourseDate DATE NOT NULL,
PRIMARY KEY (EmpID, CourseDate),
FOREIGN KEY (EmpID) REFERENCES Employee(EmpID)
);

12.2 Data Manipulation Language (DML)

  • DML is used to query and maintain the data within the database.

Example Queries

1
SELECT field_name FROM table_name WHERE condition;
  • To insert data
1
INSERT INTO table_name (field1, field2) VALUES (value1, value2);
  • To update data
1
UPDATE table_name SET field_name = value WHERE condition;

13. System Software

13.1 Operating System (OS)

  • Operating System: A set of programs that runs in the background and controls hardware, user interfaces, file management, and multitasking processes.

Key Tasks

  • Memory Management: Allocates memory for applications.
  • File Management: Handles file creation, storage, and retrieval.
  • Security Management: Ensures data privacy and security.

Utility Software

  • Disk Formatting: Prepares storage devices for data.
  • Virus Checkers: Detect and remove malware.
  • Defragmentation: Optimizes file storage to improve performance.

Language Translators

  • Assembler: Translates assembly language to machine code.
  • Compiler: Translates high-level code to machine code in one step.
  • Interpreter: Translates high-level code line-by-line.

14. Data Security and Integrity

14.1 Data Validation and Verification

  • Data Validation: Ensures the data entered is sensible and fits expected parameters.

    Validation Methods:

    • Range check: Data must fall within a specific range.
    • Format check: Data must follow a set pattern.
  • Data Verification: Ensures data entered is accurate and correct.

    Verification Methods:

    • Double Entry: Data is entered twice and compared.
    • Visual Check: A person manually checks the data.

14.2 Data Integrity

  • Ensuring that data remains accurate, valid, and consistent during transfer or storage.

Methods

  • Checksum: Adds a checksum value during data transmission to verify accuracy.
  • Parity Check: Ensures data has either an even or odd number of bits set to 1, detecting errors in transmission.

15. Logic Gates and Circuits

15.1. Logic Gates

  • Logic gates use one or more inputs to produce a single output based on logical operations.

Common Gates

  • AND Gate: Output is high if both inputs are high (A • B).
  • OR Gate: Output is high if any input is high (A + B).
  • NOT Gate: Inverts the input.

15.2. Processor Fundamentals

Fetch-Execute Cycle1

  1. Fetch: The address of the next instruction is loaded.
  2. Decode: The instruction is interpreted.
  3. Execute: The operation is performed, and the cycle repeats.

Note: This document was created for personal use and may contain copyrighted materials under ZNotes. Redistribution without consent is prohibited.