Chapter 1 Flashcards

(35 cards)

1
Q

Much of computer architecture involves the substitution of _______ for _______

A

Much of computer architecture involves the substitution of numeric codes for symbols

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

The manipulation of the symbols that represent numeric codes is facilitated by what?

A

A macro processor

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

What is m4?

A

The UNIX macro processor.

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

Define “accumulator”

A

An accumulator is a register used to contain the results of an arithmetical or logical operation

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

Define “register”

A

A location in a store of data, used for a specific purpose and with quick access time

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

What is a stack?

A

A stack is a first-in-last-out data structure in which only the top stack elements are accessible

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

What is it called when we remove something from a stack?

A

popping

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

What is it called when we place items onto a stack?

A

pushing

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

What is the ALU?

A

The arithmetic logic unit. The unit in a computer that carries out arithmetical and/or logical operations

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

Stacks and registers are two forms of what?

A

Memory

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

Why is a stack convenient for expression evaluation?

A

Because memory addresses are not needed

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

Why would one use a register instead of the stack?

A

Registers are useful when values enter into the computation in a less structured manner

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

In a computer, what is an “address”?

A

A location in memory

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

What executes the machine language?

A

The central processing unit (CPU)

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

What does the program counter do?

A

It keeps track of the address of the next instruction to be executed

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

What is assembly language?

A

Symbols representing numeric values

17
Q

What is m4 used for?

A

A program that can be used to translate symbols into numeric constants

18
Q

Define “macro”.

A

Symbol, name, or key that represents a list of commands, actions, or keystrokes. Many programs allow you to create macros so that you can enter a single character or word to perform a whole series of actions.

19
Q

How many arguments can a macro take?

A

A macro can have up to nine arguments

20
Q

When using a macro, what indicates the presence of arguments?

A

When the macro name is immediately followed by an open parentheses “(“

21
Q

If there are arguments present with a macro, how does the processor handle them?

A

The arguments are evaluated; if they are in quotes, the quotes are stripped and the arguments are NOT evaluated; any $n subs are made. The macro is fully expanded and pushed back to output stream.

22
Q

What is a location counter?

A

It is a symbol representing the memory address of the instruction being assembled.

23
Q

What is “eval”?

A

It’s a built in macro that takes in a string argument to represent an arithmetic expression. It then evaluates the expression and returns its value in the form of a numerical string.

24
Q

What is machine language?

A

Numeric values that represent the operations of a machine and the locations of operands

25
What is a macro processor?
Identifies macro tokens and arguments in its input stream, and substitutes the macro definitions in their place to be rescanned
26
Define "define" in m4
A built in macro that defines its first argument to be a macro token to be replaced on evaluation by its second argument
27
What is an accumulator machine?
It combines an operand from memory with the contents of a single register (the accumulator) and stores the result of the operation in the accumulator. The contents of the accumulator can be loaded from and stored into memory.
28
What is a label?
A symbol whose value is the address where the instruction or data it references will be located in memory
29
What is a symbol table?
A table of symbol-value pairs that is created by the macro processor on the first pass and utilised on the second pass
30
What is MAR?
Memory access register
31
What is MDR?
Memory data register
32
What are the four registers?
%g for global %o for output %l for local %i for input
33
Which register is the throwaway register?
%g0
34
Which register does trap get its service request instruction from?
%g1
35
Which registers does .div work with?
It takes what's in %o0, divides %o1 into it, and stores the result in %o0