CS 244 A1

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

1/83

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 10:32 AM on 8/22/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

84 Terms

1
New cards

Translation

Converts a whole program from one language to another before it runs (e.g. compiling); produces a standalone translated program.

2
New cards

Interpretation

Executes source instructions directly, one at a time, without producing a separate translated program.

3
New cards

Multilevel machine

A computer built as a stack of levels (digital logic, microarchitecture, ISA, OS, assembly, high-level language), each hiding the details of the level below it.

4
New cards

Virtual machine (levels sense)

The idea that each level in a multilevel machine "understands" its own language, as if it were a machine in its own right.

5
New cards

Microcode

Very simple instructions stored in fast control memory that implement a machine's ISA-level instructions in hardware/firmware.

6
New cards

1st computer generation

Vacuum tubes.

7
New cards

2nd computer generation

Transistors.

8
New cards

3rd computer generation

Integrated circuits (ICs).

9
New cards

4th computer generation

VLSI / microprocessors.

10
New cards

5th computer generation

Low-power, multicore, mobile-era design.

11
New cards

Von Neumann architecture

A single memory holds both instructions and data (the "stored program" concept); the CPU fetches, decodes, and executes instructions sequentially over one bus.

12
New cards

Von Neumann bottleneck

The performance limit caused by instructions and data sharing one memory bus, which the CPU must use for both.

13
New cards

PDP-8 significance

Popularised the minicomputer: a simple, orthogonal, affordable architecture.

14
New cards

IBM 360 significance

Introduced one compatible instruction-set architecture spanning a whole family of machines at different price points.

15
New cards

Moore's Law

An observation (not a physical law) that the number of transistors on an affordable chip roughly doubles every ~18-24 months.

16
New cards

Computer spectrum (small to large)

Disposable/embedded -> mobile & games consoles -> servers -> mainframes -> supercomputers.

17
New cards

Ki (kibi)

2^10 = 1024, the binary prefix (vs. decimal kilo = 1000).

18
New cards

Mi (mebi)

2^20 = 1,048,576, the binary prefix (vs. decimal mega = 1,000,000).

19
New cards

Gi (gibi)

2^30 = 1,073,741,824, the binary prefix (vs. decimal giga = 1,000,000,000).

20
New cards

Why disk sizes look smaller than advertised

Manufacturers quote decimal GB (10^9); operating systems report binary GiB (2^30), which is a larger unit, so the same disk shows a smaller number of GiB.

21
New cards

Registers

Small, very fast storage locations built into the CPU.

22
New cards

ALU

Arithmetic Logic Unit - performs arithmetic and logical operations on register values.

23
New cards

Fetch (cycle step)

Read the instruction at the address in the program counter into the instruction register; advance the program counter.

24
New cards

Decode (cycle step)

Determine the instruction's opcode and its operands.

25
New cards

Execute (cycle step)

Perform the operation - an ALU op, a memory access, or a branch.

26
New cards

RISC core idea

Simple, fixed-length instructions, a load/store architecture, a large register set, and instructions designed to execute in about one cycle, enabling pipelining.

27
New cards

Pipelining

Overlapping the fetch/decode/execute stages of successive instructions so several are in flight at once, improving throughput.

28
New cards

Pipeline hazard

A data, control, or structural conflict between overlapping instructions that can stall a pipeline.

29
New cards

Superscalar architecture

Issuing and executing more than one instruction per clock cycle using multiple parallel execution units.

30
New cards

Big-endian

Stores the most-significant byte of a multi-byte value at the lowest memory address.

31
New cards

Little-endian

Stores the least-significant byte of a multi-byte value at the lowest memory address.

32
New cards

Why cache hit rate matters so much

Cache access is much faster than main memory access, so the hit rate dominates the effective (average) memory access time - small hit-rate gains produce large performance gains.

33
New cards

Memory hierarchy (fastest to slowest)

Registers -> Cache -> Main memory (RAM) -> Secondary storage (SSD/HDD).

34
New cards

Track

A concentric ring on a disk platter.

35
New cards

Sector

A fixed-size chunk of a track.

36
New cards

Cylinder

The same track across every platter - accessible without moving the read/write head.

37
New cards

Platter

A physical disk inside a hard drive on which data is stored magnetically.

38
New cards

Seek time

The time for the read/write head to move to the correct track.

39
New cards

Rotational latency

The time waiting for the correct sector to rotate under the head - on average, half a full rotation.

40
New cards

RAID 0

Striping across disks - no redundancy, best performance and capacity.

41
New cards

RAID 1

Mirroring - full duplicate, good safety, halves usable capacity.

42
New cards

RAID 5

Striping plus distributed parity - survives one disk failure.

43
New cards

RAID 6

Like RAID 5 but with double parity - survives two disk failures.

44
New cards

SSD wear levelling

Spreading writes evenly across flash blocks (instead of reusing the same cells) since each cell can only be erased a limited number of times.

