How to connect DIP switch in a circuit?
Like this:







simulate this circuit &ndash; Schematic created using CircuitLab

Serial In line resistor packs exist to make this easy.

Note TTL logic 7432 and 7408 needs 5V and will be killed by 9 volts, but you already know that from the answer to your question about why your chips didn't work.

(If you're using real TTL and not modern HC CMOS versions you can omit the pull-up resistors R1-R4)