{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

sp09-sw-sf

# sp09-sw-sf - ECE 2030 12:00pm Computer Engineering Spring...

This preview shows pages 1–3. Sign up to view the full content.

ECE 2030 12:00pm Computer Engineering Spring 2009 5 problems, 5 pages Final Exam Solutions 1 May 2009 Problem 1 (4 parts, 32 points) Implementation Bonanza For each part implement the specified device. Label all inputs and outputs . Part A (8 points) Implement the expression below using N and P type switches. OUT X = A B C D E C B E D OUT X A A B C D E Part B (8 points) Implement the expression in mixed logic notation using NAND gates. OUT Y = A B  C D A B C D OUT Y Part C (8 points) Implement a 2 to 4 decoder with enable using basic gates. O 0 S 0 S 1 S 0 S 1 O 1 O 2 O 3 EN S 1 EN S 0 EN EN S 0 S 1 Part D (8 points) Write a POS expression for a two-input XOR (odd parity) using maxterms. A B A XOR B 0 0 0 1 0 1 0 1 1 1 1 0 Out = A B A B 1

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
ECE 2030 12:00pm Computer Engineering Spring 2009 5 problems, 5 pages Final Exam Solutions 1 May 2009 Problem 2 (6 parts, 32 points) Alien Software SETI has just received an interesting message from deep space. While the comments are written in an alien tongue, they appear to write programs in MIPS assembly. Intergalactic scientists have only been able to decode the register assignments. Computer engineers must take it from there. # INPUTS: \$1= num elements, \$2= array A pointer, \$3= array B pointer, # OUTPUT: \$6=result, WORKING: \$4= InA/diff, \$5= InB/pred, # label instruction comment L1 WhatsIt: sub \$6, \$6, \$6 # clear max difference L2 Loop: lw \$4, (\$2) # load A element L3 lw \$5, (\$3) # load B element L4 sub \$4, \$4, \$5 # compute difference L5 slt \$5, \$4, \$0 # if difference >= 0 L6 beq \$5, \$0, Skip1 # then skip L7 sub \$4, \$0, \$4 # otherwise negate L8 Skip1: slt \$5, \$6, \$4 # if MaxDif >= difference L9 beq \$5, \$0, Skip2 # then skip L10 add \$6, \$4, \$0 # otherwise update MaxDif L11 Skip2: addi \$2, \$2, 4 # increment A ptr L12 addi \$3, \$3, 4 # increment B ptr L13 addi \$1, \$1, -1
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern