-- File: full_add.adb -- Author: Sy Wong -- Date: 7/98 -- Aim: Implements a one bit adder package body FULL_ADD is -- An alternative implementation, with NAND, NOR, INVERT and X_OR components -- for example, is possible. procedure update(d: in out device) is begin d.sum := d.input1 xor d.input2 xor d.carry_in; d.carry_out:= ((d.input1 or d.input2) and d.carry_in) or (d.input1 and d.input2); end update; end FULL_ADD;