Skip to content

Computer Science Fundamentals

This document serves as a quick-reference guide to the fundamental concepts of computer science, from hardware architecture to software development principles.

Table of Contents

  1. Computer Architecture
  2. Operating Systems
  3. Networking Fundamentals
  4. Data Structures & Algorithms
  5. Software Development Concepts
  6. Database Fundamentals
  7. Security Fundamentals
  8. Advanced Topics

Computer Architecture

CPU (Central Processing Unit)

The CPU is the “brain” of the computer, responsible for executing instructions.

  • Control Unit (CU): Directs the flow of operations. It fetches instructions from memory and decodes them.
  • Arithmetic Logic Unit (ALU): Performs arithmetic (addition, subtraction) and logic (AND, OR, NOT) operations.
  • Registers: Small, extremely fast storage locations used to hold data temporarily during instruction execution (e.g., instruction register, program counter).

Memory and Storage

Deals with how a computer stores and accesses data.

  • Primary Storage (RAM - Random Access Memory): Volatile memory that stores data the CPU is actively using. It’s fast but loses its content when the power is off.
  • Secondary Storage (Hard Drives, SSDs): Non-volatile memory used for long-term storage of files and applications. It’s slower than RAM but retains data without power.
  • Caching: A smaller, faster memory layer (like L1, L2, L3 caches in a CPU) that stores copies of frequently accessed data from a larger, slower memory layer to speed up access.
  • Virtual Memory: A memory management technique where secondary storage is used as if it were part of the main memory (RAM). This allows for the execution of programs that are larger than the physical RAM.

Motherboard and Buses

The motherboard is the main circuit board connecting all components. Buses are the communication pathways that allow these components to interact.

  • Data Bus: Transfers the actual data between components.
  • Address Bus: Specifies the memory location where the data is being read from or written to.
  • Control Bus: Carries command and control signals to manage the activities of all components.

Instruction Set Architecture (ISA)

The ISA is the part of the computer architecture related to programming, including the native data types, instructions, registers, and memory model. It defines the interface between hardware and software.

  • RISC (Reduced Instruction Set Computer): Uses a small, highly optimized set of simple instructions. Examples: ARM, MIPS.
  • CISC (Complex Instruction Set Computer): Uses a large set of complex instructions that can perform multiple low-level operations in a single instruction. Examples: x86 (Intel, AMD).

Operating Systems

An Operating System (OS) is system software that manages computer hardware and software resources and provides common services for computer programs.

Processes and Threads

  • Process: A program in execution. Each process has its own isolated memory space, managed by the OS.
  • Thread: The smallest unit of execution within a process. A process can have multiple threads that share the same memory space, allowing for concurrent execution of different tasks.

Key Difference: Creating a process is resource-intensive (requires a new memory space), while creating a thread is lightweight. Communication between threads is easier (shared memory) than inter-process communication (IPC).

File Systems

A file system defines how data is stored and retrieved on a storage device. It manages files and directories, keeping track of their location, size, and other attributes.

  • Examples: FAT32 (older, widely compatible), NTFS (Windows default), ext4 (Linux default), APFS (macOS default).

Networking Fundamentals

Computer Networks

Computer networking refers to the practice of connecting computers together to share resources and information.

  • LAN (Local Area Network): Connects devices within a limited area like a home or office.
  • WAN (Wide Area Network): Spans a large geographical area, like the internet.
  • Protocols: Sets of rules that govern communication. TCP/IP is the foundational suite for the internet, while UDP is a simpler, connectionless alternative.

OSI Model

The Open Systems Interconnection (OSI) model is a conceptual framework that standardizes the functions of a telecommunication or computing system into seven abstract layers.

  1. Layer 7 (Application): Human-computer interaction layer (e.g., HTTP, FTP, SMTP).
  2. Layer 6 (Presentation): Ensures data is in a usable format (e.g., data encryption, compression).
  3. Layer 5 (Session): Manages sessions between applications (e.g., session setup, termination).
  4. Layer 4 (Transport): Provides reliable data transfer between points on a network (e.g., TCP, UDP).
  5. Layer 3 (Network): Handles routing and logical addressing (e.g., IP addresses, routers).
  6. Layer 2 (Data Link): Manages physical addressing and error checking for a single link (e.g., MAC addresses, switches).
  7. Layer 1 (Physical): The physical hardware that transmits the signal (e.g., cables, hubs).

