# Design an ALU that only adds

I need some help designing a simple ALU that only can add (4-bit) numbers. For the design I can only use 4-bit full adders and 4-bit edge-triggered flip-flops.

I am stuck as I do not even know where to start. Thanks for any help.

• If all it does is add, doesn't that prevent it from being an ALU? – W5VO Oct 28 '15 at 2:56
• Do you know how to make a 1-bit adder? Start there. Your adders will have carry out and carry in lines, so use them. – WhatRoughBeast Oct 28 '15 at 3:18
• @WhatRoughBeast The OP doesn't need to build an adder. His question says he can already use a 4-bit adder as a component. – tcrosley Oct 28 '15 at 9:41
• I'm I missing something here, or.. you have a 4bit adder, you want to add 4 bit numbers. Connect the 4bit numbers to the 4bit adder and you magically have the result, what else does a 4bit adder do... – Tom Carpenter Oct 31 '15 at 1:34
• I'll put a link to a video here that explains a lot about adders. This will be what you need. – BloodOnMyBlade Oct 31 '15 at 2:19

I'll give you a building block, the full adder, and how it is supposed to work in most cases:

simulate this circuit – Schematic created using CircuitLab

Now, what we are showing there is that the Sum voltage will be logic $1$ if only two out of three inputs are 1's. For the Carry, it outputs a 1 when at least 2 inputs are 1's. How would you make a chain of Full Adders to get the addition of the n-th bit and send its carry to the next unit?

• The OP is already allowed to use 4-bit full adders as a building block, so showing a single full adder is not much use. – tcrosley Oct 28 '15 at 7:48
• Well, the point is to use an adder AND a register in s way it acts like ALU and the sum is stored in the register. – Timur Galiullin Oct 28 '15 at 15:25
• @tcrosley The idea is to give him some intuition on what's happening in the adder. Understanding what the full adder does itself might help him figure it out. – Cehhiro Oct 28 '15 at 18:02

Assuming that an ALU doesn't include the registers used to store the values involved (e.g. https://en.wikipedia.org/wiki/File:CPU_block_diagram.svg ), I think you'll find that the full adder is almost everything you need. Play around with this if you have access to a simulator, the actual hardware, or programmable chips. If not, consider working through successive states of your proposed circuit using paper and pencil.