F453 - low level languages Flashcards

1
Q

Explain the term opcode

A

the mnemonic part of the instruction/that indicates what it is to do/code for the operation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is symbolic addressing?

A

the use of characters to represent the address of a store location

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the purpose of the accumulator?

A

temporary storage (within ALU)
holds data being processed/used during calculations
deals with the input and output in the processor

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is indexed addressing?

A

uses an index register/IR
…and an absolute address…
…to calculate addresses to be used

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is direct addressing?

A

the instruction gives the address to be used

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is relative addressing?

A
allows a real address to be calculated…
…from a base address…
…by adding the relative address
relative address is an offset
can be used for arrays
can be used for branching
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What’s immediate addressing?

A

used in assembly language
uses data in address field…
… as a constant

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Why is it not possible to use only direct addressing in assembly languages?

A

number of addresses available is limited…
…by the size of the address field
code is not relocatable/code uses fixed memory locations

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Explain Mnemonics

A

a code that is easily remembered…
…used to give the opcode/instruction
e.g. ADD

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Explain flow control

A

the order in which instructions are executed
the order may be changed by a jump
instruction/conditional jump instruction

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How and why is the index register (IR) used?

A

used in indexed addressing
stores a number used to modify an address…
… which is given in an instruction
allows efficient access to a range of memory locations/by incrementing the value in the IR
eg used to access an array

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are the differences between machine code and assembly language?

A
Machine Code:
written in binary or hex
no translation needed
very difficult to write
Assembly language:
includes mnemonics
includes names for data stores
translated by an assembler
easier to write than machine code, but more difficult than high level language
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What’s the use of an operand, in an assembly language instruction?

A

address field (in an instruction)
it holds data…
to be used by the operation given in the opcode
eg in ADD 12, “12” is the operand

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What’s the difference between direct and indirect addressing?

A

direct:
the simplest/most common method of addressing
uses the (data in) the address field…without modification
eg In ADD 23, use the number stored in address 23 for
the instruction (accept any valid example)
limits the memory locations that can be addressed *
indirect:
uses the address field as a vector/pointer… to the address to be used
used to access library routines
eg In ADD 23, if address 23 stores 45, address 45 holds the number to be used increases the
memory locations that can be addressed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Describe the term assembly language

A

 a language related closely to the computer being
programmed/low level language/machine specific
 uses descriptive names (for data stores)
 uses mnemonics (for instructions)
 uses labels to allow selection
 each instruction is generally translated into one machine code
instruction
 may use macros

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Describe the term machine code

A
 binary notation
 set of all instructions available
 to the architecture/which depend on the hardware design of the
processor
 instructions operate on bytes of data