If more than 4 digital inputs/outputs are needed, one solution is to use an 8-bit shift and store register such as the CD4094 integrated circuit. This chip has 8 output pins that can be set to high or low depending on the value of an 8-bit number stored in the chip's 8-bit storage register.