1 / 11

Programming Languages

A brief overview of software evolution. Programming Languages. First Generation Languages (Machine Language). We Actually have to do a few things. First we have to find the operating code, or op code (by number) to move the data (let’s assume the command is number 28).

darreng
Download Presentation

Programming Languages

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. A brief overview of software evolution • Programming Languages • First Generation Languages (Machine Language) • We Actually have to do a few things. First we have to find the operating code, or op code (by number) to move the data (let’s assume the command is number 28) Of course, we have know the identifying number for each of the registers (assume R1 = 12; R2 = 13) Finally, we have to find the op code for addition (Assume it is 37). The code I enter might be: 28 2 12; 28 3 13; (Well, Kind of – It’s a little more involved) 37 12 13 13;

  2. Programming Languages • First Generation Languages (Machine Language) • Let’s not forget that the computer is just a series of light-switches (binary). Therefore we need to convert our decimal values to binary: 2 = 000000000000010 (on 16-bits) Therefore, We would enter the commands: 3 = 000000000000011 (on 16-bits) 12 = 00001100 (on 8-bits) 13 = 00001101 (on 8-bits) 28 = 00011100 (on 8-bits) 37 = 00100101 (on 8-bits) 00011100 000000000000010 00001100; 00011100 000000000000011 00001101; 00100101 00001100 00001101 00001101; MITS Altair

  3. Programming Languages • Second Generation Languages (Assembly – c1948) • The advancement over machine level languages was that it was mnemonic (assisting or intended to assist the memory) We did not need to know the specific register addresses We did not need to know the op codes For the previous example, the code we enter might be: MOV 2 R1; MOV 3 R2; ADD R1 R2 R2; • An Assembler would then transfer the commands into a machine level language

  4. Programming Languages • Third Generation Languages (mid - late 1950’s) • The advancement over assembly level languages was that programmersdid notneed to know either the op codes nor the registers used • Specific locations in RAM were referred to by a user defined name • The compiler or interpreter, as well as the operating system, kept track of the specific locations • For the previous example, the code we enter might be: X = 2 + 3 (FORTRAN) • The code would then be rewritten as either an assembly language code or directly to amachine level language

  5. Programming Languages • Third Generation Languages (mid – late1950’s) • In the above example ‘X’ is a specific location in RAM, although we don’t have to know where it is • It is usually referred to as a variable • Meaning that we can change the contents of the location as we wish • Although it can be a constant • Meaning that once we set its value, it can not be changed • Either way, the address is assigned by the operating system at run time and managed by the compiled program (i.e., the machine-level program)

  6. Programming Languages • Comparison of COBOL and FORTRAN (Hello World) • COBOL (COmmon Business-Oriented Language) • Intended to process large amounts of data as a batch • 001 IDENTIFICATION DIVISION. • 002 PROGRAM-ID. 'HELLO'. • 003 ENVIRONMENT DIVISION. • 004 CONFIGURATION SECTION. • 005 SOURCE-COMPUTER. IBM-360. • 006 OBJECT-COMPUTER. IBM-360. • 0065 SPECIAL-NAMES. • 0066 CONSOLE IS CNSL. • 007 DATA DIVISION. • 008 WORKING-STORAGE SECTION. • 009 77 HELLO-CONST PIC X(12) VALUE 'HELLO, WORLD'. • 075 PROCEDURE DIVISION. • 090 000-DISPLAY. • 100 DISPLAY HELLO-CONST UPON CNSL. • 110 STOP RUN. • Edsger Dijkstra, winner of the Turing Award remarked that "The use of COBOL cripples the mind; its teaching should, therefore, be regarded as a criminal offense."

  7. Programming Languages • Comparison of COBOL and FORTRAN (Hello World) • FORTRAN (FORmula TRANslation) • Intended as a ‘Scientific Language’ • PROGRAM MAIN • PRINT *, 'HELLO WORLD' • STOP • END • It is one of the most popular languages in the area of high-performance computing and is the language used for programs that benchmark and rank the world's fastest supercomputers.

  8. An Overview of the C/C++ Programming Languages

  9. Developed in 1978 at Bell Labs by Kernighan & Ritchie after A & B failed • Associated with UNIX • Developed on UNIX Systems • UNIX and its software are written in c • Intended as general purpose Language • Basically a primitive language: 34 (28 original) Key words: Overview of the C Programming Language float auto default new sizeof union break do for register static unsigned case goto double release struct void char else if return switch volatile typedef const enum int short continue extern long signed while

  10. Overview of the C++ Programming Language • Developed by  Bjarne Sroustrup  at Bell Labs during 1983-1985. • C++ is an extension of C. • Prior to 1983, Stroustrup added features to C and formed what he called "C with Classes". • In 1983 the use of classes and object-oriented features with the power and efficiency of C. The term C++ was first used in 1983. • Additional C++ Reserved Words and default namespace reinterpret_cast virtual and_eq not delete template wchar_t asm not_eq xor dynamic_cast this xor_eq bitand explicit operator throw export or true bitor catch false try or_eq 40 Additional; 74 Total class friend private typeid const_cast inline protected typename public using continue mutable

  11. Overview of the C++ Programming Language Computer languages rooted in C: “Many later languages have borrowed directly or indirectly from C, including D, Go, Rust, Java, JavaScript, Limbo, LPC, C#, Objective-C, Perl, PHP, Python, Verilog (hardware description language),[4]and Unix's C shell. These languages have drawn many of theircontrol structures and other basic features from C. Most of them (with Python being the most dramatic exception) are also verysyntactically similar to C in general, and they tend to combine the recognizable expression and statement syntax of C with underlying type systems, data models, and semantics that can be radically different. C++ and Objective-C started as compilers that generated C code; C++ is currently nearly a superset of C,[10] while Objective-C is a strict superset of C.[11]” http://en.wikipedia.org/wiki/C_(programming_language)

More Related