Skip to content
ganesshkumar edited this page Sep 12, 2014 · 4 revisions

ALU Usage

Input: x, y (16 bits)
zx, nx, zy, ny, f, no (1 bit)

Output: out (16 bits)
zr=isZero, ng=negative (1 bit)

Format: zx|nx|zy|ny|f|no|out = f(x,y)

101010| 0
111111| 1
111010| -1
001100| x
110000| y
001101| !x
110001| !y
001111| -x
110011| -y
011111| x+1
110111| y+1
001110| x-1
110010| y-1
000010| x+y
010011| x-y
000111| y-x
000000| x&y
010101| x|y

Clone this wiki locally