Hardware & Software
CS 110
1
Reminders
Today
Friday
2
Course Resources
edSTEM
3
Canvas
Outline
4
What is a computer?
5
6
From the Oxford English Dictionary
7
8
9
10
11
12
13
14
15
https://www.history.com/news/human-computers-women-at-nasa
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
Outline
18
HARDWARE
19
20
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
Outline
21
SOFTWARE
What is a program?
22
A set of instructions interpreted by an information processing agent
The following are properties of programs:
Programming languages are designed to be concise & unambiguous
23
I never said they stole my cookie.
24
I never said they stole my cookie.
25
I never said they stole my cookie.
I never said they stole my cookie.
26
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.
27
28
Directions
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 ...
29
Directions
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 ...
Turtle activities!
On our course web page
30
Understanding the Words / Atoms of Programming
31
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:
Reminders
32