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
|
---
theme: metropolis
header-includes: |
\usepackage{tabu}
\let\tightlist\relax
---
## \faIcon{comments} Wiederholung: Informationsübertragung \hfill 1/3
Nimm Stellung zu folgender Aussage:
\vspace{0.4cm}
> Information kann übertragen werden, wenn sie durch Codierung in eine feste Darstellung gebracht wurde.
\pause
\boldred{Falsch!} Wir brauchen auch ein \boldred{Medium}.
## \faIcon{comments} Wiederholung: Informationsübertragung \hfill 2/3 {.t}
Nimm Stellung zu folgender Aussage:
::: {.columns align=center}
:::: {.column width=60%}
\vspace{-0.4cm}
> Der Zaubertrick funktioniert für eine beliebige Anzahl an Karten.
\only<2->{
\boldred{Jein!} Die Zahl der ausgelegten Karten ist egal nicht die Anzahl der umgedrehten.
}
::::
:::: {.column width=40%}
\begin{tikzpicture}[card/.style={minimum width=1cm, minimum height=1.75cm, rounded corners=3pt, draw}]
\node[card, fill=red] (c11) {};
\node[card, fill=black, right=0.1cm of c11] (c12) {};
\node[card, fill=red, right=0.1cm of c12] (c13) {};
\node[card, fill=red, right=0.1cm of c13] (c14) {};
\node[card, fill=red, below=0.1cm of c11] (c21) {};
\node[card, fill=black, right=0.1cm of c21] (c22) {};
\node[card, fill=black, right=0.1cm of c22] (c23) {};
\node[card, fill=black, right=0.1cm of c23] (c24) {};
\node[card, fill=red, below=0.1cm of c21] (c31) {};
\node[card, fill=black, right=0.1cm of c31] (c32) {};
\node[card, fill=red, right=0.1cm of c32] (c33) {};
\node[card, fill=red, right=0.1cm of c33] (c34) {};
\node[card, fill=blue, below=0.1cm of c31] (c41) {};
\node[card, fill=red, right=0.1cm of c41] (c42) {};
\node[card, fill=red, right=0.1cm of c42] (c43) {};
\node[card, fill=red, right=0.1cm of c43] (c44) {};
\end{tikzpicture}
::::
:::
## \faIcon{comments} Wiederholung: Informationsübertragung \hfill 3/3
Nimm Stellung zu folgender Aussage:
\hspace{0.4cm}
> Da die IBAN eine Prüfziffer hat, können keine zwei IBANs mit gleicher Prüfziffer existieren.
\pause
\boldred{Falsch!} Es gibt viel mehr IBANs als Prüfziffern.
Vielfache von 97 haben die selbe Prüfziffer.
## Informationen digital speichern und weitergeben {.t}
**Bekannt:**
Informationen brauchen eine physische Repräsentation, ein \boldred{Medium}, zur Übertragung
\pause
### Wie machen das Computer?
\vspace{0.2cm}
::: {.columns align=center}
:::: {.column width=50%}

::::
:::: {.column width=50%}

::::
:::
\pause
Wir brauchen ein \boldred{binäres} Signal (**an** oder **aus**).
## \faIcon{pencil-alt} Die kleinste Einheit von Information {.t}
\vspace{1.5cm}
\begin{merke}
Die kleinste Einheit der digitalen Information nennt man \boldred{Bit}.
\pause
Ein \boldred{Bit} kann genau `1` oder `0` speichern.
\pause
Bit ist ein \textit{Kunstwort} aus \textbf{binary} und \textbf{digit}.
\end{merke}
\vfill
\only<4>{ Schon ganz ok aber wir wollen doch mehr speichern. }
## Zurück zur Codierung
Um beliebige Informationen mit mehreren \boldred{Bits} darzustellen, müssen diese erst in Zahlen umgewandelt werden.
Diese Zahlen werden dann in einem Zahlensystem codiert das nur mit **Einsen** und **Nullen** auskommt: Das \boldred{Binärsystem}.
\vspace{0.5cm}
\pause
### Digitale Informationen
`Information -> Codiert als Zahl -> Zahl codiert im Binärsystem`
## \faIcon{pencil-alt} Stellenwertsysteme {.t}
\begin{merke}
Das Binärsystem ist, genau wie das uns bekannte Dezimalsystem, ein \boldred{Stellenwertsystem}.
\pause
In einem \boldred{Stellenwertsystem} hängt der Wert einer Ziffer von ihrer Position und der \boldred{Basis} des Zahlensystems ab.
\end{merke}
\vspace{0.5cm}
\only<3->{
\textbf{\large Dezimalsystem (Basis 10)}
\begin{tabular}{l c c c c}
\textcolor{purple}{Dezimalzahl:} & \textcolor{purple}{4} & \textcolor{purple}{3} & \textcolor{purple}{0} & \textcolor{purple}{3} \\
\textcolor{green!70!black}{Stellenwert:} & \textcolor{green!70!black}{$10^3$} & \textcolor{green!70!black}{$10^2$} & \textcolor{green!70!black}{$10^1$} & \textcolor{green!70!black}{$10^0$} \\
\end{tabular}
}
\only<4->{
\vspace{0.5cm}
$\textcolor{purple}{4} \cdot \textcolor{green!70!black}{1000} + \textcolor{purple}{3} \cdot \textcolor{green!70!black}{100} + \textcolor{purple}{0} \cdot \textcolor{green!70!black}{10} + \textcolor{purple}{3} \cdot \textcolor{green!70!black}{1} = 4303_{10}$
}
## \faIcon{pencil-alt} Binärsystem
Das Binärsystem ist ein Stellenwertsystem mit \boldred{Basis 2}.
\begin{tabu}{l c c c c}
\rowfont{\color{purple}}Binärzahl: & 1 & 0 & 0 & 1 \\
\rowfont{\color{green!70!black}}Stellenwert: & $2^3$ & $2^2$ & $2^1$ & $2^0$ \\
\end{tabu}
\vspace{0.5cm}
### Binärzahl $\rightarrow$ Dezimalzahl
$1001_2 = \textcolor{purple}{1} \cdot \textcolor{green!70!black}{8} + \textcolor{purple}{0} \cdot \textcolor{green!70!black}{4} + \textcolor{purple}{0} \cdot \textcolor{green!70!black}{2} + \textcolor{purple}{1} \cdot \textcolor{green!70!black}{1} = 9_{10}$
\pause
\vspace{0.5cm}
### Dezimalzahl $\rightarrow$ Binärzahl
$22_{10} = \textcolor{purple}{1} \cdot \textcolor{green!70!black}{16} + \textcolor{purple}{0} \cdot \textcolor{green!70!black}{8} + \textcolor{purple}{1} \cdot \textcolor{green!70!black}{4} + \textcolor{purple}{1} \cdot \textcolor{green!70!black}{2} + \textcolor{purple}{0} \cdot \textcolor{green!70!black}{1} = 10110_2$
## Peinliche Informatiker*innen Witze
::: {.columns align=center}
:::: {.column width=50% align=center}
\centering
\huge $1 + 1 = 10$
::::
:::: {.column width=50%}

