CSE101: Introduction to Computer Science Flashcards
Introduction to Computer Science and Definition of a Computer
A Computer is a device that:
Takes data from the user or other peripheral devices.
Computes or manipulates the data by following specific sets of instructions known as programs.
Provides output to the user.
Computer Science (CS):
CS is defined as the study of processes that interact with data and that can be represented as data in the form of programs.
Branches of Computer Science:
Software engineering
Algorithms and complexity
Architecture and organization
Computational science
Graphics and visual computing
Networking and communication
Operating systems
Parallel and distributed computing
Platform-based development
Security and information assurance
Programming languages
Human-computer interaction
Information management
Intelligent systems
The Importance and Demand of Computer Science
Computers are utilized in virtually every aspect of modern life, including:
Agriculture: Precision farming and resource management.
Health Care: Patient data, diagnostics, and medical research.
Industry Automation: Manufacturing and assembly controlled by software.
Global Telecommunication: Connecting the world via networks.
Security and Law: Digital forensics and surveillance.
Finance and Banking: Electronic transactions and risk assessment.
Information and Resource Management System: Efficient organizational tracking.
Self-driving Vehicles and Virtual Reality: Advanced interactive technologies.
Computers are significantly less prone to mistakes than humans, leading to the gradual displacement of manual human labor.
The demand for expertise in Computer Science continues to increase globally.
How a Computer Works: Workflow and Architecture
Simple Workflow Diagram:
Inputs: The data provided to the system.
Processing: The manipulation of data based on instructions.
Output: The resulting information presented to the user.
Roles of the Units:
Input Unit: Takes data/information from the user and stores it in the form of digital data.
Processing Unit: Performs operations as per the instructions or program provided to the computer.
Output Unit: Delivers the results of the processing to the user.
Basic Architecture Components:
Input Unit: Standard examples include the keyboard and mouse.
Storage Unit: Composed of Primary Storage (volatile) and Secondary Storage (non-volatile).
Central Processing Unit (CPU): Known as the "workhouse," it consists of the Control Unit (CU) and the Arithmetic and Logical Unit (ALU). It executes programs by performing operations on data.
Output Unit: Examples include monitors and printers.
Data vs. Control Flow:
Data Flow: The path data takes from input through storage and the CPU to the output.
Control Flow: Signals sent from the Control Unit to manage the sequence of operations.
Operational Examples and Data Representation
Arithmetic Operation Example (Addition):
Inputs: ,
Processing:
Output:
Logical Operation Example (Comparison):
Inputs: ,
Processing: If x > y then ' is greater' else ' is greater'.
Output: is greater
Data Types Used in Computers:
Text: Characters and numbers.
Image: A or matrix of pixels.
Video: Motion pictures represented as a series of frames.
Audio: Voice or sound captured as wave data.
Graphic: Computer-generated imagery (e.g., graphs, PDFs, animations, models, games).
Digital Encoding: ASCII and Imaging
ASCII (American Standard Code for Information Interchange):
Standardized binary codes for characters. For example, the character 'H' is represented as and 'I' as .
ASCII Reference Table Specifics: Uses unique combinations.
Unicode: A more expansive standard using variations to accommodate more characters.
Image Representation Types:
Black-white (Binary): Each pixel is represented by (Black) or (White).
Grayscale: Pixels range from to , where is black and is white.
Color (RGB): Uses a combination of Red, Green, and Blue values. Example: is Red; is White; is Black.
Total color combinations: .
Multimedia Data Rates:
Video: Dynamic motion typically recorded at (frames per second).
HD Video Data Rate Formula:
Audio: Converts sound waves into electrical voltage which is then generated as binary data via a transducer through processes like Delta modulation.
Hardware vs. Software
Hardware (The "What"):
Internal Hardware: Hardware enclosed within the computer casing (e.g., Processor, RAM, Hard disk).
External Hardware: Peripheral devices outside the casing (e.g., Keyboard, Mouse, Monitor, Speaker, Modem, Microphone, CD-ROM drive).
Software (The "How"):
A set of instructions that tells the computer how to complete specific tasks.
System Software: Manages computer resources at a low level. Includes the Operating System, compilers, loaders, linkers, and debuggers.
Application Software: Programs designed for end-users, such as word processors, database systems, and spreadsheet programs.
Operating System (OS) and System Management
Operating System: A collection of programs acting as a smart assistant that controls information flow and manages usage, storage, and access of data.
OS Components:
OS Shell: Includes the User Interface (UI), which may be Command/Character-based (e.g., DOS, UNIX) or Graphical User Interface (GUI).
Kernel: Part of the program that remains in main memory while the computer is running to direct nonresident programs.
Device Drivers: Facilitate communication between hardware (I/O devices) and programs.
Where is OS Stored?
Resides in secondary storage but is transferred to RAM during the booting process.
ROM (Read Only Memory): Non-volatile memory containing a "skeleton" OS to allow basic keyboard and drive usage before loading the full OS.
Main OS Functions:
Task Management: Preparing and monitoring tasks for CPU processing.
Memory Management: Allocation of memory for tasks, virtual memory management, and cache management.
Device Management: Controlling data flow to and from I/O devices.
File and Data Management: Organizing how files are created, copied, and stored.
System Monitoring: Checking resources for error detection and recovery.
Advanced Software Concepts: Multitasking and Utilities
Process: An instance of a running program with associated data.
Task: The basic unit of processing controlled by the OS.
Multitasking: Running multiple processes simultaneously by sharing CPU time blocks called CPU Time Slices. When a slice ends, the process state is saved (interrupted) so the CPU can move to the next process in the queue.
Context Switching: The act of switching the CPU from one process/user to another, such as shifting from a word processor to a spreadsheet.
Utility Programs:
Backup Utility: Creates duplicate data copies.
Data Recovery: Restores damaged/corrupted data.
Antivirus: Scans for and detects malicious viruses.
Data Compression: Removes redundant data to save storage space.
Disk Clean-up: Removes unnecessary files and corrects disk problems.
Fragmentation: The scattering of file portions across the disk.
Defragmenter Utility: Reorganizes files into contiguous blocks to improve access speed.
Program Design: Translators and Algorithms
Development Software: Translates high-level language code (written by humans) into Machine Language (binary machine code/object program).
Compilers: Translate the entire source code into machine code in one single step (e.g., Java, C++).
Interpreters: Translate and execute code one statement at a time interactively (e.g., Python, GO, R).
Algorithm: A sequence of finite instructions used for calculations and data processing.
Algorithm Representation:
Pseudocode: A generic way of describing algorithms using syntax similar to coding. It can be Sequential (one after another) or Non-sequential (based on flow control/conditions).
Flowchart: A graphical representation of an algorithm using standard shapes.
Flowchart Shapes and Logic
Standard Shapes:
Oval: Start or End of a program.
Rectangle: Denotes a calculation/processing step.
Parallelogram: Denotes Input or Output operations.
Circle: Connects different blocks of code.
Arrow: Denotes the flow of the program.
Rhombus/Diamond: Denotes a decision; one arrow enters, but two arrows exit (based on True/False conditions).
Conditional Operators:
Equality:
Inequality:
Comparison: <, >, <=, >=
Logical: NOT (), AND (&&), OR ()
Loop Components in Flowcharts:
Initialization: Setting variables to track the loop.
Condition: The boolean expression check to see if the loop should continue.
Body: The set of actions repeated in each cycle.
Steps: Updating the variables to eventually satisfy the loop exit condition.
Summary of Programming Languages Mentioned
C / C++ / C#
Java
Python
R
SQL / MySQL
HTML
PHP
JavaScript