|
Compare two 4-bit binary values to determine which is Greater than, Less than, or equal to! Because it’s serial, it’s also easily scalable and is well capable of comparing even bytes worth of data if you want, you only need to increase the size of the shift register(s) (which in real life would just mean a larger IC, here on EC it takes a little more to do that cause there’s logic gates involved that make up the shift register). However might be able to think of a way around it, if I can develop a memory topology that recycles slots.
To start the comparison, press the push button at the bottom (only necessary if it doesn’t automatically start with the sim). Make sure to reset the sim anytime you make changes or want to run the comparison again, otherwise there’s about a 75% probability that it won’t be accurate, as there’s no integrated reset logic currently, might make an update for that soon though. The output is the RGB LED, the color code is shown below, while all the other LEDs are basically for testing purposes.
**The Left set of bits is the Control, and the Right side of bits is being Compared to it**
**Uses a Shift Register that Shifts from MSB to LSB. When it has cycled through every bit, the output will display a color code representing the magnitude comparison between the two. The Seven segment displays are there to show the decimal number equivalent of the two binary inputs**
RGB Color Code:
1. Green is EQUAL (=)
2. Blue is GREATER THAN (>)
3. Red is LESS THAN (<)
|