Docsity

Practice Exam A - Digital Design Lab | ECE 2031, Exams of Electrical and Electronics Engineering

Toggle sidebar
bg1
ECE2031 In-Class Exam Fall 2003
ANSWER SHEET
Name __________________________ Section _______________________________
Student No. _____________________
Closed Books, Closed Notes, No computers or calculators.
Having read the Georgia Institute of Technology Academic Honor Code, I understand and accept my
responsibility as a member of the Georgia Tech Community to uphold the Honor Code at all times. In
addition, I understand my options for reporting honor violations as detailed in the code.
______________________________________________ ___________________
(Signature) (Date)
1. (15 points)
0
1
2. a b c d e (10 points)
3. a b c d e (10 points)
4. Fill in the truth table (10 points)
A
B
C
F
0 0
0
0 0
1
0 1
0
0 1
1
1 0
0
1 0
1
1 1
0
1 1
1
5. a b c d e (10 points)
pf3
pf4
pf5

Partial preview of the text

Download Practice Exam A - Digital Design Lab | ECE 2031 and more Exams Electrical and Electronics Engineering in PDF only on Docsity!

ECE2031 In-Class Exam Fall 2003

ANSWER SHEET

Name __________________________ Section _______________________________

Student No. _____________________

Closed Books, Closed Notes, No computers or calculators.

Having read the Georgia Institute of Technology Academic Honor Code, I understand and accept my responsibility as a member of the Georgia Tech Community to uphold the Honor Code at all times. In addition, I understand my options for reporting honor violations as detailed in the code.

______________________________________________ ___________________

(Signature) (Date)

  1. (15 points)

0

1

  1. a b c d e (10 points)
  2. a b c d e (10 points)
  3. Fill in the truth table (10 points)

A B C F

  1. a b c d e (10 points)
  1. (15 points)
  2. a b c d e f g h i j (15 points)
  3. a b c d (5 points)
  4. a b c d e (5 points)
  5. a b c d e (5 points)
  1. (10 points) The figure below shows a circuit drawn in the schematic editor.

Fill in the truth table for this circuit on the answer sheet. Do not leave any values for F blank!

  1. (10 points) For the same circuit shown in the previous question, which of the following are true? (Select all that apply.) a) It is the direct implementation of a minimal sum of products expression b) It is the direct implementation of a sum of products expression, but it is not minimal c) It is not a direct implementation of a sum of products expression of any kind d) It can be implemented with only NAND gates and inverters e) It can be implemented with only NAND gates
  2. (15 points) A transition table for a state machine is shown below. Fill in the missing state transitions and outputs in the ASM diagram on the answer sheet. Q1 is the most significant bit of the two-bit state variable shown in the ASM diagram (i.e., state 10 corresponds to Q1=1, Q0=0). Q1 Q0 X Q1+ Q0+ Z 0 0 0 1 0 1 0 0 1 0 1 1 0 1 0 1 0 0 0 1 1 1 1 0 1 0 0 0 0 0 1 0 1 1 1 0 1 1 0 0 0 1 1 1 1 0 1 1
  3. (15 points) The following (next page) ASM code fragment is clearly doing something related to the IR detectors. You can assume that - The IR detector device (ircomm) and other devices are correctly configured in a gdf file at the I/O addresses given by the EQU statements, as they were in the files provided to you for the project. - The timer device has a 10 Hz clock, also as was given to you.

SEVENSEG: EQU &H01 ; I/O write here for 7-segment display TIMER: EQU &H02 ; I/O access to timer IR_Detector: EQU &H04 ; I/O read here for detector (ircomm) ORG 0 .

. (other code – just assume it is OK) . LOAD ZERO STORE IRNUM IRloop: LOAD IRNUM ValidIR: OUT IR_Detector OUT SEVENSEG OUT TIMER ScanIR: IN TIMER SUB IRWAIT JNEG ScanIR IN IR_Detector JZERO NextDetector OUT TIMER DisplayIR: IN TIMER SUB DISPWAIT JNEG DisplayIR NextDetector: LOAD IRNUM ADDI &H STORE IRNUM SUB EIGHT JZERO ResetIRcount JUMP IRloop ResetIRcount: STORE IRNUM JUMP IRloop ; Data memory ZERO: DW &H EIGHT: DW &H IRNUM: DW 0 IRWAIT: DW 03 DISPWAIT: DW 10

Which of the statements below are true statements about what the code does or about what is wrong with this code? (Select all that apply.) a) The ORG statement is wrong, because it has to have a hexadecimal operand. b) The data memory is located wrong, because variables have to be placed at the top of the ASM file. c) It displays the sensed IR code byte on the seven segment display. d) It waits about three seconds for a detector to sense something. e) It sequentially scans all eight detectors and repeats this over and over. f) If a nonzero IR code byte is detected, it breaks out of the timer loop immediately. g) It includes commands to drive the robot forward. h) It includes commands to turn off the mine by emitting the twos complement. i) It includes commands to read sonar values. j) It pauses the scanning process for a brief interval when a nonzero IR code byte is detected.

  1. (5 points) How would a simple computer program reset the timer, assuming that the timer itself behaves internally just as the one used for the project? a) OUT &H b) IN &H c) OUT &H d) OUT &H e) IN &H
  2. (5 points) Assuming that a program performed the correct instruction for reading the switch signals (PB_DIP[15..0]), what would it read when all the DIP switches are “1” and PB2 (the second pushbutton, not the reset) is held down? a) &H b) &H01FF c) &H80FF d) &H e) &HFFFF