pete > courses > CS 202 Spring 24 > Lecture 01: Introduction
Lecture 01: Introduction
Goals
- define abstraction
- describe benefits and detriments of abstraction
- enumerate the various levels of abstraction we will be examining in this course
introductions
administrivia
poll: how many are not officially signed up?
course website: go/cs202
department/major information: go/cswiki
masks
grading
reference materials (ie, no required texts)
notes online
goals on the board: both lecture outline and highlight things you should be able to do after this lecture and reviewing notes
drop-in help sessions TBA
this class is all about abstraction
what is abstraction?
abstraction is hiding details
lets us avoid worrying about HOW things work and just trust that they DO
for instance…
- function calls
- arithmetic operations
- variables
they’re magic!
this class is about dispelling that magic (sorry)
why is abstraction important?
we can only keep so much in our heads at any one time
filtering out the wee details lets us solve big problems
BUT
sometimes the wee details bite the higher abstraction level in the ass
many security problems occur precisely because of this
(examples later in the course)
also but, sometimes the higher level can take advantage of things going on at the lower level
what do I mean by ``higher level’’?
the more abstract
the less specifically defined
you’ve already dealt with this when writing your own functions
you’ve wrapped up the gory details of some operation into a function, the specific details of which are irrelevant to whichever code calls said function
in fact, ``abstraction’’ was the original, historical term for what we now call functions (Alonzo Church, 1936)
in this regard, Python is ``high level’’
Python itself is implemented in the C programming language
which compiles down to an assembly language
which is translated into machine code
which drives a finite state machine
which is implemented using sequential logic
which is composed of storage elements and combinational logic
both of which are built from logic gates
which are themselves built from transistors
which work because physics
which really IS magic
(the hierarchy with other languages, eg Java, at the top is remarkably similar)
we’re going to dig into and play with all the layers of this pillar
as well as some other offshoots that make computers work
and others that make computers fast (optimization)
you will build things at each level to understand how they work
there are (at least) two ways we can go about this
we can start from the top and drill down
or we can start from the bottom and build up
I prefer the latter approach
gives you practice building things
so when we get to, say, sequential logic
you’re going to have a toolbox of storage elements and combinational logic
and you’re going to use those to build sequential logic
this process of learning what’s in your toolbox and working with it is endemic to developing with computers
you get a new job, they’re going to have their own preferences of which languages to use (you may not get a choice!)
you get a new hobby, maybe the popular languages are new to you
plus ca change, plus ca meme chose
a big part of the reason to go bottom-up is to give you practice with the pattern of learning a toolbox and applying it
last caveat before we start to dig in: exceptions to EVERYTHING
simple LED circuit, physically
simple LED circuit, drawn
simple LED circuit, simulated: basic_led.circ
the latter is an abstraction of the former
it ignores details
these details may or may not be relevant (depends on your intent)
what do we lose?
notion of voltage (and hence the resistor)
ground isn’t even connected!
no ``circuit’’ in the sense that the current can’t flow from + to -
no assignments on real-life circuits
they are BELOW the abstraction level we care about in this class
if you’re interested in this stuff, though…
- digital electronics course (PHYS 221)
- Arduino
- All About Circuits
Definitions
The following definitions introduced in this lecture are fair-game for future quizzes. You will be expected to give the exact definition as provided in these lecture notes.
- abstraction