 In typical usage on a circuit board the resistors would be physically located at the top of the columns and connected to the input pin.The rows would then be connected directly to the input pin bypassing the resistor.The first setup is suitable only when identical LEDs are used, whereas in the second configuration with individual resistors, the resistors make it possible to mix different kinds of LEDs by providing each with its appropriate resistor.