i am just setting up my Digital input switches, reading the installation manual for the card

if i want to switch digital input 1 then i wire pin 2 though switch and 100Kohm resistor and wired and grounded to pin 8.

just before i wire all these up is this correct or is the below correct.

I initally thought it would have been wire fron pin 1 +10v thought switch wire to pin 2 without resistor but from the instruction i take this is not cottect.