What is difference between register and memory?

Registers are storage locations internal the the processor. CPU instructions operate on these values directly. On RISC processors, all data
must be moved into a register before it can be operated. On CISC (Intel) chips, there are a few operations that can load data from RAM, process it,
and save the result back out, but the fastest operations work directly with registers.

Also, there are registers that are set aside for certain tasks, these generally include a program counter, stack, and flags.
Each register also has a size that determines the maximum amount of data that can be processed at a time. The registers on Pentium chips, for
example, are 32 bits.

Finally, there are generally only a few registers available on a processer. Intel chips, for example, have 6 general purpose registers, and several
specialized registers including a base register, stack register, flags register, program counter, and some addressing registers.

Memory, or RAM, is located external to the CPU. Generally speaking, data has to be loaded into a CPU register from memory before the CPU can process
it, RAM is much slower than registers, there is a lot more RAM than registers, and generally memory can be addressed on a byte boundaries, where registers
may not be able to access all the bytes in a register.

To summarize: in general, registers are temporary storage in the CPU that holds the data the processor is currently working on, while RAM holds the
program instructions and the data the program requires.

What is difference between register and memory?

4 thoughts on “What is difference between register and memory?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s