Chapter 1 Flashcards
(35 cards)
Much of computer architecture involves the substitution of _______ for _______
Much of computer architecture involves the substitution of numeric codes for symbols
The manipulation of the symbols that represent numeric codes is facilitated by what?
A macro processor
What is m4?
The UNIX macro processor.
Define “accumulator”
An accumulator is a register used to contain the results of an arithmetical or logical operation
Define “register”
A location in a store of data, used for a specific purpose and with quick access time
What is a stack?
A stack is a first-in-last-out data structure in which only the top stack elements are accessible
What is it called when we remove something from a stack?
popping
What is it called when we place items onto a stack?
pushing
What is the ALU?
The arithmetic logic unit. The unit in a computer that carries out arithmetical and/or logical operations
Stacks and registers are two forms of what?
Memory
Why is a stack convenient for expression evaluation?
Because memory addresses are not needed
Why would one use a register instead of the stack?
Registers are useful when values enter into the computation in a less structured manner
In a computer, what is an “address”?
A location in memory
What executes the machine language?
The central processing unit (CPU)
What does the program counter do?
It keeps track of the address of the next instruction to be executed
What is assembly language?
Symbols representing numeric values
What is m4 used for?
A program that can be used to translate symbols into numeric constants
Define “macro”.
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.
How many arguments can a macro take?
A macro can have up to nine arguments
When using a macro, what indicates the presence of arguments?
When the macro name is immediately followed by an open parentheses “(“
If there are arguments present with a macro, how does the processor handle them?
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.
What is a location counter?
It is a symbol representing the memory address of the instruction being assembled.
What is “eval”?
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.
What is machine language?
Numeric values that represent the operations of a machine and the locations of operands