A built-in self-test (BIST) circuit is configured to divide data output
bits of a RAM macro into a plurality of groups each consisting of 2 bits,
and provide a 1-bit comparator of a signature analyzer for each group to
share one 1-bit comparator by respective two data output bits. A selector
of a bit changer sequentially selects a data output bit from each group,
and the 1-bit comparator sequentially compares output data for the
selected data output bit with expected value data.