Docsity

Practice Quiz 4 on Computer Organization Systems Program | CSE 30, Quizzes of Computer Science

Toggle sidebar
bg1
Signature __________________
Name_______________
cs30x____
Student ID _________________
Score:
Quiz 4
CSE 30
Spring 2006
#1.
A) Loader D) Linker
B) C Compiler E) Assembler
C) C Preprocessor
_____ translates assembly code into machine code.
_____ performs syntax analysis on its input high-level language (HLL).
_____ takes an executable file on disk and makes it ready to execute in memory.
_____ translates C code into assembly code.
_____ performs semantic analysis on its input high-level language (HLL).
_____ expands # directives and strips comments from its input high-level language (HLL).
#2. a) Convert 122.625
10
to binary fixed-point and single precision IEEE floating-point representation
(expressed in hexadecimal).
binary fixed-point __________________________________ x 2
0
IEEE floating-point _______________________________________ (hexadecimal)
b) Convert 0xC2550000 (single precision IEEE floating-point representation) to fixed-point decimal.
fixed-point decimal ______________________________ (decimal / no exponential notation)
(over)
pf2

Partial preview of the text

Download Practice Quiz 4 on Computer Organization Systems Program | CSE 30 and more Quizzes Computer Science in PDF only on Docsity!

Signature __________________ Name_______________

cs30x____

Student ID _________________ Score:

Quiz 4

CSE 30

Spring 2006

A) Loader D) Linker

B) C Compiler E) Assembler

C) C Preprocessor

_____ translates assembly code into machine code.

_____ performs syntax analysis on its input high-level language (HLL).

_____ takes an executable file on disk and makes it ready to execute in memory.

_____ translates C code into assembly code.

_____ performs semantic analysis on its input high-level language (HLL).

_____ expands # directives and strips comments from its input high-level language (HLL).

#2. a) Convert 122.625 10 to binary fixed-point and single precision IEEE floating-point representation

(expressed in hexadecimal).

binary fixed-point __________________________________ x 2^0

IEEE floating-point _______________________________________ (hexadecimal)

b) Convert 0xC2550000 (single precision IEEE floating-point representation) to fixed-point decimal.

fixed-point decimal ______________________________ (decimal / no exponential notation)

(over)

#3. Name 1 specific disadvantage of leaf subroutines.

Name 1 specific disadvantage of open subroutines.

#4. What gets printed with the function call mystery( 10 );?

int mystery( int param ) { int local = 30;

if ( local > param ) { local = local + param; printf( "%d\n", param ); /* Output the value of param followed by a newline / param = mystery( param + 5 ) + local; printf( "%d\n", param - local ); / Output the value of (param - local) followed by a newline */ } else { printf( "Halt\n" ); }

return local; }

Put answer here