Skip to content

u/emeraldtears

In this archive from Dec 2013 to Mar 2017

1
posts
41
comments
0
media
158
score

Top posts

Top comments

This is a common fallacy in computing. 1GB != 1,000,000,000 bytes.

5GB == 5,368,709,120 bytes. This is due to the multiplicative effect of each unit of size increasing by a factor of 1024 times the previous unit, starting at kilobyte (i.e. kilobyte == 1024 bytes, megabyte == 1024 kilobytes). This is an example of the difference that often exists in units of scale in computer science vs. common SI "powers of ten" notation - scales in CS-land are predominantly measured in powers of 2, and thus can differ greatly and subtly.

While there are some who believe that the 1024 is somewhat arbitrary, the origins of that number lie in the limitations of physical hardware many decades ago. See here for more information on that. Basically, it all has to do with how you represent a number in binary, and hence how you scale at powers of 2.

Adding confusion to the issue, several years ago HDD manufacturers made some sort of public decree that their stated disk sizes would not use the historical convention (where 5GB == 5x230 == 1,073,741,824 bytes), and instead refer to size in the more SI-centric convention of powers of 10 (i.e. 5x109 == 5GB == 5,000,000,000 bytes).

Tl;dr it would be safe to always assume that file size is measured in the "2x" convention - therefore a 5KB file is not 5,000 bytes but 5120.

12 points

Subreddits

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.