News for hackers. Stuff that matters.
Re:XOR'ing a register with itself is the idiom for zeroing i... by phire on Wednesday April 22, 2026 @07:32PM (#47870593)
Thanks, I suspected there might be something from the minicomputer era.

I've only really looked at a single AM2900 implementation (and it was far from optimal). Guess I need to dig deeper at some point.

> The ONES operation forces all the carry chain to 1 (ignoring operand) (you can do a ONES+1 to get arithmetic 0, but why?)

Forcing all carries to 1 inverts the output.

If I'm understanding the ALU correctly, (the datasheet doesn't show that part) it only implements OR and XOR. When combined with the ability to invert both inputs, AND can be implemented as !(!A OR !B), NAND is (!A OR !B) and so on.

Or maybe the ALU implements NOR and XNOR, and all the carry logic is physically inverted from what the documentation says.

Re:XOR'ing a register with itself is the idiom for zeroing i... by FarmerPotato on Thursday April 23, 2026 @03:43PM (#47880698)
I'll have to rethink what goes on in the ONES operation. The gate level schematic for the 74181 I found in a databook.