{"id":21406041,"url":"https://github.com/jes/ttgen","last_synced_at":"2025-04-16T03:56:27.273Z","repository":{"id":137662621,"uuid":"969567","full_name":"jes/ttgen","owner":"jes","description":"Truth-table generator for boolean logic expressions.","archived":false,"fork":false,"pushed_at":"2011-07-30T13:21:55.000Z","size":116,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T04:51:12.178Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jes.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-10-07T15:14:55.000Z","updated_at":"2023-10-23T16:01:34.000Z","dependencies_parsed_at":"2023-03-15T08:45:48.807Z","dependency_job_id":null,"html_url":"https://github.com/jes/ttgen","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jes%2Fttgen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jes%2Fttgen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jes%2Fttgen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jes%2Fttgen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jes","download_url":"https://codeload.github.com/jes/ttgen/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249193898,"owners_count":21228026,"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":[],"created_at":"2024-11-22T16:30:33.766Z","updated_at":"2025-04-16T03:56:27.253Z","avatar_url":"https://github.com/jes.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"ttgen is a program to generate truth tables for boolean logic expressions.\n\nCompile it with:\n$ cc -o ttgen ttgen.c\n\nWhen you run the program, you will receive no output initally. You are expected\nto enter a boolean expression, for example:\n  X \u0026 Y \u0026 !Z\nAnd ttgen will respond with the truth table:\n  X Y Z \n  T T T  F\n  F T T  F\n  T F T  F\n  F F T  F\n  T T F  T\n  F T F  F\n  T F F  F\n  F F F  F\n\nExit ttgen by giving EOF on stdin (usually with ^D), or by killing the program\nin any way (e.g. with ^C).\n\nOperators available:\nSymbol   Synonym   Operator\n!        NOT       Logical negation\n|        OR        Logical or\n\u0026        AND       Logical and\n^        XOR       Logical xor\n         NAND      Logical nand (NOT (X AND Y))\n         NOR       Logical nor (NOT (X OR Y))\n-\u003e       IMP       Logical implication ((NOT A) OR B)\n=        EQU       Logical equivalence\n\nIn addition, parentheses are supported and operator synonyms are case\ninsensitive.\nVariable names may consist of letters, numbers, underscore and single quote(').\nThe latter is allowed so that variables like X' (X prime) may be used.\n\nThe variables are shown in the table in the order in which they appeared in\nyour expression. If you wish to change this order, you may use slashvars mode.\n  /Z Y X\n  X \u0026 Y \u0026 !Z\nAnd ttgen responds with:\n  Z Y X \n  T T T  F\n  F T T  T\n  T F T  F\n  F F T  F\n  T T F  F\n  F T F  F\n  T F F  F\n  F F F  F\n\nSlashvars mode is easiest to understand (and is, in fact, implemented) as if\nthe variables given on the slashvar line were present at the start of the\nexpression. This means that if you miss some variables out in your slashvar\nline they can still be used with no problem in the expression, and also that if\nsome variables in the slashvar line are not present in the expression they will\nstill appear in the truth table:\n  /X Y\n  Y \u0026 Z\nttgen responds:\n  X Y Z \n  T T T  T\n  F T T  T\n  T F T  F\n  F F T  F\n  T T F  F\n  F T F  F\n  T F F  F\n  F F F  F\n\nSlashvars mode is entered when a / is encountered as the first token on a line,\nand all variables are immediately cleared. This means that if you specify two\nslashvar lines without an expression in between, only the second slashvar line\nwill actually apply:\n  /X Y Z\n  /Y Z\nttgen responds:\n  Y Z \n  T T  T\n  F T  F\n  T F  F\n  F F  F\nNote no X variable in the output.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjes%2Fttgen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjes%2Fttgen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjes%2Fttgen/lists"}