Practice Exercise 7

  1. Encode the following instructions into CSC-1 machine language, using the 16 blanks provided for both the opcode and the operand. They have been broken up into 4 groups of 4 merely for your convenience and readability. If there are any errors, point them out and tell why.
             JMP  2300     _ _ _ _   _ _ _ _   _ _ _ _   _ _ _ _
          
             ADD  5        _ _ _ _   _ _ _ _   _ _ _ _   _ _ _ _
          
             LDI  15       _ _ _ _   _ _ _ _   _ _ _ _   _ _ _ _
          
             STD  6270     _ _ _ _   _ _ _ _   _ _ _ _   _ _ _ _
          
             RET           _ _ _ _   _ _ _ _   _ _ _ _   _ _ _ _
          
             JC  256       _ _ _ _   _ _ _ _   _ _ _ _   _ _ _ _
          
             HLT           _ _ _ _   _ _ _ _   _ _ _ _   _ _ _ _
          
             JNZ  2300     _ _ _ _   _ _ _ _   _ _ _ _   _ _ _ _
          
             AND  4095     _ _ _ _   _ _ _ _   _ _ _ _   _ _ _ _

  1. Suppose that a hardware designer sees the falling prices of memory and decides to double the size of the CSC-1's memory to 8192 words. Each word of this memory still has 16 bits each. What kinds of problems will arise?

  1. Following is a DFA. Sketch out a hardware DFA that implements this, using the same basic structure as the hardware DFA in Fig. 8 of Chapter 7.


  1. One problem with the hardware DFA as presented in Fig. 8 of Chapter 7 is that every time CK goes high, a new state is recorded into the state register.
  1. What happens if none of the condition wires (a, b, c, ...) have a 1 on them?
  2. How could this problem be fixed?

  1. The "Super Register" discussed in Chapter 7shows three "commands," namely LD (load), CLR (clear, or set all bits to 0) and INCR (increment, or add 1). Show just one bit of the super register, with a flip-flop at the center, I3 coming in, O3 going out, and the carry from the previous bit. The tricky part will be to show the ANDs and ORs that allow only that command to be carried out.

  1. Incrementer circuits are very handy to have. The following circuit takes in n wires, which form a binary number, and if the INCR wire is high, outputs the binary number plus 1. If INCR is 0, the original number is passed through unchanged. The crucial gates that implement this incrementing function are contained in the dotted circles, which you must fill in. They are all the same, so just show what one of them looks like.