2,4,1,1,7,5,4,6,0,3,1,4,5,5,3,0 BST $A // B=A%8 (B is in [0,7]) BXL 1 // B=B%1 (just the last bit - B is either 1 or 0) CDV $B // C=(int) A / 2**B (either C=A or C=A/2) BXC // B=B^C ADV 3 // A=(int) A / 2**3 A=(int)A/8 BXL 4 // B=B^4 (just the 3rd bit - B is either 4 or 0) OUT B JNZ 0 // if(A!=0) goto start