The first example below shows the 16x8 case. Two 74F189 chips are used, each four bits wide. One chip stores the lower four bits of a byte, and the other chip stores the upper four bits. Since only sixteen locations are being addressed, the four address lines A0-A3 of each chip suffice and no additional decoding is needed.
The second example circuit is for the 32x4 case. Since the data bus is still four bits wide, the inputs (D0-D3) are paralled as well as the outputs (O0-O3) of each 74F189.
To address 32 locations instead of 16, one needs five address lines A0-A4 stead of four. The first four A0-A3 are paralleled together like the other lines. The fifth address line (A4), becomes the chip select for the two 74F189 chips. a 0 on the A4 line selects the first chip, and a 1 selects the second.
The last case, 32x8 is not shown but is simply a combination of the two circuits above. Four 74F189 chips are used.The inputs and outputs are set up as in the 16x8 case, but since there are four chips, two of the chip handle the low four bits and two of the chip handle the upper four bits. Like the 32x4 case, five address lines are used. The wiring for the fifth address line is as that circuit, except the first pair of chips (low, high) has their chip select lines connected together to the A4 line, and the second set of chips (low, high) has their chip select pins tied to inverter connected to the A4 line.