my $numofstrobes; my @strobes; # To generate the stream of all 1s my $all1stream="1" x $width; my $x_num = oct("0b" . $all1stream); # to convert string into int #To Calculate the number of streams for($i=4;$i<=$width;$i=$i+4){ $numofstrobes+=int($width/$i); } #To calculate the bit stream `my $j=4; for($i=0; $i<$numofstrobes-1; $i++){ my $k=$j-4; my $temp_num=$x_num; while($k<$j) { $temp_num=$temp_num-(2**$k); $k++; } $strobes[$i]=$temp_num; $j+=4; $strobes[$numofstrobes-1]=$x_num`;