I will be using 74LS181 ICs for my 16-bit ALU and I bought some today in a local hobby store. I decided to give a try with this little breadboard setup. It’s not really a CPU but it was fun.
The inputs are set by the DIP switch. Switches 1-4 set the A input and switches 5-8 set the B input to the ALU, with 4 and 8 being the least significant bits. The chip’s operation selector (pins 3-6) is hardwired to H-L-L-H and mode selector (pin 8) is hardwired to ground which sets the ALU mode of arithmetic addition (binary A plus B in two’s complement representation). The row of green LEDs is there to indicate the output (here the least significant bit is the one on the left) and the red LED is a carry flag.
Resistors next to the IC are 10k ohm DIP switch pull-ups. When a particular switch is off, +5V (and only) is tied to a corresponding input terminal (asserting binary zero digit as inputs to the 74LS181 are active low). With a switch on, a corresponding input terminal receives direct connection to ground, current flowing from +5V bus to ground is limited by the pull-up resistor, pin voltage is zero volts and the input value is binary one.
Resistors around LEDs are around 200 ohm each and they limit the current flowing through the LEDs to 20 or so milliamps.
It this example, A input is set to 0011 and B input is 1111. The result of binary addition of these two numbers is 10010, which is 0010 and a set carry flag in a 4 bit representation. This is indicated by the row of green LEDs (least significant bit outer left) and a red carry LED (which, believe me or not, is lit).
Ultimately, I will design with four 74LS181s and a lookahead carry generator. The 74LS182 is a lookahead carry generator typically used with 181 but looks like it is hard to get, at least here in Poland. I will probably buy it off US ebay or think of another way of generating outgoing carry from 16-bit operations. Just connecting Cn and Cn+4 inputs and outputs of individual 181s is unacceptable due to high latency of such ripple carry setup.
what is the procedure of making that, using 74LS181, dip switch, and LED…I’m so confuse about our project..please help me..t
It is very simple. I plugged the ‘181 ALU, connected a dip switch to its inputs, and a couple of leds to its outputs. By changing the inputs on a dip switch (with function number hardwired) I observed the outputs on LEDs. It is a simplest possible digital circuit on a breadboard. If you want to learn more about digital electronics, I suggest some good reading (see this post).
you have a circuit diagram or logic diagram for this project?.because it gives me ideas for this project…thank you!!
ahm!! you have a step of making this?!!..sorry if i annoying you..
Shematics may be found in downloads (but I will be posting a new revision of it very soon).
thank you mr. dawid
can I ask something related to that project of yours? Cuz, Im finding a hard time to get a circuit diagram of an ALU (74LS181). Can u post this diagram please. ALso, my professor told us to have our own input (A and B) and show how they will function. Can u help me please? Thanks a lot!
Sorry, I do not have a circuit diagram for this simple setup (I only have diagrams for the entire CPU, but for simple educational purpose, that’s a bit overkill).
I want a circuit diagram of “8-bit ALU” if any one have then kindely contect me on my id:pasha_decent@yahoo.com or hello me on +92-321-5975995. remember i want to make “8-bit ALU” on breadbord………….
What’s the schematic of this experiment