Midterm.sp09

# Midterm.sp09 - 1 Name Student ID Signature cs30x CSE 30...

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

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 1 Name _________________________ Student ID __________________ Signature_______________________ cs30x_______ CSE 30 Spring 2009 Midterm Exam 1. Number Systems ___________________ (15 points) 2. Binary Addition/Condition Code Bits/Overflow Detection ___________________ (12 points) 3. Branching ___________________ (21 points) 4. Bit Operations / C Runtime Environment ___________________ (17 points) 5. Parameter Passing and Return Values (Stack Variables) ___________________ (12 points) 6. Local Variables, The Stack and Return Values ___________________ (16 points) 7. Load/Store/Memory ___________________ (11 points) SubTotal ___________________ (104 points) Extra Credit ___________________ (12 points) Total ___________________ 2 1. Number Systems Convert 0xFC16 (2’s complement, 16-bit word) to the following. (6 points) binary ____________________________________ (straight base conversion) octal ___________________________________ (straight base conversion) decimal ____________________________________ (convert to signed decimal) Convert -444 to the following (assume 16-bit word). Express answers in hexadecimal. (6 points) sign-magnitude 0x _______________________________________________ 1’s complement 0x _______________________________________________ 2’s complement 0x _______________________________________________ Convert +341 to the following (assume 16-bit word). Express answers in hexadecimal. (3 points) sign-magnitude 0x _______________________________________________ 1’s complement 0x _______________________________________________ 2’s complement 0x _______________________________________________ 2. Binary Addition/Condition Code Bits/Overflow Detection Indicate what the condition code bits are when adding the following 8-bit 2’s complement numbers. (12 points) 01010111 01100001 00011011 +10101001 +01001001 +00100101 --------- --------- --------- N Z V C N Z V C N Z V C----------------- -----------------...
View Full Document

## This note was uploaded on 08/31/2011 for the course CSE 30 taught by Professor Ord during the Fall '08 term at UCSD.

### Page1 / 10

Midterm.sp09 - 1 Name Student ID Signature cs30x CSE 30...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online