CS 310 Exam

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall with Kai
GameKnowt Play
New
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/94

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

95 Terms

1
New cards

if statement

executes substatements when the statement's expression is true, otherwise the substatements are skipped

2
New cards

branch not equal (bne)

If the expression is a comparison for equality, an if statement can be converted to a simple pattern of assembly instructions

3
New cards

if-else statement

executes one of two possible sets of sub-statements depending on an expression's value

4
New cards

C programs commonly use a multi-branch form of an if-else statement

true

5
New cards

beq: Branch on equal

beq $t0, $t1, LBranch if $t0 equals $t1

6
New cards

bne: Branch on not equal

bne $t0, $t1, LBranch if $t0 does not equal $t1

7
New cards

blt: Branch on less than

blt $t0, $t1, LBranch if $t0 < $t1

8
New cards

ble: Branch on less than or equal

ble $t0, $t1, LBranch if $t0 ≤ $t1

9
New cards

bgt: Branch on greater than

bgt $t0, $t1, LBranch if $t0 > $t1

10
New cards

bge: Branch on greater than or equal

bge $t0, $t1, LBranch if $t0 ≥ $t1

11
New cards

while loop

has an expression and substatements. If the expression is true, the substatements execute, and then execution jumps back to check the expression again

12
New cards

iteration

Each execution of a loop's substatements

13
New cards

for loop

four parts: substatements, and three preceding parts of an initialization, an expression, and an update

14
New cards

function

a named group of statements that performs a specific operation

15
New cards

function call

involves passing arguments to the function's parameters, executing the function's statements, and returning the function's return value

16
New cards

local variable

declared in a function has a scope limited to the function, meaning the variable only exists when the function executes

17
New cards

array

variable consisting of a sequence of elements.

18
New cards

base address

An array's elements are stored sequentially in memory, with a starting address

19
New cards

string

an array of characters

20
New cards

null character

\0, the last element in a C string

21
New cards

compiler

a program that converts a program in a high-level language, like C, C++, or Java, into assembly instructions.

22
New cards

front end

ensures the program is valid according to the language's rules, and converts the program to an intermediate representation (IR).

23
New cards

optimizations

simplify the intermediate representation

24
New cards

back end

converts the intermediate representation to a processor's assembly instructions

25
New cards

program memory

refers to all memory contents used by a program, including both instructions and data. Program memory is typically organized into several regions (or segments)

26
New cards

code region

contains a program's instructions

27
New cards

text region

another word for code region

28
New cards

static region

contains global variables (variables defined outside any function) and static local variables (variables defined inside functions starting with the keyword "static")

29
New cards

stack

contains values used to call functions and may also contain a function's local variables

30
New cards

heap

contains all dynamically allocated memory

31
New cards

data region

contains data that is initialized

32
New cards

bss region

(short for block started by symbol -- a term carried over from early assemblers) contains data that is uninitialized

33
New cards

circuit

a connection of electrical components

34
New cards

analog circuit

components that transform analog signals, which are signals that take on continuous values, like 0.001, 2.3, or -3.333

35
New cards

digital circuit

components that transform digital signals, which are signals that take on only one of a few specific values, like 0 and 1

36
New cards

combinational circuit

a digital circuit whose output values depend solely on the present combination of input values

37
New cards

logic gates

A combinational circuit can be built from components like AND, OR, and NOT gates

38
New cards

truth table

one way to describe the behavior of a combinational circuit, listing the output value for every possible combination of input values

39
New cards

boolean equation

