PI_CSE30_lecture_1_intro_pdf
PI_CSE30_lecture_1_intro_pdf
Diba Mirza
Dept. of Computer Science and Engineering
University of California, San Diego
Information about the Instructor/TAs
v Instructor: Diba Mirza
v Education: Ph.D. (ECE, UCSD)
v Office: 2124 EBU3B
v Email: [email protected]
v Office hours:
v Tu, Fri10:00am-10:50am
v Or by appointment
v TAs: Riley Yeakle, Ning Liu
v Tutors: Alex Rosengarten, Martin Gao, Ben Martin, Junjie Luo
Goals of the course
3
What we will learn
1. What the programmer writes?
v A high level language: Specifically C
2. How the program is converted to the language of h/w?
v Assembly Language: Specifically ARM
3. How the machine executes the program?
v The main components of the computer
v Peek into the processor
v Interaction of the processor with other components of the
computer (Memory, I/O)
4. What are the causes for errors in our high-level code?
5. Why do programs go slow?
4
Logistics: Course Components
Why Pi?
PAs: Raspberry Pi!
11
Lecture: Peer Instruction
v I will pose carefully designed questions. You will
v Solo vote: Think for yourself and select answer
v Discuss: Analyze problem in teams of three
v Practice analyzing, talking about challenging concepts
v Reach consensus
v If you have questions, raise your hand and I will come over
13
Working out Logistics
v Doyou have your own Raspberry Pi or plan to
buy one soon?
A. Yes
B. No
Familiarity with C
v How familiar are you with C?
A. I know C pretty well and have a lot of programming
experience
B. Reasonably well, lots of gaps
C. I don’t know what a pointer in C is
D. All I know is that it is a programming language that
follows B.
Course Problems…Cheating
vWhat is cheating?
vStudying together in groups is encouraged
vTurned-in work must be completely your own.
vCommon examples of cheating: running out of time on a
assignment and then pick up output, take homework from box
and copy, person asks to borrow solution “just to take a look”,
copying an exam question, …
vBoth “giver” and “receiver” are equally culpable
v I
will attempt to respond to emails within 24
hours
17
Let’s look at the evolution of the modern digital
computer ….
The Evolution of Computing
Pascaline
Schickard’s Machine
Circuit to solve it
Pascaline
• Consequences
• Programs easily fed into the
computer Memory
Processor (Program)
• Avoid clumsy methods of
programming
Stored Program Model
proposed by Jon Von Neumann
Stored Program: Big Idea!
Buses
Exponential Growth
of Computation
Gordon Moore
Intel Cofounder
Biotechnology
Robotics
“Flipper Net”
ADCP
Thermistor
CTD
http://ngs.ucsd.edu/
Computing Systems
v Increasinglysmaller
v Higher performance
v More memory
v Lower power
v Embedded
v Everywhere
v …but extremely complex
How do we handle complexity?
Algos: CSE 100, 101
Dan Garcia!
Levels of Representation
temp = v[k];
High Level Language v[k] = v[k+1];
Program (e.g., C)
v[k+1] = temp;
Compiler
ldr " r0, [r2]"
Assembly Language ldr " r1, [r2, #4]"
Program (e.g.,ARM) str " r1, [r2]"
str " r0, [r2, #4]"
Assembler
0000 1001 1100 0110 1010 1111 0101 1000
Machine Language
1010 1111 0101 1000 0000 1001 1100 0110
Program (ARM)
1100 0110 1010 1111 0101 1000 0000 1001
0101 1000 0000 1001 1100 0110 1010 1111
Machine
Interpretation
Hardware Architecture Description
(e.g., block diagrams)
Architecture
Implementation
Dan Garcia!
Abstraction is good – but …
v We still need to understand the system!
v As a programmer you will be manipulating data.
v Data can be anything: numbers (integers, floating
points), text, pictures, video !
v Writing efficient code involves understanding
how “data” and programs are actually represented
in memory
v Take a break and lets talk bits and bytes:
Number representation
Reading Assignment
v ARM 1.4, 1.5.1, 1.5.3