aboutsummaryrefslogtreecommitdiff
path: root/slides/2019-it-intro-computer-structure/src/body.tex
blob: 5f98f22fb1d283baa8fe59429a3c5471bd9697e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
\begin{frame}
  \frametitle{Motivation}
  \begin{columns}
    \begin{column}{0.59\linewidth}
      \includegraphics[height=0.8\textheight]{img/computers-everywhere}
      %\burl{http://images.slideplayer.com/26/8674558/slides/slide_3.jpg}
    \end{column}
    \begin{column}{0.39\linewidth}
      \begin{itemize}
        \item What can a computer do?
        \item How do you choose one?
      \end{itemize}
    \end{column}
  \end{columns}
\end{frame}

\begin{frame}
  \frametitle{Learning outcome based on syllabus}
  \begin{itemize}
    \item Describe the components of a computer and their interaction
      (ISGA01)
    \item Give an account of the components of a computer and their
      interaction (ISGA06)
    \item Give an account of the components of a computer and how they interact
      (ISGA90)
  \end{itemize}
  \vfill\centering
  \smartdiagramset{
    sequence item height=1.75cm,
    sequence item width=2.5cm,
    sequence item text width = 2.4cm,
  }
  \smartdiagram[sequence diagram]{%
    What is a computer?,%
    How is information processed?,%
    Hardware components and purpose?%
  }
\end{frame}

%\begin{frame}
%  \frametitle{The first computers}
%  %The first computer? Z3 by Konrad Zuse (Germany, 1941)}
%  \begin{columns}
%    \begin{column}{0.59\textwidth}
%      \includegraphics[width=\textwidth]{img/z3}
%      %\burl{https://www.livescience.com/20718-computer-history.html}
%    \end{column}
%    \begin{column}{0.39\textwidth}
%      % Say but not in slide:
%      % - Brief history of Zuse (it's a funny story)
%      % - Z3 destroyed in world-war II, rebuild in 1960 and now in museum
%      % - MUL -> 3s :)
%      \begin{itemize}
%        \item 2000 `brain cells'
%        \item Program is a punched film\footnotemark
%        \item Keyboard for input
%        \item Lamps for output
%      \end{itemize}
%      Other:
%      \begin{itemize}
%        \item ENIAC (1946)
%      \end{itemize}
%    \end{column}
%  \end{columns}
%  \footnotetext[1]{\tiny{Play with punch cards: \burl{https://www.vintageisthenewold.com/living-like-the-pioneers-code-fortran-in-a-punch-card/}}}
%\end{frame}

\begin{frame}
  \frametitle{A typical computer}
  \centering\includegraphics[width=0.7\textwidth]{img/binary}
  %\burl{http://amusementpark3.blogspot.com/2010/10/blog-entry-41.html}
\end{frame}

\begin{frame}
  \frametitle{Current computer definitions in Swedish and English}
  \begin{itemize}
    \item Digital enhet f\"{o}r ber\"{a}kning, symbolbehandling och
      kommunikation\footnote{%
        \burl{https://www.ne.se/uppslagsverk/encyklopedi/l\%C3\%A5ng/dator}
      }
    \item An electronic device for storing and processing data, typically in
      binary form, according to instructions given to it in a variable program%
      \footnote{%
        \burl{https://en.oxforddictionaries.com/definition/computer}
      }
    \item A computer is a device that can be instructed to carry out sequences
      of arithmetic or logical operations automatically via computer
      programming\footnote{%
        \burl{https://en.wikipedia.org/wiki/Computer}
      }
  \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{Information theory}
  \begin{columns}
    \begin{column}{0.79\textwidth}
      \begin{itemize}
        \item The smallest piece of information is binary
        \item One `bit' represents a zero or a one
        \item Example of sending a single bit?
        \item Example of sending multiple bits?
        %  
      \end{itemize}
    \end{column}
    \begin{column}{0.19\textwidth}
      \centering\includegraphics[width=\textwidth]{img/light-bulb}
    \end{column}
  \end{columns}
\end{frame}

\begin{frame}
  \frametitle{What does this mean?}
  \centering\Huge{\texttt{%
    01011001%
    01101111%
    01100100%
    01100001%
  }}
  \large\vfill\pause
  \alert{Many different things...}
  \vfill
  \centering
  \begin{itemize}
    \item 32-bit unsigned integer: 1500472417
    \item 32-bit floating point: $4.21143045\cdot 10^{15}$
    \item Groups of 8 bits: 89,~111,~100,~97
      \begin{itemize}
        \item Byte
        \item Number between 0--255 (\alert{why?})
      \end{itemize}
  \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{Information theory continued}
  \begin{columns}
    \begin{column}{0.49\textwidth}
      Decimal numbers as we know them:
      \begin{flalign*}
        107 &=
          \textcolor{red}{1}\cdot100 +
          \textcolor{red}{0}\cdot10 +
          \textcolor{red}{7}\cdot1 \\
            &=
          \textcolor{red}{1}\cdot\textcolor{blue}{10}^2 +
          \textcolor{red}{0}\cdot\textcolor{blue}{10}^1 +
          \textcolor{red}{7}\cdot\textcolor{blue}{10}^0
      \end{flalign*}
      A position is associated with 0--9 \\
      A position is weighted by $10^i$, $i\geq0$\\
      This is known as base \textcolor{blue}{10} \\
      \vspace{1cm}
      \pause
      \alert{Why is this intuitive for us?}
      \pause
    \end{column}
    \begin{column}{0.49\textwidth}
      Binary numbers follow the same idea:
      \begin{flalign*}
         1101 &=
          \textcolor{red}{1}\cdot8 +
          \textcolor{red}{1}\cdot4 +
          \textcolor{red}{0}\cdot2 +
          \textcolor{red}{1}\cdot1 \\
            &=
          \textcolor{red}{1}\cdot\textcolor{blue}{2}^3 +
          \textcolor{red}{1}\cdot\textcolor{blue}{2}^2 +
          \textcolor{red}{0}\cdot\textcolor{blue}{2}^1 +
          \textcolor{red}{1}\cdot\textcolor{blue}{2}^0 = 13
      \end{flalign*}
      A position is associated with 0--1 \\
      A position is weighted by $2^i$, $i\geq0$\\
      This is known as base \textcolor{blue}{2} \\
      \vspace{1cm}
      \pause
      \alert{Why is this intuitive for a computer?}
    \end{column}
  \end{columns}
  \centering
  \vfill
\end{frame}

\begin{frame}
  \frametitle{Now you can proudly wear this T-shirt!}
  \centering\includegraphics[height=0.8\textheight]{img/binary-joke}
\end{frame}

\begin{frame}
  \frametitle{Be aware of different unit systems}
  \begin{columns}
    \begin{column}{0.49\textwidth}
      \begin{tabular}{ccc}
        \toprule
        \textbf{unit} & \textbf{abbreviation} & \textbf{meaning} \\
        \midrule
        kilo & k & $10^3$ \\
        mega & M & $10^6$ \\
        giga & G & $10^9$ \\
        tera & T & $10^{12}$ \\
        \bottomrule
      \end{tabular}\\
      \vspace{6pt}
      (Decimal numbers as we know them)
      \vfill
    \end{column}
    \begin{column}{0.49\textwidth}
      \begin{tabular}{ccc}
        \toprule
        \textbf{unit} & \textbf{abbreviation} & \textbf{meaning} \\
        \midrule
        kibi & Ki & $2^{10}$ \\
        mebi & Mi & $2^{20}$ \\
        gibi & Gi & $2^{30}$ \\
        tebi & Ti & $2^{40}$ \\
        \bottomrule
      \end{tabular}\\
      \vspace{6pt}
      (Binary numbers, note $2^{10}=1024$)\\
    \end{column}
  \end{columns}
  \pause
  \vfill\centering
  \alert{``I bought a 500~GB hard drive, but Windows says it is 465.7~GB?''}
\end{frame}

\begin{frame}
  \frametitle{Amercian Standard Code for Information Interchange}
  \begin{columns}
    \begin{column}{0.79\textwidth}
      \centering\includegraphics[height=0.9\textheight]{img/ascii}
      %\burl{https://simple.wikipedia.org/wiki/ASCII\#/media/File:ASCII-Table-wide.svg}
    \end{column}
    \begin{column}{0.24\textwidth}
      \begin{itemize}
        \item 89: Y
        \item 111: o
        \item 100: d
        \item 97: a
        \pause
        \item \aa, \"{a}, \"{o}?
          \begin{itemize}
            \item UTF-8
            \item UTF-16
            \item UTF-32
          \end{itemize}
      \end{itemize}
    \end{column}
  \end{columns}
\end{frame}

\begin{frame}
  \frametitle{Divide yourself into small groups}
  %% Name required (or optional) parts in a typical computer
  \centering
  \includegraphics[height=0.5\textheight]{img/group}
  \\\Huge{Interactive exersice}
\end{frame}

\begin{frame}
  \frametitle{My office setup\footnote{\burl{https://www.dustinhome.se/favorites/index/9620211}}}
  \begin{columns}
    \begin{column}{0.49\textwidth}
      Computer case containing:
        \begin{itemize}
          \item Central Processing Unit (CPU)
          \item Random Access Memory (RAM)
          \item Solid State Drive (SSD)
          \item Hard drive (HDD)
          \item Power Supply Unit (PSU)
          \item Fan for CPU cooling
          \item Motherboard
        \end{itemize}
    \end{column}
    \begin{column}{0.49\textwidth}
      \centering
      \includegraphics[height=0.4\textheight]{img/case1}
      \includegraphics[height=0.4\textheight]{img/case2}
    \end{column}
  \end{columns}
\end{frame}

\begin{frame}
  \frametitle{Central Processing Unit (CPU) \titlefloatright{`Processor'}}
  \begin{columns}
    \begin{column}{0.59\textwidth}
      \begin{itemize}
        \item Does most of the computing
        \item Instruction set
          \begin{itemize}
            \item load
            \item store
            \item add
            \item conditional jump
            \item ...
          \end{itemize}
        \item Registers
        \item Clock speed
        \item Number of cores
      \end{itemize}
    \end{column}
    \begin{column}{0.39\textwidth}
      \centering
      \includegraphics[width=\textwidth]{img/cpu}
      Intel Core i7 7700K / 4.2~GHz processor LGA1151 Socket
    \end{column}
  \end{columns}
  \vfill\pause\centering\alert{Is faster clock speed always better?}
\end{frame}

\begin{frame}
   \frametitle{Gordon Moore predicted the number of transitors on a dense 
    integrated circuit}
   \begin{columns}
    \begin{column}{0.59\textwidth}
       \includegraphics[width=\textwidth]{img/moores-law}
       \burl{https://en.wikipedia.org/wiki/Moore\%27s\_law\#/media/File:Moore\%27s\_Law\_Transistor\_Count\_1971-2016.png}
    \end{column}
    \begin{column}{0.49\textwidth}
      \begin{itemize}
        \item Moore's law
          \begin{itemize}
            \item 1965: doubles every year
            \item 1975: doubles every two years
            \item $\approx$2025: dead
          \end{itemize}
        \item David House
          \begin{itemize}
            \item 18 months $\rightarrow$ 2x performance
          \end{itemize}
      \end{itemize}
    \end{column}
  \end{columns}
\end{frame}

\begin{frame}
  \frametitle{Different types of memory, all storing zeros and ones only!}
  \begin{columns}
    \begin{column}{0.49\textwidth}
      \input{img/memory}
    \end{column}
    \begin{column}{0.49\textwidth}
      \begin{itemize}
        \item HDD: `h\aa{}rddisk'
        \item SSD: `typ en h\aa{}rddisk'
        \item RAM: `internminne eller arbetsminne'
        \item Cache: on and nearby the CPU 
        \item Register: on the CPU
      \end{itemize}
    \end{column}
  \end{columns}
\end{frame}

\begin{frame}
  \frametitle{Different types of memory continued}
  \begin{columns}
    \begin{column}{0.33\textwidth}
      \centering
      HDD \\
      \includegraphics[width=\textwidth]{img/hdd}\\
      WD Blue 4TB 3.5" Serial ATA-600 \\
    \end{column}
    \begin{column}{0.33\textwidth}
      \centering
      SSD \\
      \includegraphics[width=\textwidth]{img/ssd} \\
      Crucial MX500 500GB Serial ATA-600 \\
    \end{column}
    \begin{column}{0.33\textwidth}
      \centering
      RAM \\
      \includegraphics[width=\textwidth]{img/ram} \\
      CORSAIR V LPX 32GB (2X16) DDR4 2400MHZ \\
    \end{column}
  \end{columns}
  \vspace{1cm}

  \pause
  \begin{columns}
    \begin{column}{0.49\textwidth}
      \begin{itemize}
        % biggest different is no moving vs moving parts
        % # most important from my point of view
        % - life time: no moving parts -> survive longer
        % - speed: no moving parts -> less work to do stuff
        % - price per GB: ssd much more expensive due to underlying tech
        % # important depending on use-case
        % - noise (ssd < hdd)
        % - temperature (ssd < hdd)
        % - energy consumption (ssd < hdd)
        % - weight (ssd < hdd)
        %
        % See more at: https://www.netonnet.se/Content/Info/ssd
        \item Trade-offs between SSD and HDD?
      \end{itemize}
    \end{column}
    \begin{column}{0.49\textwidth}
      \begin{itemize}
        % Depends on your use-case!
        \item How much RAM do you need?
      \end{itemize}
    \end{column}
  \end{columns}
\end{frame}

\begin{frame}
  \frametitle{Motherboard (or, the thing everything is attached to)
    \titlefloatright{`Moderkort'}}
  % ATX power connector: this is where you connect PSU
  % IDE connector: for hard drive, dvd, etc (newer: SATA)
  % North bridge or `memory controller': controls transfers between CPU
  %   and RAM; hence it is nearby both of these components
  % South bridge or `input/output controller': manages controllers between
  %   peripheral devices.
  % The term `bridge' is generally used when connecting two buses
  % Dynamic Vs Static ram -> has to do with underlying tech; static is
  %   faster but more expensive
  % CMOS Backup battery: to remember important stuff while shutdown, e.g.,
  %   BIOS settings and date.
  % AGP slot: for some graphic cards (legacy, nowadays PCI)
  % PCI slots: attach various extension cards here (i.e., daughter boards),
  %   e.g., network, audio, and graphic cards
  \begin{columns}
    \begin{column}{0.69\textwidth}
      \centering\includegraphics[width=\textwidth]{img/motherboard}
    \end{column}
    \begin{column}{0.29\textwidth}
      Contains at least:
      \begin{itemize}
        \item Processor slot
        \item Memory slot
        \item Connectors, e.g.,
          \begin{itemize}
            \item Power
            \item SATA
            \item SCSI
            \item ...
          \end{itemize}
        \item Control circuits
          \begin{itemize}
            \item BIOS
            \item Cache
            \item ...
          \end{itemize}
      \end{itemize}
    \end{column}
  \end{columns}
  \pause
  \vfill
  \centering\alert{What should you think about when you buy hardware?}
  % BIOS: Basic Input Output System
  %   - the first software to run when a computer is started
  %   - identifies and configures hardware, e.g., hard drive, CPU, memory, etc.
  %   - instructs the computer how to perform a number basic operations, e.g.,
  %   controlling the keyboard and booting the OS.
\end{frame}

\begin{frame}
  \frametitle{A newer motherboard: ASUS PRIME Z370-P \titlefloatright{Manual\footnote{%
    \burl{https://www.asus.com/us/Motherboards/PRIME-Z370-P/HelpDesk\_Manual/}
  }}}
  \centering\includegraphics[height=0.85\textheight]{img/new-motherboard2}
\end{frame}

\begin{frame}
  \frametitle{A newer motherboard continued}
  \centering\includegraphics[height=0.85\textheight]{img/moderkort}
\end{frame}

\begin{frame}
  \frametitle{Expantion cards usually use PCI(e)\titlefloatright{`Instickskort'}}
  \begin{columns}
    \begin{column}{0.33\textwidth}
      \hfill
      \centering
      % - It's common with 2000+ cores
      % - It has its own dedicated RAM (e.g., 8GB)
      % - Not so general purpose as a CPU, but it's good at what it does...
      % - Fun with GPUs? Cryptocurrency mining and password cracking!
      \alert{Graphics card} for complex math, geometry, and coloring
        (`grafikkort')
      \includegraphics[height=0.4\textheight]{img/graphics-card}
      %\burl{https://www.techpowerup.com/img/16-12-20/917a7803f315.jpg}\\
    \end{column}
    \begin{column}{0.33\textwidth}
      \hfill
      \centering
      \alert{Audio card} for enhanced sound experiences
        (`ljudkort')
      \includegraphics[height=0.4\textheight]{img/audio-card}
      %\burl{https://images-na.ssl-images-amazon.com/images/I/411rdurQRkL.jpg}
    \end{column}
    \begin{column}{0.33\textwidth}
      \hfill
      \centering
      % For special needs, e.g., WiFi or 10GBit/s Ethernet
      \alert{Network card} for data exchange over a computer network
        (`n\"{a}tverkskort')
      \includegraphics[height=0.4\textheight]{img/network-card}
    \end{column}
  \end{columns}
  \pause
  \vspace{0.5cm}
  \centering\alert{Is my office setup without graphics, sound, and Internet?!}
\end{frame}

\begin{frame}
  \frametitle{A few common external connectors}
  \begin{columns}
    \begin{column}{0.49\textwidth}
      \vbox to 0.8\textwidth{%
        \centering
        \alert{USB}\vspace{6pt}\\
        \includegraphics[width=0.8\textwidth]{img/usb1}
        \includegraphics[width=0.8\textwidth]{img/usb2}
        %\burl{https://www.bhphotovideo.com/explora/amp/computers/tips-and-solutions/thunderbolt-3-usb-31-usb-type-c-making-sense-connections}
        \vfill
        External HDD and devices
      }
    \end{column}
    \begin{column}{0.49\textwidth}
      \vbox to 0.8\textwidth{%
        \begin{columns}
          \begin{column}{0.49\textwidth}
            \centering\alert{HDMI}\vspace{6pt}\\
            \includegraphics[height=0.3\textheight]{img/hdmi}
          \end{column}
          \begin{column}{0.49\textwidth}
            \centering\alert{DP}\vspace{6pt}\\
            \includegraphics[height=0.3\textheight]{img/dp}
          \end{column}
        \end{columns}
        \centering\vfill
        Mainly video and audio
      }
    \end{column}
  \end{columns}
\end{frame}

\begin{frame}
  \frametitle{You will find the same basic components in every computer---Raspberry Pi}
  \begin{columns}
    \begin{column}{0.69\textwidth}
      \centering\includegraphics[height=0.8\textheight]{img/raspberrypi}\\
      \burl{https://www.raspberrypi.org/}
    \end{column}
    \begin{column}{0.29\textwidth}
      All components are embedded on a SoC:
      \begin{itemize}
        \item CPU
        \item Memory
        \item Connectors
        \item Control circuits
      \end{itemize}
    \end{column}
  \end{columns}
\end{frame}

\begin{frame}
  \frametitle{You will find the same basic components in every computer---MBP}
  \centering\includegraphics[height=0.8\textheight]{img/mbp}
  \burl{https://www.ifixit.com/Teardown/MacBook+Pro+15-Inch+Touch+Bar+Teardown/73395}
\end{frame}


\begin{frame}
  \frametitle{You will find the same basic components in every computer---iPhone}
  \centering\includegraphics[height=0.8\textheight]{img/iphone}
  \burl{https://www.ifixit.com/Teardown/iPhone+5s+Teardown/17383}
\end{frame}

\begin{frame}
  \frametitle{In the labs you will (de)assemble a computer}
  \begin{columns}
    \begin{column}{0.59\textwidth}
      \centering\includegraphics[width=\textwidth]{img/build-pc}
      %\burl{https://cdn.fstoppers.com/styles/large-16-9/s3/lead/2017/05/best\_pc\_build\_for\_adobe\_premiere.jpg}
    \end{column}
    \begin{column}{0.39\textwidth}
      \begin{itemize}
        \item Be grounded
        \item Be ``stern but fair''
        \item Be careful with cables
          \begin{itemize}
            \item Jank? No...
            \item Pull? Gently!
            \item Wiggle? If you must!
          \end{itemize}
        \item Attach in the right direction
        \item Avoid touching circuit boards
        \item Ask if you need help
      \end{itemize}
    \end{column}
  \end{columns}
\end{frame}

\begin{frame}
  \frametitle{Nervous? Prepare yourself by watching a computer being built}
  \centering\includegraphics[height=0.8\textheight]{img/video}
  \burl{https://www.youtube.com/watch?v=0bUghCx9iso}
\end{frame}