A small Python practice project that converts binary input into decimal form.
The current script uses a hard-coded list of bits, builds the matching powers of two, and prints the decimal result.
- Converts a list of
0and1values into a decimal number - Checks that the list contains only valid binary digits
- Shows the core conversion logic step by step in
simple_binary_decoder.py
simple_binary_decoder/simple_binary_decoder.py- main decoder scriptrequirements.txt- Python packages currently recorded for the environment
From the project folder:
python simple_binary_decoder/simple_binary_decoder.pyThe script currently decodes this value:
binary = [1, 0, 0, 1, 1, 0, 0, 1]To test another binary number, edit the binary list in simple_binary_decoder.py.
- Accept binary strings, such as
01001000 - Accept space-separated binary blocks, such as
01001000 01100101 - Decode binary into ASCII text
- Add functions and tests so the decoder is easier to reuse
This is part of a Python learning journey, so the project is intentionally small and will grow over time.