EPSII Lecture Section AAA 1505 SC Professor Terry A. Braun Biomedical Engineering, Ophthalmology and Visual Sciences
EPSII 59:006 Spring 2004
Course Introduction Administrative Details Hardware Platforms How Do Computers Work? Programming Languages Assembly Language High-Level Languages Compilers
Administrative Details Course assignments submitted using WebCT (more details to come) There will be a homework assignment posted on the website later this afternoon Course reading – stay on track! Programming problems? See the T.A.’s (will post availability and locations and announce in the next lecture)
Aside: Using the pico editor Logon to a Unix workstation using ssh – from home connect to ‘login.engineering.uiowa.edu’ Modify the.cshrc file (homework gives details for this) You must use the pico editor Type pico.cshrc Modify the file Use the control-keys to save file Log back in for settings to take effect
Hardware Platforms What is a “Platform” A properly configured combination of computer hardware and software What platforms will we use in this course? Best bet: use Unix machines in the computer lab
Basic Components of a Computer
How Do Computers Work? First Rule: Express everything in numbers Second Rule: There are many, many other rules! Overall Process of Computer Programming: Write a program using some computer language Translate the program into a machine-readable form Run the program – find out you made errors Fix all the errors Celebrate!
Programming Languages Provide an abstraction of the computer hardware Interact with the Operating System to provide access to I/O devices Allow for the application of specific strategies for using the computer called Algorithms
Assembly Language Programs Assembly language is a low-level interface to CPU functions Example: Movax, 1 Movbx, 2 Add bx We will not be using assembly language in this course
Assembly Language Writing programs can be very time- consuming, as you have to directly manipulate CPU registers and use complicated interfaces to I/O devices Code is assembled to make Machine Language (consisting only of 1’s and 0’s) which is the real language of the CPU
High-Level Language Programs Allow you to use symbolic names to control computer function Are much easier to write than assembly language programs Many languages exist, but we will primarily work with C, work a little with MATLAB (not really a programming language) and take a brief look at Java
What is C? Developed from (you guessed it) B Was the primary language used to develop the Unix Operating System Developed by Kernighan and Richie at Bell Labs in the early 1970’s Is generally the language of choice where performance is the major issue C code is generally (but not always) machine- independent
How to program in C? This is the main focus of this course Compared to the assembly language fragment presented earlier: To add 1 and 2: Sum = one + two ;
Compilers Translate your programming code into machine language Checks for syntax errors Cannot find logic errors Run at the computer command line (e.g., a Unix shell like csh)