4 Bit Controlled Comparator
SPECIFICATIONS:
INPUTS:
Create a circuit in Logisim that will take the
following inputs:
A : 4 bit binary number
B : 4 bit binary number
C : Control where:
if C = 0, A and B will be treated as unsigned binary
if C = 1, A and B will be treated as 2’s complement signed
binary
(for example, the number 101 represents the value ‘5’ if it is
treated as unsigned binary, but it represents the value ‘-3’ if it
is treated as 2’s complement.)
OUTPUTS:
The circuit will compare the two numbers and send a
‘1’ to the corresponding output:
< : if A is less than B
= : if A is equal to B
> : if
A is greater than B
Your circuit will look something like this:
The circuit is to be implemented using sub-circuits as
discussed in class.
HINT: Your final circuit should contain an UNSIGNED
COMPARATOR. You will then need to make modifications to the outputs
of the UNSIGNED COMPARATOR to make it work with signed
numbers.
You may only use the basic gates: NOT, AND, OR, XOR. You may
use these gates to build larger sub-circuits of your own: ADDER,
MULTIPLEXER, etc. and incorporate these into your main
circuit.
You are not allowed to use Logisim’s built-in circuits: ADDER,
MULTIPLEXER, etc., but you are free to build your own using the
basic gates.