Do I tell my boyfriend who's in jail that I cheated?

My boyfriend and I started dating and three months later he was arrested. He has been in jail for six months and has two more years. I am in love with him and want to be with him. About two months after he was arrested I had sex with a friend of mine. There are no excuses for why I did. It will not be happening again. I need help figuring out if I should tell my boyfriend that this happened or not. If you were in his position would you want to know?
Updates
+1 y
My boyfriend has never met the guy I cheated with. Just to update. He was already in jail when my friend and I met.
Do I tell my boyfriend who's in jail that I cheated?
Post Opinion