How large are processor registers?

Ben90

Platinum Member
Jun 14, 2009
2,866
3
0
So basically im understanding that registers are kinda the equivalent to a L0$ (not completely, but basically), So my question is how large exactly is the register in modern processors?

Also, does absolutely every calculation from the core need to hit the register first?
 

Borealis7

Platinum Member
Oct 19, 2006
2,914
205
106
DISCLAIMER: i'm just a lowly CompSci graduate, please don't flame me :)

a single register should be the size of a "Word". if i remember my "intro to EE" class correctly then today it would typically be 64 bits wide.

a register file would have many registers, i have no idea how many though, and the L0$ would have many register files.
registers are the fastest type of storage on the CPU, and therefore cost the most.
that's why you have several layers of "storage" in a computer, ranked according to "access time" from fastest to slowest:
registers, cache, RAM, HDD, physical media, networks, etc' etc'...

the problem with the top 3 types of storages i mentioned is that they are volatile.
meaning they lose their data once current stops flowing through them (you turn off the computer). so RAM for instance, will never replace HDDs no matter how much RAM we have, unless you want to go back to the 640k era where you had to reload everything onto your memory every time you turned on the computer.

but if we had Memristor RAM....*droooool*....(Wiki it)

for your second question, before an ALU can perform an operation on data from the CPU bus, it must be first copied from the bus to the ALUs operand register(s).

so an ADD operation would look something like this:

1) take the bits from the A operand
2) add them to the bits in the B operand, calculate carry over and all.
3) store the result in the C (or output) operand.

the C register is then "released" (dumped) into the bus for the next operation.

does this answer your questions?
 
Last edited:

Ben90

Platinum Member
Jun 14, 2009
2,866
3
0
Yep, answered basically everything. I was reading about them on wikipedia, and there were a couple things that didn't make sense to me, and i understand it now. :)
 

pm

Elite Member Mobile Devices
Jan 25, 2000
7,419
22
81
Since the original question is answered... a minor thread-hijack... why are memristors drool-worthy? Last time that I checked they were slow... faster than DRAM, but then DRAM isn't really a speed-demon. Compared to a 6T SRAM integer register file, memristors are several orders of magnitude slower and given their mechanism of operation I wouldn't think that they will be faster than silicon CMOS (drift velocities are a multiple orders of magnitude slower) without a major breakthrough. They are very small, and non-volatile, which is nice, but they are also incompatible with standard CMOS processing.
 

TuxDave

Lifer
Oct 8, 2002
10,572
3
71
for your second question, before an ALU can perform an operation on data from the CPU bus, it must be first copied from the bus to the ALUs operand register(s).

In software it sure looks like that BUT you can actually start operating on the data while it's on the way to the registers in hardware to reduce latency.
 

Zoomer

Senior member
Dec 1, 1999
257
0
76
It depends on what architecture is being discussed as well. Some ISAs allow ALU ops on data that resides in main memory.
 

Voo

Golden Member
Feb 27, 2009
1,684
0
76
a single register should be the size of a "Word". if i remember my "intro to EE" class correctly then today it would typically be 64 bits wide.
I'm not sure how it is implemented in hardware, but for example x87 floating point math is computed with 80bit accuracy and later truncated - but it's possible that they just reused existing registers, as MMX does.

But at least the SSE stuff uses its own 128bit registers, so there are some registers that are larger than the word size


But there are surely people here who know more about that stuff - I had to learn about MIPS, not IA32 or something ;)