Docsity

ECE 190 Midterm Exam 1 - Spring 2011, Exams of Introduction to Aerospace Engineering

Toggle sidebar
bg1
ECE 190 Midterm Exam 1
Spring 2011
Practice exam, February 2011
Name: NetID:
Programming studio section (mark only the one you attend):
DCL 440
DCL 520
9:00 AM
[ ] AD4
[ ] AD6
12:00 PM
[ ] AD5
[ ] AD8
1:00 PM
[ ] AD3
[ ] AD7
2:00 PM
[ ] AD9
3:00 PM
[ ] AD1
[ ] AD2
Be sure your exam booklet has 5 pages.
Do not tear the exam booklet apart.
Write your name at the top of each 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.
Don’t panic, and good luck!
Problem 1 10 points _______________________________
Problem 2 5 points _______________________________
Problem 3 10 points _______________________________
Problem 4 5 points _______________________________
Total 30 points _______________________________
pf3
pf4
pf5

Partial preview of the text

Download ECE 190 Midterm Exam 1 - Spring 2011 and more Exams Introduction to Aerospace Engineering in PDF only on Docsity!

ECE 190 Midterm Exam 1

Spring 2011

Practice exam, February 2011

Name: NetID:

Programming studio section (mark only the one you attend):

DCL 440 DCL 520 9:00 AM [ ] AD4 [ ] AD 12:00 PM [ ] AD5 [ ] AD 1:00 PM [ ] AD3 [ ] AD 2:00 PM [ ] AD 3:00 PM [ ] AD1 [ ] AD

Be sure your exam booklet has 5 pages.Do not tear the exam booklet apart.Write your name at the top of each 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.Don’t panic, and good luck!

Problem 1 10 points _______________________________

Problem 2 5 points _______________________________

Problem 3 10 points _______________________________

Problem 4 5 points _______________________________

Total 30 points _______________________________

Problem 1 (10 points): Binary representation

Part A (2 points): What range of decimal numbers can be represented using 9 bits in each 2’s complement, 1’s complement, and unsigned binary representations?

2’s complement: _____________________

1’s complement: _____________________

Unsigned binary: _____________________

Part B (2 points): Base 8 representation of numbers is called “octal”, and uses only digits 0 through 7. Give the following equivalent numbers for octal number 1275 in each binary, decimal, and hexadecimal representation.

Binary: _____________________

Decimal: _____________________

Hexadecimal: _____________________

Part C (1 point): How is the number 2 represented in the floating point data type format?

Answer: _________________________________________________

Part D (1 points): What is the largest possible positive number that can be expressed in the floating point data type, using an exponent between 1 and 254? Write your answer in binary, in IEEE 754 floating point format.

Answer: _________________________________________________

Part E (4 points): Using 2-complement arithmetic, what 32-bit number can be added to this floating point number to effectively multiply by 28?

0 01111101 00000000000000000000000

Answer: _________________________________________________

Problem 3 (10 points): Memory

Given four 1-bit memory cells, build a 2x2-bit memory unit using only AND, OR, NOT gates and MUXes:

Problem 4 (5 points): C language

Part A (1 points): Assume variables x , y , and z are already declared. Write a C expression to evaluate 𝑥 + 1 1 + 𝑦

𝑧^5

Do not switch the order of operands.

Answer: ___________________________________________________

Part B (2 points): Fill in missing expressions to implement the following formula:

if ( _________________________________________ )

f = x;

else if ( ____________________________________ )

f = - x; else f = x + 1;

Part C (1 points): Write the output produced by the following code segment:

int x = 5; do { printf(“%d “, --x); } while (x != 4)

Answer: ____________________________________________

Part D (1 points): Using only declared variables, write missing arguments in printf function call that correspond to the provided format conversion specifications.

int count; char inchar; printf(“%c %d”, _________________________________________ );