How to calculate ?

life24

Senior member
Mar 25, 2014
283
0
76
Hello,
How to calculated ?
7rd3rpvetv84.jpg

Thanks
 

freeskier93

Senior member
Apr 17, 2015
487
19
81
In binary 32 bits gives you 4,294,967,296 possible combinations (or numbers in base 10). However, using the rule of 2's Complement for signed integers this gives us 2,147,483,647 possible positive combinations, which is basically equal to to 2GB (technically 1.999999999GB).
 
Last edited:

Unico

Member
Aug 28, 2015
53
11
46
The 2 GB limit reflects the maximum file size which may be worked on by a 32 bit operating system and was not necessarily a limit of the Photoshop PSD file format.

To accommodate larger files they introduced the Photoshop PSB file format which may be up to 4 Exabytes (4 million TB). However the image is limited to a more practical 300,000 x 300,000 pixels.

This is done in the PSB file format by changing a number of the internal variables from 4 byte values (32 bits) to 8 byte values (64 bits) thereby allowing larger dimensions for layers and masks.

If you are interested, take a look at the file format specification. Search for instances of PSB to see which variables are changed.

https://www.adobe.com/devnet-apps/photoshop/fileformatashtml/
 

life24

Senior member
Mar 25, 2014
283
0
76
Hi,
2^32 bit = 4294967296 bit ( /8 ) = 536870912 Byte (/1024) KByte = 524288 (/1024) = 512 MByte
How about two gigabytes calculated?
 

ninaholic37

Golden Member
Apr 13, 2012
1,883
31
91
Hi,
2^32 bit = 4294967296 bit ( /8 ) = 536870912 Byte (/1024) KByte = 524288 (/1024) = 512 MByte
How about two gigabytes calculated?
You don't need to convert from bits to bytes. Each bit can hold a value, and each value can access a byte. Computers fetch data on the hard drive one byte (8-bits) at a time, so 0 fetches bit 0-7, 1 fetches bit 8-15. If memory addresses are stored in 32-bit unsigned, accessing 8-bits per number means that a 32-bit number can access 2^32 bytes (2^40 bits).
 

xxiz

Junior Member
Sep 1, 2015
1
0
0
Isn't the file pointer typically defined to be an integer? In that case the first bit would be the sign, leaving 2^31 bits to address the space (2GB). I'm not sure why an unsigned integer wasn't used.
 

Merad

Platinum Member
May 31, 2010
2,586
19
81
I'm not sure why an unsigned integer wasn't used.

At the time when adobe was designing the psd file format most PCs had a few megs of RAM and maybe a few dozen megs of hard drive space. Files larger than 2 GB were such an outlier that they weren't even worth considering. In fact I would be rather shocked if the original psd spec circa ~1990 supported 2 GB files. Most likely they expanded it over the years, but for whatever reason pushing support past 2 GB required enough changes that they decided to branch to a different file type for it.