Assignment 3
Assignment 3
Assignment 3
Course Instructor : _Mr. Sumit Mittu_____________ Course Tutor (if applicable) : ____________
Declaration:
I declare that this assignment is my individual work. I have not copied from any other student’s
work or from any other source except where due acknowledgment is made explicitly in the text,
nor has any part been written for me by another person.
Student’s Signature : _Ujjwal Jaryal____________
Evaluator’s comments:
_____________________________________________________________________
Marks obtained : ___________ out of ______________________
Q1. Perform the logic OR & XOR with the two binary string 10011000 and 10101110 ?
Ans:-
OR Operation
10011100
10101010
11111110
XOR Operation
10011100
10101010
00110110
Q2. “Micro programmed control better than hardwired”. Justify, also Identify some situations
when hardwired is preferred.
Ans:- The classical method of sequential circuit design. It attempts to minimize the amount of
hardwire, in particular, by using only log2p flip flops to realize a p state circuit.
An approach that uses one flip flop per state. While expensive in terms of flip flops, this
method simplifies controller unit design and debugging.
We prefer hardwired because changes can occur in hardwired but in microoperations changes
can’t occur.
Q3. Consider the process of division of two binary numbers, 10100011 by 1011, specify the
contents of E, A, Q and SC.
Ans:- For the division algorithm, the value of the dividend is stored in A, E is initialized to 0, Q
to also to 0 & SC to the no. of bits in the divisor. So, their values will be-:
E A Q SC
0 101000011 0000 4
Q4. Derive an algorithm in flowchart form for subtracting two fixed point binary numbers when
negative numbers are in signed-1’s complement representation
Ans:-
This is the flowchart for the subtraction of two binary nos. in signed 1’s complement form.
Q6. Show that adding B after A+B’+1 restores the original value of A. what is done with the
final carry.
Ans:- A +B’ + 1 performs perform A-B & adding B we will get A-B+B which is equal to A.
Let us illustrate this with the help of an example-:
B’=1101
B’+1=1101+1=1110
A+B’+1=11011
The 1 at the 5th bit is carry & will be discarded. So, the final answer will be 1011. Now adding B
which is 0010 to 1011-:
A+B’+1+B=0010+1011=1101
which is the original value of A. Hence, we see that adding B after A+B’+1 restores the original
value of A & the final carry is discarded.