Monday, December 12, 2011

How would this digital logic problem be solved?

A switching circuit has three inputs and two outputs. The output variables, a and b, represent the first and second bits, respectively, of a binary number, N.N equals the number of inputs which are 0. For example, if x=1, y=0, z=1, then a=0, b=1. Write sum of products expansion for a and b.|||So basically, you have to count how may 0's you have at the inputs x,y,z and express it in binary form.


To count the number of 0's just use the full adder circuit, which adds 3 inputs (A,B,carry-in)


Make:


A = (x==0)


B = (y==0)


carry-in = (z==0)


The outputs of the full adder are the outputs of you switching circuit.





You can implement the comparison by using XOR gates


(x==0) is equivalent to x XOR 1





The function of the full adder is:


a = A XOR B XOR carry-in


b = (A AND B) OR (carry-in AND (A XOR B))





Make the replacements and you have your final answer


Or you can build a Carnough map, if you know what it is, and extract the function directly from it.|||Programme a small ROM with the applicable outputs (a,b) for the three-bit binary addresses 0 to 7. The addressing is then driven by the three logic inputs to select the applicable output.


Standard technique.

No comments:

Post a Comment