Why always 2^x in the computer industry, specifically GPUs?

OICAspork

Newcomer
I was just curious why everything is an exponent of two.

I'll start by using consoles as a general example before getting into graphics card hardware:

4-bit (Atari?), 8-bit (NES), 16-bit (SNES), 32-bit (PSX), etc.

That is just generally speaking, but in say, the r300 we have 8 pipes, and I hear people talking about going to 16. Unless I'm mistaken the R100 had two pipes, the R2xx had 4, and the R3xx have 8, which supports the exponential rise, and all other graphics cards I'm aware of also fall into one of those multiples. What is the reason for this... Is it impossible or difficult to go from 8 to 12 pipes, or is it just more cost efficent to double each time...

Then there is the memmory bus. ATI was the first successful high end (poor Parhelia) chip to support the feature with the launch of the 9700 line, and ATI hinted about raising the bar again next generation, while it seems insane to think that they would go so soon to the sort of board complexity that a 512-bit bus would entail... is it possible to add another 128-bits to have a 384-bit bus?

GPU's have been 256-bit for awhile now... and as far as I can tell don't seem to be showing signs of jumping higher any time soon... I figure the explanation for all these things are probably linked together (pipe-lines, memmory bus, etc)... and one answer will cover everything, but it is just something that has confused me...

And thanks for activating my account Dave!
 
There are 10 types of people in the world: Those who understand binary, and those who don't.

(And, yes, this actually is an answer to your question. I believe that ^2 is the most efficient in many cases because discrete logic is normally a binary operation, or at least is implemented using binary operations.)
 
flf said:
There are 10 types of people in the world: Those who understand binary, and those who don't.

Lol...took me a minute to get that. So I guess there's 11 types:

Those who get it, those who don't, and those who get it slowly. ;)
 
Joe DeFuria said:
flf said:
There are 10 types of people in the world: Those who understand binary, and those who don't.

Lol...took me a minute to get that. So I guess there's 11 types:

Those who get it, those who don't, and those who get it slowly. ;)

*laughs* I meant to end that post asking if it was because of binary... I was pretty sure that was the reason for the cpu/gpu progression, but didn't know if it would explain the pipelines (if the pipelines were fully independent would it matter?), and memmory bus.
 
For many things, the main reason is "it's easy to divide by a power of 2 in binary, but very hard to divide by anything else".

For example this is the main reason why textures are preferred to be powers of 2 in width/height.
 
Dio said:
For many things, the main reason is "it's easy to divide by a power of 2 in binary, but very hard to divide by anything else".

For example this is the main reason why textures are preferred to be powers of 2 in width/height.

But still, it should be easy to make cards with, say, 6 pipelines. I can't see why this should be more difficult than 4 or 8 pipelines, except that you might need resolutions which can be divided by 6. Also, things like 384bit memory bus (6x64bit for instance) sound possible - though it might be a tiny bit harder to divide the load on the memory bus evenly between all channels.
 
ZenBearClaw! said:
I might be crazy but i seem to remeber that the original radeon did things in sets of 3. Is this true?
Are you referring to the 3 texture units? Though it loos like the 3rd unit wasn't used much. IIRC there are also some restrections wrt texture filtering if you use all units.
In some way, that non-power-of-2 texture units is still present in R200/RV250 (as the former can apply 3 textures per pass per texture unit, the latter 6, even though they have power of two number of texture units, 2 and 1 respectively).
 
why is everything in powers of 2...

well, its cause electronics only understand on and off, or for you binary folks, 1s and 0s...

since a bit can either be 1 or 0, a base that could cover those 2 switches are all that is needed...and base 2 accomplishes that
 
Still applies to pipeline numbers. How do you allocate pixels to each pipeline - isn't there some kind of 'division' operation there? :)
 
A base 3 computer was built (ternary logic), but it's too complex and uses too much energy. Theoretically, from an information theory standpoint, base 3 is more optimal than base 2 (actually base E=base of natural logarithm is the most optimal, but we can't have fractional bases in digital logic)
 
Care to elaborate DC?

My first impulse was that getting only 50% more information for 100% larger signal to noise ratio is a poor deal.

Cheers
Gubbi
 
