Computer science - Programming languages

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

Now you have revised try question 4 on the mini test again

-

What are the two low level languages

1. Assembly code 2.Machine code (assembly code is above machine code

Disadvantages of Low level code

1. Can be difficult to read and understand 2. Single Machine orientated 3. Needs an assembler 4. Not portable between CPU families 5. Difficult to learn

Advantages of Machine code

1. Complete control over the registers (NOT CPU) 2. Highly efficient

The four tears of programming language

1. High level language 2. Assembly language 3. Machine language 4. Hardware

Advantages of Low level code

1. High level of CPU control 2. Highly efficient: storage, execution / uses RAM

Disadvantages of High level codes

1. Needs a compiler and Interpreter 2. Slow to produce the final product 3. Low level of CPU and memory control

Advantages of High level code

1. Portable 2. Problem oriented - can directly work out issues 3. Close to English 4. Easier to debug/change/upgrade/write 5. Fewer instructions 6. No need to understand register computer architecture

Disadvantages of Machine code

1. Very difficult to understand 2. Only works in one family of CPU 3. Very difficult to debug←

What is a programming language?

A formal constructed language designed to communicate instructions to a machine → Control it's behavior

What is checking for Syntax errors called?

A syntax validation

What is a logic error

An error in reasoning. The code compiles fine - there are no syntactic errors in there - but the code does not do what it was intended to do.

What is Assembly code and what is it used for?

Assembly code is a low level language. Assembly code is rarely used, it is used to make use of special hardware or to make use of special machine dependent instructions. Several benefits also make it useful such as, Tasks are performed very quickly and the code does not take up space on the primary memory.

Do practice questions + Mind map as extra revision

Do

Machine code example and what it is:

Hex or Binary Machine code is low level language. Computers only understand theire own machine code. Machine code is the base → A program needs to be translated into machine code before it can be 'understood' by the computer.

Compiler description

High level translation software. Converts all the code (high level) into a single executable file (.exe) (machine code - for the specific processor and operating system) . It translates the entire program but does not run it. Translates one source code statement to one OR MORE machine code instruction → The compiles program can be used again without the compiler

Interpreter description

High level translation software. Converts each file of source code in turn and executes it on the (specific) CPU, usually one statement at a time but does not create the actual machine code. It identifies exactly where the problem is as it goes through all the lines → Debugging (this is what Visual Basic uses). Executes one source code stamens as one OR more instructions → The interpreter is needed for it to work each time

What is IDE

Intergrated development environment(IDE) It is a platform or program to write code on (e.g visual studio for visual basic). -)Integrated development environment -) Most high level languages have one -) Used to help debug and stop syntax errors

High level programming languages example and what is it:

Java, Visual basic, python ect... High level programming languages require no knowledge of the hardware or instruction set of the computer so is portable and can be used on different computers.

Assembly instructions up to high level languages relation:

One to many relationship. One high level 'block' or instruction has many assembly 'blocks' to make up the function of that

Machine code up to assembly instructions relation:

One to one relationship. Blocks of binary has one word or phrase of peice of data assigned to it. Uses mimonice→ Words that look like what they will cover e.g STO is store

What is translation software

Software the moves/changes source code (mimic into machine code (Binary))

What would be written in a low-level language and why?

Special hardware i.e BIOSS / start up programs.This is because low level languages have complete / very good control over the register (NOT CPU)

What do low level languages have good control over

THE REGISTER NOT CPU

When would you use a compiler

To send/ distribute things (distribution)

What is source code + examples

What you write to complete a task (assembly code or high level languages

Assembler description

Works on assembly code. An assembler changes mimonic code (source code) (e.g ADD, AX, BX) to machine code (Binary or Hex) one to one at a time . It is low level translation soft wear → Used for Distribution. It translates the entire program but does not run it.

What is a syntax error

a character or string incorrectly placed in a command or instruction that causes a failure in execution. The code cannot compile with a syntax error. ERROR IN THE ACTUAL CODE


Ensembles d'études connexes

Market Research Exam Chapters: 5,6 & 8

View Set

Economics: Unit 3, Macroeconomics

View Set

Chapter 62: Management of Patients with Cerebrovascular Disorders - PrepU

View Set

Chapter 13- Marketing: Helping Buyers Buy

View Set

American History Unit 7: Prosperity, Depression and the New Deal (1919-1941)

View Set