SRAM is logically the more complex technology – requiring six transistors per bit – however, its electrical behaviour is simpler, so we will look at it first. An SRAM cell is shown in figure 15.2.
Four of the transistors are used to make a pair of inverters – NOT gates, essentially. Each inverter requires a pair of transistors – if the input is 0, then the p-type transistor will be on, and the n-type off. This will connect the output to power, which is equal to logic 1. Otherwise, if the input is 1, the output will be connected to ground, or logic 0. The two inverters are connected in a loop, with the output of one the input of the other.
This arrangement has two stable states: we interpret these two states as 1 and 0. The other two transistors are used to control reading and writing. To read the contents of the RAM cell, the word line is set high, allowing the contents of the cell to be read out to the bit line (and its inverse) to the not bit line. To write the cell, we again set the word line high, but this time we set the bit line (and its inverse) to the value we wish to store, forcing the cell into the appropriate state.