Experiment with the program below. Modify it to produce various patterns you choose of non-ascii and ascii content within the file ("stuff") that it creates. Then use the xxd and strings commands to see what you produced and whether it's what you thought.
function block
{
# given a number range, output the characters with those numbers as their ascii codes
# must be a better way
for i in $( printf '%x\n' $(seq $1 $2) )
do
printf "\x$i"
done
}
rm -f stuff
exec 1> stuff # now anything printed goes into the file
echo "cord"
block 0 32
echo "line"
block 32 63
echo "twine"
block 64 95
echo "yarn"
block 96 127
echo "cable"
block 128 159
echo "rope"
block 160 191
echo "strand"
block 192 223
echo "thread"
block 224 255
# now you can "strings stuff" "xxd -g1 stuff"