CSE 305 Introduction to Programming Languages Lecture 1 CSE @ SUNY-Buffalo

advertisement
CSE 305 Introduction to
Programming Languages
Lecture 1
CSE @ SUNY-Buffalo
Zhi Yang
Courtesy of Google
Introduction
• Someone say: those who can, do; those who
can't, teach ~~~
• Course Web Site:
http://www.cse.buffalo.edu/~zhiyang/teaching/cse305/cse305.html
• All related information will be posted there!~~
Grading Policies
• 7 Home Assignments (The last one has 10
extra points if you finished in time) 70 points
in total.
• Midterm Exam 15 points. (June 28, 2013)
• Final Exam 15 points. (Aug 8, 2013)
Assignments
•
•
•
•
•
•
•
May 20 --- May 29, (get familiar with hardware)
1.5 week ----May 30 --- June 5, (get familiar with assembly language)
1 week ----June 6 --- June 22, (get familiar with macro instruction) 2.5 week ----June 23 --- June 29, (get familiar with scripting/lexer )
1 week ----June 30 --- July 10, (get familiar with parser system)
1.5 week ----July 11 --- July 19, (get familiar with scoping/OO concept) 2 week ----July 20 --- Aug 9, (type system/lambda function)
2.5 week -----
HW1
HW2
HW3
HW4
HW5
HW6
HW7
Four ways of studying
• 1 Do homework simply, no lecturing ~ 70%
• 2 Do lecture only, not doing hw ~ 30%
• 3 Do both ~ 100%
• 4 Do it yourway(DIY), then similar to 1.
Origin of Computation
4000-12000 B.C.: Sumerians kept track of commercial transactions on clay tablets. The
Sumerians were the first known civilization and it is believed this system was the
precursor for the calculator.
3000 B.C.: Babylonians create an abacus following the Sumerians. The abacus would
spread throughout Egypt, Greece, Persia and Asia(Courtesy of EYELLD Production and
www.mortgagecalculator.org).
Egyptian Calculating Table
• Slab stela of Old Kingdom Egyptian princess Neferetiabet
(dated 2590–2565 BC) from her tomb at Giza, painting on
limestone, now in Louvre, France(Courtesy of Wikipedia).
Babylonian Numbers
•
Like the Egyptians, the Babylonians used two ones to represent two, three
ones for three, and so on, up to nine. However, they tended to arrange the
symbols into neat piles(Courtesy of Jo Edkins).
Babylonian Positional System
•
A positional number system is one where
the numbers are arranged in columns.
We use a positional system, and our
columns represent powers of ten. So the
right hand column is units, the next is
tens, the next is hundreds, and so on. If
you want to add large numbers (and
you've lost your calculator!) you line the
numbers up so their units are in the same
column. Then you can add each column,
carrying forward to the next, if necessary.
The Babylonians had the same system,
but they used powers of sixty rather than
ten. So the left-hand column were units,
the second, multiples of 60, the third,
multiplies of 3,600, and so on.
Bronze Age
•
1300 B.C.: Chinese use wire and beads to redesign
abacus. The Chinese abacus shows similarities to the
Roman model. It is unclear which model influenced the
other.
•
On the left, you see two abacuses (abaci is also correct).
On both abacuses, we see the number 1998. The top
area of each abacus is used for fives, and the bottom
area is used for ones. Abacuses are used for doing
arithmetic. When doing arithmetic, you move the beads.
The position of the beads represents the sum, or
product, so far. It is how you can remember the partial
sum or product. Experts in the use of the abacus can be
very fast (and accurate), often faster than an expert with
a calculator, especially addition and subtraction. Such an
expert on the abacus is especially adept at data entry.
•
The Japanese abacus, the soroban, is more elegant, as
the Chinese abacus has redundant beads. With the
Chinese abacus, you never have to use the bottom bead
in each column, in both the "ones" and "fives" areas.
These extra beads are apparently useful, if you use an
extra step every time you carry. You notice that you have
all five beads up, so then you know you should execute a
carry.
Just for fun, here is a binary (base 2)
abacus, showing the number 1998.
Courtesy of Jim Loy
Ancient Calculator
• 79 A.D.: The Antikythera Device is used to determine months
and astronomical positions. The device derived its name after
it was recovered from the Antikythera wreck. (Courtesy of
Wikipedia)
Iron Age
•
1674 A.D.: Gottfried Wilhelm Leibniz creates Stepped Reckoner. The device could add,
subtract, multiply, and divide.
Now our story begin……
• https://www.youtube.com/watch?v=I3NkVMHh0_Q
Goal of Computer Science ?
• https://www.youtube.com/watch?v=AgW6HplOZV0
ENIAC and IBM 701
• https://www.youtube.com/watch?v=25qNWDJBuks
Device Improvement
Vacuum Triode with CPU (Courtesy of depositphotos)
First Programming Language
• https://www.youtube.com/watch?v=l2auLF-QdPA
Best Programmer Ever
• Https://www.youtube.com/watch?v=CfP92WdSK8A
• https://www.youtube.com/watch?v=9eyFDBPk4Yw
Download