Playing with 74LS181, a DIP-switch and some LEDs 10

_DSC5945

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.

10 thoughts on “Playing with 74LS181, a DIP-switch and some LEDs

  1. Reply leody Feb 28,2011 2:09 pm

    what is the procedure of making that, using 74LS181, dip switch, and LED…I’m so confuse about our project..please help me..t

  2. Reply dawid Mar 1,2011 2:12 am

    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).

  3. Reply leody Mar 2,2011 4:20 pm

    you have a circuit diagram or logic diagram for this project?.because it gives me ideas for this project…thank you!!

  4. Reply leody Mar 2,2011 4:29 pm

    ahm!! you have a step of making this?!!..sorry if i annoying you..

  5. Reply dawid Mar 2,2011 9:57 pm

    Shematics may be found in downloads (but I will be posting a new revision of it very soon).

  6. Reply leody Mar 3,2011 6:41 am

    thank you mr. dawid

  7. Reply analiza gerafusco Mar 4,2011 4:25 pm

    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!

  8. Reply dawid Mar 16,2011 1:56 pm

    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).

  9. Reply PASHA May 11,2011 9:33 pm

    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………….

  10. Reply Charles Mens Nov 12,2018 3:34 am

    What’s the schematic of this experiment

Leave a Reply

  

  

  

Time limit is exhausted. Please reload the CAPTCHA.