bit integer implementation