A kilobyte is officially 1000 bytes, because kilo
To resolve the confusion with 1024 in data processing, in December 1998 the International Electrotechnical Commission created new prefixes for binary multiples (q.v. for fuller explanation).
In brief: kibi is 1024, mebi is 1 048 576, then gibi, tebi, pebi, ebi. Their symbols have a capital letter then i: thus KiB = kibibyte, MiB, GiB etc.
So 1024 bytes is a kibibyte, not a kilobyte.
The kilobyte usually used to mean kibibyte in computing, but the new more accurate binary prefixes should now be used.