# ternary_computer **Repository Path**: caoctllo/ternary_computer ## Basic Information - **Project Name**: ternary_computer - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-08-26 - **Last Updated**: 2025-08-26 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README [![Rust](https://github.com/Trehinos/balanced-ternary/actions/workflows/rust.yml/badge.svg)](https://github.com/10555gff/ternary_computer) # Ternary Arithmetic A Rust library use array logic gate to arithmetic. a numeral system with digits `-1`, `0`, and `+1`. ## Installation Add this to your `Cargo.toml`: ```rust cargo add ternary_arithmetic ``` ### Example ```rust use ternary_arithmetic::ternary_io::Ternary; use ternary_arithmetic::logical_calculate::Digit; fn main() { let a = Ternary::parse("+0-+-+"); let b = Ternary::parse("+-+-+"); let result=&a + &b; result.digits_print(); let result=&a - &b; result.digits_print_t(); let result=&a * &b; result.digits_print(); let a = Ternary::parse("+-+-+-+-+++-+++-0++-000++--+-++-++-++++++++++++++-++++-+++--++++--0+++-++-+-++-++0+-0"); let b = Ternary::parse("+-+-+-+-+++-+++-0++-000++--+-++-+0+-0"); let c=&a / &b; println!("{}/{}={}",a.to_dec(),b.to_dec(),c.quotient.to_dec()); } ``` ## License This project is licensed under the MIT License.