ECEN 350 Exam 1, Prof Mi Lu

0.0(0)
Studied by 1 person
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/106

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 10:07 PM on 9/17/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

107 Terms

1
New cards

Compiler

High-level language → Assembly

2
New cards

Assembler

Assembly → Machine language

3
New cards

5 classic components of a computer

input, output, memory, datapath, control

4
New cards

Memory

where programs and data are kept

5
New cards

datapath

performs arithmetic operations

6
New cards

control

tells datapath, memory, and i/o devices what to do according to program instructions

7
New cards

processor

active part of computer. adds numbers, tests numbers, signal i/o.

datapath and control combined

also called cpu

8
New cards

DRAM

dynamic random access memory.

takes same amount of time to access the memory no matter what portion of memory is read

9
New cards

cache

built using sram - static ram.

consists of small, fast memory that acts as buffer for DRAM

10
New cards

implementation

hardware that obeys the architecture design of principle technique

11
New cards

instruction set architecture

includes anything programmers need to know to make a binary machine language program work correctly, including instructions, i/o devices, etc.

12
New cards

integrated circuit

combines dozens to millions of transistors into a single chip

13
New cards

vlsi

very large scale integrated circuit, integrates hundreds of thousands to millions of transistors into a single chip

14
New cards

manufacturing of a chip

silicon crystal ingot → sliced into wafers → chopped into dies

15
New cards

defect

microscopic flaw in wafer.

16
New cards

any defect can cause failure

true

17
New cards

why chop wafer into dies?

allows discarding only defects rather than entire wafer

18
New cards

yield

percentage of good dies from total dies on wafer

19
New cards

each wafer same price, meaning fewer dies →

higher cost per die

20
New cards

each wafer same price, meaning

2x yield → half the cost per die

21
New cards

cost per die =

cost of wafer / (dies per wafer * die yield)

22
New cards

dies per wafer =

wafer area / die area

23
New cards

die yield =

(1 + (defects per unit area * die area) / alpha) ^ -alpha

24
New cards

what is alpha in die yield equation?

number of critical processing steps in manufacturing process. eg. MOS: alpha = 2

25
New cards

cpu execution time_1 =

cpu clock cycles * clock cycle time

26
New cards

cpu execution time definition

actual time the cpu spends computing for a specific task

27
New cards

cpu (execution) time_2 =

instruction count * cpi * clock cycle time

28
New cards

clock cycle time =

1/clock rate

29
New cards

performance =

1/execution time

30
New cards

A is n times as fast as B, n(performance) =

performace(A)/performance(B)

31
New cards

A is n times as fast as B, n(execution time) =

execution time(B)/execution time(A)

32
New cards

MIPS definition

millions of instructions per second

33
New cards

MIPS_1 =

instruction count / (execution time * 10^6)

34
New cards

MIPS_2 =

clock rate / (cpi * 10^6)

35
New cards

issues with MIPS

  1. doesnt account for different instruction sets

  2. varies between programs on same computer

  3. if more instructions, but each instruction faster, mips increases but program may run slower


36
New cards

MFLOPS =

number floating point operations / (execution time * 10^6)

37
New cards

MFLOPS definition

millions of floating point operations per second

38
New cards

average execution time =

1/n * sum(execution time)

39
New cards

weighted arithmetic mean =

sum(w*execution time)

40
New cards

geometric mean =

nth root(product( execution time / execution time reference))

41
New cards

when to use geometric mean?

when averaging speedups

42
New cards

computer design principles

  1. make common case fast

  2. amdahl’s law


43
New cards

amdahl’s law =

exec time after improvement = execution time affected / amount of improvement + exec time unaffected

44
New cards

how many registers?

32

45
New cards

how many bits are instructions?

32

46
New cards

how many bits in each register?

64

47
New cards

how many bytes in memory space?

2^64

48
New cards

how many bits in a byte?

8

49
New cards

how many bits in a halfword

16

50
New cards

how many bits in a word?

32

51
New cards

how many bits in a doubleword?

64

52
New cards

arm is byte addressable

true

53
New cards

little endian

least significant byte at lowest address

54
New cards

instructions must be aligned to multiple of

4

55
New cards

B and CB type instruction branch offsets are

PC relative

56
New cards

