Latex actually wants to do that for you. Let's say you want to put a box around the number 100. Then you would type .
By studying the tutorial and posted answers to other posted questions, you can adapt my answer. (put your cursor on the box around the 100 to see how I did it).