Almost every Digital Electronics answer starts here. If you can move a value between binary, octal, decimal and hexadecimal without hesitation, and compute a complement cleanly, a whole class of GATE questions becomes free marks. If you cannot, everything from Boolean simplification to computer arithmetic feels shaky. This post builds number systems from the place-value idea up to signed representations, with a conversion you can trace by hand.
Number systems: base, radix and place value
A positional number system with base (radix) r uses r distinct digits, 0 to r-1, and the position of a digit fixes its weight. In base r, the digit at position i (counting from 0 at the rightmost integer position) carries the weight r raised to i. The four bases you must know cold are decimal (r=10), binary (r=2, digits 0 and 1), octal (r=8) and hexadecimal (r=16, digits 0-9 then A-F for 10-15).
So the binary number 1011 is not "one thousand and eleven". It is a weighted sum:
1 times 2^3, plus 0 times 2^2, plus 1 times 2^1, plus 1 times 2^0, which is 8 + 0 + 2 + 1 = 11 in decimal.

That single picture, digits sitting over their weights, is the whole idea. Fractions extend it to the right of the point with negative powers: the first fractional position has weight r^-1, the next r^-2, and so on.
Base conversions: the two core algorithms
Every conversion reduces to two procedures, plus a shortcut for the power-of-two bases.
Any base to decimal: positional expansion
Multiply each digit by its weight and add. For hexadecimal 2AF:
2 times 16^2, plus A (=10) times 16^1, plus F (=15) times 16^0, which is 512 + 160 + 15 = 687.
Decimal to any base: divide the integer, multiply the fraction
For the integer part, repeatedly divide by the target base and read the remainders bottom to top. Convert decimal 156 to binary:
156 / 2 = 78 remainder 0
78 / 2 = 39 remainder 0
39 / 2 = 19 remainder 1
19 / 2 = 9 remainder 1
9 / 2 = 4 remainder 1
4 / 2 = 2 remainder 0
2 / 2 = 1 remainder 0
1 / 2 = 0 remainder 1
Reading the remainders from the last division up, 156 in decimal is 10011100 in binary. For a fractional part, do the mirror image: repeatedly multiply by the base and read the integer parts top to bottom. For 0.625 to binary, 0.625 x 2 = 1.25 (carry 1), 0.25 x 2 = 0.5 (carry 0), 0.5 x 2 = 1.0 (carry 1), giving 0.101.
Binary to octal or hexadecimal: just group the bits
Because 8 = 2^3 and 16 = 2^4, you never route through decimal. Group binary digits from the point outward, three at a time for octal, four at a time for hexadecimal, padding with leading zeros. The binary 10011100 groups as 1001 1100, which is 9C in hexadecimal, and as 010 011 100, which is 234 in octal. Reversing the grouping expands octal or hex back to binary. Memorise this and most inter-base conversions take seconds.
r's and (r-1)'s complement
Complements let a machine subtract using only addition, which is why they matter. For a base r and an n-digit number N:
The (r-1)'s complement is (r^n - 1) - N. In binary this is the 1's complement, obtained by flipping every bit. In decimal it is the 9's complement.
The r's complement is r^n - N, which equals the (r-1)'s complement plus 1. In binary this is the 2's complement (flip every bit, add 1); in decimal, the 10's complement.
To subtract M - N, add M to the r's complement of N. If a carry comes out of the most significant position, discard it and the result is positive. If no carry appears, the result is negative and its magnitude is the r's complement of what you got. Worked in binary, 1101 (13) minus 1010 (10): the 2's complement of 1010 is 0110, and 1101 + 0110 = 1 0011. Discard the end carry, and the answer is 0011, which is 3. Correct, and no borrow logic was needed.
Signed number representation
Computers store signed integers in one of three schemes, and the exam tests the boundaries between them.
Scheme | How the sign is stored | Range for n bits | Zero |
|---|---|---|---|
Sign-magnitude | Leftmost bit is the sign, rest is magnitude | -(2^(n-1) - 1) to +(2^(n-1) - 1) | Two zeros (+0, -0) |
1's complement | Negatives are the bitwise complement | -(2^(n-1) - 1) to +(2^(n-1) - 1) | Two zeros (+0, -0) |
2's complement | Negatives are complement plus 1 | -2^(n-1) to +(2^(n-1) - 1) | One zero |
Two's complement wins in real hardware because it has a single representation of zero and one uniform addition circuit handles both signs. In 4 bits, -3 is stored as the 2's complement of 0011, which is 1101. Notice the asymmetric range: 2's complement reaches -8 but only +7, the one negative value with no positive twin.
BCD and Gray code
Two coded representations round out the topic. Binary Coded Decimal (BCD) encodes each decimal digit separately in 4 bits, so 59 becomes 0101 1001, not the pure binary 111011. BCD wastes range (the patterns 1010 to 1111 are unused) but keeps decimal digits human-readable, which suits displays and calculators. Gray code is a reflected binary code in which consecutive values differ in exactly one bit, for example 00, 01, 11, 10. That single-bit-change property prevents transient glitches in position encoders and is the reason Gray code shows up again when you group cells in a K-map.
How number systems are tested in GATE
Number System is one of the densest sub-areas in the KnowledgeGate published bank, with about 250 published questions under it inside a Digital Electronics pool of over 1,500. Across GATE CS the reliable patterns are: a direct inter-base conversion, a complement-based subtraction asking for the final bit pattern, a signed-representation range question ("what is the smallest number an 8-bit 2's complement register can hold"), and an overflow-detection question on adding two signed values. None of these reward memorisation; they reward being able to run the divide-and-remainder and the flip-and-add-one procedures without slips.
The most common avoidable error is forgetting the asymmetric 2's complement range and answering 2^(n-1) - 1 for the minimum. The second is mis-grouping bits for octal versus hexadecimal, three at a time versus four. Fix both by drilling, not re-reading.
The short version
Learn place value once, then own the two conversion procedures and the flip-and-add-one for 2's complement. Work the full topic with solved examples on the Number System learn module, and see where it sits across the subject on the Digital Electronics learn hub. For the full GATE sequence with number systems taught before Boolean algebra and arithmetic circuits, GATE Guidance by Sanchit Sir orders it the way the syllabus builds, and the CS Fundamentals category collects the supporting material.




