Skip to main content

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

I upgraded an ALU

A topic by simulator-master created Mar 10, 2023 Views: 423 Replies: 5
Viewing posts 1 to 6
(4 edits)

I made an upgraded version of loganh4005's ALU. It is mostly the same as his ALU but with a few changes to the shift and bitwise/logical chips like the use of barrel shifters.

Using barrel shifters also indirectly allows for a pass through and clear function(s) which can be integrated into the instruction set using an external decoder.

Two flags added to it are even parity flag and overflow flag


I also made a 2 and 4 bit multiplier but idk how to add it into the ALU(4 bit and 8 bit output respectively)

Instruction set:

0000 - ADD

0001 - SUBTRACT

0010 - INCREMENT

0011 - DECREMENT

0100 - OR

0101 - NOT

0110 - XOR

0111 - AND

1000 - XNOR

1001 - LOGICAL LEFT SHIFT

1010 - LOGICAL RIGHT SHIFT

1011 - ARITHMETIC LEFT SHIFT(treated same as logical left shift for now cuz idk what to do with it)

1100 - ARITHMETIC RIGHT SHIFT

1101 - ROTATE LEFT SHIFT

1110 - ROTATE RIGHT SHIFT

1111 - Not assigned to anything yet

Shift processor:


Bit Operations processor:


Logical Left Shift Barrel shifter(can be modified to make versions for right shift, arithmetic shift, etc)


Cool!