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
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.
https://vaibhavsagar.com/blog/2019/09/08/popcount/
LSB
MSB
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