0x means hex notation - so 0xDE means value hex DE which is 13 (D) * 16 + 14 (E) which is decimal 222

The example in post #2 showed how to write /read blocks of binary data.

how can i convert my char or string data to this format '0xDE'
If you mean
Code:
string block1 = "DEDEDEDEDEDEDEDEDEDEDED"; //  hex data
where does this data originate from? having it produced in the right format first is better than trying to convert.

What exactly are you trying to achieve?