In Verilog, ^ is the XOR operator. You should use ** instead. Also, you should subtract the whole value, not just assign a specific bit using [i]:
module sliding();
bit [7:0] count_value = 8'hFE;
initial sliding_0();
task sliding_0;
for(int i=0; i<7; i++)begin
count_value -= 2**i;
$display("count value is %d 'b%b 'h%x",count_value,count_value,count_value);
end
endtask
endmodule
This prints:
count value is 253 'b11111101 'hfd
count value is 251 'b11111011 'hfb
count value is 247 'b11110111 'hf7
count value is 239 'b11101111 'hef
count value is 223 'b11011111 'hdf
count value is 191 'b10111111 'hbf
count value is 127 'b01111111 'h7f