SN74181

How does one wire up such a thing. understandably I use switches for my A and B inputs also for the S functions, do these need to be grounded instead of applied with 5v? Also what are the purposes of the Generate and propogate functions with the TTL, my textbook does not go into depth with this IC

Personally, I don't see any point in using a 4-bit ALU with a microcontroller. But I did build the project below. This demonstrates the ALU and you can select any of the 16 arithmetic functions (the function number is sent to the ALU inverted by the switch so you have to invert it yourself first. I forgot to add inverters to "uninvert" the output of the switches for the function selection):

The P and G outputs are used in conjunction with a lookahead carry generator such as the 74182 so that the carry isn't substantially delayed for ALUs that use multiple 74181's joined together in a ripple configuration. This datasheet explains, though conceptually this is getting a little advanced. Look at the last page, see how the carry-in lines come from the lookahead carry generator rather than the prior ALU in the chain? However, you never need this if you are using one ALU.

http://vikiwat.com/productfile/2172/userfiles-productimages-10191-integralna-shema-74182-ttl-look-ahead-carry-generators-dip16-0.pdf

My project above does not use carry lookahead, it uses ripple only.

infinite4566: How does one wire up such a thing. understandably I use switches for my A and B inputs also for the S functions, do these need to be grounded instead of applied with 5v? Also what are the purposes of the Generate and propogate functions with the TTL, my textbook does not go into depth with this IC

Just a little side note on TTL. If you are genuinely using a SN74181 as opposed to a CMOS version (74HC181) then you should be aware of the sensitivity of TTL inputs to over-voltage. The normal way to program unused inputs is either short to 0V or pull up with 1k resistor to 5V. The inputs are rated to 5.5V or something that makes them easily damaged if the 5V supply has excess voltage spikes. 1k resistors completely protect against this failure mode.

For TTL LS, 10k resistors are adequate.

Again if I remember rightly TTL can cope with upto +7V or so maximum on the supply pins, adding the resistors makes the whole circuit a lot more robust to noise spikes (and TTL is all to easy capable of generating noise spikes if inadequately decoupled or not on a board with a ground-plane).

You can share several pins to one pull-up resistor IIRC.