Lecture 1 Slides - Hardware and Software

1 of 35

Hardware & Software

CS 110

1

2 of 35

Reminders

Today

  1. Canvas & edSTEM Overview
  2. What is a computer?
  3. Hardware
  4. Software

Friday

  1. Programming in Text
  2. Mini-Quiz 0 (completed by attending class)
  3. Finishing up Exercise 0 (Google Form + Submission to Canvas)

2

3 of 35

Course Resources

edSTEM

  • Used to ask questions, get answers, and help others.
  • Can post PRIVATE or PUBLIC questions.
  • Peers can answer questions too!
  • Personal matters should go to me via email

3

Canvas

  • Literally everything else.
  • Where you can check deadlines and course schedule.
  • Submit assignments.
  • Find assignment details.
  • Find lecture slides and recordings.

4 of 35

Outline

  • What is a computer?
  • Hardware
  • Software

4

5 of 35

What is a computer?

5

6 of 35

6

  1. ~1613. A person who makes calculations or computations; a calculator, a reckoner; spec. a person employed to make calculations in an observatory, in surveying, etc. Now chiefly hist.
  2. ~1869. A device or machine for performing or facilitating calculation.
  3. ~1945. An electronic device (or system of devices) which is used to store, manipulate, and communicate information, perform complex calculations...and is capable of receiving information (data) and of processing it in accordance with variable procedural instructions (programs or software).

From the Oxford English Dictionary

7 of 35

7

8 of 35

8

9 of 35

9

10 of 35

10

11 of 35

11

12 of 35

12

13 of 35

13

14 of 35

14

15 of 35

https://www.history.com/news/human-computers-women-at-nasa

16 of 35

16

17 of 35

17

What is a Computer?

Something or someone that interprets and processes instructions, according to a set of rules and conventions, in a consistent way.

Involves hardware and software working together

18 of 35

HARDWARE

18

19 of 35

19

Central Processing Unit (CPU)

Arithmetic and Logic Unit

Control Unit

Temporary Memory(e.g. Cache, RAM)

Permanent Memory(e.g. thumb drives, hard drives)

Inputs�(e.g. keyboard, mouse, mic, webcam, sensor)

Outputs�(e.g. screen, speakers, printer)

HARDWARE�The Physical Side of Computing

20 of 35

SOFTWARE

What is a program?

20

21 of 35

A set of instructions interpreted by an information processing agent

The following are properties of programs:

  1. Must be interpreted by someone/thing that understands them
  2. Relies on a set of formal conventions (i.e. a language) that the interpreting agent and the programmer both understand
  3. A program executed by one agent (given the same inputs) should be identical to the same program executed by another agent
  4. Order matters

21

22 of 35

22

Directions

  1. Preheat oven to 350 degrees F (175 degrees C).
  2. Cream together the butter, white sugar, and brown sugar until smooth. Beat in the eggs one at a time, then stir in the vanilla. Dissolve baking soda in hot water. Add to batter along with salt. Stir in flour, chocolate chips, and nuts. Drop by large spoonfuls onto ungreased pans.
  3. Bake for about 10 minutes in the preheated oven, or until edges are nicely browned.

Ingredients

1 cup butter, softened 2 eggs

1 cup white sugar 2 teaspoons vanilla extract

1 cup packed brown sugar 1 teaspoon baking soda

2 cups chocolate chips ...

23 of 35

23

Directions

  • Preheat oven to 350 degrees F (175 degrees C).
  • Cream together the butter, white sugar, and brown sugar until smooth. Beat in the eggs one at a time, then stir in the vanilla. Dissolve baking soda in hot water. Add to batter along with salt. Stir in flour, chocolate chips, and nuts. Drop by large spoonfuls onto ungreased pans.
  • Bake for about 10 minutes in the preheated oven, or until edges are nicely browned.

Ingredients

1 cup butter, softened 2 eggs

1 cup white sugar 2 teaspoons vanilla extract

1 cup packed brown sugar 1 teaspoon baking soda

2 cups chocolate chips ...

  • Who is the interpreter?
  • What are some of the formal conventions?
  • What is the order?
  • How much flexibility does the interpreter have?

24 of 35

A set of instructions interpreted by an information processing agent

