We have implemented an 8-bit ALU which executes AND, OR, NOT, ADD, and Square Root. All ALU functions execute on 2's complement numbers, although only positive numbers are valid inputs for the Square Root.
S(n) = 0.5[S(n-1) + A/S(n-1)].
S(n-1) is an initial estimate of the square root of A. S(n) approaches S(n-1) as S(n-1) approaches square root of A.All operations execute in a single cycle except the square root; however, the combinational square used by the square root also completes in one cycle.
This is a table of some of the operations that we plan to implement :
Mnemonic |
Operation |
ADD A | Acc = Acc + A |
SUB A | Acc = Acc - A |
AND A | Acc = A && Acc |
OR A | Acc = A || Acc |
LOAD A | Acc = A |
SQRT A | Acc = sqrt(acc), A=initial estimate |
NOT | Acc = !Acc |