4 bit ALU help

Thread Starter

Adame714

Joined May 12, 2018
5
Hello there I am trying to create a 4 bit ALU with registers but I am having trouble putting it together.
I have created ever circuit needed. If someone could point me in the right direct I would greatly appreciate it :)
 

Attachments

dl324

Joined Mar 30, 2015
18,326
It's required for full credit according to the document I was given.
Post the work you've done and the full text of the problem.

I haven't looked at the RAR file you posted. I don't have any programs installed that can open them...
 

Thread Starter

Adame714

Joined May 12, 2018
5
Build a 4 bit CPU using Logisim. We have discussed just about everything you will need for this (Decoders, Multiplexers, Adders /Subtractors, Multipliers, and even some readings on Registers and Memory Cells. There are a few details you may need to readup on, such as: Shifters and Buses (data paths).

A very base view of a CPU is an Arithmetic Logic Unit, a Controller, Input, output, and Memory. The ALU has a Logical Unit that calculates results for instructions such as AND, OR, NOT, XOR, etc. The Arithmetic Unit is the Adder, Subtractor, etc. The Controller Unit, decodes the instructions and tells the other units what to do. The multiple units of the ALU are feed into a multiplexer and the controller selects the appropriate output.

Now,you are to create your 4-bitCPU from basic(simple)gates (AND,OR,XOR,NOT,etc). You may NOT use the Logisim’s libraries any of the complex built in circuits.You have to build your allyour own Decoders,Multiplexer etc. With one exception, you may use Logisim’s “D FlipFlop” as handmade latches/flipflop soften have user issues(errors onstartupandoscillation). You may use anything fromt he Wiring,Gate,Input/Output libraries(upper left windowpane of Logisimapplication). So again Logisim’s many built in circuits deciders, Multiplexers,Latches,FlipFlops,Adders,Registers,RAM,etc.areal off limits.If you need a decoder you have to build it from basic gates.



ArithmeticLogicUnit –A samplecloser towhatyouneedtocreate.A logicunitthatdoesAND,OR, XOR,NOT.Anarithmeticunitanddoesaddition,subtraction,shift(leftandright)compare,increment,decrement,multiplication*. Shiftneed anbitinput for padding value (IusedCarry in).Compare needs toreturn-1,0,1forA<BA=B, A>B respectively.Result(oroutput) is4bits(secondneedfor multiplication) andthe followingflags:Carry,Overflow,Zero, andSign. Inputsare two4bitvalues (A&B),carry-in,andthe op-code(instruction)
 

dl324

Joined Mar 30, 2015
18,326
A standard 4 bit ALU doesn't use registers; though registers are used in designing a CPU.

Are you allowed to use datasheets for commercial products? Or you supposed to use truth tables to derive the logic?
 

WBahn

Joined Mar 31, 2012
32,829
You STILL need to show the work you have done so far. We can't help you with problems you are having if you won't do that.

The first thing is to make sure that YOU know exactly WHAT it is you are trying to accomplish. Exactly what does this ALU need to be able to do. Don't just parrot some generic verbiage, list EXACTLY what it needs to do.

EDIT: Cross posted with TS's post of work so far.
 

WBahn

Joined Mar 31, 2012
32,829
Here's what I have so far
You've got a number of blocks that have no label, either for the pins or for the block as a whole. No way to know what is going on there.

Also, we can't even begin to guess if what you have is even close to what you need until you are able to list exactly what you need.
 
Top