Exam 1 Flashcards

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
Q

When you assemble…

A

All labels dissapear

26
Q

BEQ

A

Equal to

27
Q

BNE

A

Not equal

28
Q

BLT

A

Less than

29
Q

BLE

A

Less than or equal too

30
Q

BGT

A

Greater than

31
Q

BGE

A

Greater than or equal too

32
Q

Arrays

A

all equidistant
all contiguous (nothing between them)
each variable is the same type and size

33
Q

Memory Alignment

A

means the address of an n-byte value must be a multiple of n
(memory accesses faster)

34
Q

Endianness

A

what rule is used to decide which byte goes first

35
Q

Little-Endian

A

CPU swaps the order of the bytes

36
Q

Big-Endian

A

CPU keeps terms in order

37
Q

Function

A

named piece of code with inputs and outputs

38
Q

Function call

A

pauses the caller and runs the callee to completion

39
Q

Call graph

A

diagram of which one function calls one another

39
Q

Function return

A

Stops running callee and resumes caller

40
Q

Leaf function

A

Function that calls no function

41
Q

Program counter

A

PC is the address of the current instruction

42
Q

All functions

A

share the registers

43
Q

Call Stack

A

stores info about function calls
region of memory, each program gets when it starts
Stack accessed through stack pointer

44
Q

Push

A

putting something at the top of the stack (A,B,C)

45
Q

Pop

A

Taking something from the stack (C,B,A)

46
Q

Activation Records

A

saved copies of registers values that we want to get back later

47
Q

Stack ____ when called

A

grows

48
Q

Stack ____ when returned

A

shrinks

49
Q

Recursive function

A

each function call gets its own variables

50
Q

Every function

A

is free to change any register at any time