Jump to content

So in a 32 Bit Computer there are 232 = 4,29 * 109 possible memory cells.

 

Each cell can hold 32 Bits of Data, so that would result in 232 * 32 Bit = 1,37 * 1011 Bits.

 

And as 8 Bit = 1 Byte: (232 * 32)/8 Bytes = 1,72 * 1010 Bytes = 17,2 GB.

 

But I thought 32 Bit PCs could only support up to 4 GB (that value would correspond to the 232 available cells).

 

So is one Byte now 32 Bits? Or is it just 4 GB as only one value can fit in each cell and letters/numbers that were formally just 8 Bit are now stretched to 32 Bits? Wouldn't this lead to three quarters of the Memory being free if only these 8 Bit letters/number were used?

Link to comment
https://linustechtips.com/topic/870118-bit-vs-byte-in-main-memory/
Share on other sites

Link to post
Share on other sites

One byte is 8 bits, not 32 bits, and this will be true regardless of if you're using a 16-bit, 32-bit, 64-bit, etc. operating system.

 

The reason 32-bit systems can only address "4 GB" of memory is because a 32-bit word is only four bytes. An unsigned 32-bit integer has up to 4 294 967 296 possible values (0 to 4 294 967 295), or exactly 4 GiB if converted from bytes. Even so, some 32-bit operating systems can technically support more than 4 GB using PAE (Physical Address Extension).

 

As for how many bits a "cell" can use, that depends on whatever storage medium you use. SLC flash memory and DRAM are one bit per cell, but different types of flash storage may support more bits per cell.

 

 

Link to post
Share on other sites

21 minutes ago, Kavawuvi said:

but different types of flash storage may support more bits per cell.

Just to add some examples. TLC, the common cell used in cheaper SSDs, hold 3 bits per cell.

CPU: i7-2600K 4751MHz 1.44V (software) --> 1.47V at the back of the socket Motherboard: Asrock Z77 Extreme4 (BCLK: 103.3MHz) CPU Cooler: Noctua NH-D15 RAM: Adata XPG 2x8GB DDR3 (XMP: 2133MHz 10-11-11-30 CR2, custom: 2203MHz 10-11-10-26 CR1 tRFC:230 tREFI:14000) GPU: Asus GTX 1070 Dual (Super Jetstream vbios, +70(2025-2088MHz)/+400(8.8Gbps)) SSD: Samsung 840 Pro 256GB (main boot drive), Transcend SSD370 128GB PSU: Seasonic X-660 80+ Gold Case: Antec P110 Silent, 5 intakes 1 exhaust Monitor: AOC G2460PF 1080p 144Hz (150Hz max w/ DP, 121Hz max w/ HDMI) TN panel Keyboard: Logitech G610 Orion (Cherry MX Blue) with SteelSeries Apex M260 keycaps Mouse: BenQ Zowie FK1

 

Model: HP Omen 17 17-an110ca CPU: i7-8750H (0.125V core & cache, 50mV SA undervolt) GPU: GTX 1060 6GB Mobile (+80/+450, 1650MHz~1750MHz 0.78V~0.85V) RAM: 8+8GB DDR4-2400 18-17-17-39 2T Storage: HP EX920 1TB PCIe x4 M.2 SSD + Crucial MX500 1TB 2.5" SATA SSD, 128GB Toshiba PCIe x2 M.2 SSD (KBG30ZMV128G) gone cooking externally, 1TB Seagate 7200RPM 2.5" HDD (ST1000LM049-2GH172) left outside Monitor: 1080p 126Hz IPS G-sync

 

Desktop benching:

Cinebench R15 Single thread:168 Multi-thread: 833 

SuperPi (v1.5 from Techpowerup, PI value output) 16K: 0.100s 1M: 8.255s 32M: 7m 45.93s

Link to post
Share on other sites

41 minutes ago, jippiee said:

So in a 32 Bit Computer there are 232 = 4,29 * 109 possible memory cells.

 

