Docsity

ECE 190 and DCL 520 Midterm Exam Fall 2012, Exams of Introduction to Aerospace Engineering

Toggle sidebar
bg1
Page: 1 Name: ____________________________________________
1
ECE 190 First Midterm Exam
Fall 2012
Wednesday, October 3rd, 2012
Name: NetID:
____________________________________ _______________
Lab Section:
DCL 440
DCL 520
9:00 AM
[ ] AD4
[ ] AD3
11:00 AM
[ ] AD9
12:00 PM
[ ] AD5
[ ] AD6
2:00 PM
[ ] AD7
[ ] AD8
3:00 PM
[ ] AD1
[ ] AD2
Be sure your exam booklet has 10 pages.
Do not tear the exam booklet apart; you can only detach the last page.
Use backs of pages for scratch work if needed.
Be sure to write your name and lab section on each exam page.
This is a closed book exam. You may not use a calculator.
You are allowed one handwritten 8.5 x 11" sheet of notes.
Absolutely no interaction between students is allowed.
Be sure to clearly indicate any assumptions that you make.
The questions are not weighted equally. Budget your time accordingly.
You can start on Programming Problems only after finishing Problems 1-6.
Page 9 contains additional instructions for Programming Problems.
Don’t panic, and good luck!
Problem 1 10 points: ___________
Problem 2 13 points: ___________
Problem 3 10 points: ___________
Problem 4 9 points: ___________
Problem 5 11 points: ___________
Problem 6 12 points: ___________
Programming Problem 1 25 points: ___________
Programming Problem 2 10 points: ___________
Total 100 points: ___________
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download ECE 190 and DCL 520 Midterm Exam Fall 2012 and more Exams Introduction to Aerospace Engineering in PDF only on Docsity!

ECE 190 First Midterm Exam

Fall 2012

Wednesday, October 3rd, 2012

Name: NetID:


Lab Section: DCL 440 DCL 520 9:00 AM [ ] AD 4 [ ] AD 11:00 AM [ ] AD 12:00 PM [ ] AD 5 [ ] AD 6 2:00 PM [ ] AD 7 [ ] AD 8 3:00 PM [ ] AD 1 [ ] AD 2

Be sure your exam booklet has 10 pages.Do not tear the exam booklet apart; you can only detach the last page.Use backs of pages for scratch work if needed.Be sure to write your name and lab section on each exam page.This is a closed book exam. You may not use a calculator.You are allowed one handwritten 8.5 x 11" sheet of notes.Absolutely no interaction between students is allowed.Be sure to clearly indicate any assumptions that you make.The questions are not weighted equally. Budget your time accordingly.You can start on Programming Problems only after finishing Problems 1-6.Page 9 contains additional instructions for Programming Problems.Don’t panic, and good luck!

Problem 1 10 points: ___________

Problem 2 13 points: ___________

Problem 3 10 points: ___________

Problem 4 9 points: ___________

Problem 5 11 points: ___________

Problem 6 12 points: ___________

Programming Problem 1 25 points: ___________

Programming Problem 2 10 points: ___________

Total 100 points: ___________

Problem 1 ( 10 pts): Binary Representation

i) Compute the addition and write your answer in decimal:

(0100) 10 + (0100) 2 = _______________________

ii) Convert the following floating point number to decimal:

1 10000010 11 000000000000000000000 = ______________________

iii) What is the range of numbers you can represent with 7 bits using unsigned binary representation?

From _______________ to _______________

iv) What is the result of the following bit-wise operation: NOT(x5C) AND NOT(xF0)? Write your answer in hexadecimal.

Answer: ____________________

v) Perform the following calculation by first converting the two decimal numbers to two’s complement notation using 6 bits. Write results in both two’s complement binary representation and decimal, indicate if overflow occurs.

- 14 + 22 = ____________________________________________________

Overflow: yes ______, no _____

vi) A computer runs in an unsigned 5 bit mode. What is the output for the following calculation?

15 + 20 = _______.

Problem 3 (10 pts): Memory Organization

i) What inputs should we supply to the memory shown below in order to store value 101 2 at address 1?

D Q

we

D Q

we

D Q

we

d 2 d 1 d 0

q 2 q 1 q 0

D Q

we

D Q

we

D Q

we

D Q

we

D Q

we

D Q

we

D Q

we

D Q

we

D Q

we

a 1 a 0 we

Answer: _a 1 a 0 =___________, _we=___________, d 2 d 1 d 0 =___________

ii) What is the addressability of the memory shown in part (i)?

Answer: ________________

Problem 4 ( 9 pts): FSM

i) The input "0101110101" is fed into the FSM shown below serially, one bit at a time, starting with the most significant bit. If the machine is initially in state S 1 S 0 =00, what series of state transitions does the state machine go through upon receiving the input?

Time State (S 1 S 0 ) Input (A)

0 00 0

1 1

2 0

3 1

4 1

5 1

6 0

7 1

8 0

9 1

ii) The FSM from part (i) represents a sequence recognizer which outputs 1 (Z=1) when it detects the sequence 101. The output Z is a function of the current state (S 1 S 0 ) only. Draw the output logic for this sequence recognizer. You can use no more than 2 gates.

S 1

S 0

Z

Problem 6 ( 12 pts): LC-3 ISA

LC-3 computer is about to perform a FETCH. The current IR, PC, and general-purpose registers contain the following values:

IR PC R0 R1 R2 R3 R4 R5 R6 R

x0000 x3000 x0000 x0000 x0000 x0000 x0000 x0000 x4000 x

and relevant memory locations are:

x3000 0110000110000000

x3001 0110001110000001

x3002 0001010000000001

x3003 0111010110000010

x3004 1111000000100101

x4000 0000000000111111

x4001 0000000000010101

x4002 0000000000000000

Write down (in hexadecimal notation) values in IR, PC, and general-purpose registers after executing three instructions:

IR PC R0 R1 R2 R3 R4 R5 R6 R

Programming Problem 1 ( 25 pts): LC-3 Machine code

In this assignment you are asked to write a program in LC-3 machine (binary) codes that examines values at 10 consecutive memory locations starting at address x30A0 and stores the number of values larger than 5 in memory at address x30AA. For example, look at the following test case scenarios:

Memory Location Test Set 1 Test Set 2 x30A0 x0000 x x30A1 x0042 x x30A2 x0051 x x30A3 x0000 x x30A4 x0005 x00 04 x30A5 x0002 x x30A6 x0000 x x30A7 x0040 x x30A8 x0021 x x30A9 x0001 x Result at x30AA x000 4 x

i) 5 pts. Provide a systematic decomposition for the above problem.

Start

Stop

ii) 20 pts. Implement your algorithm on the computer. Your program should start at memory address x3000. Your code should be saved in exam1/project1/larger5.bin file. To receive full credit, it should correctly run in lc3sim (or lc3sim-tk).