/* add all arguments (arrays of bits)
function add() {
	var args = [].slice.call(arguments),
		bits = args.shift().slice();
	args.forEach(function(arg, y) {
		var carry = 0,
			len = arg.length,
			x,z;
		for (x=len-1; x>-1; x--) {
			z = bits[x] + arg[x] + carry;
			switch (z) {
				case 3:
					bits[x] = oneBit;
					carry = 1;
					break;
				case 2:
					bits[x] = zeroBit;
					carry = 1;
					break;
				case 1:
					bits[x] = oneBit;
					carry = 0;
					break;
				case 0:
					bits[x] = zeroBit;
					carry = 0;
					break;
				default:
					throw new Error(["add",y,x,bits[x],arg[x],carry,z].join(" "));
					break;
			}
		}
	});
	return bits;
}