Docsity

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

Toggle sidebar
bg1
ECE#190#Midterm#Exam#1#
Spring#2011#
Monday, February 14, 2011
Name: NetID:
• 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 - Spring 2011 and more Exams Introduction to Aerospace Engineering in PDF only on Docsity!

ECE 190 Midterm Exam 1

Spring 2011 Monday, February 14, 2011 Name: NetID:

  • 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 7 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): Convert decimal number - 64 into signed magnitude, 2’s complement, and 1’s complement binary representations using the minimum number of bits. Signed magnitude: _____________________ 2 ’s complement: _____________________ 1 ’s complement: _____________________ Part C (1 point): How is the number 32.375 represented in the floating point data type format? Answer: _________________________________________________ Part D ( 2 points): What is the smallest 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 ( 3 points): Using binary integer arithmetic, what 32-bit pattern can be added to this floating point representation to effectively multiply it by 2? 0 01111111 01010101010101010101010 Answer: _________________________________________________

Problem 3 ( 10 points): Memory In this problem you will be working with 2x1-bit memory cells. Each cell stores 2 bits which can only be accessed one at a time. Which bit is accessed is determined by the address input to the memory cell. Given four 2x1-bit memory cells, build a 4x2-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 !! ! + 4!

Do not switch the order of operands. Answer: ___________________________________________________ Part B (2 points): Fill in missing expressions to implement the following formula: ! =

if ( _________________________________________ ) f = x + 10; else if ( ____________________________________ ) f = x - 10; else f = x; Part C (1 points): Write the output produced by the following code segment: int x = 5; while (x < 10 ) printf(“%d “, ++x); Answer: ____________________________________________ Part D (1 points): Using only declared variables, write missing arguments in scanf function call that correspond to the provided format conversion specifications. int count; float temp; char inchar; scanf(“%c %f %d”, _________________________________________ );