Home » Computer Organization and Architecture » Computer organization and architecture miscellaneous » Question

Computer organization and architecture miscellaneous

Computer Organization and Architecture

  1. Consider the ALU shown below :
    If the operands are in 2’s complement representation, which of the following operations can be performed by suitably setting the control lines K and C0 only (+ and – denote addition and subtraction respectively)?
    1. A + B and A – B but not A + 1
    2. A + B and A + 1 but not A – B
    3. A + B but not A – B or A + 1
    4. A + B and A – B and A + 1
Correct Option: A

Case I :- If k = 1, that means output of EX-OR gate is in complemented form. If add 1 (by setting CO = 1) to this complemented form then it becomes 2S complement of B. now adding A to the 2’S complement of B is nothing but subtraction.
Case II :- If k = 0, EX-OR Simply return B. Add A to B without setting co i.e, K = 0,
C 0 = 0, return addition of A and B ⇒ (A+ B)
Case III :- We cannot increment A value without changing B content So A + 1 is not possible with given condition. Hence option (A) is correct.



Your comments will be displayed only after manual approval.