Digital
Electronics
Interview Series
Number Systems
Page 1
Digital Electronics Series
Number Systems Interview Questions
1. What’s the difference between signed magnitude and 2’s
complement representation?
Signed magnitude uses the MSB as a sign bit, but arithmetic becomes
complex. 2’s complement allows the same circuitry for addition and
subtraction, removing +0/-0 ambiguity.
2. How do you detect overflow in 2’s complement addition?
If two operands have the same sign and the result has a different sign,
that’s overflow. Hardware-wise, it’s when the carry into the sign bit
doesn’t equal the carry out.
3. Convert -19 to 8-bit 2’s complement.
First, +19 is 00010011. Invert: 11101100, add 1: 11101101. So -19 is
11101101.
4. What’s the smallest and largest number you can represent in 8-
bit 2’s complement?
Smallest: -128 (10000000), Largest: +127 (01111111)
5. Why is Gray code used in asynchronous counters or rotary
encoders?
It prevents multiple-bit transitions between states, which reduces
glitches in mechanical and asynchronous circuits.
6. Convert binary 101101 to Gray code.
MSB stays the same. Then each next bit is the XOR of the previous
binary and the current. So it becomes: 111111.
7. What is a carry-lookahead adder, and why is it important in
number operations?
It computes carries in parallel using propagate/generate signals. This
By: Adithya Mallisetti
Page 2
reduces the delay in large bit-width binary additions compared to
ripple carry.
8. What is saturation arithmetic, and where would you use it?
In saturation arithmetic, if a result exceeds the range, it’s clamped. It’s
useful in image and signal processing where overflow distortion must
be avoided.
9. Explain 9’s and 10’s complements in decimal systems.
9’s complement = each digit subtracted from 9.
10’s complement = 9’s complement + 1.
These are used to implement subtraction by addition.
10. How is subtraction implemented using 2’s complement?
By adding the 2’s complement of the subtrahend to the minuend. This
unifies addition and subtraction in hardware.
11. What is the role of sign extension in arithmetic operations?
Candidate:
To preserve the sign and value when increasing the bit width of signed
numbers, especially during operations like ALU instructions.
12. What is the 2’s complement of the 8-bit number 10000000?
That’s -128, and its own 2’s complement is also 10000000 due to
overflow. So it wraps back to itself.
13. How do you convert an unsigned binary to BCD?
I use the double-dabble (shift-and-add-3) algorithm — shift bits and
conditionally add 3 to BCD columns.
14. Why is binary coded decimal (BCD) inefficient?
Because it wastes bits — only 10 out of 16 combinations in a nibble
are used. Arithmetic requires extra logic for corrections.
15. How does the choice of number system affect hardware
complexity?
By: Adithya Mallisetti
Page 3
Binary is simplest due to natural alignment with digital logic. Systems
like BCD or redundant representations add logic and area.
16. What’s the hexadecimal representation of -1 in 8-bit signed 2’s
complement?
It’s 11111111 in binary, which is 0xFF in hex.
17. How do you convert 11010110 to octal and hexadecimal?
Octal: 110 101 110 → 6 5 6 → 656
Hex: 1101 0110 → D6
18. What’s the difference between arithmetic and logical right
shift?
Arithmetic shift preserves the sign (MSB stays the same). Logical
shift always introduces 0 from the left.
19. Describe how subtraction can result in overflow.
When subtracting numbers of opposite signs, if the result’s sign
differs from the minuend, overflow has occurred.
20. How is a sign checked in 2’s complement numbers?
The MSB determines the sign. 0 = positive, 1 = negative.
21. Explain carry-save representation in multiplication.
It stores intermediate carries separately, avoiding full addition until
the last step — great for speeding up multi-operand addition.
22. What is the advantage of using modulo-2 arithmetic in
hardware?
It eliminates carries. XOR gates implement modulo-2 addition
directly, used in CRCs and error detection.
23. Why do digital systems prefer base-2 over base-10 or others?
Base-2 maps directly to bistable elements (0 or 1), which are easier
and cheaper to implement and more noise-immune.
24. Describe the operation of a priority encoder using binary
outputs.
By: Adithya Mallisetti
Page 4
It outputs the binary position of the highest-priority ‘1’ bit input. It's a
hardware-efficient way to encode status vectors.
25. In a 4-bit adder, what’s the issue if the inputs are signed and
overflow is ignored?
You might misinterpret results — for example, adding two large
positives can give a negative result without warning. Overflow must
be detected and flagged in signed operations.
26. What’s the advantage of using 2’s complement over 1’s
complement for negative number representation?
2’s complement simplifies arithmetic operations by eliminating dual-
zero ambiguity and enables unified addition logic.
27. Explain what is a weighted code?
In a weighted code, the value of a digit in a 4-bit code depends on its
position such as in BCD code.
28. Explain what an excess-3 code?
Excess-3 code is derived from the natural BCD code by adding (0011)
to each coded number.
29. Explain why hexadecimal code is widely used in digital
systems?
It is very convenient to enter binary data in a digital system using a
hex code.
30. Explain what is the difference between binary code and BCD?
BCD is not a number system like binary. It is a decimal system with
each decimal digit encoded in its binary equivalent. A straight binary
code takes the complete decimal number and represents it in binary,
while the BCD code converts each decimal digit to binary
individually.
By: Adithya Mallisetti