Skip to content

Instantly share code, notes, and snippets.

@d630
Last active May 30, 2018 22:15
Show Gist options
  • Save d630/0baea4bd425848f9827f4dda018ed452 to your computer and use it in GitHub Desktop.
Save d630/0baea4bd425848f9827f4dda018ed452 to your computer and use it in GitHub Desktop.
  1. Vervollständigen Sie folgende Tabelle[18P]:

    Dezimale Zahl Binäre Zahl Hexadezimale Zahl
    327
    1100 1101
    0xA4
    18
    1000 1111
    0x4A
    1088
    1001
    0x100
    Dezimale Zahl Binäre Zahl Hexadezimale Zahl
    327 0001 0100 0111 147
    205 1100 1101 CD
    164 1010 0100 0xA4
    18 0001 0010 12
    143 1000 1111 8F
    74 0100 1010 0x4A
    1088 0100 0100 0000 440
    9 1001 9
    256 0001 0000 0000 0x100
  2. Berechnen Sie binär [20P]:

    56 + 48
    103 - 17
    0xFC + 0x10
    -332 + 34
    [56]10 + [48]10 = [104]10
    [0011 1000]2 + [0011 0000]2 = [0110 1000]2
    
    [103]10 - [17]10 = [86]10
    [0110 0111]2 - [0001 0001]2 = [0101 0110]2
    
    // nun mit Kodierung im Zweierkomplement:
    [-17]10 = NOT[0001 0001]2 + [0001]2 = [1110 1110]2 + [0001]2 = [1110 1111]2
    [0110 0111]2 + [1110 1111]2 = [0001 0101 0110]2
    
    [FC]16 + [10]16 = [10C]16
    [1111 1100]2 + [0001 0000]2 = [0001 0000 1100]2
    
    [-332]10 + [34]10 = [-298]10
    [34]10 = [0010 0010]2
    [332]10 = [0001 0100 1100]2
    [-332]10 = NOT[0001 0100 1100]2 + [0001]2 = [1110 1011 0011]2 + [0001]2 = [1110 1011 0100]2
    [0010 0010]2 + [1110 1011 0100]2 = [1110 1101 0110]2
  3. Stellen Sie die folgenden Zahlen binär als 8bit signed integer dar [12P]:

    1001
    0x5F
    -127
    -56
    // 8bit hat höchstens 2^8 - 1 Werte verteilt auf 8 Stellen. Eine Stelle
    // wird gebraucht, um Vorzeichen anzuzeigen, also 2^7 - 1 Werte auf 7
    // Stellen.
    // [1001]10 > [127]10
    [127]10 = [0111 1111]2
    //[0111 1111]'2 = NOT[0111 1111]2 + [0001]2 = [1000 0000]2 + [0001]2 = [1000 0001]2
    
    [5F]16 = [0101 1111]2
    //[0101 1111]'2 = NOT[0101 1111]2 + [0001]2 = [1010 0000]2 + [0001]2 = [1010 0001]2
    
    [127]10 = [0111 1111]2
    [-127]10 = NOT[0111 1111]2 + [0001]2 = [1000 0000]2 + [0001]2 = [1000 0001]2
    
    [56]10 = [0011 1000]2
    [-56]10 = NOT[0011 1000]2 + [0001]2 = [1100 0111]2 + [0001]2 = [1100 1000]2
  4. Dekodieren Sie folgende BCD 8-4-2-1 codierte Zahlen [6P]:

    0011 0101 1001 0111
    1001 0000 1000 0101 0011 0100 0011 0010 0000
    3 5 9 7
    9 0 8 5 3 4 3 2 0
  5. Zeichnen Sie die Wahrheitswertetabellen (2 Eingänge) für die folgenden logischen Verknüpfungen [12P]:

    XOR
    NAND
    OR

    2^2 = 4

    A B Y = A ⊻ B
    0 0 0
    0 1 1
    1 0 1
    1 1 0
    A B A ∧ B Y = A ⊼ B
    0 0 0 1
    0 1 0 1
    1 0 0 1
    1 1 1 0
    A B Y = A ∨ B
    0 0 0
    0 1 1
    1 0 1
    1 1 1
  6. Zeichnen Sie die Wahrheitstabelle für das untenstehende Gatter [6P]:

         +-------+
    A----|       |
    B----|   &   |o---x
    C---o|       |
         +-------+
    
    A───────────|&&
                |&&
    B───────────|&&───│>o───x
                |&&
    C────│>o────|&&

    2^3 = 8

    A B C x = ¬(A ∧ B ∧ ¬C)
    0 0 0 1
    0 0 1 1
    0 1 0 1
    0 1 1 1
    1 0 0 1
    1 0 1 1
    1 1 0 0
    1 1 1 1
  7. Berechnen Sie x für a = 1, b = 0 und c = 0 [6P]:

    x = ¬ab
    
    x = ¬(ab) ∧  a ∨  ¬b
    
    x = ¬a ∨  (c ∨  ¬b) ∧  ¬(ac)
    x = ¬ab
    x = ¬10
    x = 00
    x = 0
    
    x = ¬(ab) ∧  a ∨  ¬b
    x = ¬(10) ∧  1 ∨  ¬0
    x = ¬(1) ∧  11
    x = 011
    x = 01
    x = 1
    
    x = ¬a ∨  (c ∨  ¬b) ∧  ¬(ac)
    x = ¬1 ∨  (0 ∨  ¬0) ∧  ¬(10)
    x = 0 ∨  (01) ∧  ¬(1)
    x = 0 ∨  (1) ∧  0
    x = 00
    x = 0
10 * 11^2 = 42

a)

11 sei binär in 2'S:

* 10(42) 11(2) 11(2) = 42(10)
* 10(42) -1(10) -1(10) = 42(10)

b)

Erlaubt seien Stellenwertsysteme mit den Basen 2..16. Also mögliche Werte im Dezimalsystem:

* 2..16 3..17 3..17 = 18..66..4

Dann 8 Möglichkeiten:

* 10(2) 11(2) 11(2) = 42(4) = 18(10)
* 10(2) 11(2) 11(4) = 42(7) = 30(10)
* 10(2) 11(2) 11(6) = 42(10) = 42(10)
* 10(2) 11(2) 11(8) = 42(13) = 54(10)
* 10(2) 11(2) 11(10) = 42(16) = 66(10)
* 10(2) 11(4) 11(4) = 42(12) = 50(10)
* 10(3) 11(2) 11(5) = 42(13) = 54(10)
* 10(6) 11(2) 11(2) = 42(13) = 54(10)

Am besten:

* 10(3) 11(2) 11(5) = 42(13) = 54(10)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment