In-Depth Computer Science Notes for IB Exam

Computer Architecture

CPU Components:
  • ALU: Performs arithmetic and logical operations.

  • CU: Directs CPU operations.

  • Registers: Fast storage for temporary data.

Memory Types:
  • Primary Memory:

    • RAM: Volatile memory.

    • ROM: Non-volatile firmware.

    • Cache: High-speed data access.

Instruction Cycle:
  • Fetch: Retrieve instruction.

  • Decode: Process instruction.

  • Execute: Perform the operation.

Storage Types

  • Secondary Memory: Persistent data storage.

Operating Systems

  • Functions: Manage hardware, provide user interface, execute tasks.

Application Software

  • Designed for specific user tasks (e.g., word processing).

Binary Representation

  • Key Terms:

    • Bit: Smallest data unit.

    • Byte: 8 bits.

    • Binary: Base-2 system.

    • Decimal: Base-10 system.

    • Hexadecimal: Base-16 system.

Data Representation:
  • Data converted into binary for processing.

Logic Gates


  • Basic Gates:

    • AND: True when both inputs are true.

    • OR: True if at least one input is true.

    • NOT: Inverts input.


  • Truth Tables:



    • AND:

      A

      B

      A AND B


      0

      0

      0


      0

      1

      0


      1

      0

      0


      1

      1

      1

      • OR:

      A

      B

      A OR B


      ---

      ---

      --------


      0

      0

      0


      0

      1

      1


      1

      0

      1


      1

      1

      1

      • NOT:

      A

      NOT A


      ---

      --------


      0

      1


      1

      0

      Advanced Gates:

      • NAND: Inverts AND output.

      • NOR: Inverts OR output.

      • XOR: True if inputs differ.

      Exam Preparation Notes

      • IB Symbols: Familiarize with specific logic gate symbols for IB exams.

      Combining Gates Examples:

      • Q = NOT (A AND B)

      • Q = NOT A NOR B

      • Q = C AND (A OR B)

      Practical Applications of Logic Gates:

      • AND: Smoke AND heat condition (fire alarm).

      • OR: Internal light IF door is open.

      • NOT: Microwave halts if door open.

      • NAND: Security systems engage without valid ID/code.

      • NOR: AC activates if all windows closed.

      • XOR: Two switches control one light.