150 likes | 295 Views
CSE111: Great Ideas in Computer Science. Dr. Carl Alphonce 219 Bell Hall Office hours: M-F 11:00-11:50 645-4739 alphonce@buffalo.edu. Announcements. First exam Wednesday next week Closed book Bring your UB card Monday next week: review. Today’s Agenda. Review last lecture’s material
E N D
CSE111: Great Ideas in Computer Science Dr. Carl Alphonce 219 Bell Hall Office hours: M-F 11:00-11:50 645-4739 alphonce@buffalo.edu
Announcements • First exam Wednesday next week • Closed book • Bring your UB card • Monday next week: review
Today’s Agenda • Review last lecture’s material • Situate machine language in hierarchy of languages • Discuss exam
cell phones off (please)
Low-level languages • Machine language • 1101000001000010 • Assembly language • ADD R1 R2
High level languages • Java • We can write “x + y” instead of “ADD R1 R2” (in addition to with several MOV instructions) • Others: C#, Erlang, Python, ML, Prolog, Lisp
Translation • LLL LLL is called assembly • there is a 1:1 translation from assembly to machine language • fairly simple process • HLL LLL is called compilation • there is no 1:1 translation • translation is quite complex • optimizations can be applied to make low level code more efficient
Requirements of a PL • Sequencing • Selection • Repetition
Equivalences • Computation models • Turing Machine • Lambda calculus • Programming languages • Java • C# • Prolog • Python
High-level languages • Easier syntax than • Machine language (bit strings) • Assembly language (mnemonic) • Must be translated (compiled) to machine language
Exam • Procedure • Format • Content
Exam procedures • Wait outside room until called in • Sit where there is an exam • Cannot leave until sign-in is completed, at the earliest • We check and collect ID cards • ID card returned when you turn in exam • Exam is closed book, closed notes, closed neighbor • Bring pen/pencil to exam • No electronics permitted (take earbuds out of your ears) • No hats, not drink bottles, pencil cases, etc. • Late arrivals will not be seated – you will receive a zero on the exam
Exam format (exam #1 only) • Some multiple-choice • Some short answer/fill-in-the-blank • Example: (drawn on board)
Exam content • Chapters 0, 1 and 2 from textbook • Lecture material • Strongest emphasis will be put on lecture material • Readings are “fair game”