GATE CS - DIGITAL LOGIC:Number Systems and Binary Arithmetic
Mastering number systems and binary arithmetic concepts and implementation.
Number Systems and Binary Arithmetic for GATE CS
GATE asks base conversion, 2's-complement arithmetic / overflow, and occasionally IEEE 754 bit fields. Keep a worked subtraction on paper every practice session.
Bases
Binary ↔ decimal ↔ hex. Hex nibble = 4 bits. For fractions, multiply/divide by the base.
2's complement
n-bit range: (-2^{n-1}) … (2^{n-1}-1).
Negate: invert bits, add 1.
(A - B = A + ( ext{2's complement of } B)).
Overflow (signed)
Overflow if carry into MSB ≠ carry out of MSB (equivalently: adding two positives yields negative, or two negatives yields positive).
Worked
4-bit: 0111 + 0001 = 1000 → (+7)+(+1) = −8 in 2's complement → overflow.
Adders
Half adder: S = A⊕B, C = AB.
Full adder: S = A⊕B⊕Cin, Cout = majority.
Ripple vs CLA appears as delay-concept options more than full designs.
IEEE 754 (single, exam level)
1 sign + 8 exponent (bias 127) + 23 mantissa.
Value ≈ (−1)^s × 1.m × 2^(E−127) for normals. Specials: all-E-zero (subnormal/zero), all-E-one (Inf/NaN).
Previous: K-maps. Hub: GATE. Quizzes: Digital Logic quiz.