c262f97t1 - Possible answers to the test are below the...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Possible answers to the test are below the test. CSc 262 Test 1 Friday, 19 September 1997 Each question worth 20 points. 1. You are designing a pseudo-code for a machine with 512 words of data memory, 512 words of a separate program memory, where each memory location stores an unsigned 22-bit word. What form would an instruction take? Design a single arithemetic instruction, e.g., +, and a single logical instruction, and explain, in detail, what they would do. 2. Explain the principles of Regularity and Simplicity. For both FORTRAN and pseudocode give examples illustrating each of the two principles. 3. Suppose two differnt FORTRAN subprograms, say SUBA and SUBB, respectively, have the following COMMON declarations: COMMON /COM1/ A(3,4), B(4,20) COMMON /COM1/ B(4,20), A(3,4) and both subprograms have the same DIMENSION statement: DIMENSION A(3,4), B(4,20) Which variable in the second subprogram corresponds to the variable A(2,2) in the first subprogram? Which variable in the first subprogram corresponds to the variable A(1,1) in the second subprogram? 4. In FORTRAN the assigned GOTO and the computed GOTO are redundant. Choose one of the two to eliminate and explain how to implement the one eliminated in terms of the one remaining. Then explain how to eliminate the one remaining
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/09/2008 for the course CSC 262 taught by Professor Varies during the Spring '08 term at Lehigh University .

Page1 / 3

c262f97t1 - Possible answers to the test are below the...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online