Professional Documents
Culture Documents
Assignment #: 3
Section #: 16
Submitted by:
1. Ahmed Hafez El-Sayed, V23010322
2. Ahmed Gaber Mohamed, V23010611
3. Ahmed Mohamed Qorany, V23010564
4. Mostafa Khaled Fouad, V23010279
Date: 7/10/2023
Last experiment in lab4:
(Half adder + 7 segment decoder)
the code is as shown in lab 4 but I just modified the des�na�on of memory files to
fit my setup as shown in
the following screenshot:
the previous table shows us the input binary code and its related decoder output
and the number that will show on seven segment.
When I tested the code using ModelSim the output was correct :
Input 00 => output 0111111 => 0
But the output was totally wrong when input was 10 and 11
I have tried to modify the text file also but didn’t affect the result at all, and I s�ll
don’t know how to fix this problem.
Assignment:
4-bit Comparator using subtractor:
Our parameters
Here we test over flow flag in same way like zero flag
Simula�on Results:
I’ll be happy to know your advices to solve it and to improve code structure.