Arithmetic logic unit: Difference between revisions
Appearance
I added some basic explainations about the alu im going to add more stuff in this page in the future |
m Fixed grammer mystakes. |
||
Line 1: | Line 1: | ||
[[File:ALU.gif|thumb|A symbolic representation of an ALU.The arrows represent inputs and outputs.]] | [[File:ALU.gif|thumb|A symbolic representation of an ALU. The arrows represent inputs and outputs.]] | ||
The | 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: | Example of what opcodes may look like: |
Revision as of 13:42, 14 September 2025

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 |