Information Management

System Architecture

Exercise 2: More Logic and Binary Arithmetic

  1. Show how each of the following can be expressed using only NAND gates:
    1. not(A)
    2. A+B
    3. A.B
    4. not(A) + B
    5. not(A).B
    6. not(A).not(B)
    7. A^B (exclusive or)

  2. A circuit has three inputs, A, B, and C. It is to output Z = 1 when A and B are both 1 and C is 0, or when B and C are 1 and A is 0, and Z = 0 in all other cases. Draw the truth table for this circuit, and device a simple circuit to do this.

  3. What are each of the following binary numbers in decimal form?
    1. 101
    2. 1101
    3. 111
    4. 1111
    5. 101010

  4. Find in binary form and then verify in decimal form:
    1. 101 + 111
    2. 1010 + 10
    3. 11 + 10110
    4. 101 + 101011

  5. Express the following decimal numbers in binary form:
    1. 5
    2. 33
    3. 17
    4. 18
    5. 72
    6. 127

  6. In the lecture we saw how to build a circuit that outputs a binary number representing the sum of two binary inputs A, B. Suppose that the circuit is to output the sum of two 2-digit binary numbers. Let the first number be A represented by binary digits A1 A0 and the second be B represented by B1 and B0. For example if A represented the decimal number 3 then A0 = 1 and A1 = 1. If B represented 2 then B0 = 0 and B1 = 2. The answer would be Z = 5, which requires three lines of output Z0, Z1, and Z2 (representing the binary number 101). Design such a circuit. Consider how to design a circuit for the addition of two 3-digit numbers (though don't actually do it).
Back to Exercises Page

Back to System Architecture Home Page