Assignment 2

Home

Clocked Sequential Circuits

Related Reading: Omnibus Chapters 3, 13, 28, 38, and 48, and
SOE Chapters 1, 2, 5, and Sections 14.1-14.3.

Due:  Midnight Friday Feb 1, 2008

  1. Perform the following computations with two's complement arithmetic, using 8-bit bytes, where the most significant (i.e. left-most) bit is the sign bit:

    22+35        35+(-22)         122+35

     
  2. Design a digital circuit, at the level of building blocks for 8-bit bytes (e.g. you can assume that you have an 8-bit adder, 8-bit multiplexer, 8-bit decoder, and so on), that behaves as follows:
    bulletIt takes one 8-bit byte A as input, as well as a three-bit "instruction" I and a clock C.
    bulletIt has one 8-bit output register R.
    bulletThe instruction I is decoded into one of 8 possible commands, which causes the following
    operation to happen on the next clock tick:
    bullet000:  R = 0 (i.e. clears the register -- sets it to all zeros).
    bullet001:  R = A (i.e. loads the input A into the register, replacing whatever was there).
    bullet010:  R = -A (i.e. loads the negation of A into the register).
    bullet011:  R = -R (i.e. negates the register).
    bullet100:  R = R+A (i.e. adds the input A to the register).
    bullet101:  R = R-A (i.e. subtracts the input A from the register).
    bullet110:  R = -R+A (i.e. subtracts the register from the input).
    bullet111:  R = -R-A (i.e. subtracts the input from the negation of the register).

    You don't have to write any Haskell code for this -- just draw a circuit diagram.  The key parts of the circuit will be the data paths -- i.e. choosing the right building blocks and wiring them together properly -- and the instruction logic -- i.e. decoding the 3-bit instruction in order to make the right operation happen.
     

  3. Complete exercises 1.6, 2.1, 2.2, 2.3, and 2.4 in the Circuits module from Assignment 1.  In other words, complete all of the exercises in that module.

 

Solutions to 3.