G
G
gitler2017-07-04 17:16:15
Programming
gitler, 2017-07-04 17:16:15

Does the text correctly explain why there are 1024 bytes in 1 kb?

To prevent distortion of information, it was customary to make certain bits a kind of "control points". In case of damage to a section of information, its reading was reset and continued from the next section, from the next checkpoint. Historically, the first punched cards had 40 cells (bits) per line, which equals five bytes. The 41st bit was used in this case as a breakpoint.
And finally, about kilobytes. The prefix kilo, as we found out at the very beginning, means "thousand". To encode 1000 bytes, 8000 bits should be required, but since one bit is added on every fifth byte - a checkpoint, then slightly more is needed to encode 1000 bytes - 8200 bits. Dividing this by the standard size of a byte, we get that 25 " is added for every thousand bytes.
And at this stage, an important coincidence played a role in the history of science. The fact is that in a binary (binary) system it is customary to count all amounts of data, linking them to a deuce. Two to the tenth power will be 1024. This is only one byte different from the value we received above. Thus, for the convenience of machine calculations, it was assumed that in one kilobyte there are not 1025 bytes, but 1024.
harryhammer.blogspot.ru/2011/05/1024.html

Answer the question

In order to leave comments, you need to log in

7 answer(s)
S
Saboteur, 2017-07-04
@saboteur_kiev

No, it's wrong.
What was in punched cards for parity - leave it to punched cards, parity and data coding are in no way connected with the designation of kilo and 1024. And even more so, 1025 is generally far from IT.
Everything is easier.
We take 1 bit, we can operate with two values ​​0 and 1
2 bits - 4 values, 0-3
3 bits - 8, 0-7
4 bits - 16, 0-15
5 bits - 32, 0-31
6 bits - 64, 0 -63
7 bits - 128, 0-127
8 bits - 256, 0-255
9 bits - 512, 0-511
10 bits - 1024, 0-1023
There is no such set of bits that we can operate on exactly 1000 values. 9 bits are not enough, and 10 bits allow you to operate with 1024 values ​​already. There is no point in limiting yourself artificially.
Therefore, at the iron level, powers of two are used as addressing in order to make the most efficient use of all used bits and memory.
Therefore, the "computer" number closest to 1000 is 1024, hence there are 1024 bytes in a kilobyte.
For business, this was not very convenient. And in general, many technical issues are not clear to ordinary users why and how, for example, with the same hard drives, when the volume of an unformatted and formatted disk can differ by noticeable 10-15 percent.
Also, in the C system, the prefixes kilo, mega, and so on always meant 1000 of something. Therefore, with the historically established 1024, an uncomfortable situation has developed in the IT industry. For correction, new names appeared, kibibytes, megabytes, and kilobytes and megabytes according to the generally accepted C system are now a multiple of 1000. But this is important for standardization, marketing, and not for programming.
Nothing has changed in programming, and no matter how they are called kibibytes or kilobytes, when programming, they operate with powers of two, not tens.

D
Dmitry, 2017-07-04
@Tabletko

Read the difference between a kilobyte and a kibibyte.

A
Anton Anton, 2017-07-04
@Fragster

I liked Kigston the most in an article about a 2 TB flash drive https://geektimes.ru/company/kingston_technology/b...

Gigabyte, as it turned out recently, is a relative concept, but according to the global standard, the actual capacity is 1,979,958,951,936 bytes.

A
Antony, 2017-07-04
@RiseOfDeath

OMG, well that's bullshit.
In 1 Kb 1024b, due to the fact that, due to some misunderstanding, we have fixed the use of decimal prefixes SI, instead of binary ones (and even in GOST).
https://en.wikipedia.org/wiki/%D0%94%D0%B2%D0%BE%D...

M
Mercury13, 2017-07-04
@Mercury13

The point is this. Take magnetic memory. It has rows of wires, columns of wires and a read-write wire passing through all the cores. To count a cell, we let current through the desired row and desired column (the current strength is selected so that two wires work, and one does not). To let the current flow through exactly one wire, a device such as a decoder is used: a binary code, for example, 010 = 2, turns into a positional code 00100000 (one in 2nd place, starting from zero).
Here we have such a block of memory. An address has arrived - how to get the row and column number? Divide the address into the number of columns; the quotient is the row number, the remainder is the column number. For the convenience of the columns, there should be a power of two: first, this fully utilizes the capabilities of the decoder; secondly, the quotient and the remainder come down to the fact that part of the address lines is assigned to one decoder, and part to the second.
If we have several such blocks, for the same reasons and rows, there should be a power of two - so it turns out that the capacity of a random access memory device (magnetic, operational, permanent, flash) is a power of two. The number of blocks is optional, and a battery of chips on an SSD can hold any convenient number—and the capacity of a single chip is really a power of two.
With the advent of semiconductor memory, the craving for powers of two even intensified: the cost of a chip depends on its capacity insofar as some of the chips go to culling. There is a certain (and rather narrow) optimal range of capacities: more - large culling; less - only for specials. applications like compatibility and power consumption.
That's all.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question