How mostafakhfagy/5-bit-adder works
Project type and purpose
• This is a digital‐logic circuit design project, implemented in Logisim (.circ file).
• Purpose: build a 5-bit binary adder, display inputs/results on 7-segment LEDs, and use a control bit to switch between decimal and hexadecimal display modes.
File structure
• index.circ: the top‐level Logisim circuit.
• docs/: design specification and deliverables in Word/PDF.
• screens/: annotated screenshots of subcircuits and final layouts.
• README.md: outlines the architecture, subcircuits, and implementation steps.
Gather architectural insights from the README
• Hierarchical, modular design:
• Half Adder subcircuit → Full Adder subcircuit → 5-bit Adder
• 6×64 Decoder built from smaller decoders
• Seven separate “segment driver” circuits (A–G)
• Control Unit for decimal/hex toggling
• Final 7-segment display assemblies
• Inputs: two 5-bit numbers + control bit; Outputs: up to six 7-segment displays (operands and sum).
Main components and interactions
a. Components:
1. Input switches (two 5-bit buses + mode bit)
2. Half Adder (for LSB) + four Full Adders → 5-bit Adder (6-bit result)
3. 6×64 Decoder (built from smaller decoders + OR gates)
4. Seven Segment Drivers (one per segment A–G)
5. Control Unit (enables decimal vs. hex mapping)
6. Seven 7-segment Displays: two for operand A, two for operand B, two for result (plus carry if needed)
b. Data flow:
• Input switches → Adder → 6-bit sum bus → Decoder
• Decoder outputs → Segment Drivers + Control Unit → 7-segment displays
• Control bit → Control Unit → multiplexes decoder outputs between decimal/hex tables
c. Architectural patterns:
• Hierarchical composition of small combinational modules (HA, FA, decoder, OR networks)
• Data-path vs. control-path separation: the adder/decoder form the data path; the control unit gates display mapping
d. Key technologies:
• Logisim for circuit simulation
• Binary arithmetic (half/full adders)
• Decoder design and OR gate networks for segment mapping
• Multiplexing logic for decimal/hex switching