Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Balanced ternary
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Addition, subtraction and multiplication and division == The single-trit addition, subtraction, multiplication and division tables are shown below. For subtraction and division, which are not [[Commutative property|commutative]], the first operand is given to the left of the table, while the second is given at the top. For instance, the answer to 1 β T = 1T is found in the bottom left corner of the subtraction table. :{| | :{| class="wikitable" style="width: 8em; text-align: center;" |+ Addition |- align="right" ! + !! T !! 0 !! 1 |- |- ! T | T1 || T || 0 |- ! 0 | T || 0 || 1 |- ! 1 | 0 || 1 || 1T |} | :{| class="wikitable" style="width: 8em; text-align: center;" |+ Subtraction |- align="right" ! β !! T !! 0 !! 1 |- ! T | 0 || T || T1 |- ! 0 | 1 || 0 || T |- ! 1 | 1T || 1 || 0 |} | :{| class="wikitable" style="width: 8em; text-align: center;" |+ Multiplication |- align="right" ! Γ !! T !! 0 !! 1 |- |- ! T | 1 || 0 || T |- ! 0 | 0 || 0 || 0 |- ! 1 | T || 0 || 1 |} | :{| class="wikitable" style="text-align: center;" |+ Division |- align="right" ! Γ· !! T !! 1 |- |- ! T | 1 || T |- ! 0 | 0 || 0 |- ! 1 | T || 1 |} |} ===Multi-trit addition and subtraction=== Multi-trit addition and subtraction is analogous to that of binary and decimal. Add and subtract trit by trit, and add the carry appropriately. For example: 1TT1TT.1TT1 1TT1TT.1TT1 1TT1TT.1TT1 1TT1TT.1TT1 + 11T1.T β 11T1.T β 11T1.T β + TT1T.1 ______________ ______________ _______________ 1T0T10.0TT1 1T1001.TTT1 1T1001.TTT1 + 1T + T T1 + T T1 ______________ ________________ ________________ 1T1110.0TT1 1110TT.TTT1 1110TT.TTT1 + T + T 1 + T 1 ______________ ________________ ________________ 1T0110.0TT1 1100T.TTT1 1100T.TTT1 ===Multi-trit multiplication=== Multi-trit multiplication is analogous to that of binary and decimal. 1TT1.TT Γ T11T.1 _____________ 1TT.1TT multiply 1 T11T.11 multiply T 1TT1T.T multiply 1 1TT1TT multiply 1 T11T11 multiply T _____________ 0T0000T.10T ===Multi-trit division=== Balanced ternary division is analogous to that of binary and decimal. However, 0.5<sub>dec</sub> = 0.1111...<sub>bal3</sub> or 1.TTTT...<sub>bal3</sub>. If the dividend over the plus or minus half divisor, the trit of the quotient must be 1 or T. If the dividend is between the plus and minus of half the divisor, the trit of the quotient is 0. The magnitude of the dividend must be compared with that of half the divisor before setting the quotient trit. For example, 1TT1.TT quotient 0.5 Γ divisor T01.0 _____________ divisor T11T.1 ) T0000T.10T dividend T11T1 T000 < T010, set 1 _______ 1T1T0 1TT1T 1T1T0 > 10T0, set T _______ 111T 1TT1T 111T > 10T0, set T _______ T00.1 T11T.1 T001 < T010, set 1 ________ 1T1.00 1TT.1T 1T100 > 10T0, set T ________ 1T.T1T 1T.T1T 1TT1T > 10T0, set T ________ 0 Another example, 1TTT 0.5 Γ divisor 1T _______ Divisor 11 )1T01T 1T = 1T, but 1T.01 > 1T, set 1 11 _____ T10 T10 < T1, set T TT ______ T11 T11 < T1, set T TT ______ TT TT < T1, set T TT ____ 0 Another example, 101.TTTTTTTTT... or 100.111111111... 0.5 Γ divisor 1T _________________ divisor 11 )111T 11 > 1T, set 1 11 _____ 1 T1 < 1 < 1T, set 0 ___ 1T 1T = 1T, trits end, set 1.TTTTTTTTT... or 0.111111111...
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)