📝 Adder Subtractor of Simple as Possible (SAP) I Computer (8 MCQs)
Arithmetic Unit for Addition and Subtraction
The adder-subtractor is the arithmetic unit of the SAP-I computer that performs addition and subtraction on two 8-bit operands. One operand comes from the accumulator and the other from the B register. The arithmetic circuit produces an 8-bit result that can be transferred through the common bus and loaded back into the accumulator for subsequent processing.
Internal Operand Connections and Subtraction Control
The accumulator and B register supply the two input values to the arithmetic circuit. During addition, the circuit adds both binary numbers directly. During subtraction, the controller activates the SU signal to select subtraction using a two's-complement approach. This method complements the second operand and adds the required carry-in to perform the subtraction through the adder circuitry.
Arithmetic Result Transfer and Accumulator Updating
After the operands enter the arithmetic circuit, the controller selects the required operation and enables the ALU output. The EO signal places the calculated result on the common bus, and AI loads it into the accumulator. The B register retains the second operand during this transfer, while the accumulator becomes the destination for the new result.
Numerical Demonstration of Addition and Subtraction
Assume the accumulator contains 09H and the B register contains 04H. Addition produces 0DH, which replaces the accumulator contents. Subtraction instead calculates 09H minus 04H and produces 05H. The SU control signal selects the subtraction path, demonstrating how the same arithmetic hardware can perform two different operations.
Use of Two's Complement in the Arithmetic Circuit
Binary subtraction can be performed using an adder by adding the two's complement of the second operand to the first. The two's complement is obtained by complementing every bit and adding one. The SAP-I design uses subtraction control to select this arithmetic behavior. This illustrates a common digital-circuit principle also used in arithmetic logic units of more advanced processors.
Adder-Subtractor Misconceptions and Corrections
'The adder-subtractor stores the final answer permanently' is incorrect because the accumulator receives the result. 'SUB means subtracting the accumulator from the B register' reverses the operand order; the operation calculates accumulator minus B. 'Two's complement subtraction requires a separate subtraction processor' is incorrect because an adder circuit can perform it using complemented operands and carry-in.
Binary Arithmetic and ALU Control Questions
Practise adding and subtracting 8-bit hexadecimal values and converting the results into binary. Identify the accumulator and B-register inputs and explain the purpose of SU and EO. Examination questions may require finding the two's complement of a number, tracing the resulting accumulator value or distinguishing addition from subtraction control operations.
Arithmetic Circuit and Two's-Complement Terms
- ALU - Performs addition and subtraction.
- SU - Selects subtraction operation.
- EO - Enables arithmetic unit output.
- Two's Complement - Complemented binary value plus one.
- Operand - Number used in a calculation.
- Carry-In - Input carry supplied to an adder.
📝 All Adder Subtractor of Simple as Possible (SAP) I Computer MCQs
Q1. A 4‑bit adder‑subtractor receives A = 1011₂ (11) and B = 0101₂ (5) with the control set for subtraction. Which output correctly shows the 4‑bit difference and the overflow condition?
📖 Explanation: The subtraction 1011₂ – 0101₂ equals 0110₂ (6). In two’s‑complement 4‑bit arithmetic this result fits without exceeding the sign range, so overflow does not occur. Choice B matches both the correct binary result and the correct overflow flag. Choice A shows the right result but incorrectly claims overflow. Choices C and D give the wrong binary value (1110₂) and therefore are both incorrect. This mirrors how a processor would flag an error only when the sign bit is corrupted.
Q2. Why does integrating an adder‑subtractor into a CPU typically reduce overall hardware compared to having separate adder and subtractor blocks?
📖 Explanation: A single adder‑subtractor uses one set of adders and a control line that conditionally inverts the second operand, eliminating the need for duplicate circuitry. This saves gates, which directly cuts silicon area and cost. Option D states this reduction of gates, making it correct. The other options describe effects that are not generally true: power may even drop, latency does not necessarily increase, and operand size is unchanged.
Q3. What is the definition of an adder‑subtractor circuit?
📖 Explanation: An adder‑subtractor is designed to perform either addition or subtraction on two binary operands, the operation being selected by a single control input. This matches option A. Options B and C describe only half of the functionality, and option D is unrelated to arithmetic operations, so they are incorrect.
Q4. An 8‑bit adder‑subtractor in two’s‑complement mode subtracts Y = 0001 1110₂ (30) from X = 0010 0101₂ (37). What 8‑bit result is produced?
📖 Explanation: Subtracting 30 from 37 yields 7, which in 8‑bit two’s‑complement is 0000 0111₂. Option C presents exactly this binary result. Option A (1111) corresponds to 15, Option B is the two’s‑complement of –7, and Option D (0010 1111) equals 47, none of which match the correct arithmetic. In a real processor, the circuit would output 0000 0111₂, confirming option C.
Q5. How does the control signal determine whether the circuit performs addition or subtraction?
📖 Explanation: When the control line is high for subtraction, each bit of operand B is XORed with 1, effectively complementing B; the circuit then adds a carry‑in of 1, producing A + (¬B) + 1, which is A − B. This mechanism is described in option B. Adding a carry‑in alone (option A) is incomplete without bitwise inversion, changing the clock (C) does not affect arithmetic, and swapping inputs (D) merely changes operand order, not the operation type.
Q6. A 16‑bit adder‑subtractor computes A − B where A = 0x7FFF and B = 0x0001. What is the 16‑bit result and does signed overflow occur?
📖 Explanation: 0x7FFF (32767) minus 0x0001 (1) equals 0x7FFE (32766), which still has a leading 0 sign bit, so no signed overflow occurs. Option A captures both the correct hexadecimal result and the correct overflow status. Options B and C incorrectly claim overflow, and option D gives an incorrect result (0x8000) that would indicate overflow, making them wrong. This reflects how a CPU would set or clear the overflow flag after a subtraction.
Q7. Why does two’s‑complement representation let the same adder hardware perform subtraction without extra circuitry?
📖 Explanation: In two’s‑complement, subtracting B is equivalent to adding the bitwise complement of B and then adding 1, which an adder can handle directly when a control line forces the complement and sets the initial carry‑in. Option A describes this exact principle. Options B, C, and D describe unrelated concepts: sign‑magnitude does not allow the same simple addition, carries are still needed, and floating‑point is a different representation.
Q8. A 5‑bit adder‑subtractor computes the difference between operands 01101₂ (13) and 10101₂ (21). What is the 5‑bit result and the borrow flag?
📖 Explanation: Subtracting a larger number from a smaller one yields a negative result; in 5‑bit two’s‑complement this is 11000₂ (‑8) and a borrow (or carry‑out) of 1 is generated. Option D correctly lists both the binary result and the borrow flag. Option A gives the magnitude of 6 with no borrow, which is the opposite situation. Option B pairs the correct magnitude with an incorrect borrow, and option C shows the correct negative magnitude but omits the required borrow flag, so they are all wrong. This mirrors how hardware signals a borrow when the minuend is smaller.