Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
If you want to learn digital electronics it is best to get a good TTL data book such as the one by Texas Instruments and read it and re-read it. Get some simple 74 series logic gates and play about with them, build some simple projects. That is how I learned digital electronics anyway.
Assuming you mean physical switches, you can make some logic with them. Two switches in series are AND logic and in parallel are OR logic. If you add a relay you can do more as you can do inversion as well. A lot of machine control used to be done with switches and relays.
a transistor behaves exactly like a switch in digital electronics.
you must have already seen one logic gate in everyday life, made from switchs -- the switchs in a staircase at top and bottom, both of which control a single staircase light. These two switch's together work like an XOR logic gate. Each switch is an SPDT type.
Other logic functions can be made similarly using such switchs.