programming languages Flashcards Preview

COMPUTING > programming languages > Flashcards

Flashcards in programming languages Deck (42):

What is system software?

Needed by the computer to keep the system running
performs the tasks needed to operate the hardware


What is application software?

Useful for the user, allows them to perform tasks such as writing a letter


Give three examples of system software

operating system
library programs
utility programs


Give the three types of application software

general purpose
special purpose
bespoke software


What does the operating system do?

Acts as an interface between user and hardware, provides a 'virtual machine'
eg by displaying files as distinct sections which can be dragged etc


What are library programs?

Pre-compiled routines for re-use


Give three examples of utility programs

disk formatter, file compressor, firewall etc


Give two examples of general purpose application software

word processor, spreadsheet


Give two examples of special purpose application software

payroll, tax calculator, (web browser)


What is bespoke application software?
(give two examples)

Software which has to be specially written for a specific purpose, it cannot just be bought off the shelf
eg London congestion simulator, air traffic control


What is machine code?

instructions which a computer can respond to directly without having to translate


What are the disadvantages of machine code?

-slow and tedious to write
-Hard to debug
-Machine specific, every type of computer has a different set of instructions


What is assembly language?

Still machine specific but had mnemonics (more meaningful abbreviations for instructions) and comments, labels and variables. Must be translated back to machine code before use.


When was assembly code developed?

The 1950s


When were high level languages developed?

The late 1950s


Name two of the first high level languages



What is the difference between high level languages and assembly and machine code?

-High level languages are problem centred, independent of different hardware platforms
-One line of high level language can correspond to lots of lines of machine code instructions, the lower levels have a one to one relationship


What are the advantages of high level languages?

-Easier to read, write and debug
-More like a natural language, usually based on syntax similar to English
-Not machine specific


What are the disadvantages of high level languages?

Needs to be translated much more than the others as one line of code can be much more than one line of machine code


What are the different types of high level languages known as?

programming paradigms


What are the two kinds of programming paradigm?

imperative/procedural and declarative


What is an imperative/procedural language?

A list of commands to be executed in sequence


Give two examples of an imperative/procedural language



What is a declarative language?

A program which defines rules and goals without specifying a precise flow of control, often used for AI


Give three examples of declarative languages

LISP, prolog, SQL


Give the generations of programming language in order

1=machine code
2=assembly language
3=high level languages
4=declarative languages


Why might assembly code still be used?

-You have more complete control over the hardware
-more efficient as program will run faster
-uses less memory
-useful for low level software or for writing compilers for higher level languages


What is a compiler?

an automatic machine code translator for high level languages


What are the two kinds of translator?



What is an assembler?

Translates assembly code to machine code
The relationship is one to one so the translation process is quite simple


What do compilers/interpreters do?

Translate high level languages to machine code


What is the difference between an compiler and a interpreter?

-compilers takes the source code and translates and saves it as an executable file (which can then be re-used without further translation)
-interpreters translate the source code one line at a time, executing it immediately(no machine code version is saved)


What are the advantages of compilers?

-Better if you need to run source code repeatedly(including running loops inn the program)-faster because it doesn't have to be translated repeatedly
-A user doesn't have to have any translation software to run an executable file
-A user cannot see the source code from an exe file, protecting intellectual property


What are the advantages of interpreters?

-Easier to write than compilers
-Use fewer resources


What is the role of interpreters in the internet?

most webpages contain javascript sent as plain text and web browsers have javascript interpreters
Every computer accessing the web page (with different operating systems) can interpret the code itself for the relevant operating system


Why do webpages not send script as an executable file?

exe files are platform specific, so would not work on all computers accessing the page


What are hybrid/two-stage models?

Some modern languages (eg java) translate in two stages, using compilation and interpretation


How does hybrid/ two stage translation work?

-The source code is translated to bytecode, a platform independent intermediate stage
-By run time the byte code is compiled or interpreted to machine code


What are the advantages of byte code?

-It can be distributed regardless of operating system
-copyright is protected
-It is the same whatever the original language was


What are the disadvantages of byte code?

Software (eg java) has to be installed to interpret the byte code


What is software?

consists of sequences of instruction which can be understood and executed by hardware


What is the column on the left when machine code is written?

The memory adress