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
Show answer & explanation
When performing binary subtraction 11101 – 01110, we process each bit from right to left. A borrow is required whenever the minuend bit is smaller than the subtrahend bit. Analyzing each column: bit 0 (1–0=1, no borrow), bit 1 (0–1 requires borrow), bit 2 (1–1=0 after borrow, no new borrow needed), bit 3 (1–1=0, no borrow), bit 4 (1–0=1, no borrow). However, the cascading effect of borrows requires a total of 3 borrow operations across the subtraction process.
Step-by-step Derivation:
Binary subtraction of 11101 – 01110:
11101
- 01110
Column-by-column analysis (right to left):
- Bit 0: 1 – 0 = 1 (no borrow)
- Bit 1: 0 – 1 = need to borrow from bit 2 → (2+0) – 1 = 1 [BORROW 1]
- Bit 2: (1–1) – 1 = need to borrow from bit 3 → (2+0) – 1 = 1 [BORROW 2]
- Bit 3: (1–1) – 1 = need to borrow from bit 4 → (2+0) – 1 = 1 [BORROW 3]
- Bit 4: (1–1) = 0
Result: 01111 (which is 15 in decimal)
Verification: 29 – 14 = 15 ✓
Total borrows required: 3