Appearing on CBS' The Late Show, Apple CEO Tim Cook explained that he decided to come out gay to help struggling LGBT teens.

Cook, who took over the reigns at Apple in 2011, quietly came out last October in an essay published in Bloomberg Businessweek, where he stated that he considers being gay “among the greatest gifts” God had given him.

Host Stephen Colbert asked his guest if his coming out was an “upgrade” or “a feature that hadn't been turned on.”

Cook answered that he “felt a tremendous responsibility” to come out.

“It became so clear to me that kids were getting bullied in school, kids were getting basically discriminated against, kids were even being disclaimed by their own parents, and that I needed to do something,” Cook said. “And where I valued my privacy significantly, I felt that I was valuing it too far above what I could do for other people. And so I wanted to tell everyone my truth.”

He added that his sexuality was an open secret, comparing it to “discovering something on your iPhone that it's always done, but you didn't quite know it.” (The video is embedded on this page. Visit our video library for more videos.)

Cook has been a vocal supporter of gay rights, in particular laws that prohibit workplace discrimination based on sexual orientation and gender identity.

(Related: Apple's Tim Cook calls on House to pass gay protections bill ENDA.)