one line of 2nd generation = one line of object code
Give the definition of a declarative language
quicker and easier to write and maintain
As you can hopefully see there are benefits to using Second-Generation Languages over First-Generation, plus a few other things that makes Assembly great:
There are many types of programming languages out there and you might already have heard of a few of them, for example: C++, , Java, Python, Assembly. We will now look at the history of how these languages came about and what they are still useful for. In all cases keep in mind that the only thing a computer will execute is machine code orobject codewhen it has been converted from a language to run on a processor.
Give two benefits of using 3rd generation over using assembly. Give one drawback
Code can make use of specific processor features such as special registers
describes what computation should be performed and not how to perform it. Not imperative!
A-level ComputingAQAComputer Components, The Stored Program Concept and the InternetFundamentals of Computer Systems
2nd (Assembly) requires an assembler
Even though Assembly code is easier to read than machine code, it is still not straight forward to perform loops and conditionals and writing large programs can be a slow process creating a mish-mash ofgotostatements and jumps.Third-generationprogramming languages brought many programmer-friendly features to code such as loops, conditionals, classes etc. This means that one line of third generation code can produce many lines of object (machine) code, saving a lot of time when writing programs.
hardware independent, written once, can be used many times
Hardware independence, can be easily ported to other systems and processors
TheColossusMark 2 was the worlds first electronic digital programmable computer. Operators had to write the machine code directly by setting switches.
By using codes resembling English, programming becomes much easier. The usage of thesemnemoniccodes such asLDAfor load andSTAfor store means the code is easier to read and write. To convert an assembly code program into object code to run on a computer requires anAssemblerand each line of assembly can be replaced by the equivalent one line of object (machine) code:
title=Fundamentals of Computer Systems: Generations of programming language
From Wikibooks, open books for an open world
Describe what is meant by an imperative language:
For 2nd and 3rd generation languages give the program translator required to convert the language generation to object code:
What is the relationship between lines of object code and lines of 2nd generation language code
UNIT 2-⇑ Fundamentals of Computer Systems ⇑
one line of 3rd generation = many lines of object code
Third generation (High Level Languages) codes are imperative. Imperative means that code is executed line by line, in sequence. For example:
may lack the low level, processor specific functionality, meaning slower code
This page was last edited on 5 January 2018, at 11:09.
Assembly code has similar benefits to writing in machine code, it is a one to one relationship after all. This means that assembly code is often used when writing low level fast code for specific hardware. Until recently machine code was used to program things such as mobile phones, but with the speed and performance of languages such asCbeing very close to Assembly, and with Cs ability to talk to processor registers, Assemblys use is declining.
code is executed line by line, in sequence
Second-generationprogramming languages are a way of describing Assembly code which you may have already met.
Imperative languages- code is executed line by line, in a programmer defined sequence
Time saving programmer friendly, one line of 3rd gen is the equivalent of many lines of 1st and 2nd gen
As it is closer to plain English, it is easier to read and write when compared to machine code
An example of a declarative language isCSSwhich you might learn more about when completing any web design unit
Declarative languages- describe what computation should be performed and not how to perform it. Not imperative!
There are several types of Third-generation languages that you will cover in more detail at A2. They include:
Fourth-generationlanguages are designed to reduce programming effort and the time it takes to develop software, resulting in a reduction in the cost of software development. They are not always successful in this task, sometimes resulting in inelegant and hard to maintain code. Languages have been designed with a specific purpose in mind and this might include languages to query databases (SQL), languages to make reports (Oracle Reports) and languages to construct user interface (XUL). An example of 4th generation programming type is the declarative language.
What is the relationship between lines of object code and lines of 3rd generation language code:
3rd requires an interpreter or a compiler
Third generation languages can be platform independent, meaning that code written for one system will work on another. To convert a 3rd generation program into object code requires aCompileror anInterpreter.