A
2002-2003
All-Star merican Computer Science League
A. only location 16
B. locations 52 and 70
C. locations 70 and 90
D. only location 70
E. None of the above
1. Computer Number Systems
Which of the following 32-bit memory locations (the contents
are displayed in hex) contain more 1’s than 0’s?
16: BA9320F3 52: D7703430 70: 8032F3EF 90: 3897E732
2
A. 36
B. 11
C. 5
D. –3
E None of the above
. Recursive Functions
Find F(12,3) given that odd and even are defined over the set of
integers.
F(X/2, Y-1) + 3X if X is even and Y is odd
F(Y-2, X+1) + X if X is even and Y is even
X2 – Y2 if X is odd and Y is even
F(Y+1, X-1) –2Y if X is odd and Y is odd
F(X,Y) =
4. Bit String Flicking
How many values of X (a five-bit string) will make the following
equation true?
(LCIRC-2 01010 OR RSHIFT –1 X AND RCIRC –1 (LSHIFT –2 01100)) =
(NOT X AND RSHIFT –1 (LCIRC –2 X))
3. Boolean Algebra
Given the following expression:
A + BC A + C
If the order of precedence were reversed, which ordered triples
would produce a value of TRUE in both truth tables?
5. Data Structures
Start with a binary tree for PETERPAN. Now add
TINKERBELL. By how much did the internal path length
increase?
A. (0,0,0)
B. (1,0,0) (0,0,0)
C. (1,0,1) (0,0,1)
D. (1,0,0) (1,1,0)
E. None of the above
A. 0
B. 2
C. 4
D. 8
E. None of the above
A. 14
B. 35
C. 51
D. 65
E. None of the above
A
2002-2003
All-Star merican Computer Science League
Senior Division
6
A. 138
B. 144
C. 150
D. 164
E. None of the above
. LISP
Given the following:
A = (MULT 2 3), B = (ADD 2 3), C = (MULT (ADD A 2) (ADD B 5 ) )
D = (SQUARE A), E = (DIV C 2), F = (EXP B 2)
Evaluate the following expression:
(ADD (EXP 2 A) (SUB D B) (DIV (SUB C 5) F ) E )
7
A.. 7
B. 13
C. 18
D 20
E. None of the above
. Graph Theory
How many paths of length 2 exist in the above graph?
8
A. 0
B. 2
C. 4
D. 8
E. None of the above
. Digital Electronics
How many ordered triples make the above circuit TRUE?
A
2002-2003
All-Star merican Computer Science League
Senior Division
9
A. a and b
B. b, c and e
C. b, d, and e
D. Only b
E. None of the above
. FSA
List all of the following regular expressions that represent strings which
can be generated by the FSA above.
a. 101101110
b. 1*0(10*1U01) 01*(110*1U01*00)
c. 101010101010
d. 00100100
e 1*010*101*110*1
10. Prefix/Infix/Postfix
A. 40
B. 50
C. 60
D. 80
E. None of the above
Let A@B represent the largest prime between A and B. Let A#B represent
the GCF of A and B. Evaluate the following prefix expression.
+ / + # 8 6 @ 3 9 2 + 4 @ 2 7 @ @ 2 6 2 # 4 6 5
1
A. 2
B. 3
C. 4
D. 6
E. None of the above
1. What Does This Program Do?
The following algorithm has two print statements, one prints MICKEY
and the other prints MOUSE. How many times is MICKEYMOUSE
printed?
10 FOR I = 1 TO 10
20 FOR J = 1 TO I STEP 2
30 IF ( I = 2 * J ) OR ( J= 2 – I ) THEN PRINT “MICKEY” ; : GOTO 50
40 NEXT J
50 IF ( I – 4 < 2 * J ) AND ( J / 2 < 2 + I ) THEN PRINT “MOUSE”
60 NEXT I
70 END
A
2002-2003
All-Star merican Computer Science League
Senior Division
A. 2
B. 4
C. 6
D. 8
E. None of the above
12. ASSEMBLY LANGUAGE
What is the final value stored in Z?
X DC 1
Y DC 9
Z DC 1
TEST LOAD X
SUB Y
BG DONE
LOAD Y
SUB =2
STORE Y
LOAD Z
MULT X
STORE Z
LOAD X
ADD =1
STORE X
BU TEST
DONE END
Share with your friends: |