What do you mean how to change to hexadecimal? You are handling microcontrollers without understanding Base-N conversions?
Search GOOGLE for binary to hexadecimal conversion.
I will only teach you how to read the ports in a PORT of PIC.
On CCS C there is a command INPUT_X() where X is the PORT letter, either A,B,C,D or E.
But of course your must set the TRI-State buffers first to input.
For example PORT_C:
set_tris_c(0x0F); // means higher nibble of port c is output and lower nibble is input
so if the instruction is:
set_tris_c(0xFF); // means all pins are inputs
to get the value of the port pins:
char in_value;
in_value = input_c();
// if the value you read in in_value is 0x00 means all port pin inputs are logic 0.
if you are reading CCS C help file you can see there that you can get the value of a single pin without any problem.