Training Computer Engineering Placement Test Practice — Computer Engineering
5 / 5

Placement Test Practice — Computer Engineering

25 min Computer Engineering

Placement Test Practice — Computer Engineering

These problems cover number systems, Boolean algebra, algorithm complexity, and modular arithmetic.

Practice Test — 25 Questions

1. Convert $(10101100)_2$ to decimal.
2. Convert decimal 100 to binary.
3. Convert $(\text{FF})_{16}$ to decimal.
4. Add $(1111)_2 + (0001)_2$.
5. What is $-12$ in 8-bit two's complement?
6. Simplify: $A + \overline{A}B$.
7. Apply De Morgan's: $\overline{(A + B) \cdot C}$.
8. How many rows in a truth table with 4 inputs?
9. What is the Big-O of $5n^3 + 2n^2 + n$?
10. Binary search complexity on $n = 1{,}000{,}000$: how many comparisons at most?
11. What is $\gcd(48, 18)$?
12. Find $23 \bmod 6$.
13. A nested loop (outer: $n$ times, inner: $n$ times). Complexity?
14. Convert $(1010)_2$ to octal.
15. What is $2^{16}$?
16. Simplify: $(A + B)(A + \overline{B})$.
17. Last digit of $9^{75}$.
18. A sorting algorithm makes $n(n-1)/2$ comparisons. Big-O?
19. If $p = 7$, $q = 13$ in RSA, find $n$ and $\phi(n)$.
20. Find the multiplicative inverse of 5 mod 7.
21. $T(n) = T(n/2) + O(1)$. What is $T(n)$?
22. How many bits needed to address 4 GB of memory (byte-addressable)?
23. XOR: $1 \oplus 0 \oplus 1 \oplus 1 = ?$
24. A linked list: best/worst lookup time?
25. Convert $(\text{2A3})_{16}$ to decimal.
Show Answer Key

1. $128 + 32 + 8 + 4 = 172$

2. $(1100100)_2$

3. $15 \times 16 + 15 = 255$

4. $(10000)_2 = 16$

5. $12 = 00001100$; invert: $11110011$; +1: $11110100$

6. $A + B$ (absorption)

7. $(\overline{A} \cdot \overline{B}) + \overline{C}$ — apply De Morgan's: $\overline{A+B} + \overline{C}$, then $\overline{A+B} = \overline{A}\overline{B}$

8. $2^4 = 16$ rows

9. $O(n^3)$

10. $\lceil\log_2 10^6\rceil = 20$ comparisons

11. $48 = 2(18) + 12$; $18 = 1(12) + 6$; $12 = 2(6) + 0$; $\gcd = 6$

12. $23 = 3(6) + 5$; answer: $5$

13. $O(n^2)$

14. Group bits: $001\;010 = 12_8$

15. $65{,}536$

16. $A$ (consensus/absorption)

17. $9^1=9, 9^2=1$ (mod 10, period 2); $75$ is odd → last digit $9$

18. $O(n^2)$

19. $n = 91$, $\phi = 72$

20. $5 \times 3 = 15 \equiv 1 \pmod 7$; inverse is $3$

21. $O(\log n)$ — binary search recurrence

22. $4$ GB $= 2^{32}$ bytes; 32 bits

23. $1 \oplus 0 = 1$; $1 \oplus 1 = 0$; $0 \oplus 1 = 1$; answer: $1$

24. Best: $O(1)$ (first element); Worst: $O(n)$ (last element)

25. $2(256) + 10(16) + 3 = 512 + 160 + 3 = 675$