======== START LECTURE #8 ========

How about a two bit counter.

To determine the combinationatorial circuit we could preceed as before

Current      Next ||
  A B   I R  A B  || DA DB
------------------++------

This would work but we can instead think about how a counter works and see that.

DA = R'(A XOR I)
DB = R'(B XOR AI)

Homework: 23

B.6: Finite State Machines

Skipped

B.7 Timing Methodologies

Skipped

Chapter 1

Homework: READ chapter 1. Do 1.1 -- 1.26 (really one matching question)
Do 1.27 to 1.44 (another matching question),
1.45 (and do 7200 RPM and 10,000 RPM), 1.46, 1.50

Chapter 3

Homework: Read sections 3.1 3.2 3.3

3.4 Representing instructions in the Computer (MIPS)

Register file

Homework: 3.2

R-type instruction (R for register)

    op    rs    rt    rd    shamt  funct
    6     5     5     5      5      6

The fields are quite consistent

Example: add $1,$2,$3

I-type (why I?)

    op    rs    rt   address
    6     5     5     16

lw/sw $1,addr($2)

RISC-like properties of the MIPS architecture

Branching instruction

slt (set less-then)

beq and bne (branch (not) equal)

blt (branch if less than)

ble (branch if less than or equal)

bgt (branch if greater than>

bge (branch if greater than or equal>

Note: Please do not make the mistake of thinking that

    stl $1,$5,$8
    beq $1,$0,L
is the same as
    stl $1,$8,$5
    bne $1,$0,L
The negation of X < Y is not Y < X

Homework: 3.12-3.17

J-type instructions (J for jump)

        op   address
        6     26

j (jump)

jr (jump register)

jal (jump and link)

I type instructions (revisited)

addi (add immediate)

    addi $1,$2,100

Why is there no subi?
Ans: Make the immediate operand negative.

slti (set less-than immediate)

    slti $1,$2,50