EveryCircuit
Contact
Reviews
Home
Niick19
modified 1 year ago

4 bits ALU outdated

9
4
496
05:03:44
4 bits Arithmetic Logic Unit - 4 bits Accumulator - 2 inputs: ACC, A - 7 instructions. The first two rows of bits are respectively A and the operation code. Opcodes: NOP xx00 0000 ; No Operation ADD xx00 0001 ; ACC + A SUB xx00 0010 ; ACC - A AND xx00 0100 ; ACC AND A OR xx00 1000 ; ACC OR A NOT xx01 0000 ; NOT ACC LDA xx10 0000 ; Loads A into the accumulator How to use: This one has an accumulator. So the operations are done with its own previous value. To do 5 + 2 you do: LDA 5 (0101) ADD 2 (0010) output: 7 (0111) To do another operation, you must load another number into the acc or use the result as input for other operation. You must wait the clock time or set it manually using the switch above Does not have a MUX and DEMUX cause it would be too much expensive for the simulator. Because of that, you could do multiple operations at once but will result in undetermined behavior.
published 2 years ago
Niick19
2 years ago
Just discovered that if you do NOT + AND and select a bit, the bit you selected will be always 1 while the others will be reverted. Its nice to find some random behaviors!
592azy2circuitdude
2 years ago
Your ALU / CPU circuits sure are impressive! I wish I had more knowledge about how they work so I could appreciate them more. Do you know any good online resources for learning the basics about ALUs?
Niick19
2 years ago
Thanks! In fact, I don't have much knowledge about processors yet. I've just been assembling circuits with logic gates and applying what I thought would work. I only learned the concepts and applied them to the circuits, like adders, AND logic, and so on. What also helped me is that I had some contact with assembly language in college.
Demir43
1 year ago
Imagine what a 64-bit ALU looks like

EveryCircuit is an easy to use, highly interactive circuit simulator and schematic capture tool. Real-time circuit simulation, interactivity, and dynamic visualization make it a must have application for professionals and academia. EveryCircuit user community has collaboratively created the largest searchable library of circuit designs. EveryCircuit app runs online in popular browsers and on mobile phones and tablets, enabling you to capture design ideas and learn electronics on the go.

Copyright © 2026 by MuseMaze, Inc.     Terms of use     Privacy policy