1.2.4 Types of programming language Flashcards
What is procedural programming?
Instructions are given in sequence.
Selection and iteration are used to control what a program does and how many times.
Contain functions and procedures.
What is object oriented programming?
A programming style which consists of objects that interact with each other.
Objects have attributes and methods.
What is assembly language?
Mnemonics are used to represent binary, machine code instructions.
What is a high level language?
A language that is similar to our languages, making it easy for humans to understand and write in.
Must be translated to machine code.
What is a low level language?
A language which uses instructions linked to the processor. It is harder for humans to use.
What is an op code?
An instruction in a binary sequence.
What is an operand?
Data for an instruction to act on.
How do you add and subtract in the LMC?
ADD
SUB
How do you store and load a value from the accumulator to memory and vice versa in the LMC?
STA - store value in memory
LDA load value from memory
What are the three methods of branching in the little man computer?
BRA - branch always
BRP - branch if positive (accumulator value)
BRZ - branch if zero (accumulator value)
How do you input and output data in the little man computer?
INP - input
OUT - output
How do you define a named data location in the LMC?
DAT
How do you end the LMC program?
HLT
What is direct addressing?
The location given is the address of the data to be used.
e.g. LDA 43 – loads contents of 43
What is indirect addressing?
The address given holds the address of the data to be used.
e.g. LDA 43, loads contents of address in 43