Added a 5-arg extern macro.
Made bitwise ops work more gracefully on mixed types.