Firstly, let's create a file of 512 bytes, i.e. matching the tar
block size exactly, full of 'A' characters:
$ python3 -c 'print("A" * 512, end="")' > 512A.out
We can see that the length of the file is indeed 512 bytes and that the contents match our expectations:
$ ls -ld 512A.out