GCSE Computing - 2.5 - Programming Languages & IDEs

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/25

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

26 Terms

1
New cards

What will computers only understand?

Computers only understand data and instructions in machine-code form.

2
New cards

How do we solve the issue(computers only understand machine code)?

Any high-level language or low-level language needs to be translated into machine code for the computer to be able to process it and carry out instructions.

3
New cards

What are the three types of translators?

A compiler; an interpreter; and an assembler.

4
New cards

What does a compiler do?

  • takes code written in high-level language and translates it into machine code

  • translates the whole of the source code in one go

  • runs through a program and produces a report of errors it detects(error handling) - won’t compile with errors

  • outputs machine code in an executable file - can be stored for future use

  • takes time to initially run the program - but will run it much more quickly once compiled

  • uses more meomry to generate the executable file

5
New cards

What is source code?

Source code is the code produced when we write a program in a high-level language

6
New cards

High-level languages

  • written in formal, structured English

  • made it easier to read, maintain and debug code

  • one line of this code translates to dozens of code lines in assembly language and machine code

7
New cards

Assembly language

  • makes opcodes easier to read

  • used a mnemonic and an operand to form an instruction

  • each line of assembly language = one line of machine code

8
New cards

Operation code

  • also known as opcode

  • written in tables to help programmers enter instructions by hand for programs

  • still time consuming

9
New cards

Grace Hopper

An important person in computing who conceived the idea of a compiler to translate plain English into machine code. Also, introduced the idea of high-level languages.

10
New cards

What is machine code?

A binary representation of instruction - format that the CPU can decode and execute. Has opcode instructions and addresses to use(operand).

11
New cards

Low-level languages

  • written in assembly language

  • translated by an assembler into machine code

  • used for embedded systems and device drivers - need to instruct hardware directly

12
New cards

What does an interpreter do?

  • takes source code and translates it into machine code

  • translates the source code one line at a time

  • errors are detected when the line of source code is reached - allows us to fix error and run code through interpreter again

  • takes up less memory than a compiler

13
New cards

Advantages of writing in low-level languages

  • faster execution - machine code doesn’t need to be trabslated

  • direct control of hardware and memory

  • usually means shorter code - less memory and storage

  • fast translation - assembly language is 1:1 to machine code

  • allows you to program for a specific type of processor

14
New cards

Disadvantages of writing in low-level languages

  • requires deeper understanding of computer’s hardware

  • code is specific to one processor - hard to transport code to other platforms

  • harder to write and understand

  • more error prone - more hardware management and debugging

15
New cards

Advantages of writing in high-level languages

  • easier to understand and faster to program and debug - it’s closer to stadard English

  • high level of abstraction from underlying hardware

  • usually doesn’t require us to deal with emmory management

  • not specific to one type of processor - portable between different platforms

16
New cards

Disadvantages of writing in high-level languages

  • slower to execute - computer needs extra time to translate source code into machine code

  • programmers have less control over emmory and hardware

  • unsuitable for embedded systems

  • slower translation - higher line ratio to machine code than assembly language

17
New cards

What is an IDE?

It is an integrated development environment; these programming environments have additional features that help and guide us while we’re writing programs.

18
New cards

What does a code editor in an IDE do?

A code editor allows us to write and edit code for our program. They have helpful aids like: automatic line numbers, colour coding for different commands; autocorrect for commands we mistype; and auto-indent for any iteration or selection.

19
New cards

What does a run-time environment in an IDE do?

A run-time environment is a window in the IDE where we can see the output of the code. It allows us to create and edit our code more quickly and efficiently.

20
New cards

What do error diagnostics in an IDE do?

In a compiler, this is an error report and in a translator, this is a error message. They help us identify where we have made a mistake so we can fix it.

21
New cards

What does a translator in an IDE do?

Each IDE either has a built-in complier or a built-in interpreter. They allow the source code that we write in a high-level language to be translated into machine code that can be understood and ran by the computer.

22
New cards

What do usability functions in an IDE do?

Usability functions allow us to change font types and sizes in the IDE. It also allows us to customise how the code is highlighted.

23
New cards

What are the three main programming constructs?

Sequence, selection and iteration.

24
New cards

What are the five main data types?

An integer; a string; a float or real; a Boolean; and a character.

25
New cards

What is a sub-program?

A sub-program is a program where we can store sections of instructions that we may want to use in our main program. There are two main types: a function and a procedure.

26
New cards

What are the two main types of errors?

The two main errors that can occur when writing programs are: syntax errors and logical errors