2020 JR Shorts Solution
2020 JR Shorts Solution
1. Boolean Algebra
1. 0 (A)
2. Boolean Algebra
First
A$B+( $ B) ( $ )
2. 4 (D)
3. Bit-String Flicking
(RSHIFT-2 (LCIRC-1 (NOT 0111001))) AND
(NOT (RCIRC-2 (LSHIFT-1 1100011)))
= (RSHIFT-2 (LCIRC-1 1000110)) AND
(NOT (RCIRC-2 1000110))
3. 0000010 (C)
= (RSHIFT-2 0001101) AND (NOT 1010001)
= 0000011 AND 0101110
= 0000010
4. Bit-String Flicking
Let X = abcde and NOT X = ABCDE
LHS = (LCIRC-2 01010) OR (RSHIFT-1 ((LCIRC-2 abcde)
AND 01110))
= 01de1
→ d = 1, e = 0, a = *, b = *, c = *
→ b = 1, c = 1, e = 1 → a = *, d = *
5. Recursive Functions
5. 380 (D)
6. Recursive Functions
6. 44 (C)
7. Digital Electronics
The digital circuit translates to:
7. 001 (D)
8. Digital Electronics
The circuit translates to:
A B C X AX X+C AX + (X+C)
0 0 0 0 0 0 0
0 0 1 1 0 1 1 8. 6 (D)
0 1 0 1 0 1 1
0 1 1 0 0 1 1
1 0 0 1 1 1 1
1 0 1 0 0 1 1
1 1 0 0 0 0 0
1 1 1 0 0 1 1
9. Prefix-Infix-Postfix
- %-+2^324*+/84$20//+82$25%-38
= - % - + 2 (^ 3 2) 4 * + (/ 8 4) ($ 2 0) / / (+ 8 2) ($ 2 5) % (- 3 8)
= - % - (+ 2 9) 4 * (+ 2 0) / (/ 10 2) (% (- 5)) 9. 5 (B)
= - % (- 11 4) * 2 ( / 5 5)
= - (% 7) (* 2 1)
= -7 2=5
10. Prefix-Infix-Postfix
If A = 5, B = 3, and C = 2:
ABC+/BC^^BA+CB^/A*+
= 532+/32^^35+23^/5*+
= 5 (3 2 +) / (3 2 ^) ^ (3 5 +) ( 2 3 ^) / 5 * + 10. 6 (A)
= (5 5 /) 9 ^ ( 8 8 /) 5 * +
= (1 9 ^) (1 5 *) +
= 1 5 +
= 6
14. 7 (D)
15. 5 (C)
16. 13 (D)
By adding the entries in the squared matrix you get 13 paths of length 2.
17. What Does This Program Do?
This program counts the number of increasing factors of 2020 that sum to
less than 2020. They are 1, 2, 4, 5, 10, 20, 101, 202, 404 and 505. 17. 10 (C)
C 0 0 0
18. 37 (B)
O 1 1 1
O 3 1 4
V 6 2 16
I 7 3 37
N V R C A(R,C) S
1 4 0 4 1 1
2 8 1 3 3 4
20. 18 (A)
3 11 2 1 2 6
4 2 0 2 2 8
5 5 1 0 4 12
6 13 2 4 1 13
7 6 1 1 5 18