max via bit ops