Title: Foundations of Software Design
1Foundations of Software Design
Lecture 1 Course Overview Intro to Binary
and Boolean Marti Hearst SIMS, University of
California at Berkeley
2Course Objectives
- Learn key computer science concepts.
- Catch up on missing math background.
- Become able to work on larger programming
projects. - Prepare you for IS206 in Spring.
3Course Structure
- Lectures
- Do readings in advance
- Discussion encouraged
- Labs
- Lead by the TAs
- Practice concepts from lecture
- Answer questions
- Homework
- Something due almost every week
- Often will be doing pair programming
- Grading
- Not assigning letter grade, but giving feedback
- To pass the class, you must attend all lectures
and labs, and turn in all homeworks on time - Exams
- I reserve the right to have exams if people dont
work hard
4Instructors
- Professor Marti Hearst
- TAs
- John Fritch
- Kaichi Sung
- Leah Zagreus
- Office hours TBA
- Lab
- Wed 1230-200
5TextBooks
Computer Science An Overview, 7th EditionGlenn
Brookshear
REQUIRED
Data Structures Other Objects Using Javaby
Michael Main
REQUIRED
Programming for Corpus Linguistics--How to do
Text Analysis in Java By Oliver Mason
STRONGLY RECOMMENDED
6Course Outline
- How Computers Work
- Object-Oriented Design
- Analysis of Algorithms
- Data Structures
- Collections, Stacks and Queues
- Trees and Graphs
- Hash Tables
- Disk-based data structures
- Search Algorithms
- Sorting Algorithms
- Formal Languages
- Computability
7Useful Topics we are NOT covering
- (These should be covered in IS206)
- Distributed systems
- Threads
- Client-server architectures
- Networking
- Security
- Probability Theory
- Coding theory (Huffman codes, etc))
- Encryption
- Scripting
8Lab Tomorrow
- Either take the placement exam in room 202
- Or build a home page in the lab in room 210
9Upcoming Reading Assignments
- For hyperlinks, see course website
- For Today
- Brookshear, Ch. 1.1-1.6
- For Thursday
- Brookshear 2.4, Online demo of logic gates and
circuits - For Tuesday Sept 3
- Brookshear 2.1-2.5, Online demo of a CPU
- For Thursday Sept 5
- Brookshear 3.1-3.5, 8.1-8.2
10How Do Computers Work?
11What happens when
- Your program creates a variable?
- You program runs a loop?
- What really happens?
12Binary Digits (Bits)
- Yes or No
- On or Off
- One or Zero
- 10010010
13Bytes
- A sequence of bits
- 8 bits 1 byte
- 2 bytes 1 word (sometimes 4 or 8 bytes)
- How do binary numbers work?
14Number Systems
For more info on number systems,
see http//courses.cs.vt.edu/csonline/NumberSyste
ms/Lessons/index.html
Images from http//courses.cs.vt.edu/csonline/Mac
hineArchitecture/Lessons/Circuits/index.html
15Powers of Two
Decimal Binary Power of 2
1 1
2 10
4 100
8 1000
16 10000
32 100000
64 1000000
128 10000000
16Famous Powers of Two
Images from http//courses.cs.vt.edu/csonline/Mac
hineArchitecture/Lessons/Circuits/index.html
17Orders of Magnitude
- Each increase in the power of 10 is an increase
in order of magnitude - http//micro.magnet.fsu.edu/primer/java/scienceopt
icsu/powersof10/index.html -
18Other Number Systems
Images from http//courses.cs.vt.edu/csonline/Mac
hineArchitecture/Lessons/Circuits/index.html
19Binary Addition
Also 1 1 1 1 with a carry of 1
Images from http//courses.cs.vt.edu/csonline/Mac
hineArchitecture/Lessons/Circuits/index.html
20Boolean Logic
- AND, OR, NOT, NOR, NAND, XOR
- Each operator has a set of rules for combining
two binary inputs - These rules are defined in a Truth Table
- (This term is from the field of Logic)
- Each implemented in an electronic device called a
gate - Gates operate on inputs of 0s and 1s
- These are more basic than operations like
addition - Gates are used to build up circuits that
- Compute addition, subtraction, etc
- Store values to be used later
- Translate values from one format to another
21Truth Tables
Images from http//courses.cs.vt.edu/csonline/Mac
hineArchitecture/Lessons/Circuits/index.html
22Interactive demo of Boolean logic
- http//courses.cs.vt.edu/csonline/MachineArchitec
ture/Lessons/Gates/index.html