Electronic – 74181 ALU not working properly cascaded to add 8 bit numbers

alubinarycpudigital-logicttl

I'm trying to make a homebrew CPU but having problems with the 74LS181 ALU, which I'm simulating in Logisim software before diving into real ICs and breadboards.

I've cascaded two 74181 following instructions found in many sites such as this.

This works fine with most of addings I tried, but some don't work.

For example:

0010 0111 (39 in decimal)
+
0000 0001 (1)

leads to a 0010 0000 (32) result.

I know it should have something to do with the fact that 74181 uses signed numbers represented in two's complement. The least significant nibble in the example (0111) represents the max positive number with 4 bits, so when incremented by one goes to zero…

Is there any way to make 74181 work with only positive numbers? Or solve this issue in any other way.

I'm frustrated because with this problem the ALU is completelly usesless.

link for 74181 datasheet

link for project (has image of error on simulated ALU) – link on comment bellow

Best Answer

Please show how you are interconnecting the two devices, particularly the carry from the LSB to the MSB device. It looks like that may not be wired correctly.

The 74LS181 doesn't deal with signed numbers, just unsigned integers. It is up to you to interpret the values in the form you need.

The two devices should be interconnected similar to this:

74181 8-bit ALU