PC relative

number of instructions from current instruction to label. + → foward, - → backward (before multiplying by 4)

57
New cards

assembly order of arguments is _ of machine code order

reverse

58
New cards

R type stands for

Register format

59
New cards

R type bit allocation

11:opcode, 5:second source, 6:shift amount, 5: first source, 5: destinition

60
New cards

R type examples

ADD, ORR, LSL, BR

61
New cards

I type stands for

Immediate arithmetic

62
New cards

I type bit allocation

10: opcode, 12: immediate, 5: source, 5: destination

63
New cards

I type examples

ADDI, ANDI

64
New cards

D type stands for

Data

65
New cards

D type bit allocation

11: opcode, 9: offset (signed), 2: op2, 5: base address, 5: load/store reg

66
New cards

D type examples

LDUR, STUR, LDURW, LDURSB

67
New cards

B type stands for

unconditional branch

68
New cards

B type bit allocation

6:opcode, 26: branch offset

69
New cards

B type examples

B, BL

70
New cards

CB type stands for

conditional branch

71
New cards

CB type bit allocation

8: opcode, 19: branch offset, 5: tested reg.

72
New cards

CB type examples

CBZ, CBNZ

73
New cards

describe MOVK

moves 16 bit immediate into destination register, can be LSL by multiple of 16, keeps other bits unchanged

74
New cards

describe MOVZ

moves 16 bit immediate into destination register, can be LSL by multiple of 16, zeros other bits

75
New cards

AND, ORR, EOR, ANDI, ORRI, EORI, etc. are bitwise operations

true

76
New cards

PC stands for what and explain what PC is

program counter, address of instruction to be executed, incremented by 4 after each execution, written over during branch instruction

77
New cards

which direction and operation are performed on stack pointer when allocating additional memory

sp growns down, SUB performed

78
New cards

what register is stack pointer SP in?

X28

79
New cards

what register is frame pointer FP in?

X29

80
New cards

what register is link register LR in?

X30

81
New cards

what register is the zero constant XZR in?

X31

82
New cards

For LDUR operations only, what is suffix to sign extend instead of default zero extend?

S

83
New cards

for LDUR and STUR operations, what is suffix to load/store a byte

B

84
New cards

for LDUR and STUR operations, what is suffix to load/store a halfword

H

85
New cards

for LDUR and STUR operations, what is suffix to load/store a word

W

86
New cards

for LDUR and STUR operations, what is suffix to load/store a doubleword

nothing

87
New cards

immediate addressing definition

operand is a constant within instruction

88
New cards

register addressing definition

operand is a register

89
New cards

base or displacement addressing definition

operand is at the memory location whose address is the sum of a register and a constant in instruction

90
New cards

PC-relative addressing definition

branch address is sum of PC and constant in instruction*4

91
New cards

how to get representation of a negative number in 2’s comp?

  1. write as binary

  2. invert all bits

  3. add 1


92
New cards

how to extending numbers in 2’s comp representation?

extend sign bit

93
New cards

how to detect overflow?

when adding same sign, if result is different sign, overflow occured

94
New cards

how to do integer multiplication?

multiplicand * multipler

start: 0…0 | multiplier

  1. check LSB of Product/Multiplier register

    1. if 1: add multiplicand to product register

    2. if 0: do nothing

  2. shift P/M register right 1 bit

  3. repeat register size amount of times

end: entire P/M register is result

note: only works on unsigned numbers


95
New cards

how to do integer division?

dividend / divisor

start: 0…0 | dividend

  1. shift R/Q register left 1 bit, new bit shifted in unknown

  2. subtract remainder register by divisor (add negative of divisor)

  3. if remainder register nonneg: keep result, set new bit = 1

    1. if remainder neg: restore before subtraction, set new bit = 0

  4. repeat register size amount of times

end: remainder | quotient


96
New cards

IEEE floating point representation single precision bias

127

97
New cards

IEEE floating point representation single precision bit allocation

1: sign, 8: exponent, 23: fraction

98
New cards

IEEE floating point representation fraction should be normalized with hidden 1

true

99
New cards

given IEEE floating point representation, convert to value formula

(-1)^s * (1+fraction) * 2^(exponent - bias)

100
New cards

IEEE rounding: round to nearest

even