Combinational circuit that calculates sum

Thread Starter

Giorgos Alexakis

Joined Feb 8, 2019
17
Hello everyone ,
This is an exam question I'm trying to figure out for my finals tomorrow.
"Draw a combinational circuit that calculates the sum S=4A+3B where A=a1a0 B=b1b0 (2bit unsigned). You can use only half adders and full adders but keep it to the minimum".
 

Thread Starter

Giorgos Alexakis

Joined Feb 8, 2019
17
hi Giorgos,
Please post your attempt at answering the question, so that we can guide you through the problem.
E
I was thinking of using carry lookahead with Pi=Ai xor Bi , Gi=Ai Bi but i get confused with multiplication as with two bits I can only represent numbers from 0 to 3
 

WBahn

Joined Mar 31, 2012
24,971
How were you planning on using carry-lookahead if you are only allowed to use half-adders and full-adders?

Hint: You can do this with just three components.
 

WBahn

Joined Mar 31, 2012
24,971
Do you mean this : Si=Pi xor Ci , Ci+1=Gi+Pi Ci ??
What is "this"?
Is it your attempt at a solution?
Is it your model of a half-adder and/or full-adder?

Please define your terms. What is S,P,G,C?

Draw (and post) a sketch of how you would hook up nothing but half-adders and/or full-adders to implement this circuit. Just take your best shot.

Do you understand how to get 2A from A without any components at all?
 

Thread Starter

Giorgos Alexakis

Joined Feb 8, 2019
17
What is "this"?
Is it your attempt at a solution?
Is it your model of a half-adder and/or full-adder?

Please define your terms. What is S,P,G,C?

Draw (and post) a sketch of how you would hook up nothing but half-adders and/or full-adders to implement this circuit. Just take your best shot.
S(sum) P(propagation) G(generation) C(carry)
 

Attachments

WBahn

Joined Mar 31, 2012
24,971
S(sum) P(propagation) G(generation) C(carry)
Okay, so that's a full-adder.

Now make and attempt to use one or more of those, and/or one or more half-adders, to implement the desired function.

Perhaps start with something simpler, like Y = 3B.

This can be done with just two half-adders.
 

WBahn

Joined Mar 31, 2012
24,971
I hope its something like this... I consider 3 as a binary which is 11 and I named it Z. I used the multiplication logic
Your task is to do it with half-adders and/or full-adders.

You have a basket containing a bunch of half-adders and a basked containing a bunch of full-adders.

You have to make your circuit using NOTHING but what is available in those two baskets.

You do not have AND gates.

You do not have XOR gates.

You have half-adders and you have full-adders.

Nothing else!

Your schematic must consist of nothing but boxes labeled HA and/or boxes labeled FA and wires connecting them.

A HA has two inputs ('a' and 'b') and two outputs ('sum' and 'carry').

A FA has three inputs ('a', 'b', 'c') and two outputs ('sum' and 'carry').
 

Thread Starter

Giorgos Alexakis

Joined Feb 8, 2019
17
Your task is to do it with half-adders and/or full-adders.

You have a basket containing a bunch of half-adders and a basked containing a bunch of full-adders.

You have to make your circuit using NOTHING but what is available in those two baskets.

You do not have AND gates.

You do not have XOR gates.

You have half-adders and you have full-adders.

Nothing else!

Your schematic must consist of nothing but boxes labeled HA and/or boxes labeled FA and wires connecting them.

A HA has two inputs ('a' and 'b') and two outputs ('sum' and 'carry').

A FA has three inputs ('a', 'b', 'c') and two outputs ('sum' and 'carry').
So something like this for 3B ??.And if that is correct I can do it with just one FA right ?
 

Attachments

WBahn

Joined Mar 31, 2012
24,971
I'm sorry i can't understand how to do it
Say I have three wires going into a box that represent a 3-bit value with A = <A2,A1,A0>.

Now say I have five wires coming out of the box that represent a 6-bit value with Y = <Y5,Y4,Y3,Y2,Y1,Y0>

Inside the box I connect a wire from A2 to both Y5 and Y2, from A1 to both Y4 and Y1, and from A0 to both Y3 and Y0.

What is the mathematical relationship between Y and A?
 

Thread Starter

Giorgos Alexakis

Joined Feb 8, 2019
17
Say I have three wires going into a box that represent a 3-bit value with A = <A2,A1,A0>.

Now say I have five wires coming out of the box that represent a 6-bit value with Y = <Y5,Y4,Y3,Y2,Y1,Y0>

Inside the box I connect a wire from A2 to both Y5 and Y2, from A1 to both Y4 and Y1, and from A0 to both Y3 and Y0.

What is the mathematical relationship between Y and A?
A=2Y ?
 

Thread Starter

Giorgos Alexakis

Joined Feb 8, 2019
17
Nope.

Draw it out and put in a few values and see what the output values are?

Do you see the pattern?
You know i have to get some sleep, its too late here .Im taking my final exam in 6 hours .Thank you for your responses
If i don't pass at least I hope to understand the problems for the next time so Im going to reply after the results maybe.
 

WBahn

Joined Mar 31, 2012
24,971
You know i have to get some sleep, its too late here .Im taking my final exam in 6 hours .Thank you for your responses
If i don't pass at least I hope to understand the problems for the next time so Im going to reply after the results maybe.
Get some sleep and do the best you can. At this point, if you don't know it, cramming another few hours isn't going to make a magical difference -- you'll pass our you won't. If you don't, you have a much better idea of what you are in for and how much sooner you need to get a handle on things.

Good luck.
 
Top