0% found this document useful (0 votes)
27 views1 page

C 2 SR Sol

The document contains solutions for the American Computer Science League Contest #2 for the Senior Division, covering topics such as Boolean Algebra, Bit-String Flicking, and Computer Number Systems. It provides detailed answers and explanations for various problems, including calculations and transformations of binary strings. The solutions include specific outputs for each problem, illustrating the application of computer science concepts.

Uploaded by

CK
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views1 page

C 2 SR Sol

The document contains solutions for the American Computer Science League Contest #2 for the Senior Division, covering topics such as Boolean Algebra, Bit-String Flicking, and Computer Number Systems. It provides detailed answers and explanations for various problems, including calculations and transformations of binary strings. The solutions include specific outputs for each problem, illustrating the application of computer science concepts.

Uploaded by

CK
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

ACSL

2007 - 2008 American Computer Science League Contest #2


Senior Division Solutions

1. Boolean Algebra 1.
= =
= =
=
=
=

2. Boolean Algebra 2. 4
+
0 0 0 1 1 1 0 0 1 1 1
0 0 1 1 0 0 0 0 1 1 1
0 1 0 0 1 0 0 0 0 0 0
0 1 1 0 0 1 0 0 0 0 0
1 0 0 1 1 1 1 0 1 1 1
1 0 1 1 0 0 0 1 0 0 0
1 1 0 0 1 0 0 0 0 0 0
1 1 1 0 0 1 1 1 1 0 1
The last column yields (0,0,*), (1,0,0) and (1,1,1)

3. Bit-String Flicking
3. 10101
(RCIRC-3 01101 OR (LSHIFT-2 (RCIRC-1 01110) AND 10111))
= (10101 OR (LSHIFT-2 00111 AND 10111))
= (10101 OR (11100 AND 10111)) = (10101 OR 10100) = 10101

4. Bit-String Flicking 4. 01*0*


((LCIRC-2 (RSHIFT-1 NOT X)) AND (RCIRC-1 (LCIRC-3 01101)))
Let X = abcde
(LCIRC-2 (RSHIFT-1 NOT abcde)) = (LCIRC-2 (RSHIFT-1 ABCDE))
=(LCIRC-2 0ABCD) = BCD0A
(RCIRC-1 (LCIRC-3 01101)) = (RCIRC-1 01011) = 10101
BCD0A AND 10101 = 00101  B=0,C=*,D=1,A=1,E=*
 a=0,b=1,c=*,d=0,e=*

5. Computer Number Systems 5. 2


The smallest 3-bit palindrome is 101 and the largest is 777.
101 is 65 in base 10 and 777 is 511
8110 = 1218 and 12110 = 1718

You might also like