80 likes | 219 Views
Computer Organization, Compilation, and Eclipse. CS 178: Programming with Multimedia Objects Aditya P. Mathur Professor of Computer Sciences Purdue University, West Lafayette August 25, 2004. Last update: August 23, 2004. Learning Objectives. What is a compiler?. The compilation process.
E N D
Computer Organization, Compilation, and Eclipse CS 178: Programming with Multimedia Objects Aditya P. Mathur Professor of Computer Sciences Purdue University, West Lafayette August 25, 2004 Last update: August 23, 2004
Learning Objectives • What is a compiler? • The compilation process • Eclipse Course Introduction Aditya P. Mathur 2004
CPU: Central Processing Unit GPU: Graphics Processing Unit e.g. Joystick, Display SPU: Sound Processing Unit Input/Output Devices e.g. 60GB CPU|GPU|SPU Secondary Storage e.g. Athelon, R3000A Cache Primary Storage e.g. 512MB Basic Computer Organization Course Introduction Aditya P. Mathur 2004
High Level-Low Level Languages • A CPU|GPU|SPU in a computer understands instructions coded as only 1’s and 0’s. • The language of 0’s and 1’s is a low level language known as machine language. • Java allows the coding of instructions using keywords from English, e.g. applet, class, and String. • Java is a high-level language. How does a CPU/GPU/SPU understand instructions coded in Java? Course Introduction Aditya P. Mathur 2004
Different from machine (CPU) code Java Compiler Byte Code Instructions executed by the CPU Java Virtual machine (JVM) Output Language Translation Java Program JVM interprets Java byte code instructions. JVM instructions are executed by the CPU. Course Introduction Aditya P. Mathur 2004
Platform Independence Byte Code Java Virtual machine Java Virtual machine Java Virtual machine Others Windows OS X Unix Course Introduction Aditya P. Mathur 2004
Structure of a Java Program Java Program Class One or more classes Class Class ....... Data Data Data Method Method Method Method Method Method Method Method Method Each class contains data and methods. Data Instructions Course Introduction Aditya P. Mathur 2004
Sample Java Programs and Eclipse Let us examine a few Java programs..small and not so small! Course Introduction Aditya P. Mathur 2004