What is so)ware? The programs that run on a computer are known as software. E.g. Word processors, Internet Browsers, Editors, Database Management System, Computer Games. Opera0ng System When you turn on or boot your computer, a program called the operating system automatically runs. Operating system provides an interface between you and your computer. It manages the computer’s resources and activities. The most popular operating systems are Windows, GNU-‐Linux, Unix variants and MAC OS X Machine Language Each computer, or more speciﬁcally each CPU, executes instructions encoded in its own unique native machine language. Machine language instruction consists of a sequence of bits. For example 10010010 00000001 00000001 10101101 Programming in machine language is both tedious and time-‐consuming. High-‐Level Language In the 1960s, the ﬁrst high-‐level language, FORTRAN, was invented. FORTRAN instructions use an English-‐like syntax. Today, hundreds of high-‐level languages are available, Fortran 2009, COBOL, Lisp, Visual BASIC, C, C++, C#, Java, Perl, Python, PHP, etc. A typical instruction coded in a high-‐level language, such as BASIC, might be If income > 1000000 then print “You are rich!” Compiler Before a program that is written in a high-‐level language can be executed on a particular computer, the program must be translated into the machine language of that computer. Translation is the job of a program called a compiler. C++ program C++ compiler Machine language program (source) (target) Compiler (cont.) Once a compiler translates the source program into machine language, the machine’s CPU can execute the resulting target program. A programmer can write just one program and translate into several diﬀerent machine languages. You need one compiler to translate your program into a machine language for your processor. Java Java is a general-‐purpose language developed by Sun Microsystems in the early 1990s. Java’s creators identiﬁed 3 main goals for their new language: -‐ Platform independence: run on any computer -‐ Security: should not be susceptible to hackers’ code and viruses -‐ Reliability: should not crash Java Virtual Machine In order to make Java a cross-‐platform programming language, Java’s creative team designed an abstract computer implemented in software called the Java Virtual Machine ( JVM). The machine language of the JVM is called bytecode. The Java interpreter, which is part of the JVM, executes each bytecode instruction, one by one. Java program Java Bytecode JVM compiler Java Virtual Machine The bytecode can run on any computer that has installed the JVM. A Java program needs to be compiled into bytecode just once. Java slogan “compile once, run anywhere”.
Pages to are hidden for
"The Software"Please download to view full document