01.IntroToComputers

Computer Science I COSC 1020

  • Institution: Georgetown University

Chapter 1: Intro to Computers and Programming

  • Importance of understanding computer operation and programming basics.

What is a Computer?

Definition

  • Machines designed to answer questions or perform tasks.

    • Examples:

      • Clocks: perform simple timekeeping tasks.

      • Abacuses: capable of performing related calculations.

      • Programmable computers can change operations based on inputs.

Functionality

  • Capable of answering various questions depending on programming and operation.

Computer Programs

Definition

  • Set of instructions that the computer follows to perform tasks.

Writing a Program

  • Involves structure and logic to produce desired outputs.

  • Reference: Gaddis et al. Chapter 1 (Sections 1-6).

Computer Components

Hardware

  • Define computer hardware as the physical components involved in processing and storing data.

Tasks of Hardware

  • Input and Output

    • Receives inputs (e.g., keyboard, mouse).

    • Produces outputs (e.g., display screen, speakers).

  • Memory Storage

    • Represents short-term and long-term storage solutions.

Computer Operations

Computation

  • Description of computation as algorithms or calculations done by computers.

  • Influence of early mathematicians in establishing algorithms for universal computing machines.

  • Reference: COSC 3250 "Introduction to Theory".

Computer Hardware Details

Constructing a Computer

  • Description of binary systems with two states:

    • High/low voltage, on/off states, magnetized/unmagnetized conditions.

Importance of Binary

  • Systems use binary (0s and 1s) to encode data and computations.

Logic Gates

Operation

  • Electric circuits following logical rules for information processing.

  • Components include two-input, one-output logic gates for comparing or combining two bits of information.

Central Processing Unit (CPU)

Function

  • CPU executes instructions and performs computations.

    • Composed of:

      • Control Unit: Coordinates operations and retrieves data.

      • Arithmetic and Logic Unit (ALU): Executes arithmetic operations and logic comparisons.

Memory Management

Storage Types

  • Main Memory (RAM):

    • Volatile memory for short-term data storage, i.e., contents lost when powered off.

  • Secondary Storage:

    • Various forms include SSDs, HDDs, and CDs, typically slower than RAM.

Input and Output Devices

Input Functions

  • Convert human actions into binary signals via various devices.

Output Functions

  • Convert binary signals back into human-readable formats through displays, sounds, etc.

Programming Basics

Nature of Computer Programs

  • Computer software consists of The instructions that tell a computer what to do.

Types of Software

  • System Software: Manages computer resources (e.g., operating systems, utility programs).

  • Application Software: Directly serves end users (e.g., word processors).

Writing Programs

Instruction Steps

  1. Define the problem - Clarify what questions need solving.

  2. Design the solution - Outline how the program will function, including inputs and outputs.

  3. Code in C++ - Write down your design using C++ language, compile, and debug.

  4. Iterate - Reassess and improve based on testing and logical analysis.

Conclusion

  • Understanding the foundational concepts of computer science is instrumental for deeper learning in programming and software development.