Acknowledgments |
|
xix | |
Preface |
|
xxi | |
Introduction |
|
xxv | |
|
Why Good Programming is Important |
|
|
xxvi | |
|
Learning to Code is Only a Starting Place |
|
|
xxvii | |
|
Importance of Low-Level Knowledge |
|
|
xxviii | |
|
Who Should Read This Book? |
|
|
xxviii | |
|
|
xxix | |
|
What Is Computer Programming? |
|
|
xxix | |
|
Coding, Programming, Engineering, and Computer Science |
|
|
xxxii | |
|
|
xxxiii | |
|
|
xxxv | |
1 The Internal Language Of Computers |
|
1 | (32) |
|
|
2 | (1) |
|
|
2 | (1) |
|
|
3 | (1) |
|
|
3 | (3) |
|
|
4 | (1) |
|
|
5 | (1) |
|
Representing Integers Using Bits |
|
|
6 | (8) |
|
Representing Positive Numbers |
|
|
6 | (2) |
|
|
8 | (2) |
|
Representing Negative Numbers |
|
|
10 | (4) |
|
Representing Real Numbers |
|
|
14 | (4) |
|
Fixed-Point Representation |
|
|
14 | (1) |
|
Floating-Point Representation |
|
|
15 | (2) |
|
The IEEE Floating-Point Standard |
|
|
17 | (1) |
|
Binary-Coded Decimal System |
|
|
18 | (1) |
|
Easier Ways to Work with Binary Numbers |
|
|
18 | (2) |
|
|
18 | (1) |
|
Hexadecimal Representation |
|
|
19 | (1) |
|
|
20 | (1) |
|
|
20 | (2) |
|
|
22 | (3) |
|
The American Standard Code for Information Interchange |
|
|
22 | (2) |
|
The Evolution of Other Standards |
|
|
24 | (1) |
|
Unicode Transformation Format 8-bit |
|
|
24 | (1) |
|
Using Characters to Represent Numbers |
|
|
25 | (2) |
|
Quoted-Printable Encoding |
|
|
26 | (1) |
|
|
26 | (1) |
|
|
27 | (1) |
|
|
27 | (4) |
|
|
29 | (1) |
|
|
30 | (1) |
|
|
31 | (2) |
2 Combinatorial Logic |
|
33 | (36) |
|
The Case for Digital Computers |
|
|
34 | (7) |
|
The Difference Between Analog and Digital |
|
|
35 | (1) |
|
Why Size Matters in Hardware |
|
|
36 | (1) |
|
Digital Makes for More Stable Devices |
|
|
37 | (1) |
|
Digital in an Analog World |
|
|
38 | (2) |
|
Why Bits Are Used Instead of Digits |
|
|
40 | (1) |
|
A Short Primer on Electricity |
|
|
41 | (6) |
|
Using Plumbing to Understand Electricity |
|
|
41 | (3) |
|
|
44 | (3) |
|
Building Hardware for Bits |
|
|
47 | (6) |
|
|
47 | (3) |
|
|
50 | (1) |
|
|
51 | (1) |
|
|
52 | (1) |
|
|
53 | (7) |
|
Improving Noise Immunity with Hysteresis |
|
|
54 | (1) |
|
|
55 | (2) |
|
|
57 | (1) |
|
|
58 | (2) |
|
Building More Complicated Circuits |
|
|
60 | (7) |
|
|
60 | (3) |
|
|
63 | (1) |
|
|
64 | (1) |
|
|
65 | (2) |
|
|
67 | (2) |
3 Sequential Logic |
|
69 | (24) |
|
|
70 | (9) |
|
|
70 | (1) |
|
|
71 | (1) |
|
|
71 | (2) |
|
|
73 | (1) |
|
|
74 | (3) |
|
|
77 | (1) |
|
|
78 | (1) |
|
Memory Organization and Addressing |
|
|
79 | (6) |
|
|
82 | (1) |
|
|
83 | (2) |
|
|
85 | (3) |
|
Flash Memory and Solid State Disks |
|
|
88 | (1) |
|
Error Detection and Correction |
|
|
88 | (2) |
|
|
90 | (1) |
|
|
91 | (2) |
4 Computer Anatomy |
|
93 | (24) |
|
|
94 | (2) |
|
|
96 | (1) |
|
The Central Processing Unit |
|
|
97 | (5) |
|
Arithmetic and Logic Unit |
|
|
97 | (2) |
|
|
99 | (1) |
|
|
100 | (2) |
|
|
102 | (1) |
|
|
102 | (7) |
|
|
104 | (1) |
|
Condition Code Instructions |
|
|
105 | (1) |
|
|
105 | (1) |
|
|
106 | (3) |
|
|
109 | (1) |
|
|
109 | (4) |
|
Data Paths and Control Signals |
|
|
109 | (1) |
|
|
110 | (3) |
|
RISC vs. CISC Instruction Sets |
|
|
113 | (1) |
|
Graphics Processing Units |
|
|
114 | (1) |
|
|
115 | (2) |
5 Computer Architecture |
|
117 | (24) |
|
Basic Architectural Elements |
|
|
118 | (2) |
|
|
118 | (1) |
|
Microprocessors and Microcomputers |
|
|
119 | (1) |
|
Procedures, Subroutines, and Functions |
|
|
120 | (2) |
|
|
122 | (3) |
|
|
125 | (3) |
|
|
128 | (2) |
|
|
130 | (2) |
|
|
132 | (1) |
|
|
133 | (1) |
|
Memory Hierarchy and Performance |
|
|
133 | (2) |
|
|
135 | (1) |
|
|
136 | (1) |
|
|
137 | (1) |
|
|
138 | (1) |
|
|
139 | (2) |
6 Communications Breakdown |
|
141 | (42) |
|
|
142 | (14) |
|
|
142 | (2) |
|
|
144 | (2) |
|
|
146 | (1) |
|
|
147 | (1) |
|
|
148 | (1) |
|
|
149 | (1) |
|
|
150 | (2) |
|
|
152 | (1) |
|
|
152 | (2) |
|
|
154 | (2) |
|
|
156 | (1) |
|
|
156 | (4) |
|
|
158 | (1) |
|
|
158 | (2) |
|
Analog in the Digital World |
|
|
160 | (16) |
|
Digital-to-Analog Conversion |
|
|
160 | (2) |
|
Analog-to-Digital Conversion |
|
|
162 | (3) |
|
|
165 | (8) |
|
|
173 | (1) |
|
|
174 | (2) |
|
|
176 | (5) |
|
|
176 | (1) |
|
|
177 | (1) |
|
|
178 | (2) |
|
|
180 | (1) |
|
|
181 | (1) |
|
|
181 | (2) |
7 Organizing Data |
|
183 | (34) |
|
|
184 | (1) |
|
|
185 | (2) |
|
|
187 | (1) |
|
|
188 | (1) |
|
|
189 | (2) |
|
|
191 | (4) |
|
Dynamic Memory Allocation |
|
|
195 | (1) |
|
More Efficient Memory Allocation |
|
|
196 | (1) |
|
|
197 | (1) |
|
|
198 | (1) |
|
Hierarchical Data Structures |
|
|
199 | (4) |
|
|
203 | (1) |
|
|
204 | (2) |
|
|
206 | (1) |
|
|
206 | (4) |
|
|
210 | (1) |
|
|
211 | (1) |
|
|
212 | (1) |
|
|
213 | (2) |
|
Efficiency vs. Performance |
|
|
215 | (1) |
|
|
216 | (1) |
8 Language Processing |
|
217 | (20) |
|
|
217 | (2) |
|
|
219 | (1) |
|
|
220 | (1) |
|
|
221 | (5) |
|
|
223 | (1) |
|
|
224 | (2) |
|
|
226 | (2) |
|
The Language-of-the-Day Club |
|
|
228 | (1) |
|
|
228 | (3) |
|
|
231 | (1) |
|
|
232 | (2) |
|
|
234 | (2) |
|
|
236 | (1) |
|
|
236 | (1) |
9 The Web Browser |
|
237 | (22) |
|
|
238 | (1) |
|
Uniform Resource Locators |
|
|
239 | (1) |
|
|
240 | (2) |
|
The Document Object Model |
|
|
242 | (2) |
|
|
243 | (1) |
|
|
244 | (1) |
|
|
244 | (4) |
|
|
248 | (3) |
|
|
251 | (2) |
|
|
253 | (1) |
|
|
254 | (1) |
|
|
255 | (1) |
|
|
255 | (1) |
|
|
256 | (3) |
10 Application And System Programming |
|
259 | (24) |
|
Guess the Animal Version 1: HTML and JavaScript |
|
|
262 | (5) |
|
Application-Level Skeleton |
|
|
263 | (1) |
|
|
263 | (1) |
|
|
264 | (3) |
|
|
267 | (1) |
|
Guess the Animal Version 2: C |
|
|
267 | (15) |
|
Terminals and the Command Line |
|
|
267 | (1) |
|
|
268 | (1) |
|
Terminals and Device Drivers |
|
|
268 | (1) |
|
|
269 | (2) |
|
|
271 | (1) |
|
|
272 | (1) |
|
Better Code Through Good Abstractions |
|
|
273 | (1) |
|
|
274 | (1) |
|
|
275 | (1) |
|
|
275 | (6) |
|
|
281 | (1) |
|
|
282 | (1) |
11 Shortcuts And Approximations |
|
283 | (52) |
|
|
284 | (6) |
|
|
284 | (1) |
|
|
285 | (3) |
|
|
288 | (2) |
|
|
290 | (11) |
|
|
292 | (6) |
|
|
298 | (3) |
|
|
301 | (1) |
|
|
301 | (12) |
|
|
301 | (3) |
|
|
304 | (7) |
|
|
311 | (2) |
|
|
313 | (5) |
|
Power Series Approximations |
|
|
313 | (1) |
|
|
313 | (5) |
|
|
318 | (15) |
|
|
319 | (1) |
|
|
320 | (2) |
|
|
322 | (1) |
|
|
323 | (10) |
|
|
333 | (2) |
12 Deadlocks And Race Conditions |
|
335 | (16) |
|
|
336 | (1) |
|
|
337 | (1) |
|
|
337 | (2) |
|
|
339 | (4) |
|
Transactions and Granularity |
|
|
340 | (1) |
|
|
341 | (1) |
|
|
341 | (1) |
|
Short-Term Lock Implementation |
|
|
342 | (1) |
|
Long-Term Lock Implementation |
|
|
343 | (1) |
|
|
343 | (3) |
|
Asynchronous Functions and Promises |
|
|
346 | (4) |
|
|
350 | (1) |
13 Security |
|
351 | (34) |
|
Overview of Security and Privacy |
|
|
352 | (10) |
|
|
352 | (1) |
|
|
353 | (2) |
|
|
355 | (1) |
|
|
356 | (1) |
|
|
357 | (2) |
|
Metadata and Surveillance |
|
|
359 | (1) |
|
|
359 | (2) |
|
Authentication and Authorization |
|
|
361 | (1) |
|
|
362 | (10) |
|
|
362 | (1) |
|
|
363 | (2) |
|
|
365 | (1) |
|
|
366 | (1) |
|
|
367 | (1) |
|
|
367 | (1) |
|
|
368 | (1) |
|
|
369 | (1) |
|
Cryptographic Hash Functions |
|
|
369 | (1) |
|
|
370 | (1) |
|
Public Key Infrastructure |
|
|
370 | (1) |
|
|
371 | (1) |
|
|
371 | (1) |
|
|
372 | (12) |
|
|
372 | (1) |
|
|
373 | (1) |
|
|
373 | (1) |
|
|
373 | (1) |
|
|
374 | (1) |
|
Generating Good Random Numbers Is Hard |
|
|
375 | (1) |
|
|
376 | (2) |
|
Extreme Cleverness Is Your Enemy |
|
|
378 | (1) |
|
Understand What's Visible |
|
|
378 | (1) |
|
|
379 | (1) |
|
|
379 | (1) |
|
Dynamic Memory Allocation Isn't Your Friend |
|
|
379 | (2) |
|
Garbage Collection Is Not Your Friend Either |
|
|
381 | (1) |
|
|
382 | (2) |
|
|
384 | (1) |
14 Machine Intelligence |
|
385 | (28) |
|
|
386 | (2) |
|
|
388 | (19) |
|
|
389 | (1) |
|
|
390 | (3) |
|
|
393 | (5) |
|
|
398 | (1) |
|
|
399 | (2) |
|
|
401 | (5) |
|
Using Machine Learning Data |
|
|
406 | (1) |
|
|
407 | (2) |
|
|
409 | (3) |
|
|
412 | (1) |
15 Real-World Considerations |
|
413 | (32) |
|
|
414 | (2) |
|
|
416 | (9) |
|
|
416 | (3) |
|
|
419 | (1) |
|
|
420 | (1) |
|
|
420 | (1) |
|
|
421 | (1) |
|
|
422 | (1) |
|
|
422 | (2) |
|
|
424 | (1) |
|
|
424 | (1) |
|
|
425 | (1) |
|
|
425 | (1) |
|
The Programming Environment |
|
|
425 | (5) |
|
|
426 | (1) |
|
|
426 | (1) |
|
|
426 | (1) |
|
|
427 | (1) |
|
Working with Different Personalities |
|
|
428 | (1) |
|
Navigating Workplace Culture |
|
|
429 | (1) |
|
|
430 | (1) |
|
Development Methodologies |
|
|
430 | (2) |
|
|
432 | (4) |
|
|
432 | (1) |
|
|
432 | (1) |
|
|
433 | (3) |
|
Reusing Code or Writing Your Own |
|
|
436 | (1) |
|
|
436 | (6) |
|
|
437 | (2) |
|
|
439 | (1) |
|
|
440 | (1) |
|
|
440 | (1) |
|
Bug Reporting and Tracking |
|
|
441 | (1) |
|
|
441 | (1) |
|
|
441 | (1) |
|
|
442 | (1) |
|
|
443 | (1) |
|
|
444 | (1) |
Index |
|
445 | |