IP Addressing and Subnetting

  • IP Address: A unique numerical label assigned to each device connected to a computer network. IPv4 (e.g., 192.168.1.1) is the most common, while IPv6 provides a vastly larger address space.
  • Subnetting: The process of dividing a single, large network into smaller, more manageable sub-networks or “subnets.”

Data Structures & Algorithms

Data Structures

Ways of organizing and storing data to perform operations efficiently.

  • Array: A collection of items stored at contiguous memory locations.
  • Linked List: A sequence of nodes where each node points to the next node.
  • Stack: A LIFO (Last-In, First-Out) structure. Use cases: function call stack, undo operations.
  • Queue: A FIFO (First-In, First-Out) structure. Use cases: task scheduling, message queues.
  • Tree: A hierarchical structure with a root node and child nodes. Use cases: file systems, DOM.
  • Graph: A collection of nodes (vertices) and edges that connect them. Use cases: social networks, mapping.

Algorithms

A set of rules or instructions for solving a problem or performing a computation.

  • Sorting: Arranging data in a specific order.
    • Quicksort: Efficient, in-place sorting algorithm. Average case: O(n log n).
    • Mergesort: Stable, not in-place. Worst case: O(n log n).
  • Searching: Finding a specific item in a collection.
    • Binary Search: Efficiently finds an item in a sorted array. Complexity: O(log n).

Software Development Concepts

Programming Languages

  • Compiled: Source code is translated into machine code by a compiler before execution (e.g., C, C++, Go). Generally faster.
  • Interpreted: Source code is executed line-by-line by an interpreter at runtime (e.g., Python, JavaScript, Ruby). Generally more flexible.

Software Development Lifecycle (SDLC)

A process for planning, creating, testing, and deploying high-quality software.

  1. Planning & Requirement Analysis
  2. Design
  3. Development & Implementation
  4. Testing
  5. Deployment
  6. Maintenance

Database Fundamentals

Database Management Systems (DBMS)

Software for creating and managing databases.

  • Relational (SQL): Data is stored in tables with a predefined schema. Enforces relationships between tables. Examples: PostgreSQL, MySQL, SQL Server.
  • Non-relational (NoSQL): Data is stored in various flexible formats (document, key-value, graph). Schema is dynamic. Examples: MongoDB, Redis, Cassandra.

Data Normalization

The process of organizing columns and tables in a relational database to minimize data redundancy and improve data integrity. The goal is to ensure that each piece of data is stored in only one place.


Security Fundamentals

Cybersecurity Basics

  • Authentication: Verifying the identity of a user (e.g., password, biometrics).
  • Authorization: Granting or denying permissions to a user based on their identity.
  • Encryption: Converting data into a code to prevent unauthorized access.
  • Common Threats: Malware, phishing (tricking users into revealing sensitive info), Man-in-the-Middle (MITM) attacks.

Encryption and Cryptography

  • Symmetric Encryption: Uses the same key for both encryption and decryption. Fast but has the challenge of secure key exchange.
  • Asymmetric Encryption (Public-Key): Uses a public key for encryption and a private key for decryption. Slower but more secure for key exchange.
  • Hashing: A one-way function that converts an input into a fixed-size string of bytes. Used to verify data integrity (e.g., storing passwords).

Advanced Topics

Cloud Computing

Delivery of computing services—including servers, storage, databases, networking, and software—over the Internet (“the cloud”).

  • IaaS (Infrastructure as a Service): Basic building blocks (e.g., virtual machines, storage). Ex: AWS EC2.
  • PaaS (Platform as a Service): Platform for developing, running, and managing applications without dealing with infrastructure. Ex: Heroku, AWS Elastic Beanstalk.
  • SaaS (Software as a Service): Ready-to-use software applications. Ex: Google Workspace, Salesforce.

Machine Learning and AI Basics

  • Artificial Intelligence (AI): The broader concept of machines being able to carry out tasks in a way that we would consider “smart.”
  • Machine Learning (ML): A subset of AI that involves training a model from data to make predictions or decisions.
    • Supervised Learning: Training on labeled data (input and output are known).
    • Unsupervised Learning: Training on unlabeled data to find patterns.
    • Neural Networks: A type of ML model inspired by the human brain, forming the basis of deep learning.

Big Data and Data Analytics

  • Big Data: Refers to datasets that are too large or complex for traditional data-processing application software to adequately deal with. Characterized by the “3 Vs”: Volume, Velocity, and Variety.
  • Frameworks: Tools for processing big data across clusters of computers.
    • Hadoop: An open-source framework for distributed storage and processing.
    • Spark: A faster, more modern alternative to Hadoop’s processing engine (MapReduce).