::::
:::
## \faIcon{pencil-alt} Arbeitsauftrag: Zahlenumwandlung \hfill 7 min
\Large
1. Rechne die Dezimalzahl $42_{10}$ in ihre Binärdarstellung um
2. Rechne die Binärzahl $110101_2$ in ihre Dezimaldarstellung um
## \faIcon{pencil-alt} Arbeitsauftrag - Lösung
\Large
1. $42_{10} = 1\cdot 32 + 0 \cdot 16 + 1\cdot 8 + 0 \cdot 4 + 1 \cdot 2 + 0 \cdot 1 = 10101_2$ \pause
2. $110101_2 = 1 \cdot 32 + 1 \cdot 16 + 0 \cdot 8 + 1 \cdot 4 + 0 \cdot 2 + 1 \cdot 1 = 53$
##
\large
Wie stellen wir mehrere Binärzahlen in Folge dar?
\pause Ähnliches Problem wie beim Morse code!
Wo endet die eine wo beginnt die Andere?
\pause
### Lösung
Wir stellen Binärzahlen immer in festen Blöcken dar.
\faIcon{pencil-alt} Der kleinste solche Block besteht aus 8 Bit und wird \pause \boldred{Byte} genannt
## \faIcon{pencil-alt} Arbeitsauftrag: BYTE_MAX \hfill 7 min
\large
Begründe was die größte Dezimalzahl ist, die eine Byte darstellen kann.
\pause
### Lösung
>* Jedes Bit kann zwei Werte darstellen (1 und 0).
>* Jedes Zusätzliche Bit verdoppelt die Anzahl der darstellbaren Zahlen
>* Ein Byte (8 Bits) kann deshalb $2^8$ Zahlen darstellen
>* Die kleinste ist Null
>* Die größte ist $2^8 - 1 = 255$
## Was ist mit den Menschen?
Die Binärdarstellung wird durch die Funktionsweise von Computern erzwungen.
Für den Menschen ist sie aber schwer verständlich und sehr lang.
Deshalb existiert das \boldred{Hexadezimalzahl} als Mittelweg.
## \faIcon{pencil-alt} Hexadezimalsystem {.t}
\begin{merke}
Das Hexadezimalzahl ist ein \textbf{Stellenwertsystem} mit der \boldred{Basis 16}.
\pause
Dabei bilden die \textbf{11.} bis zur \textbf{16.} Ziffer die Großbuchstaben \boldred{A} bis \boldred{F}.
\end{merke}
\only<3->{
\begin{tabu}{l c c c}
\rowfont{\color{purple}}Hex-Zahl: & D & 2 & E \\
\rowfont{\color{green!70!black}}Stellenwert: & $16^2$ & $16^1$ & $16^0$ \\
\end{tabu}
}
\only<4->{
$D2E_{16} = \textcolor{purple}{13} \cdot \textcolor{green!70!black}{256} + \textcolor{purple}{2} \cdot \textcolor{green!70!black}{16} + \textcolor{purple}{14} \cdot \textcolor{green!70!black}{1} = 3374_{10}$
}
\only<5->{
\textbf{\large Vorteil}
Ein Byte ist mit zwei Ziffern darstellbar.
\begin{tabular}{c c}
$\textcolor{blue}{1110}\textcolor{orange}{0111}_2$ & $\textcolor{blue}{2}\textcolor{orange}{A}_{16}$ \\
= & = \\
$\textcolor{blue}{E}\textcolor{orange}{7}_{16}$ & $\textcolor{blue}{0010}\textcolor{orange}{1010}_2$ \\
\end{tabular}
}
## Arbeitsauftrag: Text im Dezimalsystem (ASCII)
Um Text in Zahlen umzuwandeln gibt es den ASCII-Standard.
Dieser definiert Tabellen zur Umwandlung von Zeichen in Zahlen.
1. Öffne eine ASCII-Tabelle aus dem Internet
2. Wandle die Zahlenfolgen in Text um
* $00111010_2$, $00101101_2$, $01110000_2$
* $3A_{16}$, $27_{16}$, $7D_{16}$
3. ASCII verwendet nur 7 Bit. Wie viele Zeichen lassen sich damit darstellen?
4. Kodiere das Wort "Hallo" im Dezimalsystem
|