This is a pure combinational design. This is a simple ALU (Arithmetic Logic Unit) whose output is connected to two different decorders, an Octal decoder for two 7 segments displays and an Gray decoder for the same two 7 segments displays. The output displays will show the result of the operations between two 3 bit numbers according to Sel_A_in and Sel_M_in.
The Sel_A_in has the following operations according to its value.
The Sel_M_in has the following operations.
Note: The Gray Decoder has been specially decoded to be shown in a decimal system for the 7 segments displays.
In order to test this device, you will need to input the numbers to the pin where Num_A_in and Num_B_in are located, this values go from 0 =3'b000 up to 7 = 3'b111. From this point forward modify the correponding bits on the correspondent selectors based on list displayed in How it works and see the result on the 7 segment displays (External).
For external hardware you'll need: . An external DC power source. . 14 330 ohms resistors. . 2 7 segments displays common cathode.
# | Input | Output | Bidirectional |
---|---|---|---|
0 | Sel_A_in [0] | Disp_out[6] | |
1 | Sel_A_in [1] | Disp_out[7] | Disp_out[0] |
2 | Num_B_in [0] | Disp_out[8] | Disp_out[1] |
3 | Num_B_in [1] | Disp_out[9] | Disp_out[2] |
4 | Num_B_in [2] | Disp_out[10] | Disp_out[3] |
5 | Num_A_in [0] | Disp_out[11] | Disp_out[4] |
6 | Num_A_in [1] | Disp_out[12] | Disp_out[5] |
7 | Num_A_in [2] | Disp_out[13] | Sel_M_in |