another way to describe the behavior of a combinational circuit, using operators AND (a*b or just ab), OR (a+b), and NOT (a')

40
New cards

minterm

term that involves all a function's variables exactly once

41
New cards

sum of minterms

An equation derived by ORing terms for each 1 in a truth table

42
New cards

multiplexor

a combinational circuit that passes one of multiple data inputs through to a single output, selecting which one based on additional control inputs

43
New cards

mux

short for multiplexor

44
New cards

select lines

A mux's control inputs

45
New cards

4x1 mux

spoken as "4 to 1 mux", has 4 data inputs, 1 data output, and requires 2 select inputs

46
New cards

decoder

a combinational circuit that converts N inputs to a 1 on one of 2N outputs

47
New cards

2x4 decoder

spoken as "2 to 4 decoder", converts two inputs to a 1 on one of four outputs

48
New cards

adder

a combinational circuit that adds two N-bit inputs, producing an N-bit sum output

49
New cards

timing diagram

graphically shows a circuit's output values for given input values that change over time

50
New cards

sequential circuit

a digital circuit whose output values may depend on present and past input values (vs. depending only on present values in a combinational circuit)

51
New cards

register

stores N bit values, loading new bit values when a clock input rises if a load input is 1

52
New cards

load input(ld)

indicates when the register should be loaded

53
New cards

reset input(rst)

indicates that the register's bits should be reset to 0 (having priority over ld)

54
New cards

All a circuit's registers may share one ___________________, whose _________________ (the instant a 0 changes to 1) synchronizes loading of all registers (like a drum beat synchronizes a marching band).

clock signal; rising edge

55
New cards

three-state buffer

a component that outputs y = b if input a is 1, and outputs Z if a is 0

56
New cards

high impedance

Z represents an electrical situation

57
New cards

tri-state buffer

A three-state buffer

58
New cards

register file

efficiently implements access to N M-bit registers

59
New cards

write operation

Loading a register in a register file

60
New cards

write port

The data input, address input, and load enable input for writing are together

61
New cards

read port

a register file consolidates read wires into a single 32-bit data output, 4-bit address input, and enable input

62
New cards

base MIPSzy

implements the lw, sw, addi, and add instructions

63
New cards

processor

a circuit that executes instructions

64
New cards

Program Counter(PC)

holds the address of the current instruction to execute

65
New cards

memory

a digital component that retains bit values, consisting of N words of M bits each

66
New cards

random access memory (RAM)

any "random" word can be quickly accessed, in contrast to older sequentially-accessed memory technologies like tape that had to first be spun or moved to access a particular word

67
New cards

Most RAM is __________________, meaning bit values are lost if electrical power is removed.

volatile memory

68
New cards

static RAM (SRAM)

typically uses 6 transistors to store each bit value, by passing the bit into a loop within those transistors

69
New cards

Dynamic RAM (DRAM)

typically uses 1 transistor and 1 capacitor to store each bit value, by charging the capacitor

70
New cards

IEC prefixes

kibi (210 or 1024), mebi (220 or 1,048,576), gibi (230 or 1,073,741,824), and tebi (240 or 1,099,511,627,776)

71
New cards

chip(integrated circuit or IC)

a digital circuit manufactured on a fingernail-sized piece of silicon, typically placed inside a black or silver insulating package.

72
New cards

Non-recurring engineering (NRE) cost

the cost to design and set up a computer chip for manufacturing

73
New cards

yield

the percentage of chips that are usable and free from significant defects

74
New cards

cache

small on-chip memory

75
New cards

hit

if an item's copy exists in the cache

76
New cards

miss

system first copies the item from memory to cache

77
New cards

direct-mapped cache

directly maps memory addresses to cache addresses using a subset of address bits (called the index), storing the remaining bits (called the tag) in the cache entry

78
New cards

index

subset of address bits

79
New cards

tag

remaining bits

80
New cards

valid bit

initially set with 0, then set with 1 upon the first copy of an item into that entry (staying 1 from then on)

81
New cards

spatial locality

If a program accesses a memory location, then the program will likely soon access adjacent locations too

82
New cards

block(line)

if a memory item doesn't exist in cache, the system usually copies that item plus several adjacent items

83
New cards

Some address bits are used to ________ into the block to get the proper item.

offset

84
New cards

write through

A straightforward cache write approach

85
New cards

write back

A faster cache write approach

86
New cards

when a processor writes data to the cache, the system marks that cache block as

dirty

87
New cards

thrashing

two blocks may keep replacing each other in the cache

88
New cards

2 way set associative cache

a cache can be designed to allow two blocks per cache address

89
New cards

fully associative cache

A cache where all memory blocks are looked up just by tags (so the cache essentially has only one cache address)

90
New cards

cache replacement policy

When copying a block into a 2-way associative cache, the system must decide which of the two existing blocks to replace

91
New cards

temporal locality

If a memory address was recently accessed, that word will likely be accessed again soon

92
New cards

LRU

replaces the least recently used block

93
New cards

memory hierarchy

Computers often have multiple levels of memory/storage devices

94
New cards

drive(hard drive)

non-volatile storage (typically disk or flash) that holds a computer's program instructions and data files even when the computer is off

95
New cards

non-volatile storage

maintains bit values even without electrical power.