added some binary base functions