# Binary to Hex Decoder Project
**Objective:**
The objective of this project is to design a combinational logic
control system that converts a 4-bit binary input into the appropriate
control signals for a seven-segment LED display. The system decodes binary
values corresponding to hexadecimal characters (1–F) and activates the
correct LED segments to visually represent each character.
---------------------------------------------------------------------------------------------------------
**Logic:**
The system receives a 4-bit binary input representing a hexadecimal value
between 1 and F. This input is typically generated by a counter or other
digital logic source. Based solely on the current input combination, the system
must determine which of the seven LED segments should be illuminated to correctly
display the corresponding hexadecimal character.
The system produces seven binary outputs, each corresponding to a specific LED
segment. A segment is illuminated when its output is logic high (1) and dimmed
when its output is logic low (0). Combinations of inputs are defined in the
truth table.
---------------------------------------------------------------------------------------------------------
**Input Variables:**
Counter Bit (A)
* A = 1 if the most significant counter bit is high
* A = 0 if the most significant counter bit is low
Counter Bit (B)
* B = 1 if the second counter bit is high
* B = 0 if the second counter bit is low
Counter Bit (C)
* C = 1 if the third counter bit is high
* C = 0 if the third counter bit is low
Counter Bit (D)
* D = 1 if the least significant counter bit is high
* D = 0 if the least significant counter bit is low
**Output Variables:**
Each output controls one segment of the seven-segment display.
Segments A - F (S)
* S = 1 if segment is illuminated
* S = 0 if segment is off
---------------------------------------------------------------------------------------------------------
**Truth Table:**
| Counter bits | | LED Segments | | Character |
|-------------------------------|-|------------------------------------------------------|-|-----------|
| A | B | C | D | |A | B | C | D | E | F | G | | |
|-------|-------|-------|-------|-|------|-------|-------|-------|-------|-------|-------|-|-----------|
| 0 | 0 | 0 | 1 | | 0 | 1 | 1 | 0 | 0 | 0 | 0 | | 1 |
| 0 | 0 | 1 | 0 | | 1 | 1 | 0 | 1 | 1 | 0 | 1 | | 2 |
| 0 | 0 | 1 | 1 | | 1 | 1 | 1 | 1 | 0 | 0 | 1 | | 3 |
| 0 | 1 | 0 | 0 | | 0 | 1 | 1 | 0 | 0 | 1 | 1 | | 4 |
| 0 | 1 | 0 | 1 | | 1 | 0 | 1 | 1 | 0 | 1 | 1 | | 5 |
| 0 | 1 | 1 | 0 | | 1 | 0 | 1 | 1 | 1 | 1 | 1 | | 6 |
| 0 | 1 | 1 | 1 | | 1 | 1 | 1 | 0 | 0 | 0 | 0 | | 7 |
| 1 | 0 | 0 | 0 | | 1 | 1 | 1 | 1 | 1 | 1 | 1 | | 8 |
| 1 | 0 | 0 | 1 | | 1 | 1 | 1 | 0 | 0 | 1 | 1 | | 9 |
| 1 | 0 | 1 | 0 | | 1 | 1 | 1 | 0 | 1 | 1 | 1 | | A |
| 1 | 0 | 1 | 1 | | 0 | 0 | 1 | 1 | 1 | 1 | 1 | | B |
| 1 | 1 | 0 | 0 | | 1 | 0 | 0 | 1 | 1 | 1 | 0 | | C |
| 1 | 1 | 0 | 1 | | 0 | 1 | 1 | 1 | 1 | 0 | 1 | | D |
| 1 | 1 | 1 | 0 | | 1 | 0 | 0 | 1 | 1 | 1 | 1 | | E |
| 1 | 1 | 1 | 1 | | 1 | 0 | 0 | 0 | 1 | 1 | 1 | | F |
---------------------------------------------------------------------------------------------------------
Loading
tt-block-input
tt-block-input
Loading
tt-block-output
tt-block-output
(click to edit)
A'C
BC
A'BD
AD'
AB'C'
A'B'D
A'B'C
A'CD
A
A'BC'D'
AB'D'
AC'D
Loading
tt-block-input
tt-block-input
Loading
tt-block-input
tt-block-input
B
A'B
AB'
C'D
B'D
C
Loading
tt-block-input
tt-block-input
AC'D'
B'CD
A'CD'
BCD'
BC'D
D
Loading
tt-block-input
tt-block-input
AD'
AB
AC
CD'
Loading
tt-block-input
tt-block-input
Loading
tt-block-input
tt-block-input
E
F
AC
AB'
BD'
A'BC'
CD'
B'C
AD
AB'
A'BC'
G