We have recognized that 2D codes, i.e., a group of strongly connected neurosomes that can be simultaneously excited, are the basic data carriers for memory in a brain. An echoing mechanism between two neighboring layers of neurosomes is assumed to establish temporary memory, and repeating processes enhance the formation of long-term memory. Creation and degradation of memory information are statistically. The maximum capacity of memory storage in a human brain is estimated to be one billion of 2D codes. By triggering one or more neurosomes in a neurosome-based 2D code, the whole strongly connected neurosome network is capable of exciting simultaneously and projecting its excitation onto an analysis layer of neurons in cortex, thus retrieving the stored memory data. The capability of comparing two 2D codes in the analysis layer is one of the major brain functions.