Enter Bytebeat expression:


Examples (Copy and paste)

Syntax

This bytebeat interpreter is a simple reverse polish notation calculator.

A bytebeat program is composed from the following commands, which each modify a hidden stack of numbers.

The program is run once for each time step, and the top value on the stack after the program runs is used as the 8-bit sound value at that time.

t push the current sample number
number push the number
+ pop the top two numbers, add them, and push the result
* pop the top two numbers, multiply them, and push the result
- pop the top two numbers, subtract the second from the first, and push the result
/ pop the top two numbers, divide the first by the second, and push the quotient
% pop the top two numbers, divide the first by the second, and push the remainder
| pop the top two numbers, bitwise or them, and push the result
^ pop the top two numbers, bitwise xor them, and push the result
& pop the top two numbers, bitwise and them, and push the result
‹ pop the top two numbers, left shift the first by the second, and push the result
› pop the top two numbers, right shift the first by the second, and push the result

Other Resources