7 Segment display binary to decimal
It is not recommended lo leave logic inputs floating. You should use a pull-down / pull-up resistor (see Spehro Pefhany's comment).







simulate this circuit &ndash; Schematic created using CircuitLab

This circuit inputs low level by default (switch open). If you press the switch then it inputs high level.







simulate this circuit

This circuit inputs high level by default (switch open). If you press the switch then it inputs low level.