added a Macros file to encapsulate bit twiddling stuff