This is a 1024-byte length string.
How to pronounce the sentence above?
This is a one-thousand-and-twenty-four byte length string.
or
This is a one-oh-two-four byte length string.
This is a 1024-byte length string.
How to pronounce the sentence above?
This is a one-thousand-and-twenty-four byte length string.
or
This is a one-oh-two-four byte length string.
"This is a ten-twenty-four byte length string."
I've found this to be one of the more common ways to say it. This is also typical of other numbers over 1024, such as 2048 ("twenty-forty-eight") and 4096 ("forty-ninety-six").
This is a question of convention. There are several correct ways to pronounce it. Complicating the question, it's poorly-enforced convention.
In general, conventions follow convenience. Due to some neuro/psychological factors (humans prefer to not count beyond three, humans have a hard time remembering unstructured lists, etc), most long numbers are pronounced in batches of shorter numbers.
Consider this list of numbers, and their common pronunciations:
Some general preferences are apparent:
These aren't ironclad rules. For example, when we left the " 'oughts" (2000-2009), there was a confusion whether we should go from reading it as "two thousand nine" to "two thousand ten" (2000|10) or switch to "twenty ten" (20|10). Obviously, under the above preference, 20|10 is the conventional way to say it, but there's a certain amount of conversion cost, so people were divided on whether it was worth converting.
After the or a it’s common to omit the leading one from numbers in speech:
This is a thousand-twenty-four-byte string.
This is in contrast to other leading digits:
That is a two-thousand-forty-eight-byte string.
But as others have noted, a programmer is quite likely to abbreviate these numbers:
This is a one-K string. That is a two-K string.
Note that the K implies “kilobytes,” so you wouldn’t pronounce “bytes.”
Either one thousand and twenty-four or ten twenty-four, but most computer folks would probably read it as one K, since it's obvious from the context that bytes are what are being discussed.
If it was a memory size, it might be necessary to say the i1103 is a one K-bit memory or the AM27S37 is a one K-byte memory.
This is a one-oh-two-four byte length string.
As a part-time programmer, that's the way I have always mentally said it, so that's the way I'd say it out loud.
I wouldn't shorten it to "1K", unless you're being fairly non-technical. Because an important characteristic of 1024 is that it's divisible by 2, 4, 8, 16, 32, etc. So if the term arises during a discussion that involves arithmetic, I'd stick to the exact formulation of the length.
In programming, it would be most common to convert bytes to a more manageable unit so you don't have to express the full number.
eg. it is much easier to just state "one kilobyte" than "one thousand twenty four bytes" even though the latter is still correct. You certainly wouldn't say "eight thousand one hundred ninety-two bits" :)
You would never say the numbers individually as in your second example.