You are on page 1of 2

Programming concepts and programming languages

What is machine code written in?


A
B
C
D

Mnemonics
Natural language
Hexadecimal
Binary

Explain how a program written in a high-level language is carried out by the


computer hardware (2 marks)
H-l lang is very close to natural human lang (English).
To run h-l lang it needs to be compiled by a compiler
This turns it into machine code (binary)
This can then be understood by the computer and the instructions can be carried out.
The whole program has to be compiled before it can be run

Complete this diagram to show how high-level and low-level languages become
machine code (2 marks)
High-level
language

Low-level
language

compiled

Is ..
To become

Machine code

assembled

Is ..
To become

Match each type of language to TWO characteristics of these languages (4 marks)


Powerful and easy
High-level
to understand
languages
Takes
up
less
memory
space
Low-level
languages
Run quickly
More intuitive

What is assembly language usually written in?


A
B
C
D

Mnemonics
Natural language
Hexadecimal
Binary

Explain what mnemonics are and why they are used in low-level language
programming. (4 marks)
They are abbreviations such as MOV and CMP which are used in assembly language.
Each mnemonic is equivalent to a machine code instruction.
Assembly language is written using an assembler which helps the programmer by
checking for errors in the mnemonics before compiling the program into machine code.
Machine code is binary bytes which would be hard for a programmer to write as they
would see the program as binary numbers. Mnemonic abbreviations in assembly
languages make understanding the program easier

Complete these descriptions of procedural, event-driven and object orientated


programs
1. Procedural programs have
a sequence
fixed

fixed

variable

start and end points and run in


random

several

listen
2. Event-driven programs
for an event such as a mouse click
and then carry out the appropriate action
Look

listen

feel

search

3. Object-orientated programs are a collection of objects


database record
Patterns

entities

items

such as a

objects

Worked example (have a go at this but we will work through it in class)


Explain one reason why event programming has become more popular in
recent years. (2 marks)
Event programming listens for events such as a mouse click on a certain part of the
screen and then actions will be carried out.
A GUI allows the user to choose what they want to do by using windows, icons and
menus which means it is about the user carrying out events
Procedural programs ran in sequence and could not be interrupted by an event until
the sequence was complete.
Therefore as GUIs became more popular, procedural programs became less used

You might also like