Finished the 8 bit ALU design schematic based on @roelh 's square inch ALU design. Includes design for the input register which has a control signal to load. It's output is tied to the B input of the ALU. The data bus will be the A input for the ALU. The output register design is included, whose input is tied to the output of the ALU. It has a control signal to output to the data bus. There is also the logic to set the flag lines (CArry, ZERo, and NEGative). The Status register (not in this schematic) will have a control input that set's weather they flags are stored or not.
https://upverter.com/2-Zons/2f903c2bed9cef6d/8-bit-ALU-w-input-and-output-registers/
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
I see a few things in the ALU schematic that bother me:
- without the fast carry circuits, the ALU will be quite slow
- You used a 74LS30 to calculate a Z flag. But the LS30 will AND all output bits, while you need something that does a OR on all output bits (Although for testing if two bytes are equal, you could use the XNOR function to give all-ones for equality).
- Why do you use two 4-bit register chips LS173 where you can use a single 8-bit register chip like the HC574 ?
- Apparently, the NEG output is wired in such a way that it only gives output for certain instructions. Why not simply tie it to output7 and ignore the NEG bit after instructions where NEG makes no sense ?
Are you sure? yes | no
Your input is very helpful. Like I have said I am very rusty at this.
After talking with you I will be using the fast carry circuit. I understand what it does now. Should it be used on all bits above 3 or just for bit 4 and the carry flag?
You are correct on the LS30. in my mind I thinking "one when all are zero, that's opposite of and, so nand". I'm now actually writing out truth tables on paper so I can see it. It's starting to come back.
Good point on the 173's. Should have seen that
The o7 to NEG flag: That's a fair point. I have been thinking about the subtract function. You can use it on an unsigned byte and it will work as long as B is less than 128. Nice thing about your ALU design is that i can use the LD B function to set the flags. So I can have a test instruction that just passes a byte through the ALU and set the flags. The zero flag will check if it is over 127.
Are you sure? yes | no
I just updated my project #4 bit TTL ALU to show the best configuration (with respect to carry) for an 8-bit ALU.
Are you sure? yes | no
404 page not found :-(
Are you sure? yes | no
My bad, project wasn't public. It should work now.
Are you sure? yes | no
it does :-)
It's however not very handy, you could export a bitmap for display here for convenience :-)
Are you sure? yes | no