implementation of arithmetic logic unit