You firstly have to call right datablock e.g C DB 11 (if DB11 doesn't exist in PLC if "C DB11" operation will be executed , PLC will go to STOP, so You can create manualy DB with nr. of DW's which You will be using or You can generate DB inside S5 plc program too)
and than do logical operation on DR,DL, DW , Dx.x (bit) or what You want