4-BIT ALU IN LOGISIM
Hello readers, I am Farhan Ahmed. I design a 4-bit ALU using Logisim. Today I will tell you all you need to design your own 4-bit ALU using Logisim.
What is Logisim?
When learning computer architecture and logic circuits, you will need a real-world, graphical example of what you are studying. Text and diagrams only go so far. A helpful tool for designing and simulating logic circuits is?Logisim.
Because the tool lets you create large circuits from smaller circuits, you can design entire CPUs using Logisim. Further, the tool will run on any computer!
The interface itself is very intuitive and the use of color-coding of wires and elements allows for easy analysis and testing of circuits. You can also save the completed file as an image, or as a .circ file (core to Logisim).
you can read more about Logisim here: Introduction to Logisim: Setup & Overview | Study.com
You can download it easily from here: Logisim download | SourceForge.net
What is ALU?
In?computing, an?arithmetic logic unit?(ALU) is a?combinational?digital circuit?that performs?arithmetic?and?bitwise operations?on?integer?binary numbers.?This is in contrast to a?floating-point unit?(FPU), which operates on?floating-point?numbers. It is a fundamental building block of many types of computing circuits, including the?central processing unit?(CPU) of computers, FPUs, and?graphics processing units?(GPUs).
The inputs to an ALU are the data to be operated on, called?operands, and a code indicating the operation to be performed; the ALU's output is the result of the performed operation. In many designs, the ALU also has status inputs or outputs, or both, which convey information about a previous operation or the current operation, respectively, between the ALU and external?status registers.
You can read more here: Arithmetic logic unit - Wikipedia
Now we understand what ALU and Logisim are Let's start designing our 4-bit ALU in Logisim.
In this 4-bit ALU that I design there are three major parts:
4-bit Arithmetic Unit
There are basically two components used in the Arithmetic Unit.
领英推荐
There are four 4:1 MUX and four Full Adders in my circuit. this arithmetic unit can perform 7 operations, including add, subtract, transfer, etc.
4-bit Logic Unit
There are four 4:1 MUX and 4 pairs of AND, OR, XOR, and NOT gates. In my circuit, we can perform the NOT operation on both inputs A and B. This Logic unit can perform 16 different logic operations that can be performed with two binary variables, including NAND, XOR, complement A, etc.
4-bit Combinational Circuit Shifter
A combinational circuit shifter can be constructed with multiplexers. The 4-bit shifter has four data inputs and four data outputs. There are two serial inputs, one for shift left and the other for shift right. When the selection input is 0, the input data are shifted right. When 1, the input data are shifted left.
Connecting above components
For connecting all components we can use four 4:1 MUX. The Four inputs in each MUX is as follows:
0 = Arithmetic Unit
1 = Logic Unit
2 = Shift Right
3 = Shift Left
The above signals are controlled by Selection inputs S3 and S2.
This ALU can perform the following operations:
When we successfully connect all the components, we will get our 4-bit ALU ready. It will be looking like this:
Your ALU design can be different, but the Logic behind this will remain the same.
Student at Govt. KRG college Gwalior M. P. work at CSIR - CIMAP Lucknow
2 年Keep it up Farhan...??. Best wishes for... Upcoming Life in this field ??
Professor at ITM University - Company
2 年Good job. All the best for your future ventures!!!