{"id":25171797,"url":"https://github.com/basemax/7segments","last_synced_at":"2025-04-03T21:24:31.699Z","repository":{"id":210913232,"uuid":"727182868","full_name":"BaseMax/7Segments","owner":"BaseMax","description":"This C project demonstrates a simple digit encoding and decoding mechanism using a digit struct composed of boolean values to represent segments of a digital display.","archived":false,"fork":false,"pushed_at":"2023-12-05T13:59:14.000Z","size":24,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-28T17:08:04.339Z","etag":null,"topics":["7segment","7segments","c","decode","digit-encoding","encode","encoding"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BaseMax.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-12-04T10:58:53.000Z","updated_at":"2023-12-05T21:36:36.000Z","dependencies_parsed_at":"2023-12-05T14:56:44.425Z","dependency_job_id":null,"html_url":"https://github.com/BaseMax/7Segments","commit_stats":null,"previous_names":["basemax/7segments"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2F7Segments","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2F7Segments/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2F7Segments/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2F7Segments/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BaseMax","download_url":"https://codeload.github.com/BaseMax/7Segments/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247080388,"owners_count":20880256,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["7segment","7segments","c","decode","digit-encoding","encode","encoding"],"created_at":"2025-02-09T09:22:07.967Z","updated_at":"2025-04-03T21:24:31.674Z","avatar_url":"https://github.com/BaseMax.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Digit Encoding and Decoding 7 Segments\n\nThis C project demonstrates a simple digit encoding and decoding mechanism using a digit struct composed of boolean values to represent segments of a digital display.\n\nThe project includes functionalities to encode integers (0-9) into a digit struct and decode a digit struct back into its corresponding integer. Additionally, it provides a function to convert the digit struct into a string representation.\n\n## Tests\n\n```\nEncoded to Decoded mapping:\nEncoded: 0 (1111110 - 0000001) =\u003e Decoded: 0\nEncoded: 1 (0110000 - 1001111) =\u003e Decoded: 1\nEncoded: 2 (1101101 - 0010010) =\u003e Decoded: 2\nEncoded: 3 (1111001 - 0000110) =\u003e Decoded: 3\nEncoded: 4 (0110011 - 1001100) =\u003e Decoded: 4\nEncoded: 5 (1011011 - 0100100) =\u003e Decoded: 5\nEncoded: 6 (1011111 - 0100000) =\u003e Decoded: 6\nEncoded: 7 (1110000 - 0001111) =\u003e Decoded: 7\nEncoded: 8 (1111111 - 0000000) =\u003e Decoded: 8\nEncoded: 9 (1111011 - 0000100) =\u003e Decoded: 9\n```\n\n## Usage\n\nTo use this project, you can follow these steps:\n\nCompilation:\n\nCompile the source code using a C compiler. For example:\n\n```\ngcc 7-segments.c -o digit_encoding7\n```\n\nRun:\n\nExecute the compiled binary:\n\n```bash\n./digit_encoding7\n```\n\n## Functions\n\n### `digit encode(int d)`\n\nEncodes an integer (0-9) into a digit struct composed of boolean values.\n\n### `int decode(digit d)`\n\nDecodes a digit struct back into its corresponding integer.\n\n### `char* digitToString(digit d)`\n\nConverts a digit struct into a string representation.\n\n#### Examples\n\nThe main function in the code demonstrates examples of encoding, decoding, and converting the digit struct into a string for integers 0-9.\n\n## Contributors\n\n- Max Base\n\n## License\n\nThis project is licensed under GPL3 See the [LICENSE] file for details.\n\nCopyright 2023, Max Base\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasemax%2F7segments","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbasemax%2F7segments","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasemax%2F7segments/lists"}