pete > courses > CS 202 Spring 24 > Tier 2, Phase 1, Problem 03: exactly two ones


Tier 2, Phase 1, Problem 03: exactly two ones

You will construct a circuit with 4 inputs that outputs 1 if exactly two of those four inputs is 1 and 0 otherwise. So if the four inputs are 0, 0, 1, 1, then the output should be one; but if the four inputs are 0, 1, 1, 1, then the output should be zero.

Submission Requirements

You will submit a single Logisim-Evolution circuit file and a single text file containing tests that verify your circuit’s correctness. The name of the circuit file must be two_ones.circ and the name of the test file must be test-vector.txt. The circuit within must have exactly four inputs, labeled "A", "B", "C", and "D", respectively, and one output, labeled "two_ones".

You are limited to the following Logisim components (though you are not required to use them all):

Submission Instructions

Copy the two_ones.circ and test-vector.txt files to weathertop and then run:

$ 202 submit t2p1p03 two_ones.circ
$ 202 submit t2p1p03 test-vector.txt

Submissions will not be accepted after 2pm on Wednesday, 28 February.

Last modified: