Log in

View Full Version : Why in computer 1024 bytes are equal to 1KB?


hkz
Sep 26, 2010, 02:50 AM
according to the mathematical theory 1000 meters = 1 kilo meter while in computer 1024 bytes are equal to 1 kilo byte ?

Curlyben
Sep 26, 2010, 03:45 AM
That would be because it's based on binary (base 2) and not the more normal base 10.

ScottGem
Sep 26, 2010, 04:42 AM
Just to expand on Ben's answer. A computer is, when you boil it down, nothing more than a series of switches that are either on or off. The CPU reads which switches are on and off and performs actions based on that. To represent whether a switch is on or off the binary numbering system is used since this numbering system has only two digits; zero and one. So computer numbers are all based on this. To represent the number 2 in binary you use 10. To represent the number 3 its 11. Or further:
4:100
5: 101
6: 111
etc.

Each of these switches is called a bit and 8 of then is called a byte. So everything goes in multiple of 8.