Stephen Colbert
Stephen Colbert grills Bernie Sanders about why he is still running for president on "The Late Show" on June 23, 2016. CBS

Many Americans are curious why Bernie Sanders is still in the Democratic primary race despite no realistic shot at the presidential nomination. Add comedian Stephen Colbert to that list.

Sanders stopped by CBS' "The Late Show with Stephen Colbert" Thursday — the senator has made the late night show a semiregular campaign stop over the past few months — and the host grilled Sanders on what he hopes to achieve by staying in the race, as well as what Sanders thought of his Democratic colleagues' sit-in on the House Floor on Wednesday to protest inaction on gun control.

"I'm very good at arithmetic," Sanders told Colbert, admitting that he has virtually no chance to overtake presumptive Democratic nominee Hillary Clinton. "What we're doing now is marshaling our resources to make sure that we defeat Donald Trump and we defeat him badly. And most importantly, campaigns are about winning elections, but more importantly, campaigns are about transforming America."

Sanders emphasized that whoever the Democratic nominee may be, it is imperative that Trump be prevented from taking the White House.

"We do not want a bigot to become the president of the United States of America," Sander said.

Colbert, however, did not let Sanders off the hook.

"What is it you want?" Colbert asked.

"That's a fair question," Sanders said, explaining that he hopes to maximize the influence of his supporters at the convention. "We want our 12 million supporters to be heard."

Sanders and Colbert also discussed the House Democrats' 26-hour sit-in Wednesday into Thursday to protest Republicans' reluctance to pass gun control measures in the wake of the Orlando shooting. The candidate had paid a visit to the protest Wednesday night. On "The Late Show," Sanders reiterated his support for a bill that would prevent suspects on terrorist watch lists from buying a gun.

"It is so crazy that we have to argue about having sane gun control legislation," Sanders said.

While Sanders may have held off on endorsing Clinton on "The Late Show," on Friday the senator finally signaled that he would support her if she were the nominee.

"Yes," Sanders said in response to MSNBC's Nicole Wallace, who asked point-blank if he would vote for Clinton. "I think the issue right here is, I am going to do everything I can to defeat Donald Trump. I think Trump in so many ways will be a disaster for this country if he were to be elected president."