(39 . 7)(39 . 6)
2233 return WBool(Shift_Right((A and B) or ((A or B) and (not S)),
2234 Bitness - 1));
2235 end W_Carry;
2236 pragma Inline_Always(W_Carry);
2237
2238
2239 -- Find the Borrow, from a subtraction where it is known that A - B == D:
(49 . 7)(48 . 6)
2241 return WBool(Shift_Right(((not A) and B) or (((not A) or B) and D),
2242 Bitness - 1));
2243 end W_Borrow;
2244 pragma Inline_Always(W_Borrow);
2245
2246 -- A+B+C is the output bit of 1-bit adder; C is carry-in;
2247 -- A-B-C is the output bit of 1-bit subber; C is borrow-in.
(86 . 6)(84 . 5)
2249 begin
2250 return B xor ((Sel - 1) and (A xor B));
2251 end W_Mux;
2252 pragma Inline_Always(W_Mux);
2253
2254 end Word_Ops;