Some Matlab info from section 1.1, useful in a couple of days
Store numbers as variables to use later
Semicolons suppress output
Memory stores information to use in processing other information
The apparently vague use of “information” here actually mirrors a
deep fact about computing: all information is essentially the same.
The same representation expresses different things in different contexts
10010: meaning depends on context
Processor executes instructions from memory
Information encoded in bits (1 or 0)
Numbers can be represented with bits using base 2
All numbers have finite precision
Hardware pieces include monitor, hard drive, etc.
Computers have gone from setting individual bytes, switches, etc., in big
machines to small more usable machines
Abstraction = hiding details in order to concentrate on essentials
Different programming languages for different applications
Examples / questions
Count in binary
0, 1, 10, 11, 100, 101, etc.
How many distinct values can 8 bits (1 byte) represent?
28 = 256 since each bit has 2 options
This is about enough for for one Latin character plus digits plus punctuation
So byte = character is an historical equivalence
But in the last 20 years or so computer makers have realized that not everyone
uses the Latin alphabet; modern character representation needs much more than
one byte
Numbers typically 32 bits (integer), 64 (real), 80 (real again)
Why is work in progress when a computer abruptly shuts down (e.g., power failure)
lost?
Computers typically store work in progress in RAM for fast access, but
RAM is volatile, i.e., loses data when power goes away
Work only becomes permanent when copied to non-volatile hard disk, flash drive,
etc.
Examples of abstraction in daily life? In math?
Sports (or news) reports compress huge amounts of detail about actual event
to summarize it in a few sentences
Graphs suppress some detail about the function they display
Even numbers are abstractions: “7” captures certain properties
(e.g., being bigger than 6) regardless of whether you mean 7 ants or
7 people or 7 of anything else