Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

ALU: Arithmatic and Logic Unit

A topic by TheXadGaming created May 01, 2023 Views: 586 Replies: 3
Viewing posts 1 to 3
(1 edit)

In My last post I made a 16-Byte RAM chip.

Today I'm making an ALU, an Arithmetic and Logic Unit.

Here's how:

The ALU:

-----------------------------------------------------------

Architecture:

The ALU has 8 Functions on it, 4 Logical, 4 Arithmetic.

Logical: NOT, OR, AND, XOR.

Arithmetic: ADD, SUB, INC, DEC.

-----------------------------------------------------------

The Addition and Subtraction:

This Chip has 2 8-bit inputs, and an 8-bit Output along with an extra 9th bit for output.

And a Carry Input, and a Subtraction Signal. When the Subtraction Signal is on we use 2s Complement

to Subtract the 2 inputs.

Note:

This is the Full-Adder chip, the design is umm, pretty bad, but it works!

-----------------------------------------------------------

The Logical Part:

So this does the Logical Operations.

It has 2 8-bit inputs, and 4 selection signals.

Depending on which selection is on, the output of that operation is put on to an 8-Bit Bus wire and fed out of the chip

on an 8-bit output number.

-----------------------------------------------------------

The finished Build:

Finally, We combine everything together to make a ALU.

First the Arithmetic part, we have the 4 selection signals, and  when the In B1 Signal or the Decrement/Increment signal is on then the first bit of the second number is on. And the Subtraction on the chip is on, when the Decrement or the Subtraction signal is on.

Logic is just the LU chip, the Arithmetic and Logic are put through an OR gate so we can choose which to output, and we also have the Clock.

It ahh, I didn't setup the Clock properly, so I might address that in the future and add some stuff to the ALU, but that's it for now.

-----------------------------------------------------------

Thanks for reading.

Hells yeah!

This looks really cool! I'm currently on my own little journey to make a little emulated computer with this, would you be able to show the inside of the "8-Bit Add-Sub" chip?

(+1)

I'll update the post in a day or two.