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.

computer science

Description

CS240 Spring 2020 Project
DUE:  Midnight May 17, 2020

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:

 

1.      The circuit is to be implemented using sub-circuits as discussed in class. 

2.      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.

3.      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.

4.      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.

5.      This is NOT a team project.  Each student is expected to do his/her own work.

 

TURNING IN YOU PROJECT:

Your finished project should be a single Logisim CIRC file.  ZIP up this file and name it:  CS240_Lastname_Firstname.ZIP. (i.e. if your name is John Smith, the file name will be CS240_Smith_John.ZIP).  Upload this file to class’s Blackboard site.  Failure to follow these simple instructions will result in a deduction of 5 points.

Once you have uploaded your project, I highly recommend that you download and test it from another PC to make sure it works.  There have been instances in the past where a student uploaded files that did not work.  If it doesn’t work, I can’t grade it…


Related Questions in computer science category