{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Solutions to Pratice Problems

# Solutions to Pratice Problems - Final Exam Practice...

This preview shows pages 1–3. Sign up to view the full content.

Final Exam Practice Problems This is not meant to be an exhaustive list of topics for the final exam, nor is it intended to representative of the length of the exam. The exam may be longer or shorter. These are questions that I would ask if I were writing the exam. The real exam will be written by the TAs and thus may contain different kinds of questions. You are responsible for all material covered in class, even if it is not mentioned here. Unless otherwise noted, .ORIG and .END pseudo-ops and the HALT or TRAP x25 instructions are not required for any code you write and may be omitted from the code provided. 1. What is the decimal value of 10001111 2 if we consider it to be an unsigned integer? What is the decimal value if we consider it to be a signed two's complement integer? Answer: Unsigned: 143 (2 7 + 2 3 + 2 2 + 2 1 + 2 0 ) Signed: -113 (Invert and add 1 to get 01110001 2 , then 2 6 + 2 5 + 2 4 + 2 0 ) 2. Write AB1D 16 in both decimal and binary. (A calculator might be handy for this one) Answer: First in binary, A 16 = 1010 2 , B 16 = 1011 2 , 1 16 = 0001 2 , and D 16 = 1101 2 , so the answer is 1010 1011 0001 1101 2 . Then that is 2 15 + 2 13 + 2 11 + 2 9 + 2 8 + 2 4 + 2 3 + 2 2 + 2 0 = 43805 10 . 3. Given that A = 1, B = 0, C = 0, and (A + B).(C + D) = 1, what is the value of D? Answer: A OR B = 1. So 1 AND (C+D) = 1. Need C+D to be 1, and C is zero, so D must be 1. 4. The following questions apply to the figure below, a transistor-level diagram of a circuit.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
a) Complete the truth table for the circuit. C A B Q 0 0 0 1 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 0 1 1 0 0 1 1 1 0 b) Draw a logic gate implementation of the circuit (That is, draw the circuit using the symbols for AND, OR, NOT, NAND, and NOR gates). One solution is drawn below. However, there are several other possibilities. c) Write the equivalent Boolean algebra expression for the circuit. Answer: (A + B).C 4. After the success of its soda machine, the IEEE is diversifying their selection. They have installed a gum machine, which dispenses a pack of gum after receiving 15¢. It is controlled by a state machine. a) If we include a state for which the machine contains 0¢ and the machine does not give change, how many states are needed? The machine accepts nickels, dimes, and quarters.
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}