void setup() {
  // put your setup code here, to run once:


void loop() {
  // put your main code here, to run repeatedly:

This design implements "popcnt" on the dip switch
Digital InputBreakout
Digital OutputBreakout
This means the number of switches in the on position will get encoded as a binary number. After encoding, the number will be shown on the 7-segment display.
For more information on popcnt and why this is a useful thing to do please follow this link.
The number of on switches encoded in binary.
The number of on switches displayed in decimal.

ERC Warnings

gate23:B: Input pin not driven
gate26:B: Input pin not driven
gate33:B: Input pin not driven
gate36:B: Input pin not driven