GIKI Test study materials
GIKI Test study resources

GIKI Test: Computer Sciences and Engineering: Representation, Semantics and Complexity

GIKI Test · Work through your exam, one topic at a time.

All guide sections

Computer Sciences and Engineering: Representation, Semantics and Complexity

What this section tests

The Computer Sciences and Engineering section tests the parts of computing that are provable on paper: number systems and two's complement, data representation, C-family expression semantics, arrays and pointers, algorithm tracing, asymptotic complexity, Boolean algebra, and light coverage of operating systems, databases and networks.

Core rules

  • Binary/hex conversion: group bits in fours for hex; decimal to binary by repeated division, remainders read upward.
  • Two's complement: invert all bits and add 1 to negate. An n-bit signed integer spans −2^(n−1) to 2^(n−1) − 1.
  • Array indexing is 0-based; in C, a[i] equals *(a + i), so pointer arithmetic scales by element size, not bytes.
  • Complexity: a loop running n times with a constant-time body is O(n); two nested loops over n are O(n²); halving the range each step is O(log n).
  • Integer division truncates toward zero; short-circuit && and || skip the right operand.

Worked example

Represent −5 in 8-bit two's complement. +5 = 0000 0101. Invert: 1111 1010. Add 1: 1111 1011. Check: read as unsigned, 1111 1011 = 251, and 251 − 256 = −5. Correct. Because the range is −128 to +127, the value −128 has no positive counterpart: negating 1000 0000 returns 1000 0000. That asymmetry is a favourite exam trap.

Traps

Assuming 8-bit when the question says 16-bit; confusing % (remainder) with / (quotient) for negative operands; labelling an algorithm O(n log n) when only the outer structure was analysed; mixing a stack (LIFO) with a queue (FIFO).