Base binary/expand implementation