Content-addressable memory (CAM) is a type of computer memory that specializes in search operations; this has been used as hardware and as a data structure, but more often is hardware. Unlike random access memory (RAM), which functions by looking at a certain address, content-addressable memory finds a word in the entire structure. CAM is usually much faster than RAM, because it performs this entire search in one clock cycle, but as of 2011, it costs much more to manufacture. This memory is typically larger than RAM, but fewer transistors are required. Its increased cost means CAM typically is used as supplemental memory during sleep mode or is added to specialized computers.
RAM and content-addressable memory act similarly in that they both look up data, but they go about it differently. When someone searches with RAM, the user points toward a memory address and the RAM retrieves information from that address. With CAM, the user supplies what he or she is looking for, and the CAM searches through all memory addresses and returns all instances of the search query. The CAM also may return similar data words, because they may be useful.
CAM searches all the memory addresses in one clock cycle, instead of searching just one memory address, so it is typically faster than RAM. While it is faster, content-addressable memory costs more because it requires more circuits than RAM. This memory also uses more power overall, because it searches many more addresses at once and more power is needed to support this function.
CAM is typically larger than RAM, because of the many circuits needed for content-addressable memory to properly function. Most CAM hardware is about the size of a compact disc (CD), and the hardware tends to be circular. At the same time, it needs about half the transistors that RAM needs, because cells can share a transistor.
Its limitations mean CAM is typically not used as the main memory, even though it is faster. Instead, it is used to supplement RAM functions, especially during sleep mode. This keeps the computer from forgetting or losing data while in a prolonged sleep and tends to use less power than RAM does during sleep mode. Some specialized computers use CAM as the primary memory source, but these are often not released to the public because of their high costs. These specialized computers typically have massive databases that cannot be adequately searched with RAM, forcing the user to rely on CAM.