This assignment asks you to design three circuits in Digital. You’ll submit this assignment via Canvas (future coding assignments will be submitted on the FCCSCI server, as usual).

  1. Using any gates you like, implement a 2-input (A, B), 3-output (C, D, E) circuit which behaves the following way:

    InputsOutputs
    AB CDE
    00 100
    10 010
    01 110
    11 001

    (This circuit increments — adds 1 to — the two-bit input AB, producing a 3-bit output CDE.)

  2. Using any gates you like, implement a 2-input (A, B), 2-output (Q, C) circuit which behaves in the following way:

    InputsOutputs
    AB QC
    00 00
    10 10
    01 10
    11 01

    This is known as a half-adder: it “adds” together two bits (A and B) and produces the sum on output Q; if the sum is too large to fit in a single bit (i.e., if A and B are both 1, and the sum is 2) then Q is 0 and the carry output C is 1. A half-adder is a building-block to building an addition circuit.

  3. Using any gates you like, implement a 2-input, 2-output circuit which behaves the following way:

    InputsOutputs
    AB QR
    00 00
    10 10
    01 11
    11 00

    This is a half-subtractor circuit, computing the 1-bit subtraction A - B; the R output is the borrow output; if A < B then the subtraction cannot be performed without borrowing from a higher bit.

Build your answers in one circuit file (don’t make separate files for each problem); connect Input devices to the inputs and LEDs to the outputs, for easy of testing. Submit your circuit file via Canvas for Assignment 1.