OA. free
Free
Qualcomm Embedded Systems & Hardware Embedded Systems & Hardware Medium

How many times is a borrow required to solve the below given equation?

Qualcomm technical mcq question, verified with a worked answer. Free to practise - no sign-up.

How many times is a borrow required to solve the below given equation?

A = 11101 - 01110

Choose one option.
Show answer & explanation
Answer: B. 1

In binary subtraction of 11101 - 01110, we work right-to-left column by column. Most columns can be subtracted directly (1-0=1, 1-1=0, 0-0=0), but at position 2 (from right, 0-indexed), we encounter 0-1, which requires exactly one borrow from position 3. After borrowing, 0 becomes 10 (binary 2), and 10-1=1. The result is 01111 (decimal 15).

Step-by-step Derivation:
Binary subtraction of 11101 - 01110:

11101

  • 01110

Column-by-column (right to left, position 0 to 4):

  • Position 0: 1 - 0 = 1 (no borrow needed)
  • Position 1: 0 - 1 = ? (BORROW REQUIRED from position 2)
    After borrow: 10 - 1 = 1, position 2 becomes 0
  • Position 2: 0 - 1 = ? Already borrowed, becomes: 1 - 1 = 0
  • Position 3: 1 - 1 = 0 (no borrow needed)
  • Position 4: 1 - 0 = 1 (no borrow needed)

Result: 01111
Total borrow operations: 1