Skip to content

Commit

Permalink
Update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
orbisgloria committed Dec 2, 2024
1 parent 9af292b commit 9a13e94
Showing 1 changed file with 23 additions and 9 deletions.
32 changes: 23 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# trit

It's useful package for working with trinary logic in Go!
Package for working with three-valued (trinary) logic in Go.

Package defines the data type and basic operations of a ternary logic system, often referred to as trinary or ternary logic. It supports three states, namely False, Unknown, and True, with False represented by negative number (-1), Unknown represented by zero (0), and True represented by positive number (1).

Expand All @@ -13,15 +13,21 @@ There are also some useful methods provided for checking the state of a Trit val

Overall, this package can be beneficial in scenarios where a "maybe" or "unknown" state is needed, such as in database systems and logic circuits, and in the construction of trinary computers and balanced ternary systems.

## Quick start

Install package:

```shell
$ go get github.com/goloop/trit
## Installation
```bash
go get github.com/goloop/trit
```

Some examples of using the package:
## Features
- Three-valued logic operations (True, False, Unknown)
- Safe bool conversions with Unknown state handling
- JSON marshaling (Unknown → null)
- Thread-safe parallel operations for slices
- Zero allocations for basic operations
- Extensive test coverage
- Comprehensive truth tables documentation

## Quick Start

```go
package main
Expand Down Expand Up @@ -357,4 +363,12 @@ func main() {
}
```
This is a very simple and demonstrative example of using three-valued logic in everyday life.
This is a very simple and demonstrative example of using three-valued logic in everyday life.
## Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

0 comments on commit 9a13e94

Please sign in to comment.