programming languages Flashcards Preview

COMPUTING > programming languages > Flashcards

Flashcards in programming languages Deck (42):
1

What is system software?

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

2

What is application software?

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

3

Give three examples of system software

operating system
library programs
utility programs

4

Give the three types of application software

general purpose
special purpose
bespoke software

5

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

6

What are library programs?

Pre-compiled routines for re-use

7

Give three examples of utility programs

disk formatter, file compressor, firewall etc

8

Give two examples of general purpose application software

word processor, spreadsheet

9

Give two examples of special purpose application software

payroll, tax calculator, (web browser)

10

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

11

What is machine code?

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

12

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

13

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.

14

When was assembly code developed?

The 1950s

15

When were high level languages developed?

The late 1950s

16

Name two of the first high level languages

FORTRAN and COBOL

17

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

18

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

19

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

20

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

programming paradigms

21

What are the two kinds of programming paradigm?

imperative/procedural and declarative

22

What is an imperative/procedural language?

A list of commands to be executed in sequence

23

Give two examples of an imperative/procedural language

-pascal
-C

24

What is a declarative language?

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

25

Give three examples of declarative languages

LISP, prolog, SQL

26

Give the generations of programming language in order

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

27

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

28

What is a compiler?

an automatic machine code translator for high level languages

29

What are the two kinds of translator?

-assembler
-compiler/interpreter

30

What is an assembler?

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

31

What do compilers/interpreters do?

Translate high level languages to machine code

32

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)

33

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

34

What are the advantages of interpreters?

-Easier to write than compilers
-Use fewer resources

35

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

36

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

37

What are hybrid/two-stage models?

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

38

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

39

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

40

What are the disadvantages of byte code?

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

41

What is software?

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

42

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

The memory adress