Exam 1 Flashcards

(51 cards)

1
Q

instruction

A

A single command to a computer

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

Machine language

A

binary coding of isntructions

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

Each ISA…

A

has a fixed set of instructions that the CPU can read

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

Assembly Language (asm)

A

human readable textual representation of machine language
almost one to one

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

CPU can…

A

Read a list of instructions
Turing complete (solve any computationally solvable problem)

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

CPU _____
Ram _______

A

Does, remembers

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

Registers

A

small, fast, temp memory inside CPU

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

The CPU can only…

A

operate on data in registers
run programs in memory

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

MIPS has…

A

32 registers

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

Arguments

A

a registers
inputs to a function

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

Return Values

A

v registers
returns from function
used for syscall

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

Temporaries

A

t registers

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

Saved (stack)

A

s registers
SAFE PLACE

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

Zero

A

register that always contains zero

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

Load

A

put value into a register

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

immediate

A

a constant value written inside the instruction

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

Load into _____
Store into ______

A

register, variable

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

Variables are in …

A

memory

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

Load into …

A

register

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

Store into …

A

memory

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

Every variable

A

has 2 parts (address and value)

22
Q

Loads copy data from…

A

memory into CPU registers

23
Q

Stores copy data from…

A

CPU registers into memory

24
Q

Address of any value

A

is the address of its 1st byte

25
When you assemble...
All labels dissapear
26
BEQ
Equal to
27
BNE
Not equal
28
BLT
Less than
29
BLE
Less than or equal too
30
BGT
Greater than
31
BGE
Greater than or equal too
32
Arrays
all equidistant all contiguous (nothing between them) each variable is the same type and size
33
Memory Alignment
means the address of an n-byte value must be a multiple of n (memory accesses faster)
34
Endianness
what rule is used to decide which byte goes first
35
Little-Endian
CPU swaps the order of the bytes
36
Big-Endian
CPU keeps terms in order
37
Function
named piece of code with inputs and outputs
38
Function call
pauses the caller and runs the callee to completion
39
Call graph
diagram of which one function calls one another
39
Function return
Stops running callee and resumes caller
40
Leaf function
Function that calls no function
41
Program counter
PC is the address of the current instruction
42
All functions
share the registers
43
Call Stack
stores info about function calls region of memory, each program gets when it starts Stack accessed through stack pointer
44
Push
putting something at the top of the stack (A,B,C)
45
Pop
Taking something from the stack (C,B,A)
46
Activation Records
saved copies of registers values that we want to get back later
47
Stack ____ when called
grows
48
Stack ____ when returned
shrinks
49
Recursive function
each function call gets its own variables
50
Every function
is free to change any register at any time