Shift (Ternary): Difference between revisions

From TernaryWiki
Jump to navigationJump to search
No edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 2: Line 2:


Register shift, shifts all trits to the left or right.
Register shift, shifts all trits to the left or right.
What is shifted in can be selected; negative, zero, positive.
What is shifted in can be selected; negative, zero, positive.


=== Logical ===
The shifted out trit is copied to the shift ALU flag.
Logical shifts exclude the ALU barrow/carry flag trit.


=== Arithmetic ===
There are Logical and Arithmetic shifts where the ALU barrow/carry flag trit is excluded or included.  
Arithmetic shifts include the ALU barrow/carry flag trit.


== Uses ==
A left shift will cube the result. A right shift will cube-root the result.
A left shift will cube the result. A right shift will cube-root the result.

Latest revision as of 23:15, 21 May 2025

Register Shift

Register shift, shifts all trits to the left or right.

What is shifted in can be selected; negative, zero, positive.

The shifted out trit is copied to the shift ALU flag.

There are Logical and Arithmetic shifts where the ALU barrow/carry flag trit is excluded or included.

A left shift will cube the result. A right shift will cube-root the result.