Open In App
Related Articles

What is Content-addressable Memory?

Improve Article
Save Article
Like Article

Content addressable memory (CAM) is a data storage device, that stores memory in cells. When any aspect of the memory is entered, the CAM compares the input with all the stored data. It is a high-speed technology. In CAM memories are not arranged in chronological order and are not packed in isolated modules.

CAM is used in very high-speed searching applications. It is also called associative memory, associative storage, or associative array.

Features of CAM:

  1. It is used in the database management system.
  2. It is also called Associative memory.
  3. CAM is expensive than RAM.
  4. CAM is suitable for parallel search.
  5. It returns the list of data word address that was located.

Working of CAM:

  1. Content-addressable memory (CAM) is a silicon chip for amazingly quick yet unmistakable kinds of memory queries.
  2. Queries utilizing a CAM is theoretically like cooperative exhibit rationale in data structures yet the yield is very streamlined.
  3. At the point when the key is passed to a CAM sub-framework, it restores the related incentive to that key. Because a “key -> esteem” pair is made that can be referenced further.
  4. The most significant element is that a query of a section in a CAM can be performed in a solitary clock cycle in the silicon.
  5. A RAM module that requires various clock cycles to make a solitary memory brings a CAM cell in the chip that comprises two SRAM cells.
  6. SRAM requires broad silicon entryways to actualize that require a great deal of intensity per door for quick exchanging.
  7. In a chip, control utilization creates heat and prompts constraints on warm scattering by the restricted impression of a chip.


  1. Whenever an address translation is needed use content addressable memory.
  2. Large priority of encodes will be replaced with the help of CAM’s 
  3. It allows switching to forward without flooding the traffic to all ports.
  4. Even though the timeout of CAM is 5 minutes, a frame is seen from a host is updated each time.
  5. It can be used as a search engine.


  1. CAM is accurate
  2. In one clock cycle, the input is associated with their memory contents.
  3. To increase the size of lookup tables, the CAM is cascaded.
  4. New entries can be added to the tables.
  5. It is one of the solutions for higher speeds.


  1. Cost is high
  2. Occupies large footprints
  3. Consumes more power.
  4. Tables updated simultaneously
  5. Frequently lookup the requests 

There are two basic forms of CAM- Content Addressable Memory (CAM)  and Ternary Content Addressable Memory (TCAM).

Similarities between CAM and TCAM:

  1. CAM and TCAM are specialized memory that is used for high-performance network equipment
  2. CAM and TCAM, both are used in-memory caches and translation lookaside buffers in modern CPUs.
  3. TCAM is the CAM version only.

Differences between CAM and TCAM:

1.The fullThe full form of CAM is Content Addressable MemoryThe full form of TCAM is Ternary content addressable memory.
2.CAM performs binary operationTCAM performs ternary operations.
3.Matches are based on 0 and 1 values and no bits are ignoredMatches are based on 0, 1, and X ( don’t care)
4.Returns a result as “HIT”Longest match returns “HIT”.
5.CAM is used for MAC address lookupTCAM is used for lookup where not all values in the key must have an exact match
6.CAM is useful for layer 2 security-related VPN segregation.TCAM is useful for layer 3 and layer 4 classification for QoS purposes.
7.CAM is used in Ethernet switchTCAM is used in routers.

Switching in CAM:

In multilayer switching, CAM is used for the purpose of switching frames to their destination. The switch takes care of the incoming frame source MAC address and enters it into the CAM table and stays there at 300 seconds before aging out. Generally, for security-related purposes, it is the default value. Suppose the device that is connected to the switch port moved to another port, then the switch records the incoming source MAC address, then updates the CAM table and removes its previous entry for the same MAC address.

Switching in TCAM:

In multilayer switches, all the matching process that ACLs provides is implemented in hardware called a TCAM. With TCAM a packet can be evaluated against an entire access list within a single table lookup. Switches use multiple TCAMs so that both inbound and outbound security and QoS ACLs can be evaluated simultaneously or entirely in parallel with layer 2 or layer 3 forwarding decisions.

Last Updated : 23 Nov, 2021
Like Article
Save Article
Similar Reads
Related Tutorials