Docsity

ECE 190 and DCL 440/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
Tuesday, October 2nd, 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 440/520 Midterm Exam - Fall 2012 and more Exams Introduction to Aerospace Engineering in PDF only on Docsity!

ECE 190 First Midterm Exam

Fall 2012

Tuesday, October 2nd, 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) 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 _____

ii) What is the range of numbers you can represent with 6 bits using 2's complement representation?

From _______________ to _______________

iii) What is the result of the following bit-wise operation: NOT(xC6 AND NOT(x07))? Write your answer in hexadecimal.

Answer: ____________________

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

(0011) 10 + (0011) 16 = _______________________

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

20 - 40 = _______.

vi) Convert the following floating point number to decimal:

1 10000001 01000000000000000000000 = ______________________

Problem 3 (10 pts): Memory Organization

i) What is the memory output q 3 q 2 q 1 q 0 when A[1:0]=00 and WE=0?

d 3 d 2 d 1 d 0

q 3 q 2 q 1 q 0

D Q

we

0

D Q

we

1

D Q

we

1

D Q

we

0

D Q

we

0

D Q

we

1

D Q

we

1

D Q

we

0

D Q we

1

D Q we

0

D Q we

0

D Q we

1

a 1 a 0 we

Answer: ________________

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

Answer: ________________

Problem 4 ( 9 pts): FSM

i) Consider the following FSM with states A and B and inputs I 1 I 0. Suppose the FSM is fed the following sequence of inputs: 00, 11, 01, 10, 01, 11, 00, 10, 10. If the FSM is initially in state B, what is the series of states that the FSM will transition through?

Time State Input (I 1 I 0 )

0 B 00

ii) A series of inputs causes the FSM from part (i) to stay in state B, what is the relationship between the input bits I 1 and I 0 while the FSM is in state B?

Answer: ____________________________________________________________

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 x0000 x

and relevant memory locations are:

x3000 1010000011111111

x3001 0011000011111101

x3002 1111000000101000

x30FF 0011010100000000

x3100 0011010100000001

x3101 0011010100000010

x3500 1011111011101111

x3501 1111111011101101

x3502 0110000000001101

Write down (in hexadecimal notation) values in IR, PC, and general-purpose registers after executing two 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 7 consecutive memory locations starting at address x 30 FF and stores their absolute values back to the same memory locations. For example, look at the following test case scenario:

Memory Location Input Test Set Result after Program Run x30FF - (^1010 ) x3100 (^010 ) x3101 (^1010 ) x3102 - (^234510 ) x3103 - (^12310 ) x3104 (^65710 ) x3105 - (^1600010 )

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/abs.bin file. To receive full credit, it should correctly run in lc3sim (or lc3sim-tk).