Creating an Arithmetic Logic Unit (ALU)

Discussion in 'Homework Help' started by The_Cook, Feb 29, 2016.

May 29, 2014
48
0
I need some help with creating an ALU. It will be a part of a bigger control unit. It needs to have the following functions: ALU/inc_y(by 2), ALU/add, ALU/sub (other input from y), ALU/or, ALU/and, ALU/shift_right, ALU/shift_left, ALU/not. I've looked online and found these :

Truth Table :

Circuit:

Can some please tell me if this is correct and explain what is going on in the diagram. The A and B inverts, the carry in and outs and the operation.

2. ian field Distinguished Member

Oct 27, 2012
4,459
792
Watch eBay for a vintage 8008 - its pretty much an ALU and not much else.

Apr 5, 2008
15,806
2,389
Hello,

You might want to have a look at the 74181.

Bertus

• 74181.pdf
File size:
493.2 KB
Views:
4

May 29, 2014
48
0
So if I were to use that for a 16 bit design, what would I need to do? I was skimming through the specs, couldn't find anything on a carry bit

5. WBahn Moderator

Mar 31, 2012
18,089
4,917
Is this some kind of school project? If so, a bit more context might be helpful (such as what the constraints are on what you can and can't use). If not, what is the purpose of doing this from the gate level?

6. ian field Distinguished Member

Oct 27, 2012
4,459
792
archive.org has some old databook manuals, some from obscure semiconductor companies. Among that lot are some very detailed descriptions of complex (for the day) logic functions.

It'll take a bit of research effort, but I'm reasonably sure you'll find what you need there.

Apr 5, 2008
15,806
2,389
Hello,

You can make use of a 74182 in combination with 4 X 74181 to make it 16 bits.

Bertus

File size:
493.2 KB
Views:
4
• 74182_motorola.pdf
File size:
178.1 KB
Views:
1

May 29, 2014
48
0
Yeah it is. So the constraints are we can use gate level components and other things that are provided in logisim

9. WBahn Moderator

Mar 31, 2012
18,089
4,917
Thanks. So this thread should be in Homework Help, where it will get the attention of more people that like to focus on helping students with schoolwork in a way that they can learn the concepts. So we'll get it moved over.

10. WBahn Moderator

Mar 31, 2012
18,089
4,917
MOD NOTE: Thread moved from forum The Projects Forum

May 29, 2014
48
0
Thanks for moving the thread. In addition to performing those functions, the ALU has to support these functions for control unit it will go into:
• word size of 16-bits
• memory address bus size of 16-bits
• 64K byte main memory
• a 16-bit program status word (PSW) with status bits.
• 16 conditionally executed instructions
• 8 16-bit General Purpose Registers
• a 16-bit program counter (PC) which is also Reg[7]
• a 16-bit count-down timer that causes a timer interrupt
• 2’s complement number representation

12. WBahn Moderator

Mar 31, 2012
18,089
4,917
So does a 74181 fall under "gate level components" or "other things provided in logisim"? If you are relying on the second one, I would recommend asking your instructor if it is really far game since the wording implies that the "other things" is exclusive of the logic components (and, instead, includes switches, displays, timers, clocks, and stuff like that).

May 29, 2014
48
0
We're only allowed to use the gates provided in Logisim.

14. WBahn Moderator

Mar 31, 2012
18,089
4,917
The first thing you need to do is draw a black box that has all the needed I/O. So identify ALL of your inputs and ALL of your outputs.

After you get that done, identify ALL of the functions that the ALU needs to perform. Then figure out how to perform them one at a time. I would recommend grouping them into two categories -- Arithmetic and Logic (hence the name ALU).

Once you have figured out how to perform each of them, then you are ready to consider how you can use the control inputs to determine which function gets performed.

There are many ways of doing this. One brute force way would be to have your ALU always perform all possible functions and then just use the control signals to select which function feeds the output via a MUX.

But don't try to do it all at once. Once approach is to add the functions one at a time until you have the entire ALU built up.