Beta encoder