Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Computer program
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Generations of programming language=== {{main|Programming language generations}} [[File:W65C816S Machine Code Monitor.jpeg|thumb|[[Machine language]] monitor on a [[W65C816S]] [[microprocessor]]]] The evolution of programming languages began when the [[EDSAC]] (1949) used the first [[Stored-program computer|stored computer program]] in its [[von Neumann architecture]].<ref name="sco-ch1-p17">{{cite book | last = Tanenbaum | first = Andrew S. | title = Structured Computer Organization, Third Edition | publisher = Prentice Hall | year = 1990 | page = [https://archive.org/details/structuredcomput00tane/page/17 17] | isbn = 978-0-13-854662-5 | url = https://archive.org/details/structuredcomput00tane/page/17 }}</ref> Programming the EDSAC was in the first [[Programming language generations|generation of programming language]].<ref>{{Citation |last1=Wilkes |first1=M. V. |title=The EDSAC |date=1982 |work=The Origins of Digital Computers: Selected Papers |pages=417β421 |editor-last=Randell |editor-first=Brian |url=https://link.springer.com/chapter/10.1007/978-3-642-61812-3_34 |access-date=2025-04-25 |place=Berlin, Heidelberg |publisher=Springer |language=en |doi=10.1007/978-3-642-61812-3_34 |isbn=978-3-642-61812-3 |last2=Renwick |first2=W.|url-access=subscription }}</ref> * The [[First-generation programming language|first generation of programming language]] is [[machine language]].<ref name="pis-ch4-p160">{{cite book | last = Stair | first = Ralph M. | title = Principles of Information Systems, Sixth Edition | publisher = Thomson | year = 2003 | page = 160 | isbn = 0-619-06489-7 }}</ref> ''Machine language'' requires the programmer to enter instructions using ''instruction numbers'' called [[machine code]]. For example, the ADD operation on the [[PDP-11]] has instruction number 24576.<ref name="sco-ch7-p399">{{cite book | last = Tanenbaum | first = Andrew S. | title = Structured Computer Organization, Third Edition | publisher = Prentice Hall | year = 1990 | page = [https://archive.org/details/structuredcomput00tane/page/399 399] | isbn = 978-0-13-854662-5 | url = https://archive.org/details/structuredcomput00tane/page/399 }}</ref> * The [[Second-generation programming language|second generation of programming language]] is [[assembly language]].<ref name="pis-ch4-p160"/> ''Assembly language'' allows the programmer to use [[Assembly language#Mnemonics|mnemonic]] [[Instruction_set_architecture#Instructions|instructions]] instead of remembering instruction numbers. An [[Assembler (computing)|assembler]] translates each assembly language mnemonic into its machine language number. For example, on the PDP-11, the operation 24576 can be referenced as ADD in the source code.<ref name="sco-ch7-p399"/> The four basic arithmetic operations have assembly instructions like ADD, SUB, MUL, and DIV.<ref name="sco-ch7-p399"/> Computers also have instructions like DW (Define [[Word (computer architecture)|Word]]) to reserve [[Random-access memory|memory]] cells. Then the MOV instruction can copy [[integer]]s between [[Processor register|registers]] and memory. :* The basic structure of an assembly language statement is a label, [[Operation (mathematics)|operation]], [[operand]], and comment.<ref name="sco-ch7-p400">{{cite book | last = Tanenbaum | first = Andrew S. | title = Structured Computer Organization, Third Edition | publisher = Prentice Hall | year = 1990 | page = [https://archive.org/details/structuredcomput00tane/page/400 400] | isbn = 978-0-13-854662-5 | url = https://archive.org/details/structuredcomput00tane/page/400 }}</ref> ::* ''Labels'' allow the programmer to work with [[Variable (computer science)|variable names]]. The assembler will later translate labels into physical [[memory address]]es. ::* ''Operations'' allow the programmer to work with mnemonics. The assembler will later translate mnemonics into instruction numbers. ::* ''Operands'' tell the assembler which data the operation will process. ::* ''Comments'' allow the programmer to articulate a narrative because the instructions alone are vague. :: The key characteristic of an assembly language program is it forms a one-to-one mapping to its corresponding machine language target.<ref name="sco-ch7-p398">{{cite book | last = Tanenbaum | first = Andrew S. | title = Structured Computer Organization, Third Edition | publisher = Prentice Hall | year = 1990 | page = [https://archive.org/details/structuredcomput00tane/page/398 398] | isbn = 978-0-13-854662-5 | url = https://archive.org/details/structuredcomput00tane/page/398 }}</ref> * The [[Third-generation programming language|third generation of programming language]] uses [[compiler]]s and [[Interpreter (computing)|interpreters]] to execute computer programs. The distinguishing feature of a ''third generation'' language is its independence from particular hardware.<ref name="cpl_3rd-ch2-26">{{cite book | last = Wilson | first = Leslie B. | title = Comparative Programming Languages, Third Edition | publisher = Addison-Wesley | year = 2001 | page = 26 | isbn = 0-201-71012-9 }}</ref> Early languages include [[Fortran]] (1958), [[COBOL]] (1959), [[ALGOL]] (1960), and [[BASIC]] (1964).<ref name="pis-ch4-p160"/> In 1973, the [[C programming language]] emerged as a [[high-level language]] that produced efficient machine language instructions.<ref name="cpl_3rd-ch2-37">{{cite book | last = Wilson | first = Leslie B. | title = Comparative Programming Languages, Third Edition | publisher = Addison-Wesley | year = 2001 | page = 37 | isbn = 0-201-71012-9 }}</ref> Whereas ''third-generation'' languages historically generated many machine instructions for each statement,<ref name="pis-ch4-p160_quote1">{{cite book | last = Stair | first = Ralph M. | title = Principles of Information Systems, Sixth Edition | publisher = Thomson | year = 2003 | page = 160 | isbn = 0-619-06489-7 | quote = With third-generation and higher-level programming languages, each statement in the language translates into several instructions in machine language. }}</ref> C has statements that may generate a single machine instruction.{{efn|[[Operators in C and C++|Operators]] like <code>x++</code> will usually compile to a single instruction.}} Moreover, an [[optimizing compiler]] might overrule the programmer and produce fewer machine instructions than statements. Today, an entire [[programming paradigm|paradigm]] of languages fill the [[imperative programming|imperative]], ''third generation'' spectrum. * The [[Fourth-generation programming language|fourth generation of programming language]] emphasizes what output results are desired, rather than how programming statements should be constructed.<ref name="pis-ch4-p160"/> [[Declarative language]]s attempt to limit [[Side effect (computer science)|side effects]] and allow programmers to write code with relatively few errors.<ref name="pis-ch4-p160"/> One popular ''fourth generation'' language is called [[Structured Query Language]] (SQL).<ref name="pis-ch4-p160"/> [[Database]] developers no longer need to process each database record one at a time. Also, a simple [[Select (SQL)|select statement]] can generate output records without having to understand how they are retrieved.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)