Each cell can hold 32 Bits of Data, so that would result in 232 * 32 Bit = 1,37 * 1011 Bits.

 

And as 8 Bit = 1 Byte: (232 * 32)/8 Bytes = 1,72 * 1010 Bytes = 17,2 GB.

 

But I thought 32 Bit PCs could only support up to 4 GB (that value would correspond to the 232 available cells).

 

So is one Byte now 32 Bits? Or is it just 4 GB as only one value can fit in each cell and letters/numbers that were formally just 8 Bit are now stretched to 32 Bits? Wouldn't this lead to three quarters of the Memory being free if only these 8 Bit letters/number were used?

This refers to the address space of the system. There are 2^32 possible addresses. Since memory is typically byte addressable, this comes out to 2^32 bytes of data that the processor can address.

 

Some 32-bit processors have ways to address more memory physically, like Intel's PAE, but programs are still only limited to a 32-bit address space.

 

The 32-bit part otherwise just means that's how much data the processor can crunch at once. And RAM typically transfers data over in 64-bits at once per module since the Pentium days. Data transfer is also irrelevant to the bit size of a processor.

Link to post
Share on other sites

2 minutes ago, Jurrunio said:

Just to add some examples. TLC, the common cell used in cheaper SSDs, hold 3 bits per cell.

Yeah, TLC is pretty common in entry level SSDs (and even some mid-ranged SSDs like the Samsung 850 EVO). They're cheaper, perform worse, and probably won't last as long as SLC or MLC. Though if it's not defective, it'll probably outlast many of your other components, and a decent one will be much, much faster than any hard drive.

Link to post
Share on other sites

46 minutes ago, jippiee said:

So in a 32 Bit Computer there are 232 = 4,29 * 109 possible memory cells.

 

Each cell can hold 32 Bits of Data, so that would result in 232 * 32 Bit = 1,37 * 1011 Bits.

 

And as 8 Bit = 1 Byte: (232 * 32)/8 Bytes = 1,72 * 1010 Bytes = 17,2 GB.

 

But I thought 32 Bit PCs could only support up to 4 GB (that value would correspond to the 232 available cells).

 

So is one Byte now 32 Bits? Or is it just 4 GB as only one value can fit in each cell and letters/numbers that were formally just 8 Bit are now stretched to 32 Bits? Wouldn't this lead to three quarters of the Memory being free if only these 8 Bit letters/number were used?

So, 1 byte=8bits so 32 bits would be 4 bytes ( interesting fact, if you wanna see what your max download speed on your internet, take the speed listed by your ISP because they show the speed in bits to make it look bigger and divide that by 8, in my case for example I have 1Gb/s that means somwhere around 120 GB/s (Gb is gigabit and GB is gigabyte)).

 

32 bit PCs can support up to 4GB of RAM. The reason why they are called 32 bit is because every single number that the CPU works with is storred on 32 bits (that's the size of the registers used to store the numbers), therefore a number like 12 for example, in binary would be 1100, the rest of the positions being occupied by zeros (00000000000000000000000000001100) and that's how the CPU would see and work with the number 12 (in reality there are many forms to represent a number like 1 or 2 complement, floating point etc...). 

Link to post
Share on other sites

8 hours ago, jippiee said:

Each cell can hold 32 Bits of Data

No it doesn't.

 

7 hours ago, SandalsWarrior said:

The reason why they are called 32 bit is because every single number that the CPU works with is storred on 32 bits

No it isn't.

Link to post
Share on other sites

1 minute ago, SandalsWarrior said:

yes it is.

It's called 32 bit because it can work with numbers stored up to 32 bits, though with their corresponding opcode (iirc, correct me if I'm wrong). You could have a 16 bit number and a 16 bit opcode, or a 24 bit number and an 8 bit opcode. If all the numbers were 32 bits and the registers were that big you'd never have enough space for the opcodes, meaning it'd be useless.

