fwrite(s, bin2dec('10101010'), 'int8');
fwrite(s, bin2dec('00000110'), 'int8');
Numbers such as -34.3 and -1.1 do not have a unique binary form. Use whatever form you prefer. You are going to have to write all the code for the 8051 to handle the decimal fractions, as the 8051 instruction set is strictly integer.