1.2.4 extension Flashcards

1
Q

What is the opcode?

A

Consists of binary digits representing the basic operations such as ADD and 2 digit code representing addressing mode

(Addressing mode attached to opcode)

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

How do you calculate maximum number of operations for instruction set

A

2^n

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

What indicates the the addressing mode?

A

Indicated by bit pattern that’s the last 2 bits of opcode

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

What is immediate addressing?

A

Operand is actual value to be operated on

(Don’t need to go to memory)

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

What is direct addressing?

A

Operand holds memory address of value to be operated on
Only addressing mode used in LMC assembly language

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

What is indirect addressing?

A

Operand is location (typically a register) which holds address of data we want

Reference to memory location where we find real address of required data

Enables larger range of addressable locations (without we can’t hold memory addresses larger than 16 if operand only 4 bits!)

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

What is indexed addressing?

A

Address of operand obtained by adding a constant value to contents of general register (called index register)

Number of index register and constant value are included in instruction code

Used to access an array whose elements are in successive memory locations

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

Why does array need to be stored in contiguous memory?

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

High level languages

A

3rd generation
Abstraction of machine level steps taken to solve problems
More accessible
Problem-oriented as opposed to machine orientated
One to many relationship w machine code (each instruction gives rise to many lines of machine code)

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

What are imperative languages?

A

Programs written as lists of commands which describe how problem should be solved (tell comp what to do step by step)

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

What is a procedural language?

A

Type of imperative Lang that are structured using procedures/subroutines/functions

Program where instructions given in sequence, selection used to decide what program does, iteration dictates how many times it does it
Programs broken down into key blocks called ‘procedures, functions’

Examples - BASIC, C, Pascal

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

What is a declarative language?

A

Describe problem to be solved or what program should achieve rather than how to solve it

Eg SQL

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

What is procedural programming

A

Type of imperative programming paradigm where program is built from 1 or more subroutines (procedures, functions etc)

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