in hardware u say
1 = add (addition)
2 = substract
3 = multiply
=> opcodes (for simplcitiy let's assume 1 byte)
and so on
for simplicity u say add also has a 1 followed by two numbers of 1 byte
so your programm would be 3 bytes
add 2 4
then u can increase that programm by another 3 bytes for 2 = substract
also let's say when 255 is used, it means use the result of the previous calculation
sub 255 6
and so on