I am trying to convert an int, a char, and a short into their binary values and display it.
I understand how to convert an integer to a binary value bit by bit, I just don't understand how to store it as a varible so I can print it out as a binary value in a printf() line.
int temp = a%2; //the value of the bit starting at the least significant
a = a/2;
//how would i store this bit by bit