English | MP4 | AVC 3840×2160 | AAC 44KHz 2ch | 78 Lessons (28h 16m) | 13.15 GB
As software engineers, we study computer systems (also called “computer architecture”) to be able to understand how our programs ultimately run and how the machine expects our data to be encoded. Our immediate reward is to be able to write faster, more memory-efficient and more secure code.
Longer term, the value of understanding computer systems may be even greater. Every abstraction between us and the hardware leaks, to one degree or another. This course aims to provide a set of first principles from which to build sturdier mental models and reason more effectively.
We’ll start by considering the machine’s expectation of how our data is encoded, as well as some higher level binary representations like those for text. We’ll continue through introductory C and assembly programming, to better understand the interface that a typical computer provides for executing programs. Finally we’ll cover two important areas for improving program performance: utilizing the CPU microarchitecture, and CPU caches (the memory hierarchy).
At the core of this course are the sequences of problems for each topic. You should aim to solve each problem, using the worked solutions and supplementary explainers as needed. There are also some full seminars, which some find helpful to tie topics together. While no textbook is necessary for this course, we do recommend Computer Systems: A Programmer’s Perspective (“CS:APP”) as a supplement, and reference relevant CS:APP chapters below.
Table of Contents
1 Protobuf varint
2 CSS color convert
3 Beep beep boop
4 Image rotate
5 TCP SYN flood
6 UTF-8 truncate
7 Sneaky NaN
8 Unsigned integers alternatives and overflow (sorry maam)
9 Signed integers integers in JavaScript and ones complement Internet checksum
10 Floating point IEEE754 structure and safe integers in floats in JavaScript
11 Unicode UTF-8 UTF-32 and ugh UTF-16
12 What are standard in and standard out
13 Why does a byte have values 0255
14 What do bigendian and littleendian mean
15 Why masking low order bits is like modulus of a power of 2
16 Why do we care about teletype machines
17 Why are some bitwise operations faster than arithmetic equivalents
18 What are file descriptors 0 1 and 2
19 What does it mean for a value to be a certain number of bits
20 What are signed and unsigned integers
21 Why do I sometimes see the sequence rn for a newline
22 What does it mean to flush a buffer
23 Whats the basic difference between UTF8 UTF16 and UTF32
24 Why does one byte correspond to two hexadecimal digits
25 Whats the difference between Unicode and something like UTF8
26 How to remember all the powers of two
27 How do I read a hexdump
28 What is a byte exactly
29 How does UTF-8 encode characters (aka artisinal Unicode sandwich)
30 What is a file descriptor
31 What exactly is hexadecimal
32 What do bitwise and or xor and not do
33 Whats the point of floating point
34 What is the effect of shifting bits
35 How are IEEE 754 floating point numbers encoded (aka why is 01 02 030000000000000004)
36 Hello World
37 Bitcount
38 Fast pangram
39 Dynamic array
40 Varint C extension
41 Basic hashmap
42 How do C compilers differ
43 What is a register
44 The generic pointer (void) in C
45 Helping Max rotate bits right
46 Loop syntax in C
47 The C pre-processor macros and conditional inclusion
48 A brief overview of structs in C
49 A brief introduction to Valgrind
50 Type definitions and literals in C
51 A brief overview of malloc and related functions
52 A brief tour of LLDB
53 What happens in the compilation pipeline
54 What is the effect of the compiler optimization level flag
55 Overview of pointers and arrays in C
56 Helping Jessica understand void
57 Assembly Hello world
58 Sum to N
59 Matrix access
60 x8664 pangram
61 Binary convert
62 Cone volume
63 Low level recursion
64 The System V AMD64 calling convention
65 Explaining the terms computer architecture instruction set and microarchitecture
66 Whats the difference between Intel and ATT assembly syntax
67 What are the general purpose registers in x8664
68 What is the fetchdecodeexecute cycle
69 Faster sum
70 Color quantizing
71 Moving beyond the simple fetchdecodeexecute model
72 Grayscale speedup
73 Pointer chase
74 Bogosum
75 What is a cache line (brief explanation)
76 Understanding CPU caches
77 Why are there multiple levels of CPU cache
78 Measuring cache performance with perf and cachegrind
Resolve the captcha to access the links!