Jump to content

Arithmetic logic unit: Difference between revisions

From Logic World Wiki
Rgjava (talk | contribs)
I added some basic explainations about the alu im going to add more stuff in this page in the future
(No difference)

Revision as of 13:40, 14 September 2025

A symbolic representation of an ALU.The arrows represent inputs and outputs.

The alu is a component in a computer that does the actal processing in a computer, it has an opcode input and inputs for A and B. Its like the brains of the computer. It can add two numbers or subtract two numbers. It can also do bitwise operations. Like XOR, NOR, AND, OR, is 0, is -, carry. It can do flags like A = B, A > B, A < B.

Example of what opcodes may look like:

Name Opcode Description
Add 000 Adds A and B
Sub 001 Subtracts A and B
AND 010 if A and B are true then output true else output false
NAND 011 invert of AND if A and B is true then output false
OR 100 either A or B
NOR 101 invert of OR
XOR 110 OR of A and B but if both are true then output false