Skip to content

Commit 837510a

Browse files
committed
Revise L09
1 parent 20cd5ed commit 837510a

1 file changed

Lines changed: 35 additions & 36 deletions

File tree

09_Rechnerarithmetik.md

Lines changed: 35 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
author: Sebastian Zug & André Dietrich & Fabian Bär
44
email: sebastian.zug@informatik.tu-freiberg.de & andre.dietrich@informatik.tu-freiberg.de & fabian.baer@student.tu-freiberg.de
5-
version: 0.0.6
5+
version: 0.0.7
66
language: de
77
narrator: Deutsch Female
88
@@ -630,43 +630,42 @@ Wir starten aus der Sicht eines einzigen Bits und erweitern die Konzepte dann au
630630

631631
Um das Ergebnis komplett darzustellen müsen wir für die Addition (Subtraktion als Komplementoperation) neben dem Ergebnis $S$ auch die Carry Flags $C$ berücksichtigen.
632632

633-
<table>
634-
<tr>
635-
<td>
633+
<section style="display: flex; flex-wrap: wrap; justify-content: space-between;">
634+
635+
<div style="width: 46%; float: left">
636+
636637
Erweiterte Wahrheitstabelle
637-
</td>
638-
<td>
639-
Gleichungen
640-
</td>
641-
</tr>
642-
<tr>
643-
<td>
638+
644639
<!-- data-type="none" -->
645640
| $A$ | $B$ | $S$ | $C$ |
646641
| --- | --- | --- | --- |
647642
| 0 | 0 | 0 | 0 |
648643
| 0 | 1 | 1 | 0 |
649644
| 1 | 0 | 1 | 0 |
650645
| 1 | 1 | 0 | 1 |
651-
</td>
652-
<td>
646+
647+
</div>
648+
<div style="width: 46%; float: right">
649+
650+
Gleichungen
651+
653652
$$
654653
\begin{aligned}
655654
S &= \overline{A} \cdot B + A \cdot \overline{B} = A \oplus B \\
656655
C &= A \cdot B
657656
\end{aligned}
658657
$$
659-
</td>
660-
</tr>
661-
</table>
658+
</div>
659+
660+
</section>
662661

663662
Die Wahrheitstafel lässt sich mit folgendem Schaltnetz umsetzen:
664663

665664
![Bild](./images/09_Arithmetik/Half_Adder.svg.png)<!-- style="width: 30%; max-width: 800px;" -->
666665

667666
![Bild](./images/09_Arithmetik/Half_Adder_Symbol.png)<!-- style="width: 15%; max-width: 600px;" -->
668667

