This post is part of the Stack Based Virtual Machines series. In the previous part we have started writing some code for our stack based virtual machine. In this part, we’re going to extend the catalog of instructions that our CPU can support. The code for this article can be found on github. Arithmetics Our VM can already handle additions, so teaching it to add subtractions, multiplications and (integer) division won’t be very hard.