45
New cards

Why SSDs can't overwrite in place

Flash memory is organised into pages (the read/write unit) grouped into blocks (the erase unit) - a page can't be overwritten without erasing its whole block first.

46
New cards

DSL (digital subscriber line)

Reuses existing copper telephone lines for digital data, typically asymmetric (faster downstream than upstream).

47
New cards

Fibre-optic advantage

Transmits data as light pulses, giving far higher bandwidth and lower attenuation over distance than copper.

48
New cards

ASCII

A 7-bit code (0-127) for English letters, digits, and control characters - one byte per character.

49
New cards

Unicode

A character set assigning a unique code point to every character across essentially all the world's writing systems.

50
New cards

UTF-8

A variable-width encoding of Unicode code points into 1-4 bytes, backward-compatible with ASCII.

51
New cards

Sign-magnitude negation

Flip the sign bit only; magnitude stays the same.

52
New cards

One's complement negation

Invert every bit.

53
New cards

Two's complement negation

Invert every bit, then add 1.

54
New cards

Why two's complement is preferred

Only one representation of zero, and ordinary binary addition works directly without special-case logic.

55
New cards

IEEE 754 single precision - total bits

32 bits: 1 sign + 8 exponent + 23 mantissa/fraction.

56
New cards

IEEE 754 - sign bit meaning

0 = positive, 1 = negative.

57
New cards

IEEE 754 - exponent bias

127 - the stored exponent equals the true exponent plus 127.

58
New cards

IEEE 754 - mantissa's implicit bit

There's an implicit leading 1 before the stored fraction bits (in the normalised form).

59
New cards

Declaration vs. definition (C)

A declaration introduces a name and type without necessarily allocating storage (e.g. extern int x;); a definition actually allocates storage (e.g. int x;).

60
New cards

auto storage class

Default for local variables - allocated on the stack, lifetime is the enclosing block.

61
New cards

static storage class (local var)

Allocated once for the whole program's lifetime; retains its value between calls to the function.

62
New cards

extern storage class

Refers to a variable definition that lives elsewhere, usually another file.

63
New cards

register storage class

A hint to the compiler to keep the variable in a CPU register - mostly a historical curiosity today.

64
New cards

Struct vs. Java class

A struct groups fields into one aggregate type with no methods, no access control, and no inheritance.

65
New cards

Array bounds checking in C

None - reading or writing outside declared bounds is undefined behaviour, not a caught runtime error.

66
New cards

Array decay

In most expressions, an array's name decays to a pointer to its first element (but sizeof still reports the whole array's size).

67
New cards

Preprocessor's role

Runs before compilation and performs purely textual substitution: #include, #define macros, #ifdef/#ifndef conditional compilation.

68
New cards

Macro pitfall

A function-like macro like #define SQUARE(x) xx isn't parenthesised, so SQUARE(a+b) expands to a+ba+b, not (a+b)*(a+b).

69
New cards

Prefix ++x

Increments x first; the expression evaluates to the new value.

70
New cards

Postfix x++

The expression evaluates to the old value; x is incremented afterwards.

71
New cards

First-class feature

Something a language lets you store in a variable, pass as an argument, return from a function, and create at runtime - pointers are first-class in C.

72
New cards

Reifies / reifiable

Turns an otherwise-invisible concept (like a memory address) into an explicit, manipulable value a program can compute with.

73
New cards

Evaluation strategy: call-by-value

A copy of the argument's value is passed to a function - C's only parameter-passing mode.

74
New cards

Covariance

A subtyping relationship is preserved in the same direction when building a new type from it (if Sub is-a Super, F(Sub) is-a F(Super)).

75
New cards

Invariance

No subtyping relationship is preserved - F(Sub) and F(Super) are unrelated even if Sub is-a Super (roughly describes C pointer types).

76
New cards

Pointer width

Matches the target architecture's address size - 4 bytes on 32-bit, 8 bytes on 64-bit, regardless of the pointed-to type.

77
New cards

malloc

Allocates a given number of bytes on the heap; returns a void* (or NULL on failure).

78
New cards

free

Releases heap memory back to the system; using it afterwards is a use-after-free.

79
New cards

Memory leak

Allocated memory that's never freed and whose only pointer has been lost - can't be reached or reclaimed until the program exits.

80
New cards

Double pointer (T**) use case

Needed when a function must modify the caller's pointer itself, or for dynamically-allocated 2D arrays.

81
New cards

-> operator

Shorthand for accessing a struct member through a pointer - p->field means (*p).field.

82
New cards

Function pointer

A variable holding the address of a function, letting you pass functions as arguments or select between them at runtime.

83
New cards

Hamming code parity bit positions

Positions that are powers of two: 1, 2, 4, 8, … Data bits fill the remaining positions.

84
New cards

Purpose of a Hamming code

To detect and correct a single flipped bit in a transmitted codeword using redundant parity bits.