669-
``` json @DigiSim.evalJson
668+
```json @DigiSim.evalJson
670669
{"devices":{"a":{"label":"a","type":"Button","propagation":0,"position":{"x":15,"y":0}},"b":{"label":"b","type":"Button","propagation":0,"position":{"x":15,"y":50}},"s":{"label":"s","type":"Lamp","propagation":1,"position":{"x":315,"y":45}},"cout":{"label":"cout","type":"Lamp","propagation":1,"position":{"x":315,"y":0}},"xor":{"label":"a xor b","type":"Xor","propagation":1,"bits":1,"position":{"x":160,"y":50}},"and":{"label":"a and b","type":"And","propagation":1,"bits":1,"position":{"x":155,"y":-5}}},"connectors":[{"from":{"id":"a","port":"out"},"to":{"id":"and","port":"in1"}},{"from":{"id":"b","port":"out"},"to":{"id":"and","port":"in2"}},{"from":{"id":"and","port":"out"},"to":{"id":"cout","port":"in"}},{"from":{"id":"a","port":"out"},"to":{"id":"xor","port":"in1"}},{"from":{"id":"b","port":"out"},"to":{"id":"xor","port":"in2"}},{"from":{"id":"xor","port":"out"},"to":{"id":"s","port":"in"}}],"subcircuits":{}}
671670
```
672671

@@ -679,17 +678,12 @@ Die Wahrheitstafel lässt sich mit folgendem Schaltnetz umsetzen:
679678

680679
Die allgemeingültige Addition von $A_i$, $B_i$ und $C_{i–1}$ an den Bitpositionen $i = 1, ... , n–1$ erfordert einen Volladdierer (FA = „Full Adder“), der die Summe $S_i$ und den Übertrag $C_i$ bestimmt:
681680

682-
<table>
683-
<tr>
684-
<td>
681+
<section style="display: flex; flex-wrap: wrap; justify-content: space-between;">
682+
683+
<div style="width: 46%; float: left">
684+
685685
Erweiterte Wahrheitstabelle
686-
</td>
687-
<td>
688-
Gleichungen
689-
</td>
690-
</tr>
691-
<tr>
692-
<td>
686+
693687
<!-- data-type="none" -->
694688
| $A_i$ | $B_i$ | $C_{i-1}$ | $S_i$ | $C_i$ |
695689
| ----- | ----- | --------- | ----- | ----- |
@@ -701,8 +695,12 @@ Gleichungen
701695
| 1 | 0 | 1 | 0 | 1 |
702696
| 1 | 1 | 0 | 0 | 1 |
703697
| 1 | 1 | 1 | 1 | 1 |
704-
</td>
705-
<td>
698+
699+
</div>
700+
<div style="width: 46%; float: right">
701+
702+
Gleichungen
703+
706704
$$
707705
\begin{aligned}
708706
S_i &= A_i \oplus B_i \oplus C_{i-1}\\
@@ -712,17 +710,18 @@ C_i &= (\overline{A_i}B_i + A_i\overline{B_i} )C_{i-1} + A_iB_i \\
712710
C_i &= (A_i + B_i)C_{i-1} + A_iB_i \\
713711
\end{aligned}
714712
$$
715-
</td>
716-
</tr>
717-
</table>
713+
714+
</div>
715+
716+
</section>
718717

719718
> **Aufgabe:** Die obigen Gleichungen sind identisch und unterscheiden sich nur durch $\oplus$ und $+$. Erklären Sie den vermeintlichen Widerspruch.
720719
721720
![](./images/09_Arithmetik/Full_Adder.svg.png)<!-- style="width: 45%; max-width: 600px;" -->
722721

723722
![](./images/09_Arithmetik/Full_Adder_Symbol_2HA.png)<!-- style="width: 15%; max-width: 800px;" -->
724723

725-
``` json @DigiSim.evalJson
724+
```json @DigiSim.evalJson
726725
{"devices":{"a":{"label":"a","type":"Button","propagation":0,"position":{"x":15,"y":0}},"b":{"label":"b","type":"Button","propagation":0,"position":{"x":15,"y":50}},"cin":{"label":"cin","type":"Button","propagation":0,"position":{"x":15,"y":100}},"s":{"label":"s","type":"Lamp","propagation":1,"position":{"x":470,"y":70}},"cout":{"label":"cout","type":"Lamp","propagation":1,"position":{"x":540,"y":-5}},"xor1":{"label":"a xor b","type":"Xor","propagation":1,"bits":1,"position":{"x":140,"y":20}},"xor2":{"label":"(a xor b) xor cin","type":"Xor","propagation":1,"bits":1,"position":{"x":275,"y":75}},"and1":{"label":"(a xor b) and cin","type":"And","propagation":1,"bits":1,"position":{"x":290,"y":25}},"and2":{"label":"a and b","type":"And","propagation":1,"bits":1,"position":{"x":210,"y":-25}},"or":{"label":"((a xor b) and cin) or (a and b)","type":"Or","propagation":1,"bits":1,"position":{"x":380,"y":-30}}},"connectors":[{"from":{"id":"xor2","port":"out"},"to":{"id":"s","port":"in"}},{"from":{"id":"xor1","port":"out"},"to":{"id":"xor2","port":"in1"}},{"from":{"id":"cin","port":"out"},"to":{"id":"xor2","port":"in2"}},{"from":{"id":"a","port":"out"},"to":{"id":"xor1","port":"in1"}},{"from":{"id":"b","port":"out"},"to":{"id":"xor1","port":"in2"}},{"from":{"id":"cin","port":"out"},"to":{"id":"and1","port":"in2"},"vertices":[{"x":225,"y":115}]},{"from":{"id":"xor1","port":"out"},"to":{"id":"and1","port":"in1"}},{"from":{"id":"a","port":"out"},"to":{"id":"and2","port":"in1"}},{"from":{"id":"b","port":"out"},"to":{"id":"and2","port":"in2"},"vertices":[{"x":105,"y":25}]},{"from":{"id":"and1","port":"out"},"to":{"id":"or","port":"in2"}},{"from":{"id":"and2","port":"out"},"to":{"id":"or","port":"in1"}},{"from":{"id":"or","port":"out"},"to":{"id":"cout","port":"in"}}],"subcircuits":{}}
727726
```
728727

@@ -741,7 +740,7 @@ Das Carry wird von Stelle zu Stelle weitergegeben, woraus der Name „Ripple Car
741740

742741
### Umsetzung eines Addier-/Subtrahier-Werkes
743742

744-
Wie lässt sich ausgehend von diesen Überlegungen ein 4-Bit Addier-/Subtrahierwerk realisieren. Wir wollen die Funktion $A+B$ sowie $A-B$ umsetzen können.
743+
Wie lässt sich ausgehend von diesen Überlegungen ein 4-Bit Addier-/Subtrahierwerk realisieren. Wir wollen die Funktion $A+B$ sowie $A-B$ für die niedrigsten 4 Bit umsetzen können.
745744

746745
> **Aufgabe:** Entwerfen Sie die externe Beschaltung!
747746
@@ -799,7 +798,7 @@ Ein Carry-Save-Addierer wird verwendet, um die Summe von drei oder mehr Binärza
799798
+ 11001 (b) 25
800799
+ 01011 (c) 11
801800
------- ----
802-
00001 Summe ohne Carrys 1
801+
00001 Summe ohne Carrys 1
803802
11011 Carry Flags 54
804803
------ ----
805804
110111 Gesamtsumme 55
@@ -880,5 +879,5 @@ Ergebnis: 1010100111001010 (43466)
880879

881880
## Übungsaufgaben
882881

883-
+ Implementieren Sie einen 2Bit Multiplikator in einer Simulation. Welche Breite braucht man für das Ausgangsregister.
882+
+ Implementieren Sie einen 2Bit Multiplikator in einer Simulation. Welche Breite braucht man für das Ausgangsregister?
884883
+ Realisieren Sie ein Subtraktions- / Additionswerk

0 commit comments

Comments
 (0)