DemoCoder said:
A base 3 computer was built (ternary logic), but it's too complex and uses too much energy. Theoretically, from an information theory standpoint, base 3 is more optimal than base 2 (actually base E=base of natural logarithm is the most optimal, but we can't have fractional bases in digital logic)

And then there is the quantum computing with an infinite number of states between 0 an 1... o.o/ but that is a whole other can of worms!
 
Care to elaborate DC?

My first impulse was that getting only 50% more information for 100% larger signal to noise ratio is a poor deal.

IIRC in one of the Art of computer programming Knuth showed that a base 3 computer would be significantly faster than a base 2 computer. Depending on who you ask, base 3 computers are theoretically better but practically worse with current technology or you'll get people went with base 2 because that seems very natural with transistors and since things were very new people ran with it.

As for e, that'd be wicked for LOTS of different problems, if you've taken even an introductory calculus course which bothered to touch a bit upon applications of calculus you'd start seeing how useful it'd be to have e states.

And then there is the quantum computing with an infinite number of states between 0 an 1... o.o/ but that is a whole other can of worms!

But those are probabilistic so it's not quite the same.
 
Saem said:
As for e, that'd be wicked for LOTS of different problems, if you've taken even an introductory calculus course which bothered to touch a bit upon applications of calculus you'd start seeing how useful it'd be to have e states.
Err, yeah. Except for things that computers spend 99% of their time doing(counting and simple mathematics). Then it would just be a wicked nightmare.

I'm not exactly sure how you'd parse up e^n states for something like a switch statement.
 
Actually, the most popular audio DSPs (found in home A/V receivers) tend to operate on 24-bit fixed-point integer operands. (The I/O bus is still 8/16-bit on these things.) That's probably one of the few oddities in an otherwise 2^x digital-world!
 
Dio said:
Still applies to pipeline numbers. How do you allocate pixels to each pipeline - isn't there some kind of 'division' operation there? :)

Considering you have a three pixel pipelines design. The only viable fixed pattern is 3x1 (or 1x3) blocks. To simplify the design of memory controller, you may want to align the memory address with the pixel blocks (so it may have a 96 bits or 192 bits memory bus). Now, given a pixel coordinate, you have to find what block the pixel lies inside. You need a division operation for this.

This is just my thought so I could be very wrong :p
 
Assume you want to build a computer that can work on numbers as large as N. If it were binary, you'd need log_2(N) binary (2-state) components to store N.

Now generalize that. If I had a base B computer, I'd need log_b(N) b-state components to store N. Now, assume some "cost" function for the circuit complexity. It turns out that the cost function doesn't matter too much, but pick something reasonable such as the complexity cost of a b-state component is proportional to b. Thus, the total cost of a base-B computer capable of processing a number N is b * log_b(N)


So you have

(cost to store integer N on base B device)

Cost(b,N) = log_b(N) * b


Now try to find the minimum of this equation

Replace log_b(N) with ln N / ln B

we have

Cost(b,N) = ln N * b/ln b

derivative with respect to b

Cost'(b,N) = ln N * (ln b - 1)/(ln b)^2 = 0

Solve for b, you'll find b=e minimizes the equation


However, the difference between b=2, b=e, and b=3 isn't that large.

It turns out that while the amount of circuitry needed is somewhat reduced (higher density), the power consumption goes way up. If you assume, for example, that signals are representated by voltage level gaps, it takes much more energy to switch between -1 and 1 (skipping 0) than to switch between 0 and 1. So while we get a slight benefit (like 5%) in circuit density by going to ternary, we incur over 50% more energy in switching.
 
My 2 cents on the original question :

Designing for something that works for non-powers of 2 gets difficult with address calculations and things like that. Working with numbers that are powers of 2 are easy because of the simple binary math inherent.

I'm kinda echoing flf's comment though.
 
DemoCoder said:
A base 3 computer was built (ternary logic), but it's too complex and uses too much energy. Theoretically, from an information theory standpoint, base 3 is more optimal than base 2 (actually base E=base of natural logarithm is the most optimal, but we can't have fractional bases in digital logic)

I've seen a counter argument to this based on the physical requirements to implement different bases. To detect the 3 levels in base 3, you need to do 2 compares. I can't remember the details but I guess that the 'natural' choice would be to have e compatitors so if you round that up to 3, you end up with base 4 which brings us back to base 2.

I don't know if that's right though :)
 
Back
Top