USEFUL LINKS:

PSU Tier List F@H stats

Link to post
Share on other sites

3 hours ago, SandalsWarrior said:

yes it is.

No, it isn't.

 

There are many, many variables which are smaller than 32 bits. Just take C as an example. int8_t is an 8bit long signed integer. char is 8 bits long too (usually). Way smaller than 32bit. Short is 16bit.

That would be extremely wasteful if we could only save things in 32bit increments and then had to use padding for the rest.

 

The registers aren't 32bit either, nor are they 64bit on a 64bit computer.

For example some processors have AVX register which can hold up to 512 bits (aka AVX-512). My Ryzen processor got AVX registers that are 256bit in size, and it's a 64bit processor.

In the general registers for x86 there are actually quite few 32bit ones. 16 and 8 bits are far more common. Examples of 8bit registers would be AH, AL, BH and BL.

 

 

On 12/6/2017 at 10:53 PM, jippiee said:

So in a 32 Bit Computer there are 232 = 4,29 * 109 possible memory cells.

 

Each cell can hold 32 Bits of Data, so that would result in 232 * 32 Bit = 1,37 * 1011 Bits.

 

And as 8 Bit = 1 Byte: (232 * 32)/8 Bytes = 1,72 * 1010 Bytes = 17,2 GB.

 

But I thought 32 Bit PCs could only support up to 4 GB (that value would correspond to the 232 available cells).

 

So is one Byte now 32 Bits? Or is it just 4 GB as only one value can fit in each cell and letters/numbers that were formally just 8 Bit are now stretched to 32 Bits? Wouldn't this lead to three quarters of the Memory being free if only these 8 Bit letters/number were used?

Here is the thing...

Flash cells do not hold 32 bits of data. The type used in RAM holds 1 bit per cell. The type used in SSDs usually holds 2 bits or 3 bits, but both the way they work (don't need constant refreshing like DRAM) and the way they are addressed are completely different from RAM so they can not be compared.

 

So RAM holds 1 bit per cell. But even if there were more bits inside each cell the amount of addresses in the page table (what maps virtual memory addresses to the physical ones) would still just be 32 bits (not counting PAE) which would be 232 = 4GB in size.

You can have more memory if you want, but without being able to address it, it can't be used, which is what happens when you add let's say 8GB to a computer running 32bit version of Windows. It can tell that there is more RAM in the computer, but it can only address 4GBs of it (minus the addresses used for things like VRAM, host controller interfaces, and so on).

Link to post
Share on other sites

Oh bugger. I guess I can flex my Computer Engineering muscle here.

 

What does the number of bits in a processor mean?

Generally speaking, it's referring to the largest value that the integer execution unit (or rather, the ALU) is capable of processing in one instruction. This does not mean that a processor is only capable of crunching numbers of that size or smaller. 8-bit processors can calculate 16-bit values, but it takes at least two operations to do so. Generally this also means the registers, which are the bits of memory in a CPU, are also of that size, but not all the time.

 

I explicitly state the ALU size because processors can process other forms of data that is larger. Instructions for single-instruction, multiple-data (SIMD) operations have larger sized data operations and need registers that is much larger. The latest Intel architecture processors have 512-bit registers for SIMD operations, however, this does not mean it crunches on 512-bit numbers. It's a packed format, meaning there are multiple values within that register (likely 8 64-bit numbers, 16 32-bit numbers, 32 16-bit numbers, or 64 8-bit numbers), hence the "multiple data" part of SIMD.

 

What it also doesn't mean is address space size (32-bit Intel processors had 36-bit address spaces since the Pentium Pro and the 8086 has a 20-bit address space despite being a 16-bit processor, but this is a semi-complicated topic) or how big the data bus is (The Pentium has a 64-bit data bus).

 

 

(I was going to address the RAM part but I think that's been taken care of satisfactorily)

Edited by M.Yurizaki
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×