RD3804A15 Com Arch 2
Transcript of RD3804A15 Com Arch 2
Home Work-2CAP211: COMPUTER ORGANIZATION AND
ARCHITECTURE
SUBMITTED TO: - SUBMITTED BY:-
JITESHVER ANAND SURENDRA
MCA 3nd SEM
ROLL NO- D3804A15
REGD NO- 10806601
PART-AQ1. Design a four bit combinational circuit incrementer and decrementer using full adders.
ANSWER:
B3 A3 B2 A2 B1 A1 B0 A0
M
C3 C2 C1 C0
C4 S3 S2 S1 S0
FA FA FA FA
B=1
M=0
M=1
Q2. Register A holds the 8 bit binary 11011001. Determine the B operand and the logic micro operations to be performed in order to change the value in A to
(a) 01101101 (b) 11111101
ANSWER:
a) the given register has 8-bit: 11011001. This is the value of A
the requirement is the b’s operand. With the help of the givenoutput and the a’s value. The output is -01101101,
a’s value-- 11011001
b’s value -- 10110100
in the following function the XOR function is applied:
a(+)b -- 01101101
b) the given input of the a is 11011001
the b’s input is put. 10110100 then we get 11111101 by using the or operation we can get the required output
a -- 11011001
b --00100100
the output will get as following OR AVB
A or B 11111101
Q3. Starting from initial value of R=11011101, determine the sequence of binary values in R after a logic shift left followed by circular shift right, followed by a logical shift right and a circular shift
ANSWER:
initial value (given) : R=11011101
After the logical shift left the value is R=10111010
After the circular shift right the value is R=01011101
After the logical shift right the value is R=00101110
After the circular shift left the value is R=01011100
The above shifting is complete
PART-B
Q4. Determine the micro operation that will be executed in the processor when following 14 bit control words are applies
(a) 00101001100101(b) 00000000000000
ANSWER:
(a) 00101001100101:
selA selb seld opr
r1 r2 r3 sub
micrOoperation = r3 r1— r2
(b) 00000000000000:
selA selb seld opr
input input none tsfa
microoperation:
output input
Q5.Convert the following arithmetic expressions from infix to RPN
(a) A*B+C*D+E*F(b) A*B+A*(B*D+C*E)(c) A+B*[C*D+E*(F+G)](d) A*[B+C*(D+E)]
F*(G+H)
ANSWER:
A * B + C * D + E * F
A * B + C * D + E F *
A * B + C * D E F * +
A * B + C D * E F * +
AB*CD*EF*++
A * B + A * ( B * D + C * E )
A * B + A * ( B D * C E * + )
A * B + A ( B D * C E * + ) *
A B * A ( B D * C E * + ) * +
A B * A B D * A C E * + * +
A + B* [ C * D + E * ( F + G )]
A +B *[C * D + E * F G + ]
A + B * [ C D * + E * F G +]
F G + E * C D * + B * A +
A*[B+C*(D+E)]
F*(G+H))
A * [ B + C * ( D + E ) ] F G H + * /
A * [ B + C D E + * ] F G H + * /
A B C D E + * + * F G H + * /
Q6. Convert the following from RPN to infix
(a) ABCDE+*-/(b) ABC*/D-EF/+
ANSWER:
A B C D E + * - /
A B C D + E * - /
A B C * D + E - /
A B – C * ( D + E) /
A / B – C * ( D + E )
A B C * / D - E F / +
A B * C / D – E F / +
A / B * C D – E F / +
A / (B * C – D) E F / +
A / (B * C – D) E / F +
A / (B * C) – D + E / F