Skip to content

Commit 59c077a

Browse files
committed
Update readme with truth table example
1 parent 3b63599 commit 59c077a

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ A simple boolean expression parser written in C#. It parses boolean expressions
77

88
- [Running](#running)
99
- [Building](#building)
10+
- [Display](#display)
1011
- [Usage](#usage)
1112
- [Expressions](#expressions)
1213
- [Variables](#variables)
@@ -29,6 +30,25 @@ After downloading a release from the Releases section to the right, you can run
2930
To build the project, you'll need .NET 6 installed. You can then build the project with `dotnet build` or run it with `dotnet run`. Alternatively, you can open the project in Visual Studio or Visual Studio Code, the latter of which has config in the repo.
3031

3132

33+
## Display
34+
35+
The application displays an intuitive truth table output for each boolean expression:
36+
```
37+
┏━━━━━━━━┳━━━━━━━┓ ┏━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┓
38+
┃ A B ┃ A.B ┃ ┃ A B C ┃ (!A.B)[XOR]C ┃
39+
┣━━━━━━━━╋━━━━━━━┫ ┣━━━━━━━━━━━╋━━━━━━━━━━━━━━━━┫
40+
┃ 0 0 ┃ 0 ┃ ┃ 0 0 0 ┃ 0 ┃
41+
┃ 0 1 ┃ 0 ┃ ┃ 0 0 1 ┃ 1 ┃
42+
┃ 1 0 ┃ 0 ┃ ┃ 0 1 0 ┃ 1 ┃
43+
┃ 1 1 ┃ 1 ┃ ┃ 0 1 1 ┃ 0 ┃
44+
┗━━━━━━━━┻━━━━━━━┛ ┃ 1 0 0 ┃ 0 ┃
45+
┃ 1 0 1 ┃ 1 ┃
46+
┃ 1 1 0 ┃ 0 ┃
47+
┃ 1 1 1 ┃ 1 ┃
48+
┗━━━━━━━━━━━┻━━━━━━━━━━━━━━━━┛
49+
```
50+
51+
3252
## Usage
3353

3454
Run `./BooleanExpressionParser <args>` from the command line. `args` is a list of boolean expressions to parse. If no arguments are given, the program will prompt you to enter them into the console.

0 commit comments

Comments
 (0)