Here are picture about it:
In this example:
RAM: 60416 + 5120 = 65536KB / 1024 = 64MB
In your case:
Cisco CISCO2901/K9 (revision 1.0) with 483328K/40960K bytes of memory.
Processor board ID FTX1628837T
2 Gigabit Ethernet interfaces
4 Serial(sync/async) interfaces
1 terminal line
DRAM configuration is 64 bits wide with parity enabled.
255K bytes of non-volatile configuration memory.
3425968K bytes of USB Flash usbflash1 (Read/Write)
250880K bytes of ATA System CompactFlash 0 (Read/Write)
RAM: 483328 + 40960 = 524288KB / 1024 = 8192MB
About USB Flash: Using a USB flash drive with your Cisco router - TechRepublic
About DRAM: DRAM, RAM, NVRAM and FLASH
And also, for the sake of not-so-much-of-a-guesswork, I guess Cisco uses some proprietary DRAM modules. Would be interested to hear some extra on these
Depends on the device model. For example an 256mb ram module for C2801 is an SO-DIMM PC133S 2XR16, for C2900 series routers, you may use UDIMM ECC unbuffered PC2-4200E 1xR8, for ASA5510/5520/5540, you need UDIMM ubuffered PC-3200U 2Rx8 without ECC. If you buy such ram from cisco, it will be expensive, but there re many companies providing compatible ram, which is not so expensive.