Lernpfad:Das Dualsystem/10
Betrachte erneut 4-Bit Dualzahlen. Mit vier Bit können insgesamt 16 Zahlen dargestellt werden. Von [math]\displaystyle{ (0000)_2 = (0)_{10} }[/math] bis [math]\displaystyle{ (1111)_2 = (15)_{10} }[/math].
Was aber, wenn wir auch negative Zahlen im Binärsystem darstellen wollen?
- Überlegt Euch, wie man negative Zahlen im Dualsystem darstellen kann.
- Welche Zahlen können nach Eurem Verfahren mit 4 Bit dargestellt werden?
- Probiert die Addition von Binärzahlen aus. Funktioniert sie noch, wie zuvor?
Die Vorzeichenbit-Darstellung
Bei n-Bit Zahlen in Vorzeichenbit-Darstellung (VzD) wird das höchstwertige Bit (das Bit ganz links für die Potenz [math]\displaystyle{ 2^{n−1} }[/math]) für das Vorzeichen reserviert (0
=positiv, 1
=negativ). Es verbleiben also [math]\displaystyle{ n − 1 }[/math] Bit für die Darstellung des Zahlwertes.
4-Bit VzD: | [math]\displaystyle{ (0011)_2 = (3)_{10} }[/math] | [math]\displaystyle{ (1011)_2 = (-3)_{10} }[/math] | 7-Bit VzD: | [math]\displaystyle{ (0001000)_2 = (8)_{10} }[/math] | [math]\displaystyle{ (1001000)_2 = (-8)_{10} }[/math] |
Für die VzD ist also von Bedeutung, wie viele Bit eine Dualzahl maximal haben kann.
Forme die 6-Bit VzD Zahlen ins Dezimalsystem um:
- [math]\displaystyle{ (010101)_2 }[/math]
- [math]\displaystyle{ (101010)_2 }[/math]
- [math]\displaystyle{ (000000)_2 }[/math]
- [math]\displaystyle{ (100000)_2 }[/math]
Forme die 6-Bit VzD Zahlen ins Dezimalsystem um:
- [math]\displaystyle{ (010101)_2 = (21)_{10} }[/math]
- [math]\displaystyle{ (101010)_2 = (-10)_{10} }[/math]
- [math]\displaystyle{ (000000)_2 = (0)_{10} }[/math]
- [math]\displaystyle{ (100000)_2 = (-0)_{10} }[/math] (!!)