======== START LECTURE #11 ========

As noted just above the tall skinny box is useful for all size CLAs. To expand on that point and to review CLAs, let's redo CLAs with the general box.

Since we are doing 4-bits at a time, the box takes 9=2*4+1 input bits and produces 6=4+2 outputs










A 4-bit adder is now the figure on the right

What does the ``?'' box do?

  1. Calculates Gi and Pi based on ai and bi
  2. Calculates si based on ai, bi, and Ci=Cin
  3. Does not bother calculating Cout.







Now take four of these 4-bit adders and use the identical CLA box to get a 16-bit adder.

The picture on the right shows ONE 4-bit adder (the magenta box) used with the CLA box. To get a 16-bit adder you need 3 more magenta box, one above the one shown (to process bits 0-3) and two below (to process bits 8-15).





Four of these 16-bit adders with the identical CLA box gives a 64-bit adder (no picture shown).





Shifter

This is a sequential circuit.




Homework: A 4-bit shift register initially contains 1101. It is shifted six times to the right with the serial input being 101101. What is the contents of the register after each shift.

Homework: Same register, same initial condition. For the first 6 cycles the opcodes are left, left, right, nop, left, right and the serial input is 101101. The next cycle the register is loaded (in parallel) with 1011. The final 6 cycles are the same as the first 6. What is the contents of the register after each cycle?

4.6: Multiplication

    product <- 0
    for i = 0 to 31
        if LOB of multiplier = 1
            product = product + multiplicand
        shift multiplicand left 1 bit
        shift multiplier right 1 bit

Do on the board 4-bit multiplication (8-bit registers) 1100 x 1101. Since the result has (up to) 8 bits, this is often called a 4x4->8 multiply.

The diagrams below are for a 32x32-->64 multiplier.

What about the control?