The following are properties of programs:

  • Must be interpreted by someone/thing that understands them
  • Relies on a set of formal conventions (i.e. a language) that the interpreting agent and the programmer both understand
  • A program executed by one agent (given the same inputs) should be identical to the same program executed by another agent
  • Order matters

Programming languages are designed to be concise & unambiguous

24

25 of 35

I never said they stole my cookie.

25

26 of 35

I never said they stole my cookie.

26

27 of 35

I never said they stole my cookie.

I never said they stole my cookie.

27

28 of 35

Programming Languages and Ambiguity

In spoken languages like English, there are situations where weirdness prevents us from understanding the meaning behind a sentence.

I never said they stole my cookie. — Someone else said it.

I never said they stole my cookie. — I didn't say it.

I never said they stole my cookie. — I only implied it.

I never said they stole my cookie. — I said someone did, not necessarily them.

I never said they stole my cookie. — I considered it borrowed.

I never said they stole my cookie. — Only that they stole a cookie, not necessarily my own.

I never said they stole my cookie. — They stole something of mine, not my cookie.

Computers can't deal (easily at least) with this ambiguity. So in a programming language, we limit ourselves to particular functions that are defined very specifically such that there is no ambiguity when you give the computer that command.

28

29 of 35

29

30 of 35

Some Vocabulary…

Folders & Files - Just like their physical counterparts, they store data (using bits)

  • Desktop - The screen you see when you have no apps open on your computer

Internet Browsers - Applications that allow us to access resources on the internet

  • We can access websites directly through their URL
  • Search Engines like Google or DuckDuckGo have indexed those pages

WiFi - a specific wireless networking technology

  • Just having a Wifi Connection does not mean you have access to the internet
  • It’s the last “link” in the chain to the “world wide web”

30

31 of 35

Some Vocabulary…

LLMs (Large Language Models) - The technology that powers most of the software we hear colloquially referred to as “AI” or “Artificial Intelligence”

  • Most we see are GPT (Generative Pre-trained Transformer) models.
  • ChatGPT” or “Gemini” are actually just brands companies have slapped on the front-end tools (people have started calling these ChatBots)
    • For instance, ChatGPT.com routes your conversations and queries to a specific model by FIRST using a simple LLM to figure out what sort of question you’re asking (not transparent to the public), then use that info to pick suitable model(s) to answer that query (or sub-queries)
    • The actual models are called stuff like GPT-5.2, gpt-5-mini, gpt-oss-120b, gpt-5.1-codex-max, etc.
    • These models differ in how they’ve been trained (a process we don’t have much insight to)
    • A fundamental restriction here is that they’re trained off of what already exists

31

32 of 35

Some Vocabulary…

Programming Language - Literally a language we use to explain actions to a computer

  • They do not necessarily have to be text-based!
  • There are LOTS of them. Each one has its own advantages and disadvantages.
  • Unlike spoken languages, they are designed with specific purposes in mind.
  • In this class, starting Friday, we will be focusing on one that’s currently quite popular called Python (specifically Python 3.14)

IDE (Integrated Development Environment) - Applications that allow us to write, run, and debug programs.

  • Just like Google Docs is an application that allows us to write, edit, and export essays / docs, IDEs allow us to do that same thing for programs.
  • In this class, starting Friday, we will use a really basic one called IDLE.
  • There are much more complicated ones available (I’ll even show some later in the quarter) but remember, this is kindergarten!

32

33 of 35

Turtle activities!

On our course web page

33

34 of 35

Understanding the Words / Atoms of Programming

34

Python is made up of different kinds of “words”, which can be used to construct sentences and paragraphs (statements and code blocks). Some types of ‘words’ in Python include:

  • pieces of data like numbers, words, images, etc.
  • variables are containers that can hold data
  • operators are symbols that perform actions
  • functions are way of chunking programs
  • reserved words (special words in python)
  • modules

35 of 35

Reminders

  • Go ahead and take a look at Exercise 0 (due Friday at 11:59pm) and complete the first portion (Google Form Survey + Installation of Python)
  • We'll do the programming portion together in-class on Friday
  • Make sure to look at the Syllabus, particularly the Grading Policies section which says how you're evaluated and what sort of leniency the course has built-in!

35