Computer Organization & Architecture
Unit 7: Computer Arithmetic
From binary addition to floating-point magic — master every arithmetic algorithm the CPU uses, trace them step-by-step, and conquer GATE numericals.
⏱️ 6 hrs theory + 4 hrs lab | 🎯 GATE ~3 marks | 🖥️ ARM Cortex Multiplier
📝 30 MCQs (Bloom's Mapped) | 6 Numerical Problems | 5 GATE Practice Questions
Opening Hook — How Your Phone Calculates a Bank EMI in Nanoseconds
🏦 ₹10 Lakh Home Loan EMI — Calculated in 0.000000003 Seconds
Open any banking app — HDFC, SBI, ICICI — and tap the EMI calculator. Enter ₹10,00,000 loan, 8.5% interest, 20 years. In literally 3 nanoseconds, your phone shows ₹8,678/month. How?
Inside your phone's ARM Cortex-A78 processor sits a dedicated hardware multiplier — a circuit that multiplies two 64-bit numbers in a single clock cycle. That EMI formula needs multiplication, division, and exponentiation — all done by computer arithmetic circuits we'll study in this chapter.
The same arithmetic unit inside India's Chandrayaan-3 navigation computer calculated trajectory corrections that landed Vikram exactly at the lunar south pole. The same Booth's multiplier algorithm running inside ISRO's onboard processors processed thousands of multiply operations per second to adjust thrust vectors.
What if YOU understood exactly how the CPU does math? Not just "it adds numbers" — but the actual bit-level shift, add, complement, and overflow detection that makes digital arithmetic work? That's what this chapter delivers.
Learning Outcomes — Bloom's Taxonomy Mapped (12 Outcomes)
| Bloom's Level | Learning Outcome |
|---|---|
| 🔵 Remember | LO1: State the rules for 2's complement representation and list the steps of Booth's algorithm |
| 🔵 Remember | LO2: Recall the IEEE 754 single-precision format — sign bit, 8-bit exponent (bias 127), 23-bit mantissa |
| 🟢 Understand | LO3: Explain why 2's complement is preferred over sign-magnitude for hardware arithmetic |
| 🟢 Understand | LO4: Describe how overflow is detected in signed addition using carry-in and carry-out of the MSB |
| 🟡 Apply | LO5: Perform binary multiplication using the shift-and-add method with a complete trace table |
| 🟡 Apply | LO6: Execute Booth's algorithm for signed multiplication including negative operands |
| 🟡 Apply | LO7: Carry out restoring and non-restoring division with quotient and remainder |
| 🟡 Apply | LO8: Convert a decimal number to IEEE 754 single-precision floating-point format |
| 🟠 Analyse | LO9: Compare restoring vs non-restoring division in terms of steps, complexity, and hardware cost |
| 🟠 Analyse | LO10: Analyse Booth's algorithm's advantage when the multiplier has consecutive 1s or 0s |
| 🔴 Evaluate | LO11: Evaluate trade-offs between hardware multiplier (area/speed) vs software multiplication (flexibility) |
| 🔴 Create | LO12: Design and implement a Booth's multiplier simulator in Python |